[vlc-devel] [PATCH 09/17] test pages: fix working of play/pause button

Daniel Amm da2424 at t-online.de
Sun Jun 14 00:35:45 CEST 2015


---
 share/test/test.html       | 3 +++
 share/test/windowless.html | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/share/test/test.html b/share/test/test.html
index 920d93d..6154ca9 100755
--- a/share/test/test.html
+++ b/share/test/test.html
@@ -707,7 +707,10 @@ function doPlayOrPause()
     var vlc = getVLC("vlc");
     if( vlc )
     {
+        if( vlc.playlist.isPlaying )
             vlc.playlist.togglePause();
+        else
+            vlc.playlist.play();
     }
 }
 
diff --git a/share/test/windowless.html b/share/test/windowless.html
index c464cda..0598024 100755
--- a/share/test/windowless.html
+++ b/share/test/windowless.html
@@ -419,7 +419,11 @@ function doPlayOrPause()
     var vlc = getVLC("vlc");
     if( vlc )
     {
+        if( vlc.playlist.isPlaying )
             vlc.playlist.togglePause();
+        else
+            vlc.playlist.play();
+    }
 }
 
 function doStop()
-- 
2.1.4




More information about the vlc-devel mailing list