Repository navigation
fix: video start check hanging on an unconfirmed native seek - #475
Merged
Merged
Conversation
The start check seeked to 0.1, then back to 0, and only became ready after a second confirmed onSeek, with no time limit. Seeking back to the start of a streamed file forces a fresh fetch, and a seek the player never confirms blocked the ride start forever. Drop the seek back to 0 (a few frames in is within tolerance), accept the current frame if the seek is not confirmed within VIDEO_SEEK_TIMEOUT_MS (300ms), and lower Android's playback buffer requirement from the default 2500ms to 1000ms.
|
gdoumen
marked this pull request as ready for review
October 14, 2026 16:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Production logs show mobile
video_not_readyride-start cancellations at about 2.5x the desktop rate. The start check seeked to 0.1, then back to 0, and only became ready after a second confirmedonSeek, with no time limit anywhere. A seek the player never confirms blocked the start indefinitely, and seeking back to the very start of a streamed file forces a fresh fetch whose confirmation waits for the player's default ~2.5s playback buffer.What changed
VIDEO_SEEK_TIMEOUT_MS(300ms): if the initial seek (bootstrap or direct tostartTime) is not confirmed in time, the frame currently showing is accepted andonLoadedfires. The timer is cleared on completion and on unmount.VideoViewpassesbufferConfig={{ bufferForPlaybackMs: 1000 }}to the native player (Android only; default is 2500ms).Not part of this change: videos that never get past the native load event, and the
load start eventlog that always reports null fields.Test plan
Video.test.tsx: bootstrap seek confirmed -> ready with no second seek; unconfirmed seek -> ready after the timeout (bootstrap andstartTime); late confirmation does not complete twice; no timeout after unmountVideoView.test.tsx:bufferConfigpassed to the native playertsc, eslint