4 <script src=media-file.js
></script>
5 <script src=video-test.js
></script>
13 var videos
= document
.getElementsByTagName('video');
16 run('controller = video.controller');
17 controller
.addEventListener('canplaythrough', canplaythrough
, true);
18 var src
= findMediaFile('video', 'content/test');
23 function canplaythrough()
25 consoleWrite("EVENT(canplaythrough)");
26 controller
.removeEventListener('canplaythrough', canplaythrough
, true);
27 controller
.addEventListener('playing', playing
, true);
28 run('controller.play()');
33 consoleWrite("EVENT(playing)");
34 controller
.removeEventListener('playing', playing
, true);
35 controller
.addEventListener('pause', pause
, true);
36 run('controller.pause()');
40 consoleWrite("EVENT(pause)");
41 controller
.removeEventListener('pause', pause
, true);
42 controller
.addEventListener('playing', playingAgain
, true);
43 run('controller.play()');
46 function playingAgain()
48 consoleWrite("EVENT(playing)");
49 testExpected('controller.playbackState', 'playing');
50 controller
.removeEventListener('playing', playingAgain
, true);
56 <body onload=
"start()">
57 <video mediaGroup=
"group" controls
></video>
58 <video mediaGroup=
"group" controls
></video>