I got a little issue
I'm trying to play audio files on a webView with html5 on the ipad simulator, i got a code like this:
<audio controls="controls" format="mp3 ogg">
<source src="test.ogg" />
<source src="test.mp3" />
</audio>
But i always got a "cannot play audio file" on the black bar on control :/
Someone as an idea why ?
Of course my test.mp3 and test.ogg are added in my xcode project and are in the same directory
Thanks
Format attribute in audio doesn't makes any sense. You should use type attribute in source tag.
See example:
<source src="test.ogg" type="audio/ogg" />
<source src="test.mp3" type="audio/mpeg" />
This is working in ipad.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With