HTML and CSS Reference
In-Depth Information
Video on the Canvas Examples
In the last section, we learned that the video playing on the canvas and the video embedded
with the <video> tag are, in fact, the same video. It took a lot more code to play the video on
the canvas than it did to embed and play the video in JavaScript. This begs the question: why
load video onto the canvas at all?
Well, sometimes simply displaying a video and playing it is not enough. You might want
events to occur as the video is playing, or perhaps you want to use transformations on it, use
it in a game, create custom video controls, or animate it and move it on the canvas.
The following five examples will show you in very specific detail why the canvas can be an
exciting way to display video.
Search WWH ::




Custom Search