1.已经在pc上实现了在canvas中播放video标签的视频,现在在手机上进行测试,发现无法播放了2.` var fps = 1000/30; // 1/30秒var videoObj = document.getElementById("sec4-video");var canvasObj = document.getElementById("sec4-canvas");
var ctx=canvasObj.getContext('2d');
videoObj.addEventListener('play', function() { var i=window.setInterval(function() {
ctx.drawImage(videoObj,0,0,400,400);},fps);
},true);`<div class="slide-wrap"> <video autoplay loop id="sec4-video">
<source src="video/world-home-flat.mp4" type="video/mp4">
</video>
<canvas id="sec4-canvas" width="400" height="400"></canvas>
</div>
添加回答
举报
0/150
提交
取消