Skip to content

Errors / JavaScript errors

DOMException: play() failed because the user didn't interact with the document first

A video or sound tried to play on its own and the browser stopped it.

The video sits still where the design expected it to play.

Why it happens

  • Chrome blocks autoplay with sound until the visitor has clicked or tapped on the page.
  • The play() request was interrupted by a call to pause() or by a new load: the video was paused or its source changed before playing started.

How to fix it

  1. Autoplay muted (muted and playsinline on the <video>), and let the visitor turn the sound on.
  2. Catch the promise play() returns and show a play button when it rejects.
  3. Chrome's rules differ by visitor: someone who often plays media on the site may be allowed autoplay with sound, and a first-time visitor is not, so it works for the team and fails for new visitors. Test it in a new private window, which starts with no history.

Whose problem it is

Usually the site's own code or settings.

Does your site have it?

Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.

Check only sites you run or have permission to check.

Often seen with

  • Uncaught (in promise)Something the page asked for in the background failed, and no code was there to handle it.