Fix Apple episode-transition media auth - #52
Merged
Conversation
Owner
Author
|
Linked Apple renderer follow-up: blurbery/silo-apple#8 The deployed server fix keeps long-running Apple media requests authorized. The linked Apple change handles the separate episode-to-episode display and Aether lifecycle handoff that the live E3 to E4 test exposed. |
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 I changed
I added a narrowly scoped server compatibility path for Apple build 31 across iOS, iPadOS, macOS and tvOS. It keeps
header_authenticated_media_v1intact and supplies the existing signed, session-bound media capability in a plan header.The Apple client and AetherEngine use the same playback boundary across those platforms. The client resolves the current API bearer when an item starts, then AetherEngine snapshots
LoadOptions.httpHeadersand reuses them for later range reads and internal reloads. If that bearer expires during playback, normal API calls refresh successfully but the media loader can keep sending the old bearer. That produces 401 range responses while already buffered playback continues, which appears as a loading badge and can affect automatic episode transitions.The server now validates the narrower session capability before falling back to the bearer. The media URL remains credential-free, the Apple client continues to see a consistent header-authenticated contract, and the capability is bound to the user, profile, media file, play method and playback session.
This keeps the playback decision and media bytes unchanged. A direct DV7 MKV remains the same direct DV7 MKV, and the selected audio route is unchanged. It does not force HLS, remuxing, transcoding, HDR conversion or a quality downgrade.
Scope
The compatibility path only applies when all of these match:
header_authenticated_media_v1anddevice_quirks_v1are both advertisedThe path keeps media on the authenticated API origin. Later builds and non-Apple clients retain the existing behavior.
Validation
git diff --check