ptg16476052
Embedding Video Using <video> 399
14
Finally, if you’re fairly certain that most people who come to your page will want to
view the video, but you want to let them play the video themselves, you may want to
include the preload attribute, which tells the browser to go ahead and download the
video when the page loads but to wait for the user to play the video. Usually this means
users will not have to wait as long to see the video after they try to play it, but the disad-
vantage is that you’ll use bandwidth sending the video to everyone, whether or not they
actually play the movie.
Using the
There is one major drawback to using the
To embed a single video file, you can use the src attribute of the video tag. To provide
videos in multiple formats, use the
type='video/mp4; codecs="avc1.42E 01E, mp4a.40.2"'>
type='video/ogg; codecs="theora, vorbis"'>
FIGURE 14.9
A
a different aspect
ratio than the
embedded video
file.