Rdio rant on audio element problems

The HTML5 audio element has unfinished business. This posting by Ian McKellar of Rdio to the Rdio-API mailing list articulates the problems well.

The conversational context is that he’s explaining why the Rdio in-browser player uses a a headless Flash module to stream audio rather than the Audio element.

We have no plans to support streaming via <audio> tags. There are a few show-stopper issues with the specification and the implementations that make it inappropriate for our use.

First of all there is no audio codec supported across popular browsers: http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML5_Media)#Audio_format_support
As you can see Firefox only supports Ogg Vorbis and while Chrome supports that Safari and IE do not.

Current implementations are immature and generally of poor quality. For example while iOS browsers have an <audio> tag it seems that they apparently don’t actually work very well: http://www.phoboslab.org/log/2011/03/the-state-of-html5-audio
Most other browsers have have their own warts and bugs too. I’m sure this will all look a lot better in a few years, but for the time being the platform isn’t ready. And for all of Flash’s bugs and flaws they do handle music streaming pretty well.

The <audio> API doesn’t support streaming which *significantly* increases bandwidth usage. Flash’s RTMP protocol allows devices to only download what they’re actually playing. If you skip 20 seconds into a song then Flash will have only downloaded about 30 seconds worth of audio. Using HTTP progressive download playback (the only protocol that <audio> supports) then you’d have downloaded as much of the track as could be streamed across your network connection. Seeking with RTMP also significantly more efficient and quick than with plain old HTTP.

Finally Rdio’s business and the businesses of our content partners depends on being able to securely deliver content to subscribers. When I listen to a song by a friend’s band (eg: http://rd.io/x/Q1I2VLLD) I know that my friend is getting paid. While we all know that no security mechanisms are perfect the ones available in Flash are significantly more sophisticated, robust and well tested than what we could build on top of HTML5 <audio>.