Chapter 6Audio the HTML5 Way

Audio on a web page can serve a number of needs: music, lectures, webcasts, and even just sound effects for some spookier or odd web sites (it’s all in the ambience).

The audio element in HTML5 is very much like the video tag, except for the obvious difference of no visuals. It is a native element, eliminating the need for a third-party player. Like the video element, the audio element can be styled with CSS (although if it is so altered as to not be recognizable as an audio player, up comes a red flag of bad design).

Another approach you can take is to not show the audio player at all! The audio element can be on a web page, but made invisible, as will be demonstrated in this chapter. Why might you want to do this? ...

Get HTML5 Multimedia Developer's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.