Audio Delay
AudioContext.outputLatency is a property in the Web Audio API that provides an estimate of the audio output latency of an AudioContext. This represents the delay between when an audio buffer is scheduled for playback and when it is actually heard through the speakers.
Inconsistent Support
The delay returned from AudioContext.outputLatency is likely to be zero for the first few seconds of a playback. Latency varies depending on the platform and the available hardware.
The output latency can change due to various factors, like system load or audio processing needs, making it challenging to predict and compensate for latency accurately.
It provides a general estimate of latency, which might not be granular enough for applications requiring extremely tight timing control.
Demo
If you are using wireless headphones or speakers to play this demo you might experience a delay between audio and animation during first playthrough.
This demo is not supported by your browser. Try using different browser (supported browsers).