diff options
Diffstat (limited to 'extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_ServerSeek.html')
-rw-r--r-- | extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_ServerSeek.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_ServerSeek.html b/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_ServerSeek.html new file mode 100644 index 00000000..6a9d7d04 --- /dev/null +++ b/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_ServerSeek.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 URLTimeEncoding='true' src="http://www.archive.org/download/night_of_the_living_dead/night_of_the_living_dead_512kb.mp4"/> + <source URLTimeEncoding='true' 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_ServerSeek.html?' + Math.random(1) + '#start=' + $j("#startTime").val(); + }); + }); + </script> + </body> +</html> |