baseLatency 只读特性在 AudioContext interface returns a double that represents the number of seconds of processing latency incurred by the AudioContext passing an audio buffer from the AudioDestinationNode — i.e. the end of the audio graph — into the host system's audio subsystem ready for playing.

注意 : You can request a certain latency during construction time 采用 latencyHint option, but the browser may ignore the option.

句法

var baseLatency = audioCtx.baseLatency;
					

A double representing the base latency in seconds.

范例

// default latency ("interactive")
const audioCtx1 = new AudioContext();
console.log(audioCtx1.baseLatency); // 0.00
// higher latency ("playback")
const audioCtx2 = new AudioContext({ latencyHint: 'playback' });
console.log(audioCtx2.baseLatency); // 0.15
					

规范

规范 状态 注释
Web 音频 API
The definition of 'baseLatency' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
baseLatency Chrome 58 Edge ≤79 Firefox 70 IE 不支持 No Opera 45 Safari 不支持 No WebView Android 58 Chrome Android 58 Firefox Android 不支持 No Opera Android 43 Safari iOS 不支持 No Samsung Internet Android 7.0

图例

完整支持

完整支持

不支持

不支持

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

另请参阅

元数据

  • 最后修改: