just-audio-web Error: NotAllowedError: play() failed because the user didn't interact with the document first

202 Views Asked by At

It's acting like an autoplay issue. The error received is: "NotAllowedError: play() failed because the user didn't interact with the document first."

Additionaly when I load a playlist and press Next, it also doesn't start playing automatically.

Any ideas ?

1

There are 1 best solutions below

0
Forth Temple On

Chrome doesn't allow autoplay of audio: https://developer.chrome.com/blog/autoplay/

I got around the issue by putting a button in flutter and then playing the audio using just-audio-web when onPressed