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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -