Skip to content

chore(player): preserve Rhainland's stall fix history - #653

Merged
Quick104 merged 3 commits into
mainfrom
t3/rebase-update-pr-641
Oct 6, 2026
Merged

Quick104 merged 3 commits into
mainfrom
t3/rebase-update-pr-641

Conversation

@Quick104

@Quick104 Quick104 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR #641 closed after its rebase found that both commits had already shipped in #620. This replacement preserves the original commits and gives @Rhainland credit for the player stall fix and its regression tests.

Rhainland implemented the loading decision for a stalled source, including the empty-buffer check and the guard that keeps loading visible while a replacement plan is prepared. The original commits, e61f8105 and 974a73c8, retain Rhainland's authorship in this branch. A reconciliation merge preserves the current main tree, so this PR has no source changes against main.

Related PRs: #641, #620. Related validation issue: #337.

Validation

  • The branch tree matches main at 34cedf4dbf5e4f320a01fcad810b9865bdb4cd19 exactly.
  • Both original commits are ancestors of the replacement branch.
  • git diff --check and scripts/ci/check-no-api-v1.sh pass.
  • No new build or runtime checks were run because there are no source changes. Original test and simulator results are recorded in fix(player): show Loading only when playback actually stalls #641.

Risks and follow-up

This PR records the original commit history for a fix already present on main. No additional implementation work is required.

AI Disclosure

Rhainland and others added 3 commits October 6, 2026 01:00
During direct play with the server stopped mid-stream, video kept playing from the read-ahead buffer for about four minutes while the "Loading…" capsule showed the whole time and the player controls stayed hidden. Aether reports a source reconnect as PlaybackPhase.stalled ahead of every other phase, even while frames keep advancing, and PlayerViewModel mapped .stalled straight to isLoading. isLoading drives the capsule, hides the controls, and pauses the intro-skip and credits logic.

PlayerStallPresentation now decides isLoading from the phase. Over a stalled source the player is loading only while it means to play and, for at least one second, either the playhead has not moved or the engine has held no media ahead of its clock. The second case covers a seek past the buffer: Aether's clock then runs on without a frame, so a moving playhead alone does not prove playback. An audio-only load has no buffer-ahead reading and is judged by its playhead. PlayerViewModel records when the playhead last moved and when the buffer ran out and, while the phase stays .stalled, checks again every 250 ms, so the capsule appears once the buffer runs out and clears when frames move again. A real rebuffer on the AVPlayer path still shows through isBuffering, and .loading and .rebuffering are unchanged.

Tests cover a reconnecting source with a moving playhead, a stopped playhead, no playhead sample yet, a running clock with nothing buffered ahead, a paused player, and the other phases.

Found during the Series validation, silo-apple#337.
A replan, credential reload or new start sets isLoading before it waits for the server, while the outgoing load still reports its phase. When that load's source was stalled but still playing from its buffer, the stall watcher re-judged the phase within 250 ms and cleared isLoading. The Loading capsule went away and the intro-skip prompt resumed while the replacement plan was still being prepared. A replan sent while the server is down can wait for its request timeout, so this lasted seconds.

PlayerStallPresentation now takes whether a replacement is being prepared, and a stalled phase stays loading while it is. Other phases keep their meaning, so a playing or paused outgoing load still reports as before.
@Quick104
Quick104 merged commit f6d1eba into main Oct 6, 2026
@Quick104
Quick104 deleted the t3/rebase-update-pr-641 branch October 6, 2026 15:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T15:05:13.969351Z 8d32366 PR opened
🔒 Security Review ✅ Completed 2026-10-06T15:06:56.808977Z 8d32366 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

2 participants