[xiph-commits] r3061 - liboggplay/trunk/plugin/test

tahn at svn.annodex.net tahn at svn.annodex.net
Tue Jun 26 02:40:08 PDT 2007


Author: tahn
Date: 2007-06-26 02:40:08 -0700 (Tue, 26 Jun 2007)
New Revision: 3061

Modified:
   liboggplay/trunk/plugin/test/test.html
Log:
Added keys for skipping.


Modified: liboggplay/trunk/plugin/test/test.html
===================================================================
--- liboggplay/trunk/plugin/test/test.html	2007-06-26 09:35:55 UTC (rev 3060)
+++ liboggplay/trunk/plugin/test/test.html	2007-06-26 09:40:08 UTC (rev 3061)
@@ -79,8 +79,8 @@
 </td><td>
 <i>Miscellanea</i><br>
 <tt>&nbsp; </tt><input type="button" value="Clear CMML" onclick='clearCMML()'/><br>
-<tt>] </tt><input type="button" value="Skip +1 sec" onclick='Skip(1000)'/><br>
-<tt>[ </tt><input type="button" value="Skip -1 sec" onclick='Skip(-1000)'/><br>
+<tt>] </tt><input type="button" value="Skip +1 sec" onclick='skip(1000)'/><br>
+<tt>[ </tt><input type="button" value="Skip -1 sec" onclick='skip(-1000)'/><br>
 </td></tr>
 </table>
 </form>
@@ -244,14 +244,6 @@
   output.value = "Movie length at " + i + ": " + plugin.getMovieLengthAt(i);
 }
 
-function Skip(ms) {
-  var t = plugin.getPlayPosition() + ms;
-  if (t < 0) t = 0;
-  output.value =
-    "Skipping to " + t + " ms\n" +
-    (plugin.setPlayPosition(t) ? "Succeeded" : "Failed");
-}
-
 function RegisterCMMLCallback() {
   if (api.cbCMML.checked) {
     plugin.registerCMMLCallback(
@@ -374,6 +366,8 @@
     case "N": SetPlayPositionWithinMovie();  break;
     case "A": RetrieveAnnotationsAt();  break;
     case "L": GetMovieLengthAt();  break;
+    case "]": skip(1000);  break;
+    case "[": skip(-1000);  break;
     case ".": changeSelectedMovie(1);  break;
     case ",": changeSelectedMovie(-1);  break;
   }
@@ -403,6 +397,14 @@
     }
   }
 }
+
+function skip(ms) {
+  var t = plugin.getPlayPosition() + ms;
+  output.value =
+    "Skipping to " + t + " ms\n" +
+    (plugin.setPlayPosition(t) ? "Succeeded" : "Failed");
+}
+
 </script>
 
 </center>



More information about the commits mailing list