r51452 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51451‎ | r51452 | r51453 >
Date:07:26, 4 June 2009
Author:j
Status:deferred
Tags:
Comment:
update seek example
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/example_usage/seeking_example.html (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/seeking_example.html
@@ -1,7 +1,7 @@
22 <!doctype html>
33 <html>
44 <head>
5 - <title>Video element properties</title>
 5+ <title>mv_embed Seeking Example</title>
66 <script type="text/javascript" src="../mv_embed.js"></script>
77 <style>
88 #render_box {
@@ -20,7 +20,7 @@
2121 </style>
2222 <script>
2323 var pos = 0;
24 -var duration = 10;
 24+var duration = 2;
2525 var step = 0.04;
2626 var render = false;
2727
@@ -28,7 +28,7 @@
2929 $j('#pos').val(pos);
3030 document.getElementById('render_box').setCurrentTime(pos, function(currentTime) {
3131 return function() {
32 - //call ogg.addFrame();
 32+ //ogg.addFrame('frame_overlay');
3333 pos += step;
3434 if(render && pos <= duration)
3535 renderNext();
@@ -37,15 +37,24 @@
3838 }
3939
4040 function startRender() {
 41+ //ogg = new Firefogg();
 42+ //ogg.initRender('{"videoQuality": 10, "framerate": 25, "width": 400, "height": 300}', 'sample_smil.ogv');
 43+ $j("#buttonStart").attr("disabled", true);
4144 if(!render) {
42 - duration = document.getElementById('render_box').getDuration();
43 - render = true;
44 - pos = 0;
45 - renderNext();
 45+ //document.getElementById('render_box').play();
 46+ //document.getElementById('render_box').pause();
 47+ setTimeout(function() {
 48+ //duration = document.getElementById('render_box').getDuration();
 49+ render = true;
 50+ pos = 0;
 51+ renderNext();
 52+ }, 1000);
4653 }
4754 }
4855 function stopRender() {
4956 render = false;
 57+ $j("#buttonStart").attr("disabled", false);
 58+ $j("#buttonSop").attr("disabled", true);
5059 }
5160 function seek() {
5261 var seekTo = $j('#pos').val();
@@ -58,8 +67,8 @@
5968 <div id="frame_overlay"></div>
6069
6170 <div id="info" style="position: absolute; top:360px">
62 - <button onclick="startRender()">Start</button>
63 - <button onclick="stopRender()">Stop</button>
 71+ <button onclick="startRender()" id="buttonStart">Start</button>
 72+ <button onclick="stopRender()" id="buttonStart">Stop</button>
6473 position: <input type="text" id="pos" value="6.6" />
6574 <button onclick="seek()">seek</button>
6675 <span id="status"></span><br>

Status & tagging log