web api instance property
AudioPlaybackStats: averageLatency property
Limited availability
The averageLatency read-only property of the AudioPlaybackStats interface is a number indicating the average latency since the audio context was initialized or since resetLatency() was last called.
Value
A double-precision floating point number indicating the average latency, in seconds.
Examples
Basic usage
const audioCtx = new AudioContext();
const stats = audioCtx.playbackStats;
// ...
// Log average latency
console.log(stats.averageLatency);
See also the main AudioPlaybackStats reference page for a more in-depth example.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.