Benny
Benny

Reputation: 2228

Audio tag auto play not working in android browser

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.

Upvotes: 0

Views: 2943

Answers (1)

OJay
OJay

Reputation: 1239

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.

Upvotes: 2

Related Questions