我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

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.


var latency = audioCtx.outputLatency;


A double representing the output latency in seconds.


const audioCtx = new AudioContext();


Specification Status Comment
Web Audio API
The definition of 'outputLatency' in that specification.
Working Draft  

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome No support NoEdge ? Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android No support NoOpera Android No support NoSafari iOS ? Samsung Internet Android No support No


No support  
No support
Compatibility unknown  
Compatibility unknown

See also


此页面的贡献者: Jedipedia, fscholz, chrisdavidmills
最后编辑者: Jedipedia,