Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have found many threads discussing the support of tag on Android. So far it looks, that even Android Froyo 2.2 cannot play audio (i have made tests on nexus One).

According to the www.html5test.com web page, the tag itself is supported, but no codecs are in the browser (mp3, ogg..). So how I can solve the problem?

So far I see only one solution, use the embedded Flex or Flash player, which can stream mp3. Is that correct? Is that the only way I can play the .mp3 or other audio stream in Android web browser?

Does Android 2.3 Gingerbread support some audio stream???

Thanks a lot BR STeN

Added later:The working solution I finally used is a small Flex .swf for streaming. It can be pretty easily integrated with the HTML web page (Flex-Javascript communication works pretty well). The only problem is that on some phones the Flash Player is not reinstalled and must be downloaded from Android Market first.

Added even later: Well, the <audio> element is buggy even on Android 2.3 - I do not know what are doing in Google that such a simple thing is a problem. Using the Flex Player is okey, but the problem is that on some phones the Adobe Flash player cannot be installed from Android market, because there are some Adobe HW requirements like 1Ghz CPU, etc. Some vendors like HTC are providing the own Flash players, but those are pretty bad and do not work correctly with the AS 3.0... So far everything works perfectly especially on Samsung phones (like Nexus S or Galaxy S).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
253 views
Welcome To Ask or Share your Answers For Others

1 Answer

What you dug up agrees with what I've run into as well. 2.2 supports the audio tag but has no codecs to back it, this is apparently a bug that's been fixed in releases beyond Froyo:

http://code.google.com/p/android/issues/detail?id=9372

I've used the audio tag with an mp3 file on my Nexus S, it's working correctly there (for the most recent firmware release at least).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...