W3cubDocs

/DOM

AudioContext.outputLatency

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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 requesting the host system to play a buffer and the time at which the first sample in the buffer is actually processed by the audio output device. It depends on the platform and the available hardware.

Syntax

var latency = audioCtx.outputLatency;

Value

A double representing the output latency in seconds.

Example

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

Specifications

Browser compatibility

Feature Chrome Edge Firefox Internet Explorer Opera Safari
Basic support Yes ? No No Yes No
Feature Android webview Chrome for Android Edge mobile Firefox for Android IE mobile Opera Android iOS Safari
Basic support Yes Yes ? No No Yes ?

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/outputLatency