4 <title>Test effective playback rate with a MediaController.
</title>
5 <script src=
"media-file.js"></script>
6 <script src=
"video-test.js"></script>
11 video
.src
= findMediaFile("video", "content/test");
13 // Set the rate on the media element so playback won't move forward.
14 video
.playbackRate
= 0;
16 waitForEventOnce("canplay",canplay
);
19 var canplay = function()
21 video
.controller
= new MediaController();
23 // Verify the controller playback rate is 1. This
24 // means the "effective playback rate" is 1 even though
25 // the HTMLMediaElement's playbackRate attribute is 0.
26 testExpected("video.controller.playbackRate", 1);
27 testExpected("video.playbackRate", 0);
29 // Wait for the seek initiated by the "bringing up to speed"
31 waitForEventOnce('seeked', seeked
);
34 var seeked = function()
36 // Initiate playback and verify that time moves forward.
38 waitForEventOnce("playing", playing
);
41 var playing = function()
43 waitForEventOnce("timeupdate", timeupdate
);
46 var timeupdate = function()
48 testExpected("video.currentTime", 0, "!=");
53 <body onload=
"start()">