Chapter 17. Audio and Video
In the early days of the Internet, websites were about as jazzy as an IRS form. You’d see pages filled with an assortment of plain text, links, and more plain text. Over time, the Web matured, and web pages started to change as designers embraced the joys of color, pictures, and tacky clip-art. But when that excitement started to wear off, it was time for a new trick—multimedia.
Multimedia is a catchall term for a variety of technologies and file types, all of which have dramatically different computer requirements and pose different web design challenges. Multimedia includes everything from the irritating jingle that plays in the background of your best friend’s home page to the wildly popular video clip of a cat playing the piano. (Depressing fact: That cat has over 20 million views, you’re unlikely to ever create a web page that’s half as popular.)
In this chapter, you’ll consider how to use several types of multimedia. First, you’ll learn to play background music and put a snazzy MP3 player on a web page. Then you’ll embed video—first using ordinary HTML, and then using the new, but not-quite-ready <video> element in HTML5. Finally, you’ll see how you can avoid some serious headaches by hosting your video files on YouTube.
Note
Before you go any further, take a moment to consider the worst examples of multimedia abuse. These include flashing banner ads, irritating background music, time-wasting intro pages, and bandwidth-sucking commercials. Before you ...
Get Creating a Website: The Missing Manual, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.