views:

319

answers:

2

What audio formats can be played using the html5 'audio' tag in the android browser? Does anyone know where to find official specs on what the android browser supports and not?

For the record, the android media formats page does not seem to cover this - I have soundfiles (3gp) playing fine in a native app, but they won't play in my webapp.

The webkit docs also do not seem to help. My soundfiles play fine in my webapp on iphone, so that version of webkit handles them fine. Shouldn't the android browser have some official documentation somewhere?

+2  A: 

Probably there should be official documentation. If you want to test it, why not make a web page on some domain you have access to, with links to all of the different sound files you can think of, and point your browser at it.

Amos
You're right ahead of me... I had planned to do this, just didn't have the time before. Now my bare-bones test page has a range of media formats, supported in varying degrees by desktop browsers:http://textopia.org/androidsoundformats.htmlHowever, on my android browser: Nothing. Nada. No audio element, and no error message. This is on a HTC Desire, running android 2.1. WTF?
Anders Sundnes Løvlie
Just followed that link using my HTC Hero running a custom 2.1 Rom (VillainROM 6.2 I think) and likewise nothing. Maybe that's why there's no mention in the documentation, because there is no support.
Amos
well, if the audio element is not supported, then the browser should display the text between the audio tags instead. on my htc magic with android 1.6 it does. on the htc legend it does not - it displays neither an audio-button, nor the text between the tags. just a blank spot.
Anders Sundnes Løvlie
oh and by the way, the iphone browser (on my 3gs, still running iphone os 3 i think) displays all the audio elements correctly, only the ogg one doesn't work (just like desktop safari).
Anders Sundnes Løvlie
All I could see were the names before each colon.
Amos
A: 

after some testing, i am concluding that support for the html5 audio element is broken in android 2.1. details of my testing can be found on my blog. I tested on a htc desire running android 2.1 and htc sense, whereas user amos confirmed the same error on his htc hero running a custom 2.1 rom (thanks, amos!). If anyone will try the testpage in different configurations and report back either here or on my blog, I will update with any new information.

Anders Sundnes Løvlie
one user on my blog reports identical behaviour on a Motorola Droid. that makes it three different devices showing the same problem.
Anders Sundnes Løvlie
the android project reports that this issue is resolved in android 2.2 froyo. so whenever phones get upgraded...http://code.google.com/p/android/issues/detail?id=9372
Anders Sundnes Løvlie
hm, I just tried to test this in the 2.2 emulator, and it did not work there either. another user on the google code page reports similar problems with nexus one.
Anders Sundnes Løvlie