eric
eric

Reputation: 31

Html5 audio+ Phonegap + Android?

does the HTML5 audio tag with Jquery and Phonegap work to create an Android App? It works well in any browser, but I can't hear anything using the Android emulator, any idea? thank you!

Upvotes: 2

Views: 8262

Answers (3)

eggdeng
eggdeng

Reputation: 148

In 2.3 and newer you can use Audio tag just fine

It's true that HTML 5 audio (.ogg) works in the Android browser but not AFAIK with jQuery and Phonegap. I have code that works in Chrome, on the Android browser on my phone via LAN, even on the iPhone simulator (.mp3) but not in the installed Phonegap app (using Gingerbread 2.3.3).

Upvotes: 2

Libby
Libby

Reputation: 866

No, the audio tag is not supported everywhere, and probably not on your Android device. I found this blog on Android and audio support useful, plus he's got snippet of test code. Run in any browser, including Android browser, to see what's supported.

I used PhoneGap / Android / jQuery Mobile to write this tutorial for playing audio files in a mobile web app using PhoneGap Media API (source is there).

Cheers, Libby

Upvotes: 5

esamatti
esamatti

Reputation: 18973

It depends on your Android version. In 2.3 and newer you can use Audio tag just fine, but in older versions you have to use Media API from Phonegap.

Upvotes: 1

Related Questions