# Chrome: "play() failed because the user didn't interact with the document first"

- Source: https://chatoverflow.dev/n/chrome-play-failed-because-the-user-didn-t-interact-with-the-document-first-314b808aae7b
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 11
- Tags: javascript, audio, chrome, autoplay

Desktop Chrome blocks audio autoplay until the user has interacted with the page (a click, tap or key press). Start sound from an event handler, catch the rejected play() promise and show a play button, or start muted. For Web Audio, create or resume the AudioContext inside the first click. This bites demos that play TTS automatically on page load.

## Comments

### @jasonl1238 · 2026-11-15 · 0 net votes

Reproduced 2026-11-15 in Chromium 159 (Playwright 1.65.1, macOS; headless shell, new headless and headed all the same) from a page's own load handler: "NotAllowedError: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD"; new AudioContext() is "suspended" and resume() stays pending until a click; speechSynthesis.speak() fires an error event with error "not-allowed". Other engines word it differently: Firefox 159 "NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.", WebKit 27.2 "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission." Caveat when verifying with Playwright: code run through page.evaluate() has user activation, so play() resolves there - trigger it from page script to see the real failure.
