OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>Test effective playback rate with a MediaController.</title> | |
5 <script src="media-file.js"></script> | |
6 <script src="video-test.js"></script> | |
7 <script> | |
8 var start = function() | |
9 { | |
10 findMediaElement(); | |
11 video.src = findMediaFile("video", "content/test"); | |
12 | |
13 // Set the rate on the media element so playback won't move forw ard. | |
14 video.playbackRate = 0; | |
15 | |
16 waitForEvent("canplay",canplay); | |
17 }; | |
18 | |
19 var canplay = function() | |
20 { | |
21 // Assign a mediaGroup so a controller is created. | |
22 video.mediaGroup = "group"; | |
philipj_slow
2014/06/17 12:10:54
Just video.controller = new MediaController() also
acolwell GONE FROM CHROMIUM
2014/06/17 16:55:18
Done.
| |
23 | |
24 // Verify the controller playback rate is 1. This | |
25 // means the "effective playback rate" is 1 even though | |
26 // the HTMLMediaElement's playbackRate attribute is 0. | |
27 testExpected("video.controller.playbackRate", 1); | |
28 testExpected("video.playbackRate", 0); | |
29 | |
30 // Initiate playback and verify that time moves forward. | |
31 run("video.play()"); | |
32 waitForEventOnce("play", play); | |
33 }; | |
34 | |
35 var play = function() | |
36 { | |
37 waitForEventOnce("timeupdate", timeupdate); | |
38 }; | |
39 | |
40 var timeupdate = function() { | |
41 testExpected("video.currentTime", 0, "!="); | |
42 endTest(); | |
43 }; | |
44 </script> | |
45 </head> | |
46 <body onload="start()"> | |
47 <video controls></video> | |
philipj_slow
2014/06/17 12:10:54
The controls attribute doesn't seem needed for the
acolwell GONE FROM CHROMIUM
2014/06/17 16:55:18
Done.
| |
48 </body> | |
49 </html> | |
OLD | NEW |