npapi-vlc | branch: master | Daniel Amm <[email protected]> | 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 <[email protected]> > 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() _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
