Skip to content

fix: autoplay intent survives player recreation; timeout misclassification - #17

Merged
ghostcoder42 merged 1 commit into
mainfrom
fix/autoplay-intent-race
Oct 9, 2026
Merged

ghostcoder42 merged 1 commit into
mainfrom
fix/autoplay-intent-race

Conversation

@ghostcoder42

Copy link
Copy Markdown
Owner

Autoplay landed only intermittently: useVideoPlayer recreates the whole native player when the stream source lands (null → url), and the play() fired by the effect right after that recreation can race the native prepare and be silently dropped — the video then sits paused forever (reproduced on Android 8.1: paused overlay, no buffering, manual play starts instantly).

  • The play intent now rides player construction (setup callback runs on every recreation), so it exists before the prepare race begins.
  • A statusChange retry re-asserts autoplay once the player reports readyToPlay — covering prepare paths that drop early commands.
  • Manual pause (while focused) beats autoplay: pauses arriving with focus already lost are the blur cleanup, not the user.

Also: RN-Android aborts surface as "Fetch request has been canceled" (no "abort" wording) and were misclassified as offline (probe fired, message wrong). Now recognized as timeouts.

…ation

Autoplay landed only intermittently: useVideoPlayer recreates the whole
native player when the stream source lands (null → url), and the play()
fired by the effect right after that recreation can race the native
prepare and be silently dropped — the video then sits paused forever
(reproduced on Android 8.1: paused overlay, no buffering, manual play
starts instantly).

- The play intent now rides player construction (setup callback runs
  on every recreation), so it exists before the prepare race begins.
- A statusChange retry re-asserts autoplay once the player reports
  readyToPlay — covering prepare paths that drop early commands.
- Manual pause (while focused) beats autoplay: pauses arriving with
  focus already lost are the blur cleanup, not the user.

Also: RN-Android aborts surface as "Fetch request has been canceled"
(no "abort" wording) and were misclassified as offline (probe fired,
message wrong). Now recognized as timeouts.
@ghostcoder42
ghostcoder42 force-pushed the fix/autoplay-intent-race branch from 90c59b7 to b816d85 Compare October 9, 2026 07:23
@ghostcoder42
ghostcoder42 merged commit 0d30971 into main Oct 9, 2026
1 check passed
@ghostcoder42
ghostcoder42 deleted the fix/autoplay-intent-race branch October 9, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant