When testing my latest WEBGL game on Itch.io I’ve discovered that audio will not play unless the user clicks within the game window first. Then the audio starts from the beginning and catches up to where it’s supposed to be.
While researching I did find a couple of posts mentioning a workaround that involves adding the following code to some sort of user interaction. Like a button click to start the game.
User interaction before playing audio is a requirement of modern web browsers, although I have reproduced the case of WebGL working fine without user interaction in 2.02.05 and below.
While technically 2.02.06 and above is the correct and intended behaviour, I can see how the previous behaviour would be more desirable, so I have passed this onto the Dev team to see how it was previously possible to bypass this requirement.
In the meantime, the recommened approach is to prompt a user interaction before you want audio to begin.
I have not been able to reproduce this issue- and I also do not understand how having it commented out could break your build, so I suspect there may be another issue. That said, there should be no need to call mixerSuspend / mixerResume yourself in 2.02.08.