Question

Which browsers support the html 5 <audio> tag on Windows today?

Edit: Trying http://moztw.org/demo/audioplayer/ as a test. Chrome 2, and Safari 4 not working for me.

Was it helpful?

Solution

Safari 3.1+ and Firefox 3.5 both support the audio element. Opera 10 does not support the audio element though it does support an older version of it in the form of an Audio object. Chrome 3 will likely support the audio element.

(Just saw you wanted to know support for that specific page. That mostly depends on the codecs you are using I'm afraid.)

(Disclaimer: I work for Opera and am a member of the HTML WG.)

OTHER TIPS

if this evaluates to true:

!!document.createElement('audio').canPlayType

, then you have audio tag support in your browser. Doing a feature detect like this is a lot better than parsing userAgent strings.

Alternatively, you can use something like Modernizr to handle this detect and many others for you.

Our blog post.

Contains more up to date information on modern browser support for HTML5 audio.

As of July 2011

IE9

Supports MP3 and AAC

Firefox 5

Supports Ogg and Wav

Chrome 12

Supports Ogg, MP3, Wav and AAC

Safari 5

Supports MP3, AAC and WAV

Opera 11

Supports Ogg and Wav

As you can see from the data above and from reading the blog post, it's a bit of a frustrating situation as there isn't one audio format supported by all browsers. There's no immediate sign of any resolution yet either.

I put together a list of when the browsers started supporting the audio tag and which audio formats they support.

The support is pretty good now. Since IE9, the latest versions of all the desktop browsers and most the mobile browsers support the audio tag. The only reason not to use it, would be to support old versions of IE, but you can always provide a fallback if that's important.

Here are the details for desktop browsers:

+---------+-------------------------+----------------------------------+
| Browser | Supported since version |             Formats              |
+---------+-------------------------+----------------------------------+
| IE      | 9.0                     | AAC or .mp3                      |
| Firefox | 3.5                     | .ogg, .wav                       |
| Chrome  | 3                       | .mp3, .ogg                       |
| Safari  | 4                       | Any audio supported by Quicktime |
| Opera   | 9.5                     | .ogg, .wav                       |
+---------+-------------------------+----------------------------------+

Here are the details for mobile browsers (no format information, sorry):

+--------------+-------------------------+
|   Browser    | Supported since version |
+--------------+-------------------------+
| iOS Safari   | 4                       |
| Opera mobile | 10                      |
| Opera mini   | no support (Dec 2011)   |
| Android      | 2.3                     |
| Blackberry   | 6                       |
+--------------+-------------------------+

If you want to use the audio, it's important to provide both .ogg and .mp3 versions of the file to get good cross browser support.

<audio controls>
   <source src="/my-podcast.mp3" />
   <source src="/my-podcast.ogg" />
</audio>

Here is a wikipedia article comparing each browser's HTML5 support:

For Safari to support audio on Windows, Quicktime needs to be installed. The javascript snippet reports correctly if it's supported or not.

All of these browsers support the functionality of the tag. The reason your player does not work on Safari is because you are using OGG files. OGG is supported on Firefox and Chrome.
Firefox supports only WAV and OGG. Chrome supports everything. Opera supports only WAV. Safari supports everything but OGG.

Good luck!

opera 10 and ff 3.5 , don't know about safari

I'm sure of Safari 4, Firefox 3.5 from RC1 and maybe Chrome 2.

As far as i know it is supported either partially or fully in the gecko, webkit and presto engines.

So any browser which uses an up to date version of those engines should support it.

Gecko, Webkit and Presto engines are suppose to support it, but I think only partly. So Firefox 3.5 and Opera are your best bet.

The page (moztw.org/demo/audioplayer) works OK in Chrome 3 (dev channel)

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