Blog

Web Audio API: decoding AudioBuffers from fetch, CORS requirements for ArrayBuffer responses, and worklets

`decodeAudioData` needs untainted input—fetch cross-origin audio with appropriate `crossOrigin` and CORS headers.

1 min read
web-audiocorsbrowser

Streaming

MediaElementSource connects to `<audio>`—CORS on media URLs still applies for cross-origin media.

HLS in MSE uses separate segment requests—each host needs CORS if not same-origin.

Latency

Large decode buffers increase time-to-first-sound—separate from CORS but often conflated in bug reports.

Back to blog