All questions

Why does a browser game start with no sound until I click somewhere?

asked by framedrop32 minutes ago

Happens in Chrome and Edge for me. The game loads, the music is silent, and only after I click on the page (sometimes only after I click inside the game) the sound kicks in. Is that the game being buggy or my browser?

2 answers

  1. ninthperiod31 minutes ago

    It is the browser, on purpose. Chrome, Edge, Safari and Firefox all block audio from starting until you have interacted with the page at least once, a click, a tap or a key press, so autoplaying music cannot blast you the moment a tab opens. A game that starts its music in the loading screen hits that block and stays silent until your first input unlocks the audio context. Clicking anywhere on the page, or pressing a key in some games, is what flips it on, which is why it looks like the first click fixes it.

  2. boostpad30 minutes ago

    Some games handle this better than others. A well made one waits for your first click before it even tries to play sound, or shows a Tap to start screen exactly for this reason. Older HTML5 games were written before browsers enforced the rule, so they try to play immediately, get blocked, and never retry, and in those the music stays off until something inside the game triggers a new sound. Clicking a menu button or restarting the level usually brings it back. If the sound never comes on at all, check the speaker icon on the tab, since Chrome remembers a muted site.

Posting as yaw player
Why does a browser game start with no sound until I click somewhere? - yaw.gg Questions | yaw.gg