Recover video playback after network drops and hide Android system bars in fullscreen - #357
Merged
Merged
Conversation
…rs in fullscreen Wi-Fi to cell handoffs currently dump buyers on a dead-end error screen, and native fullscreen on Android leaves the navigation bar covering the scrubber. Retry transient player errors from the last position, add a Try again button, and hide system bars for native fullscreen the same way we already do for the external-caption overlay.
Contributor
Greptile SummaryThe PR adds bounded video playback recovery with a manual retry action and hides Android system bars during native fullscreen playback.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| app/video-player.tsx | Adds guarded playback recovery, retry UI, progress-based retry-budget reset, and native fullscreen system-bar handling; the previously reported issues are resolved at the current head. |
| lib/transient-playback-error.ts | Adds a bounded transient-error classifier for common network and gateway playback failures. |
| tests/app/video-player.test.tsx | Expands coverage for automatic and manual recovery, iOS asynchronous replacement, retry-budget reset, and fullscreen system-bar restoration. |
| tests/lib/transient-playback-error.test.ts | Covers transient marker recognition, case handling, and non-transient playback failures. |
Reviews (3): Last reviewed commit: "Continue iOS transient playback retries" | Re-trigger Greptile
Contributor
Author
|
Stays draft: on-device Android QA is still owed (native fullscreen hides 3-button nav; Wi-Fi↔cell handoff retries instead of the failed screen). No booted emulator in this sandbox. CI green at |
On-device test_pixel, 3-button nav: native VideoView fullscreen hides system bars and restores them on exit. Hard origin failure shows Try again and recovers after the origin returns. Co-authored-by: Gianfranco Piana <52470719+gianfrancopiana@users.noreply.github.com>
Member
Contributor
Author
|
Greptile's rerun was clean. While finishing the gate I found and fixed one additional iOS transient-retry edge, reran focused tests plus Sol, and merged this as 9c0a6d9. |
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.
What
Makes the native video player survive the Android (and iOS) failures that show up in store reviews:
VideoViewfullscreen button did not, so 3-button navigation covered the scrubber. Native enter/exit now uses the same hide/restore.Does not re-enable
staysActiveInBackgroundon Android (PR #215 / #345). That still trips the media3ExpoVideoPlaybackServiceANR.Why
Play Store is 3.6 vs iOS 4.7 on the same app. The 1-star Android reviews are the player: network switch → error, nav buttons covering controls, “close the app and start over.” This is the half we can ship without reopening the ANR.
Before / After
On-device Android (
test_pixel, 3-button nav) ata3230b9:Inline (nav bar visible, expand control reachable above it):
Native fullscreen (landscape, system bars hidden, scrubber fully tappable):
Exit fullscreen (portrait, 3-button nav restored):
Hard origin failure → Try again (not a dead end):
Try again after the origin is back:
In-flight Wi-Fi ↔ cell retry was not captured: the 10s local clip fully buffered, so killing the origin mid-play did not surface a transient error. Unit tests still cover that path. iOS
staysActiveInBackgroundwas not re-tested on a device this run.Test Results
npx jest tests/lib/transient-playback-error.test.ts tests/app/video-player.test.tsx --runInBand— 83/83 passingisTransientPlaybackErrorto always return false failsretries a transient network error without showing the failed screen; removing the recovery-progress retry reset failsresets the automatic retry budget after playback progresses again; disabling the iOSreplaceAsyncpath failsuses asynchronous source replacement for iOS playback recovery; restored, 83/83 pass againnpx tsc --noEmit— cleannpx expo linton the touched files — 0 new errors (same pre-existing warnings as onmain)QA steps
test_pixel.staysActiveInBackgroundstill iOS-only). Code still iOS-only; not re-run on a physical iPhone this pass.Status
AI disclosure: Generated with Grok 4.6; review feedback verified with Sol.
Premerge review: clean @ 815a35f