3 <script src=
"media-file.js"></script>
6 if (window
.testRunner
) {
7 testRunner
.waitUntilDone();
11 video
= document
.getElementsByTagName('video')[0];
12 video
.src
= findMediaFile("video", "content/test");
14 canvas
= document
.getElementsByTagName('canvas')[0];
15 ctx
= canvas
.getContext('2d');
18 video
.addEventListener("canplay", function (e
) {
19 ctx
.globalAlpha
= 0.5;
20 ctx
.drawImage(video
, 0, 0);
22 if (window
.testRunner
) {
23 testRunner
.notifyDone();
29 <body onload=
"onLoad();">
30 <video></video><canvas width=
"320px" height=
"240px" style=
"position:relative;left:-100px;"> </canvas>