Repository navigation
Conversation
…ck renditions The server now names each embedded inventory row's track in the source (stream_index, container_track_id), marks rows the player may switch to on the original stream (native_selectable), and, under hls_subtitle_renditions_all_v1, lists every cue-indexed embedded text track as a rendition of an HLS plan's stream (inventory hls_rendition, plus index on subtitle.hls_rendition). Model those fields and send hls_subtitle_renditions_all_v1 the way the remux feature is sent: only to a server that advertises it, and only when the request already lists hls_subtitle_renditions_v1. Add the predicates the player needs to switch without the server: whether a row is native-switchable (native_selectable, or the client's own evaluation when the server sends none of the C1 fields), whether it has a well-formed rendition, and whether a returned plan keeps the playing transport so it can be applied without a remount. Re-vendor the playback-v3 fixtures from the unmerged server branch and add round-trip tests for the native and every-track rendition decisions. They must be re-synced from server main once those branches land. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Picking another subtitle used to replan and then remount the MediaItem, even when the playing media already carried the track: a native track of an original_http file, or a rendition of an HLS stream that lists every embedded text track. The viewer waited for the server and then sat through a rebuffer. Phone and TV now show such a pick at once and send its track_change replan in the same step, including a pick queued while a commit is in flight. A row qualifies when the server marks it native_selectable (falling back to the client's own evaluation when the server sends none of the C1 fields), or has an every-track rendition; Off qualifies on the same streams, and Media3 must list the track. For a subtitle pick only, the session manager marks a staged candidate inPlace when it keeps the transport the player renders and changes only a subtitle selectable in that media. Audio the player switched inside the file without a replan counts as the plan's audio. The manager carries the transport's first-frame report, local mutations and passthrough scope across the commit. The view models lay the adopted plan's subtitle decision, identity and menus over the mounted plan, so a change the client made to the mount (a PCM retry's audio claim) stays and nothing remounts. Phone adopts without a new mount generation. TV adopts without a mount nonce and keys its mount effect on a media mount key that ignores the subtitle decision; its two-phase publication confirms the selection on the tracks already published, and an in-place publication rolls back by restoring the predecessor's plan and reselecting its subtitle without a remount. A failed replan, or a newer pick that needs one, restores the previous subtitle locally. A plan that changes the transport or returns a sidecar is adopted with a remount as before. Stall detectors key on the mount rather than the plan id. A pick of another server-placed track that cannot switch in place always goes to the server, and TV counts a stale sidecar as mountable only while the plan selects it. TV's same-route remount restores a native or rendition track by its exact identity, since the reloaded playlist still marks the original track DEFAULT, and its mount-request flow keeps the newest request. An in-place plan sends no plan_summary of its own: the transport's summary covers it, and the server keys summaries, samples and learned limits by connection. The design and its rollback rules are in docs/playback/README.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 59 minutes. View limit details
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The Evidence section says
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
Superseded by #770, which combines this change with the rest of the stack for review. |
Problem
Related issue: #79, Silo-Server/silo-server#1406
Validation tasks: changes #323 C3, C4; changes #324 C3, C4, C5
Picking another subtitle replanned and then remounted the player, even when the media already playing carried the track: another embedded track of a direct-played file, or another rendition of an HLS stream. The viewer waited for the server and then sat through a rebuffer, the kind of unexplained wait #79 describes. Phone and TV now show such a pick at once and adopt the server's answer without remounting.
Approach
stream_index,container_track_idandnative_selectableto embedded inventory rows.hls_subtitle_renditions_all_v1, and keeps the running stream when the subtitle changes.mainonce they land.hls_subtitle_renditions_all_v1only to a server that advertises it and only when the request already listshls_subtitle_renditions_v1. It adds the checks the player needs: whether a row can be switched natively (native_selectable, or the client's own evaluation when a server sends none of the new fields), whether a row has a usable rendition, and whether a returned plan keeps the playing transport.track_changereplan goes out in the same step, including a pick queued while a commit is in flight. Off qualifies on the same streams, and Media3 must list the track.PlaybackSessionManagermarks the server's answer as in place when it keeps the transport the player renders (session, stream and headers, file, recipe, timeline, audio, claims, transformations and quirks) and changes only a subtitle the player selects in that media. Audio the player switched inside the file without a replan counts as the plan's audio. The first-frame report, local mutations and passthrough scope carry over.plan_summaryof its own; the transport's summary covers it. The server keys summaries, throughput samples and learned limits by connection, not by plan.docs/playback/README.md("Switching subtitles on the playing stream") records the design and the rollback rules.Validation
./gradlew testDebugUnitTest: pass, 6,664 tests, 0 failures. New tests cover the wire model and fixture round trips, the transport-keep check (including audio the player switched), in-place adoption in the session manager, the phone and TV adapters (immediate switch, Off, queued and superseded picks, a late mount, failure and restore), TV's local mountability, and the mount and stall-detector keys../gradlew :android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug: pass, no new findings.:androidApp:assembleDebugand:androidTvApp:assembleDebug: pass.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-733/
Risks
Checklist
AI Disclosure
plan_summaryfor in-place plans was checked against the server and answered in the docs.🤖 Generated with Claude Code
Note
Add in-place subtitle switching on the playing stream without a remount
canSwitchSubtitleInPlacein InPlacePlanAdoption.kt andPlaybackPlanV3.appliesInPlaceOverin PlaybackProtocolV3.kt.PlaybackSessionManagermarks qualifying subtitle-track replans as in-place candidates. Adoption overlays the adopted plan withwithInPlaceAdoptionand keeps the active attempt's start time and local mutations; rollback restores the predecessor's state without a remount. Both mobile (PlayerViewModel.kt) and TV (TvPlayerViewModel.kt) view models adopt in-place plans without issuing a transport mount nonce.HLS_SUBTITLE_RENDITIONS_ALL_V1_FEATUREprotocol feature and per-row subtitle inventory fields (stream index, container track ID, native-selectability, HLS rendition) so the server can advertise which tracks are switchable.mountedPlaybackKeyandmediaMountKeyinstead of the whole plan object, so a subtitle-only plan change no longer restarts playback effects.gatedForHlsSubtitleRenditionsin SequencedPlayback.kt; failed in-place switches restore the prior committed subtitle; local-mount timeouts are suppressed while an in-place replan is pending.Macroscope summarized 8d723ee.