Audio tag auto play not working in android browser

2.9k views Asked by At

I created an audio player dynamically with autoplay enabled. But it is working with desktop browser not in android browser. And progress handler not dispatched.

If I enable the controls attribute and click the play button it will dispatch the progress handler and playing the audio. Even I was tried to play by manually by calling the play() method.

I want to play the audio once canplaythrough handler triggered.

1

There are 1 answers

0
OJay On

Audio on mobile devices often requires a user event (click / touch) in order to play, which seems to be what is happening in your case.

You can check out the SoundJS Mobile Safe Tutorial to learn more about the issue and a couple of ways to work around it.

Hope that helps.