Hussain Khalil
Hussain Khalil

Reputation: 1650

HTML5 <audio> tag not working in Android Chrome

The <audio> tag, for some reason, isn't working on my Android Device running Chrome 40 on Android 5.0.2. Interestingly, it works when I access the audio files directly. And it works fine on Chrome on my desktop. My HTML is below:

<audio id="audio" hidden loop autoplay>
    <source src="/static/music/audio.mp3" type="audio/mpeg">
    <source src="/static/music/audio.ogg" type="audio/ogg">
    <source src="/static/music/audio.wav" type="audio/wav">
    You browser doesn't support the HTML5 audio tag!
</audio>

Upvotes: 1

Views: 4068

Answers (1)

Hussain Khalil
Hussain Khalil

Reputation: 1650

I actually found that HTML5 audio can't automatically play (to prevent large amounts data usage), and instead must be triggered by some event (i.e. click, etc.). See here: https://code.google.com/p/chromium/issues/detail?id=138132

Upvotes: 3

Related Questions