[SOLVED] Audio will not play without a user interaction

Ok so instead of autoplaying when the game starts,the audio starts when the user press the game instead??
Is this a bug or was this what this function was made to do?

As designed unfortunately. Most browsers won’t play audio until there is some user interaction. Nothing PlayCanvas can do about that.

My projects also have been affected by it. The only thing I do is put a text that says, “Click to play music.”

Lol I may just add a button to it

Then how does youtube work when playing a video automatically with audio?

That’s a good question :thinking: I’m actually not sure if there is an allowlist for websites that is agreed by browsers developers.

At least for me, a new installation of Firefox will not autoplay YouTube the first time you go there, but will remember the decision to autoplay after allowing it once.

2 Likes