Closed erf closed 2 years ago
Hi, @erf As far as I know there is no workaround (unless you somehow send the artificial click event to the browser). Safari also requires user interaction before allowing website to play a sound. So as you already know: user should press the button before accessing audio. You can see how I solved the problem in the example app.
Hi,
I'm building a Flutter app and i would like to play a sound at startup. This works fine on most platforms but not in Chrome. If i later press a button that plays a sound, the intro sound is played also.
I made a simple example:
I'm on macOS.
I was able to play the intro sound in Firefox, but not in Safari.
I noticed Chrome logged the following warning issue:
The link seem to explain some new google policy. It seem i have to press a button in order to play a sound.
If you know a workaround for this it would be appreciated.