blob: b6376bf8632059d2b82c9f49eea676789feea901 [file] [log] [blame]
<html>
<head>
<script src="../media/media-file.js"></script>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
}
function onLoad() {
video = document.getElementsByTagName('video')[0];
video.src = findMediaFile("video", "../media/content/test");
canvas = document.getElementsByTagName('canvas')[0];
ctx = canvas.getContext('2d');
video.load();
video.addEventListener("canplay", function (e) {
ctx.globalAlpha = 0.5;
ctx.drawImage(video, 0, 0);
if (window.testRunner) {
testRunner.notifyDone();
}
});
}
</script>
</head>
<body onload="onLoad();">
<video></video><canvas width="320px" height="240px" style="position:relative;left:-100px;"> </canvas>
</body>
</html>