If you have to use Autoplay, Mute the Audio

All mobile browsers, plus Safari, have banned autoplaying audio before any user interaction for quite a while. Chrome banned it in December 2017, and I’ve been predicting that Firefox would make this the default behavior since then (Update: Literally while I was writing this, Firefox announced this would be the default behavior starting in March).

This is the best policy for users—imagine opening a web page on your cellphone on the bus, only to make all the other passengers listen to The Macarena because some inconsiderate designer decided it should autoplay.

The best policy is probably not to autoplay, but if you need to Autoplay, you should do what YouTube does and mute the audio until the user clicks on a button. But please make the button obvious.

Current Elm Difficulty = Easy

Just don’t include an autoplay attribute. Or if you do, make sure you add a muted attribute (you’ll have to make your own, but it’s easy.

Last updated

Was this helpful?