Supported Formats

Here is a quick chart to show you which audio formats are supported by which browsers. We are not going to use version numbers here, because we assume the latest version of each product:

Platform

.ogg

.mp3

.wav

Chrome

X

X

X

Firefox

X

 

X

Safari

 

X

X

Opera

X

 

X

Internet Explorer

 

X

 

The situation is much like that of the <video> tag. To support <audio>, we will need to use multiple separate formats for each piece of audio we want to play. To be on the safe side, we will use three formats: .mp3, .ogg, and .wav. At this point, we will probably never see Opera and Firefox support for .mp3 files. The license fee associated with the format is prohibitive for those browsers.

Get HTML5 Canvas, 2nd Edition 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.