HTML and CSS Reference
Video and the Canvas
The HTML video object already has a poster property for displaying an image before the
video starts to play, as well as functions to autoplay and loop . So why is it necessary to pre-
load the video? Well, as we alluded to in the previous section, simply playing a video is one
thing—manipulating it with HTML5 Canvas is quite another. If you want to start manipulat-
ing video while it is displayed on the canvas, you first need to make sure it is loaded.
In this section, we will load video and then manipulate it in various ways so that you can see
how powerful Canvas can be when it is mixed with other HTML5 elements.