Reputation: 2503
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
Reputation: 1929
Internet Exploree: MP3
Chrome: MP3, WAV, OGG
Firefox: WAV, OGG
Safari: MP3, WAV
Opera: WAV, OGG
Upvotes: 2
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
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