Skip to Content
Platform.Ontology

Web Audio playback

Plays generated sound; the audio context stays silent until the person has interacted.

Does something on your deviceThings a page can doMedia outputWeb browsersWhile you use it

In one line

Can play and mix sound inside the page, after you have tapped

Plays generated sound; the audio context stays silent until the person has interacted.

A site can synthesize and mix sound at sample precision (games, music tools). Autoplay rules keep it quiet until a click, but once resumed it can run for as long as the tab lives.

What it can and can't do

What the user does: You tap Play, Start or anything on the page before sound begins.

It can

  • Play sounds, music or game effects that it makes or loads
  • Mix and change sounds, such as echo and volume
  • Keep sound going while the tab is open

It cannot

  • Make sound before you have tapped, clicked or pressed a key
  • Listen through your microphone; that needs a separate permission
  • Play over a tab you muted yourself
  • Change your device volume

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported352014-05-20None
EdgeSupported122015-07-29None
FirefoxSupported252013-10-29None
SafariSupported14.12021-04-26None
Safari on iPhoneSupported14.52021-04-26All iOS browsers use WebKit
Chrome on AndroidSupported352014-05-20None
Samsung InternetSupported3.02015-04-10None

How a site asks for it

APInew AudioContext(); ctx.resume(); AudioWorklet
Browser compat keysapi.AudioContext
api.AudioWorklet
How access is grantedgesture
What the user seesNo prompt (needs a click, tap or keypress)
Needs a secure context (HTTPS)No
Needs a user gestureYes
Activationsticky
How long it lastsContext state suspended until resumed; lives with the page
How to take it backNothing to revoke (no permission is stored)
Inside an iframeCross-origin iframes need allow="autoplay"

Typical flow

  1. Create AudioContext (starts suspended)
  2. On a click call ctx.resume()
  3. Audio plays through the default output

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • AudioContext starts suspended until user activation on the page (Chrome 71, Firefox 66, Safari since webkitAudioContext)
  • Chrome limits about 6 simultaneously active AudioContexts per tab in older versions; Safari limits 4 on iOS (older)
  • Cannot choose output device without setSinkId and a permission (selectAudioOutput)
  • Sample rate and output latency are readable (fingerprint)
  • Cannot read the system volume or other apps' audio

The story

What it is

A page can make sound, but stays silent until you click or tap.

For you

A game or music tool starts making sound only after your first tap. You are never surprised by blaring audio from a new tab.

For makers

Makers get full control over sound: effects, synths and mixing. The gesture rule is how browsers keep ads from shouting at you.

Where you see it

TypeExampleApps
gamesA browser game plays footsteps, music and echo effects, all built from code.Slither.io, Krunker.io
musicA web music maker lets you play synths and drums in the browser.Chrome Music Lab, BandLab, Soundtrap
videoA video call tool adds noise cancelling to your voice.Google Meet, Discord web
educationA learning site shows how a sound wave works and plays it.Ableton Learning Synths
securityAudio processing can reveal small differences between devices and is used in fingerprinting.None named
adsAn ad network tries to autoplay a video ad with sound, blocked until you tap.None named

Risks

  • Device fingerprint
  • Surprise sound

What the platform says

Good uses and abuse

Legitimate uses

  • Games
  • Synths and DAWs
  • UI sound design

Known abuse

  • Hidden ultrasonic beacons (cross-device tracking)
  • Audio fingerprinting

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bits2Rough identifying entropy, when known

History

  • 2018-12, Chrome 71: AudioContext autoplay policy enforced
  • 2019-03, Firefox 66: AudioContext needs user gesture
  • 2023-02, Chrome 110: AudioContext.setSinkId lets a page route output to a chosen device

Sources

How well checked: Based on official documentation.

On this page