I have a video that I would like to draw inside canvas. I am not really sure how to go about doing this. Can anyone demonstrate how to do this through JavaScript? Here is the code I have already:
function load(){
//Code to do this will go in here
}
<video id="video" height="800" style="width: 100%;" onloadstart="load()">
<source src="video.mp4" type="video/mp4" />
<source src="video.ogg" type="video/ogg" />
<source src="video.webm" type="video/webm" />
<img src="images/video.jpg" height="800" style="width: 100%;" />
</video>
<canvas>???</canvas>
I have been to a few sites like this one:http://html5doctor.com/video-canvas-magic/ that show how to do this but I was not able to get it to work. I also do not really need the extra features it provides I would just like a simple video inside canvas. Also, if I implement this on a page, do I have to hide the video element so that there isn't two videos on a page? Thank you.