Cornel Marian
Cornel Marian

Reputation: 2503

What are the supported formats for embedding audio in HTML5?

I recently read that HTML 5 comes with a standard way of embedding audio files. I need to use this feature but I don't know which are the supported files.

<audio controls>
<source src="track.mp3" type="audio/mpeg">
</audio>

Only mpeg ?

Thanks

Upvotes: 1

Views: 135

Answers (3)

Beniamin Szabo
Beniamin Szabo

Reputation: 1929

Internet Exploree: MP3
Chrome: MP3, WAV, OGG
Firefox: WAV, OGG
Safari: MP3, WAV
Opera: WAV, OGG

Find More

Upvotes: 2

Bud Damyanov
Bud Damyanov

Reputation: 31829

The tag is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari.

Note: Internet Explorer 8 and earlier versions, do not support the tag. The tag defines sound, such as music or other audio streams.

Currently, there are 3 supported file formats for the element: MP3, Wav, and Ogg:

Browser MP3 Wav Ogg
IE      YES NO  NO
Chrome  YES YES YES
Firefox NO  YES YES
Safari  YES YES NO
Opera   NO  YES YES

Update: Firefox 21 running on Windows 7, Windows 8, Windows Vista, and Android now supports MP3.

MIME Types for Audio FormatsFormat MIME-type

MP3 audio/mpeg
Ogg audio/ogg
Wav audio/wav

Upvotes: 5

r3mainer
r3mainer

Reputation: 24557

The supported formats are MP3, WAV and Ogg. You'll need to include at least two of these if you want to support all the major browsers.

Upvotes: 3

Related Questions