O'Reilly logo

HTML5 Multimedia Developer's Guide by Lee Cottrell, Ken Bluttman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required