4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
8 var seekedEventCount = 0;
11 function seekIncrement()
13 // We want to verify that seeking by an increment smaller than the test movie's time scale
14 // (the smallest unit of time in that file) succeeds. test.mp4 has a time scale of 2500,
15 // 0.0004 seconds, so start with that and decrease by half each time.
25 if (++seekedEventCount == 8) {
33 function attemptSeek()
35 var increment = seekIncrement();
36 consoleWrite("<br>** Seeking by " + increment);
37 video.currentTime += increment;
43 video.src = findMediaFile("video", "content/test");
45 waitForEvent('canplaythrough', attemptSeek);
46 waitForEvent('seeked', seeked);
47 waitForEvent('seeking');
49 waitForEvent('pause');
54 <video controls></video>
55 <p>Test seeking by very small increments.</p>
56 <script>start()</script>