HTML5 Audio Tag Mess

by Hugh

Good news: in the new HTML5 spec, you don’t need Flash or another plugin to play audio files from standards compliant browsers. Instead, you can put your audio link between <audio> tags, and all should be well.

New releases of Safari, Chrome, Firefox, and Opera all support the audio tag.

Bad news: Safari, Chrome, Firefox and Opera all support the tag, but they don’t all support the same codecs – or kinds of audio files. Here, from HTM5 Doctor, is a list of current support:

HTML5 browser codec support

Man.

You can solve the problem by offering all the codecs between the tags, so:


<audio>
<source src="librivox.ogg" />
<source src="librivox.mp3" />
<source src="librivox.wav" />
</audio>

Anyone have a better explanation for such a jumble?