Playing audio with HTML5 in Android browser -
i want play audio in android browser, using html5 <audio> tag. works fine in iphone browser, not in android. i'm using android virtual device 4.0.3.
does know why?
the android source:
webview.loadurl("file:///android_asset/www/test.html");
the html file:
<audio controls="controls" format="mp3"> <source src="achievement.mp3" /> </audio> (i couldn't hear audio <embed> , <object> tags either)
i found solution here embed background audio in android >= 2.3 browser
<audio id="audio1" controls="controls" loop="loop" autoplay="autoplay" > <source src="scene1.mp3" type="audio/mpeg" /> <source src="scene1.ogg" type="audio/ogg" /> </audio> it's work me :)
Comments
Post a Comment