4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
12 var videos = document.getElementsByTagName('video');
15 run('controller = video.controller');
16 controller.addEventListener('canplaythrough', canplaythrough, true);
17 var src = findMediaFile('video', 'content/test');
22 function canplaythrough() {
23 consoleWrite("EVENT(canplaythrough)");
24 controller.removeEventListener('canplaythrough', canplaythrough, true);
25 controller.addEventListener('playing', playing, true);
26 run('controller.play()');
30 consoleWrite("EVENT(playing)");
31 controller.removeEventListener('playing', playing, true);
32 testExpected('controller.paused', false);
33 controller.addEventListener('ended', ended, true);
34 run('controller.currentTime = 5');
35 testExpected('video.currentTime', 5);
36 testExpected('video2.currentTime', 5);
40 consoleWrite("EVENT(ended)");
41 controller.removeEventListener('ended', ended, true);
46 <body onload="start()">
47 <video mediaGroup="group" controls></video>
48 <video mediaGroup="group" controls></video>