我正在尝试像这样捕获视频帧作为图像:
http://appcropolis.com/using-html5-canvas-to-capture-frames-from-a-video/
我的简单代码:
var video = document.getElementById("video");
var bottom = document.getElementById("bottom");
var canvas = document.createElement('canvas');
canvas.width = 500;
canvas.height = 282;
var ctx = canvas.getContext('2d');
ctx.drawImage(video, 0, 0, 500, 282);
bottom.innerHTML = '';
bottom.appendChild(canvas);
在IE中表现很好,但在Chrome上画布总是变黑...
演示在这里:
http://html5-canvas-test.vipserv.org/
有什么办法可以修复这个问题吗?