2

Can somebody advise a single audio format to maximize compatibility between desktop browsers?

The program isn't audio driven and I consider audio and extra bonus.

Mikhail
  • 7,749
  • 11
  • 62
  • 136
  • Also: [What to do with the incompatibilities in HTML 5 audio across browsers?](http://stackoverflow.com/q/2303032/38108) (2010-02-20) and [What Options Are There for Cross-Browser Compatible Audio?](http://stackoverflow.com/q/13147951/38108) (2012-10-30) – Graham Perrin Jan 10 '13 at 14:04

2 Answers2

2

The most common format that is utilized by most browsers is .wav Audio Formats and Browser Support. However with html 5 you can always specify fallbacks for browser that might not support that format e.g

<audio controls>
   <source src="horse.wav" type="audio/wav">
   <source src="horse.ogg" type="audio/ogg">
   <source src="horse.mp3" type="audio/mpeg">
   Your browser does not support the audio element.
</audio>
Mikhail
  • 7,749
  • 11
  • 62
  • 136
Mario Dennis
  • 2,986
  • 13
  • 35
  • 50
2

There is no single audio format that works cross-browser. MP3 is supported by Safari, Chrome and IE9+, whereas Firefix and Opera both support WebM (and Ogg but WebM is better).

There are plans for Firefox to eventually support MP3 I hear, but I don't know when that is.

You could also use a library such as MediaElementJS which will automatically fallback to using Flash to play an audio file if the browser doesn't support it.

Ian Devlin
  • 18,534
  • 6
  • 55
  • 73