I am developing a small game that, when launched, displays a menu with background music. If I compile it for desktop, I have no problems, but if I compile it for HTML5 and try the game online, the music does not start until I click on the browser window. I have read that this seems to be a default setting for browsers, which require user interaction before allowing an HTML5 game to start playing music in the background.
However, I see that several games on Itch.io developed with Defold start the background music without any interaction, unless you consider clicking on the “run game” button that appears on the game pages to be “interaction”. Can you explain this to me? Thank you all.