# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://danabrams.gitbook.io/av-best-practices/if-you-have-to-use-autoplay-mute-the-audio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
