[vlc-commits] test pages: show current state after buffering
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:43 2015 +0200| [f5913acb7ac27ccccbba7884033ecc50962482da] | committer: Jean-Baptiste Kempf
test pages: show current state after buffering
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=f5913acb7ac27ccccbba7884033ecc50962482da
---
share/test/test.html | 11 +++++++++++
share/test/windowless.html | 11 +++++++++++
2 files changed, 22 insertions(+)
diff --git a/share/test/test.html b/share/test/test.html
index 116fe22..56af9b5 100644
--- a/share/test/test.html
+++ b/share/test/test.html
@@ -107,7 +107,18 @@ function handle_MediaPlayerOpening()
function handle_MediaPlayerBuffering(val)
{
+ var vlc = getVLC("vlc");
+
document.getElementById("info").innerHTML = val + "%";
+
+ if( vlc && val == 100 )
+ {
+ // display the current state after buffering
+ if( vlc.playlist.isPlaying )
+ onPlay();
+ else
+ onPause();
+ }
}
function handle_MediaPlayerPlaying()
diff --git a/share/test/windowless.html b/share/test/windowless.html
index 32d69da..ea5dd2f 100644
--- a/share/test/windowless.html
+++ b/share/test/windowless.html
@@ -111,7 +111,18 @@ function handle_MediaPlayerOpening()
function handle_MediaPlayerBuffering(val)
{
+ var vlc = getVLC("vlc");
+
document.getElementById("info").innerHTML = val + "%";
+
+ if( vlc && val == 100 )
+ {
+ // display the current state after buffering
+ if( vlc.playlist.isPlaying )
+ onPlay();
+ else
+ onPause();
+ }
}
function handle_MediaPlayerPlaying()
More information about the vlc-commits
mailing list