IT lexicon › Web › Web Audio API

Web Audio API

Web På svenska → Updated: 2026-10-28

The browser's audio engine: a graph of nodes that generate, filter and mix sound in real time from JavaScript.

Before it there was only the <audio> tag, which can play a file and not much else. Chris Rogers at Google proposed a node-based model around 2010, and Chrome shipped it prefixed as webkitAudioContext; Mozilla's rival Audio Data API was dropped. The spec only became a W3C Recommendation in 2021.

You create an AudioContext and wire oscillators, filters, a convolution reverb, FFT analysers and the destination together. Custom DSP first lived in ScriptProcessorNode, which ran on the main thread and stuttered whenever the page did anything else; its replacement, AudioWorklet, runs on a dedicated audio thread, often with WebAssembly inside. Since 2018 the context starts suspended until the user clicks something — autoplaying ads are why.

← Back to the lexicon