upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / media / video-canvas-alpha.html
1 <html>
2  <head>
3   <script src="media-file.js"></script>
4
5   <script>
6     if (window.layoutTestController) {
7       layoutTestController.waitUntilDone();
8     }
9
10     function onLoad() {
11       video = document.getElementsByTagName('video')[0];
12       video.src = findMediaFile("video", "content/test");
13     
14       canvas = document.getElementsByTagName('canvas')[0];
15       ctx = canvas.getContext('2d');
16
17       video.load();
18       video.addEventListener("canplay", function (e) {
19         ctx.globalAlpha = 0.5;
20         ctx.drawImage(video, 0, 0);
21
22         if (window.layoutTestController) {
23           layoutTestController.notifyDone();
24         }
25       }); 
26     }
27   </script>
28  </head>
29  <body onload="onLoad();">
30    <video></video><canvas width="320px" height="240px" style="position:relative;left:-100px;"> </canvas>
31  </body>
32 </html>