OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>Test currentTime for media controller when media fragments are ad ded consicutively.</title> | |
philipj_slow
2014/09/16 12:27:15
Media fragments aren't being added consecutively i
amogh.bihani
2014/09/16 13:46:01
I wanted to test whether the new media element see
philipj_slow
2014/09/16 19:18:15
Thanks, the updated test is easier to understand.
| |
5 </head> | |
6 <body> | |
7 <video controls></video> | |
philipj_slow
2014/09/16 12:27:15
The controls attribute is probably not needed here
amogh.bihani
2014/09/16 13:46:01
Done.
| |
8 <video controls></video> | |
9 <script src=media-file.js></script> | |
10 <script src=video-test.js></script> | |
11 <script> | |
12 videos = document.getElementsByTagName("video"); | |
13 video = videos[0]; | |
14 video2 = videos[1]; | |
15 | |
16 var src = findMediaFile("video", "content/test"); | |
17 video.src = src + "#t=2"; | |
18 video.mediaGroup = "group"; | |
19 video2.mediaGroup = "group"; | |
20 controller = video.controller; | |
21 | |
22 setTimeout(function() { | |
philipj_slow
2014/09/16 12:27:15
In general, never use setTimeout unless there's no
amogh.bihani
2014/09/16 13:46:01
Done.
| |
23 video2.src= src; | |
24 }, 500); | |
25 | |
26 video.addEventListener("loadeddata", function() { | |
27 testExpected("video.currentTime", 2); | |
28 testExpected("video2.currentTime", 0); | |
29 }); | |
30 video2.addEventListener("loadeddata", function() { | |
31 testExpected("video.currentTime", 2); | |
32 testExpected("video2.currentTime", 2); | |
33 endTest(); | |
34 }) | |
35 </script> | |
36 </body> | |
37 </html> | |
OLD | NEW |