5 <title>local video</title>
7 <script src=media-file.js></script>
8 <script src=video-test.js></script>
12 var startedPlayback = 0;
15 function canplaythrough()
17 // Cache the duration, seek to 0.2 seconds
18 duration = video.duration;
19 testExpected("video.duration", 0, '>');
20 testExpected("video.currentTime", 0);
21 run("video.currentTime = 0.3");
28 testExpected("video.currentTime.toFixed(1)", 0.3);
30 run("video.playbackRate = -1");
31 startedPlayback = true;
37 if (startedPlayback && video.currentTime == 0) {
38 // Make sure the duration is still valid
39 testExpected("video.duration", 0, '>');
48 waitForEvent("error");
49 waitForEvent('canplaythrough', canplaythrough);
50 waitForEvent('seeked', seeked);
51 video.addEventListener("timeupdate", timeupdate);
53 video.src = findMediaFile("video", "content/test");
60 <video controls autobuffer></video>
61 <p>Tests that duration is not set to zero when playing in reverse to the origin.</p>
62 <script>start()</script>