【发布时间】:2017-02-14 13:34:33
【问题描述】:
我尝试将视频帧复制到我的画布。我在 Android 平板电脑 (v4.4.4) 上使用 Chrome (v46)。
第一帧画得很好,但第二帧画得不好。
JS:
document.addEventListener('DOMContentLoaded',function() {
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var video = document.getElementById('video');
video.addEventListener('timeupdate',function(){
ctx.drawImage(video,0,0);
},false);
},false);
HTML
<video id="video" autoplay controls muted preload>
<source src="http://video.webmfiles.org/big-buck-bunny_trailer.webm" type="video/webm" />
</video>
有什么想法吗?
【问题讨论】:
标签: android google-chrome video canvas frame