mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Previously, we would just listen to the single video track for buffering, so if for some reason the audio data runs ahead of the video, we would drop some audio until the video buffered. Instead, stop playing audio at the last available sample when any provider is blocked. Also, PlaybackManager now starts in the Buffering state, so that it can wait for enough data to be ready to play without interruption. When the end of the stream is reached, the buffering state is exited to ensure that we don't get stuck buffering at the end of a media file.