1、使用canvas对video元素进行截图
function getVideoFrame(video){ const canvas = document.createElement("canvas"); canvas.width = video.videoWidth; canvas.height =video.videoHeight; canvas.getContext("2d").drawImage(video, 0, 0); return canvas.toDataURL("image/png"); }
标签:视频,截图,image,canvas,获取,video From: https://www.cnblogs.com/hyt09/p/17445735.html