[vlc-commits] test.html: remove reverse mode, display current rate instead

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


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

test.html: remove reverse mode, display current rate instead

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

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

 share/test/test.html |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/share/test/test.html b/share/test/test.html
index 6aee558..f9716d6 100644
--- a/share/test/test.html
+++ b/share/test/test.html
@@ -316,7 +316,7 @@ function close()
             <input type="button" value="Stop" onClick='doStop();'>
              
             <input type="button" value=" << " onClick='doPlaySlower();'>
-            <input type="button" value="Reverse" onClick='doReverse();'>
+            <span id="rateTextField" style="text-align:center">1x</span>
             <input type="button" value=" >> " onClick='doPlayFaster();'>
              
             <input type="button" value="Fullscreen" onClick='getVLC("vlc").video.toggleFullscreen();'>
@@ -495,11 +495,11 @@ function doGetPosition()
         alert( "position is " + vlc.input.time);
 }
 
-function doReverse(rate)
+function doGetRate()
 {
     var vlc = getVLC("vlc");
     if( vlc )
-        vlc.input.rate = -1.0 * vlc.input.rate;
+        document.getElementById("rateTextField").innerHTML = vlc.input.rate + "x";
 }
 
 function doAudioChannel(value)
@@ -740,14 +740,20 @@ function doPlaySlower()
 {
     var vlc = getVLC("vlc");
     if( vlc )
+    {
         vlc.input.rate = vlc.input.rate / 2;
+        doGetRate();
+    }
 }
 
 function doPlayFaster()
 {
     var vlc = getVLC("vlc");
     if( vlc )
+    {
         vlc.input.rate = vlc.input.rate * 2;
+        doGetRate();
+    }
 }
 
 function doMarqueeOption(option, value)



More information about the vlc-commits mailing list