[vlc-commits] test pages: fix working of play/pause button

Daniel Amm git at videolan.org
Sun Jun 14 00:58:26 CEST 2015


npapi-vlc | branch: master | Daniel Amm <da2424 at t-online.de> | Sun Jun 14 00:35:45 2015 +0200| [268ed518851a6b72595a99a5fbdbc69822532003] | committer: Jean-Baptiste Kempf

test pages: fix working of play/pause button

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=268ed518851a6b72595a99a5fbdbc69822532003
---

 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 100644
--- 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 100644
--- 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()



More information about the vlc-commits mailing list