December 2011
Intermediate to advanced
480 pages
10h 42m
English
Like the new video element, the new audio element allows you to embed an audio file into the page without the need for an additional plug-in like Flash. No longer having to rely on these third-party plug-ins, audio plays natively in modern web browsers, including browsers on many mobile devices.
In this chapter, you will learn the basics of the audio element and then look at ways to solve cross-browser issues. Then you will learn about the API available to see how you can create your own audio player.
audio ElementFor a basic example of how to put audio on a page using the new audio element, take a look at the code in Listing 8.1. The controls attribute has been added; otherwise, ...