stephenwade / festival

A website to host online music festivals
ISC License
2 stars 1 forks source link

Use `AudioContext.outputLatency` to sync video rendering with audio #505

Open stephenwade opened 2 years ago

stephenwade commented 2 years ago

Authors working on an application that need audio/video synchronization can use outputLatency to synchronize their rendering: instead of painting video frames as soon as they are rendered, they can shift the clock of the rendering by outputLatency, and audio and video will be in sync.

https://blog.paul.cx/post/audio-video-synchronization-with-the-web-audio-api/

~On hold until Chrome implements AudioContext.outputLatency.~

Chrome Platform Status: https://chromestatus.com/feature/5682265146261504 crbug: https://bugs.chromium.org/p/chromium/issues/detail?id=785409 MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/outputLatency

stephenwade commented 1 year ago

AudioContext.outputLatency shipped in Chrome 102.