[vlc-devel] [PATCH 14/17] test.html: improve demo for getting current position/time
Daniel Amm
da2424 at t-online.de
Sun Jun 14 00:35:50 CEST 2015
The existing method 'doGetPosition() has returned the time instead of the position.
Now there are two own methods for getting time and position.
---
share/test/test.html | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/share/test/test.html b/share/test/test.html
index 639dd14..a16efb7 100755
--- a/share/test/test.html
+++ b/share/test/test.html
@@ -368,6 +368,7 @@ function close()
</td>
<td style="text-align:right">
<input type="button" value="get position" onClick='doGetPosition();'>
+ <input type="button" value="get time" onClick='doGetTime();'>
</td>
</tr>
<tr>
@@ -491,9 +492,16 @@ function doGetPosition()
{
var vlc = getVLC("vlc");
- // set slider to new position
if( vlc )
- alert( "position is " + vlc.input.time);
+ alert( "position is " + vlc.input.position );
+}
+
+function doGetTime()
+{
+ var vlc = getVLC("vlc");
+
+ if( vlc )
+ alert( "time is " + vlc.input.time );
}
function doGetRate()
--
2.1.4
More information about the vlc-devel
mailing list