Repository navigation
fix(tvos): keep video visible across episode autoplay - #221
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesAetherEngine native item handoff
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR makes a localized change to preserve video during episode autoplay handoff, with no actionable merge-blocking risk remaining beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
… the handover patch The app was pinned to a personal fork of AetherEngine frozen at 6.34.0 with five local commits. It now pins Silo-Server/AetherEngine at dfe11a08, which is upstream 6.67.2 plus one re-implemented commit that lets a host request the in-place native item handover on an episode change. That keeps the tvOS autoplay fix from #221 while picking up 52 upstream releases, including the 6.50.0 loopback-origin exposure fix and the libzvbi GHSA-86rm-g7qf-j2fh update via FFmpegBuild 3.0.0. FFmpegBuild 3.0.0 renames the nine embedded frameworks with an Aether prefix and moves to dav1d 1.5.4, zimg 3.0.6, and libzvbi 0.2.45; LibDovi moves to 2.1.0 (dolby_vision 3.4.0). THIRD_PARTY_NOTICES.md, the in-app acknowledgements, and quietvoid's libdovi notice are updated to the resolved revisions. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…x its attribution (#246) * docs: correct AetherEngine attribution and credit the engine in README THIRD_PARTY_NOTICES.md recorded the upstream 6.34.0 commit while the app links 653be639, a published fork revision that adds Silo's handover patches. The notices and in-app acknowledgements now name the fork branch as the modified source, the upstream tag as its base, and state the LGPL publication obligation for those patches. README.md now credits AetherEngine and its author next to the other third-party notices. Co-Authored-By: Claude Fable 5.1 <[email protected]> * chore(deps): move AetherEngine to the Silo-Server fork at 6.67.2 plus the handover patch The app was pinned to a personal fork of AetherEngine frozen at 6.34.0 with five local commits. It now pins Silo-Server/AetherEngine at dfe11a08, which is upstream 6.67.2 plus one re-implemented commit that lets a host request the in-place native item handover on an episode change. That keeps the tvOS autoplay fix from #221 while picking up 52 upstream releases, including the 6.50.0 loopback-origin exposure fix and the libzvbi GHSA-86rm-g7qf-j2fh update via FFmpegBuild 3.0.0. FFmpegBuild 3.0.0 renames the nine embedded frameworks with an Aether prefix and moves to dav1d 1.5.4, zimg 3.0.6, and libzvbi 0.2.45; LibDovi moves to 2.1.0 (dolby_vision 3.4.0). THIRD_PARTY_NOTICES.md, the in-app acknowledgements, and quietvoid's libdovi notice are updated to the resolved revisions. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: record the FFmpegBuild 3.0.0 artifact inspection in the notices The inventory claim described a 2.4.3 debug build. A tvOS Simulator debug build against 3.0.0 was inspected: nine Aether-prefixed frameworks embedded, --enable-shared present, no GPL, version3, or nonfree flags, and no FFmpeg symbols exported by the app binary. Co-Authored-By: Claude Fable 5.1 <[email protected]> * chore(deps): bump the AetherEngine fork so the remote-HLS bypass honours the handover CI's iOS suite failed PlayerSurfaceLayoutTests: the synthetic next-episode handover on the nativeRemoteHLS route showed 2 item changes and 1 nil item. The fork's bypass callsite never read the handover flag. Fork 745de1cc consumes it the same way the loopback callsite does; the test now reports 1 item swap and 0 nil items. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Problem
I reproduced the Apple TV autoplay failure again during a real episode handoff: the next episode started, audio played and the playback clock advanced, but the screen stayed black. Backing out and reopening the same episode restored the picture.
The server-side trace rules out a failed stream handoff:
I have intentionally left the server address, session identifiers, account details, and viewing history out of this PR.
Root cause
The replacement work already merged in #202 keeps Silo's Aether controller, native host, display criteria, audio-session policy, and playback intent alive across the episode boundary. That part is working as intended, but it exposed one remaining engine-level gap.
On a normal foreground replacement, AetherEngine 6.34.0 still allowed the retained native host to run its ordinary teardown. That path calls
replaceCurrentItem(with: nil)before the next item exists. The reused host then performs its normal unload once more before finally attaching the successor.The Next Up mini-player is relevant because Silo changes presentation at the same time as that nil-item interval. The minimised view is not independently detaching the Aether surface, but the combined mini-player-to-full-screen transition makes the itemless player layer vulnerable to staying black. The countdown, Play Now button, Siri Remote play command, and remote-control next command all converge on
playNextEpisodeNow(), so they all hit the same replacement path and showed the same symptom.Solution
I added a supported one-shot handoff to AetherEngine and arm it from Silo's existing replacement boundary immediately before the outgoing episode is paused:
AetherPlaybackController.prepareForReplacement()invalidates the outgoing Silo load as before.prepareForItemReplacement()on Aether.load()consumes that request exactly once.AVPlayerItemattached while it prepares the successor.AVPlayerand player layer.The dependency is pinned to an exact reviewed revision based directly on Silo's existing AetherEngine 6.34.0 commit. I did not upgrade through the intervening engine releases, because that would mix a broad dependency migration into an isolated playback fix. The public API, package lock, project specification, and LGPL source reference all point to the same exact commit.
I also ported and validated the engine change against current AetherEngine
main, without forcing that larger dependency upgrade into this fix. That portable commit is ready for a separate upstream submission: blurbery/AetherEngine@1386a80Regression coverage
playNextEpisodeNow()and the same prepared replacementAetherPlaybackBoundaryTestscoverage from #202Proof and measurements
Replacement seam
This is a deterministic operation count through the exact native replacement path, not a wall-clock performance claim:
replaceCurrentItem(with: nil)callsThat removes both explicit nil assignments and reduces item mutations at the seam by 66.7%. More importantly, there is no longer a period where the shared player layer has no item while Silo changes from the Next Up presentation back to full-screen playback.
Automated validation
The exact AetherEngine revision pinned by this PR passed the complete public CI matrix:
Run: https://github.com/blurbery/AetherEngine/actions/runs/33621069137
The equivalent change against current AetherEngine
mainalso passed its complete platform matrix: https://github.com/blurbery/AetherEngine/actions/runs/33621760009The Silo branch is one commit ahead of current upstream
main, zero commits behind, and changes only the replacement call plus the exact dependency and license pins. It does not bring the production fork's unrelated commits into this PR.Scope and release check
This does not change the server playback plan, force a transcode, alter the Next Up timing/UI, or change final teardown. It only selects Aether's existing atomic native item-swap mechanism for an explicitly prepared foreground replacement.
The engine behavior, API contract, package resolution, and platform builds are covered here. A final real-device episode transition on the affected Apple TV is still the release acceptance check; I have not described simulator builds as physical-device proof.
AI Disclosure
I orchestrated this change and provided the reproduction, constraints, and acceptance criteria. I used the OpenAI Codex desktop agent harness with
gpt-5.6-solat ultra reasoning for the code investigation, implementation, regression analysis, and validation. No other AI tooling was used.