Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
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 Element.......................................................................


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 element nested within your



FIGURE 14.9
A

Free download pdf