Quantcast
Viewing all articles
Browse latest Browse all 17066

On IOS audio is not playing second time without user interaction

I am using react-player package to play audio.

The situation is, there is a button, clicking on that button going to play an audio then there is a 5 seconds delay(setTimeout). After 5 seconds I am changing the src of the audio.

So the expected behavior is It will play sound one. Then 5 seconds later it will play second sound.

But on ISO(Both Chrome & Safari) the first sound starts playing when clicking the button then after 5 seconds delay, I need to manually interact with the UI(click on the play/pause button) to play the second sound. It doesn't start playing automatically.

How I can overcome this situation?

NB: It's working on Desktop(Chrome, Safari), Android. The only issue with IOS.


Viewing all articles
Browse latest Browse all 17066

Trending Articles