summaryrefslogtreecommitdiff
path: root/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html')
-rw-r--r--extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html b/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html
new file mode 100644
index 00000000..8c0f8e9d
--- /dev/null
+++ b/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html
@@ -0,0 +1,35 @@
+<html>
+ <head>
+ <script type="text/javascript" src="../../../mwEmbedStartup.php"></script>
+ </head>
+ <body>
+ <h2>mwEmbed / archive.org server side seek</h2>
+ Start Playing at <input id="startTime" size="5" value ="50"></input> seconds. <input value="go" type="button" id="doPageSeek"></input></br>
+ <video id="vid1" poster="http://www.archive.org/download/night_of_the_living_dead/format=Thumbnail&x.jpg"
+ style="width:400px;height:300px" durationHint="5717.21">
+ <source src="http://www.archive.org/download/night_of_the_living_dead/night_of_the_living_dead_512kb.mp4"/>
+ <source src="http://www.archive.org/download/night_of_the_living_dead/night_of_the_living_dead.ogv"/>
+ </video>
+ <script type="text/javascript">
+ mw.ready( function(){
+ // check for hash:
+ var urlParts = new mw.Uri ( document.URL);
+ if( urlParts.anchor ){
+ // run the start offset:
+ var startTime = urlParts.anchor.split('=')[1];
+
+ //update the input box:
+ $j('#startTime').val( startTime );
+
+ // update current time then play:
+ $j('#vid1')[0].currentTime = startTime;
+ $j('#vid1')[0].play();
+ }
+ // bind button:
+ $j('#doPageSeek').click(function(){
+ document.location = 'Player_Seek.html?' + Math.random(1) + '#start=' + $j("#startTime").val();
+ });
+ });
+ </script>
+ </body>
+</html>