HTML5 Canvas [96]
Figure 6-2 shows what a video with controls looks like in Google Chrome.CH6EX2: Basic HTML5 Video With Controls
Figure 6-2. HTML5 video embed with controls
You can see the full code in Example 6-2.
Example 6-2. HTML video with controls, loop, and autoplay
(Autoplay, Loop, Controls)
Altering the Width and Height of the Video
In our first example, we showed how you could embed a video without changing the default width or height. However, there are many good reasons why you might want to change the default width and height of a video in the HTML page, such as fitting it into a particular part of the page, or enlarging it so it is easier to see. Similar to embedding an image into HTML with the tag, a video will scale to whatever width and height you provide in the