The AudioContext.getOutputTimestamp() method helps to synchronize DOM time and AudioContext time values. It is used to estimate DOMHighResTimeStamp value of the audio output stream position for the given AudioContext.currentTime value, or do the opposite: estimate AudioContext.currentTime value of the audio output stream position for the given DOMHighResTimeStamp value.
Docs: https://webaudio.github.io/web-audio-api/#widl-AudioContext-getOutputTimestamp-AudioTimestamp https://developer.mozilla.org/en-US/docs/Web/API/AudioContext