fix(player): bound playback init so a stalled stream can't spin forever#58
Merged
Conversation
`controller.initialize()` had no timeout, so a wedged instant-stream proxy (or any stalled source) left the player stuck on "Preparing your video…" indefinitely — the preview fallback, with its own graceful timeouts, was never reached because the instant-stream await never completed. Cap initialize at playbackInitTimeoutSeconds (25s). On timeout it's treated as a load failure: the cold-press (instant-stream) path falls back to a preview (reportErrors: false), other paths surface the graceful error. No path can hang forever now. analyze clean, 156 tests pass, flutter build web succeeds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Bug
Tapping some episodes sometimes just spins on "Preparing your video…" with no recovery.
Root cause
VideoPlayerController.initialize()in_startPlaybackhad no timeout. The cold-press path awaits the instant-stream proxy; if that stalls (see the backend fix windoze95/nullfeed-backend#93), theawaitnever completes — so it never returns to fall through to the preview fallback (which does have graceful 90s/180s timeouts). Result: an indefinite spinner.Fix
Bound
controller.initialize()atplaybackInitTimeoutSeconds(25s). A timeout is treated as a load failure:reportErrors: false) → returns false → falls back to the preview path (bounded + graceful error),So no playback path can hang forever, regardless of backend behavior. Defense-in-depth with the backend's first-byte cap.
Verification
flutter analyze --fatal-infos --fatal-warnings→ No issues;flutter test→ 156 passed;flutter build web→ succeeds.🤖 Generated with Claude Code