3 <script src=../../media-resources/media-file.js
></script>
4 <script src=../../media-resources/video-test.js
></script>
6 var file
= findMediaFile("video", "http://127.0.0.1:8000/resources/test");
8 function createVideo() {
9 var video
= document
.createElement("video");
10 document
.body
.appendChild(video
);
12 waitForEvent('loadedmetadata');
13 waitForEvent('loadeddata');
14 waitForEvent('canplay');
17 function firstCanPlayThrough() {
18 document
.body
.removeChild(video
);
20 waitForEventOnce('canplaythrough', endTest
);
21 run("video.src = file");
26 waitForEventOnce('canplaythrough', firstCanPlayThrough
);
27 run("video.src = file");
31 <body onload=
"init()">