W3cubDocs

/Web APIs

AudioContext: outputLatency property

The outputLatency read-only property of the AudioContext Interface provides an estimation of the output latency of the current audio context.

This is the time, in seconds, between the browser passing an audio buffer out of an audio graph over to the host system's audio subsystem to play, and the time at which the first sample in the buffer is actually processed by the audio output device.

It varies depending on the platform and the available hardware.

Value

A double representing the output latency in seconds.

Examples

js

const audioCtx = new AudioContext();
console.log(audioCtx.outputLatency);

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
outputLatency 102 102 70 No 88 No 102 102 79 70 No 19.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/outputLatency