| Current File : /home/jvzmxxx/wiki1/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Seek.html |
<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>