Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Why not use Flash?

oh wait. that would be too easy.

If you're having to use Flash for IE anyway, why not just build it once? You're only going to have to maintain this for the next 5 years of browser updates every time something changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top