You are previewing HTML5 Foundations.

HTML5 Foundations

Cover of HTML5 Foundations by Matthew West Published by John Wiley & Sons
O'Reilly logo

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 ...

The best content for your career. Discover unlimited learning on demand for around $1/day.