indow.webkitURL.crea
video.src = window.webkitURL.createObjectURL(stream);
video.play();
}
function error(err) {
alert('video error: ' + err)
}
//canvas
var context = canvas.getContext('2d');
setTimeout(function(){
//把当前视频帧内容渲染到画布上
context.drawImage(video, 0, 0, 640, 480);
}, 5000);
//捕获并保存帧内容
function captureAndSaveFrame(www.laipuhuo.com){ console.log(context);
preFrame = curFrame;
context.drawImage(video, 0, 0, 640, 480);
curFrame = canvas.toDataURL; //转为base64并保存
video.play();
}
function error(err) {
alert('video error: ' + err)
}
//canvas
var context = canvas.getContext('2d');
setTimeout(function(){
//把当前视频帧内容渲染到画布上
context.drawImage(video, 0, 0, 640, 480);
}, 5000);
//捕获并保存帧内容
function captureAndSaveFrame(www.laipuhuo.com){ console.log(context);
preFrame = curFrame;
context.drawImage(video, 0, 0, 640, 480);
curFrame = canvas.toDataURL; //转为base64并保存
全部评论
相关推荐
03-04 17:32
上海新闻出版职业技术学校 Java 点赞 评论 收藏
分享
03-04 00:14
九江职业大学 C++ 点赞 评论 收藏
分享
02-13 01:27
Java
WVVW888:不会的 java全身心投入 从今天开始 拼到4月中 然后4月初开始投 4.5月可以拿offer的 甚至6月可以捡漏 点赞 评论 收藏
分享
查看16道真题和解析 点赞 评论 收藏
分享