Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What to do with the incompatibilities in HTML 5 audio across browsers?

Tags:

html

audio

codec

I need to use HTML 5 audio to play sounds. However, the codec support is very irritating:

  • Firefox: Ogg, Wav
  • Safari: Mp3, Wav
  • Chrome: Ogg, Mp3
  • Opera: Wav

I basically need to encode in Wav and Ogg/Mp3. However, Wav's are terrible in size and that is very crucial point for me. So, I guess I should go for Mp3 + Ogg leaving Opera and IE out?

like image 256
Tower Avatar asked Feb 20 '10 17:02

Tower


People also ask

Which audio format is not supported by HTML5?

aLaw audio format is not supported by HTML5 audio tag.

Which audio format is supported by HTML5?

There are three supported audio formats in HTML: MP3, WAV, and OGG.

Is audio supported in HTML5?

HTML5 Audio is a subject of the HTML5 specification, incorporating audio input, playback, and synthesis, as well as speech to text, in the browser.


2 Answers

According to: http://my.opera.com/core/blog/2009/12/31/re-introducing-video, Opera 10.5 (still in alpha/beta) supports Vorbis and PCM Wav for audio. I don't believe 10.10 actually supports the audio tag.

Safari would support Vorbis (and Theora on the video side) if Apple ever bothered to include support for Xiph's codecs in the QuickTime framework (you can add it manually, of course, with XiphQT, but you obviously can't count on it for web dev purposes).

In any case, Vorbis clearly has the most coverage (Chrome has more of the market than Safari now, Opera is about half of Safari, and obviously FF is huge), and it doesn't really have the strong opposition that Theora has. I could actually see Vorbis support in Safari happening in the near future, unlike Theora.

like image 56
Kelly Clowers Avatar answered Sep 22 '22 22:09

Kelly Clowers


I think you have answered your own question. Since you are already leaving out IE why not leave out Opera too? You could then use Ogg/MP3 for the others and maybe get away with some simple flash for IE/Opera.

like image 38
smaclell Avatar answered Sep 21 '22 22:09

smaclell