Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ignore buffered content less than 1e-4s (shaka-project#6802)
On Firefox, in some cases after a period ends, seeking shortly after will cause playback to fail or stall. This occurs when the next period has small gaps and we're seeking to after the gap. Seeking to before the gap succeeds. Even though the seek requests the soure buffers to be fully cleared, Firefox actually keeps around less than 1e-4s of content and won't let us forcibly remove this content. Trying to call flush causes in infinite loop. This leftover content makes shaka think that the buffer end in where we used to be even though the presentation time reflects where we seeked to. This means that playback doesn't continue. The buffer contitues getting filled and playback will either fail when the SourcBuffer is filled and triggers a QuotaExceededError or contiue when the buffer will reach the presentationTime.
- Loading branch information