[vlc-devel] [PATCH 12/17] test.html: remove reverse mode, display current rate instead

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


---
 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 100755
--- 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)
-- 
2.1.4




More information about the vlc-devel mailing list