我能在画布(canvas)上绘制矩形。但是它被视频所遮挡,我只能从侧面看到它。请建议我如何才能将它绘制在视频上,就像我可以在图像上绘制一样。这是我正在使用的代码:
<p>Video to use:</p>
<video id="video1" controls width="270" autoplay>
<source src="http://www.craftymind.com/factory/html5video/BigBuckBunny_640x360.ogv" type="video/ogg"/>
</video>
<p>Canvas (the code draws the current frame of the video every 20 millisecond):</p>
<canvas id="myCanvas" width="270" height="135" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
></canvas></div>
请在以下链接查看我的jsfiddle:http://jsfiddle.net/mummydaddy/LjqbuLne/