chapter eleven

Adding Video and Audio

The website you have been building for Joe’s Pizza Co. looks pretty good so far, but it would look even better if it included a video. In this chapter, you update the About page, adding a short video with some custom playback controls that you build yourself. When the video is in place, you learn how you can make video and audio content more accessible by adding subtitles to your multimedia content.

Until recently, embedding video and audio within a web page required the use of a third-party plug-in, such as Adobe Flash or Microsoft Silverlight. The result was a fragmented ecosystem of plug-ins that users had to install, manage, and upgrade, often confusing less tech-savvy individuals. This approach also meant that developers had less control over their video content.

The capability to create custom playback controls or special effects required the use of proprietary software such as Adobe Flash Professional. Even when developers did take the leap and purchase this considerably expensive software, they still had to learn a whole new programming language, ActionScript, in order to achieve what they desired.

Fortunately, HTML5 introduces a new way of embedding video and audio into web pages. Using the new <video> and <audio> elements, developers can now add multimedia content to their websites as easily as they can add images or text. Hurray!

Converting Video and Audio Files

Before you can start adding video and audio to your web pages, you ...

Get HTML5 Foundations 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.