You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(player): say when playback stopped because it was paused too long - #1043
Silo-Server/silo-server#5180 lets an admin end playback that stays paused too long (default 15 minutes). Today the Android player treats that server answer as an administrator's end and shows "An administrator ended this playback session."
This advertises the new paused_timeout_v1 client feature on phone and TV video starts. When the server answers 410 playback_session_paused_timeout, the player leaves the way it does for an administrator's end, and shows the localized "Playback stopped because it was paused for too long." The server keeps the viewer's position.
Approach
PlaybackServerEnd (ADMIN, PAUSED_TIMEOUT) is read from the 410 problem code, and sessionEndedEvents carries the reason. The progress reporter checks it before the sequenced-progress branch, so a paused timeout never turns into "Playback progress is pending" or a renewal.
Phone and TV leave on a paused-timeout answer from progress, failure-recovery replans, seek reanchor and seek fallback, and the staged replans behind subtitle, audio and quality changes. Admin ends keep their current paths.
remoteStopRequests now carries UiText, so the paused-timeout notice comes from the string catalog. The admin notice text is unchanged.
playbackClientFeaturesV3(context, pausedTimeout) adds the feature only for the phone and TV video starters, and the attempt keeps the choice for its replans. Cast and audiobook starts, which share the list, don't send it.
No journal change was needed: a stop for an already-stopped attempt answers replayed with the stored receipt, which settles the session. A test covers it.
Validation
Unit tests for :shared, :android-shared, :androidApp and :androidTvApp: 7,287 passed. The new progress test fails when the paused-timeout check is removed.
paused playback left the player about 90 s later with the new notice and returned Home, keeping the position;
a 40 s pause followed by resume kept playing;
a main build showed "An administrator ended this playback session." for the same answer.
On an Android TV emulator (API 36) against the same server: paused playback left the player about 80 s later with the new notice and returned to the episode page; a 31 s pause followed by resume kept playing; a main build showed the administrator wording.
On an Android tablet emulator and an Android foldable emulator, folded and open (API 36), against the same server with the branch at 6f2d9c57a and main at bbbfdeeb5:
each paused playback left the player 76–84 s after the pause;
the branch showed "Playback stopped because it was paused for too long." on all three, and main showed "An administrator ended this playback session.";
the tablet returned to the series page and the foldable to Home, where each started.
Show exit notice when playback ends due to paused-timeout or admin server stop
Adds a PlaybackServerEnd enum with ADMIN and PAUSED_TIMEOUT reasons, each with its own exit notice string. A new ApiResult.playbackServerEnd mapper recognizes 410 responses with matching problem codes.
PlaybackSessionEnded lifecycle events now carry the session ID plus reason, and PlayerViewModel/TvPlayerViewModel leave playback with the reason's notice instead of always showing the admin notice.
Phone and TV video starts advertise the new paused-timeout client feature (PAUSED_TIMEOUT_V1_FEATURE via playbackClientFeaturesV3); Cast and audiobook starts omit it. The stored attempt repeats the feature on replan and seek-recovery paths.
Paused-timeout errors during subtitle transactions and seek recovery exit playback for the current session; other errors keep existing failure handling.
Risk: the session-ended event payload changes from a String to PlaybackSessionEnded, and the remote-stop flow in both view models now carries UiText instead of String — any collector of these flows must be updated (the in-tree screens in PlayerScreen.kt and TvPlayerScreen.kt are).
…s a paused session
The server now ends a native video session that stays paused past an admin
limit and answers progress and replans with 410
playback_session_paused_timeout. Phone and TV leave the player the way an
administrator's end does, but show player.notice.pausedTimeout instead of
the admin wording.
- PlaybackSessionLifecycle names why the server ended a session
(PlaybackServerEnd) and checks it before the sequenced branch, so the
answer never becomes "progress pending" or a renewal.
- Remote stop requests carry UiText, so the notice follows the app language.
- Failure-recovery replans, seek reanchor and seek fallback, and staged
subtitle, audio and quality replans leave on a paused-timeout answer.
Admin ends keep their current handling on every path.
- A journal test pins that the exit's stop settles the attempt against the
server's replayed receipt, so later starts send nothing for it.
Builds need the player.notice.pausedTimeout catalog key from
silo-translations #159; the client is re-pinned to its release separately.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Phone and TV video starts now send paused_timeout_v1, so the server answers
a session it ended for staying paused with 410
playback_session_paused_timeout instead of the admin wording. The attempt
remembers the choice and every replan (failure recovery, seek reanchor,
seek recovery) repeats it, matching the server's attempt-sticky feature.
Cast and audiobook starts keep the default and do not send it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The V3 playback protocol adds an opt-in paused-timeout feature. Mobile and TV playback retain the option across session requests, recognize paused-timeout server responses, and show the corresponding localized exit notice. Translation catalogs also add related messages and other strings.
Changes: Playback feature advertisement
Layer / File(s)
Summary
Advertise paused-timeout support shared/src/commonMain/kotlin/org/siloserver/silo/model/playback/PlaybackProtocolV3.kt, android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackSessionManager.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileVideoPlaybackStarter.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvVideoPlaybackStarter.kt, android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/PlaybackSessionManagerSeekReanchorTest.kt
The protocol adds PAUSED_TIMEOUT_V1_FEATURE. Mobile and TV video starts enable the feature, and the session manager includes it in subsequent replan and seek requests. Tests cover enabled and default starts and feature propagation.
Classify server ends and exit playback android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackSessionLifecycle.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileSubtitleTransactionAdapter.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerScreen.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvSubtitleTransactionAdapter.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt, android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/PlaybackSessionLifecycleTest.kt, shared/src/commonTest/kotlin/org/siloserver/silo/repository/SequencedPlaybackTest.kt
The lifecycle reporter emits typed end reasons for administrator and paused-timeout responses. Mobile and TV ViewModels use those reasons for playback exit and notices. Subtitle transaction adapters invoke the timeout callback for matching stage or commit errors. Tests cover classification, lifecycle events, and sequenced stop handling.
Refresh translations and catalog metadata .silo-translations, android-shared/silo-locales.properties, android-shared/src/androidMain/res/values*/strings_catalog.xml
The metadata and generated catalogs identify revision 2026.11.23-73e6a54. Locale catalogs add paused-timeout error and notice strings, a For You empty-state message, and a media-type label.
sequenceDiagram
participant PlaybackSessionManager
participant Playback API
participant PlaybackSessionLifecycle
participant PlayerViewModel
participant PlayerScreen
PlaybackSessionManager->>Playback API: Send progress report
Playback API-->>PlaybackSessionLifecycle: Return 410 paused-timeout error
PlaybackSessionLifecycle->>PlayerViewModel: Emit session ID and typed end reason
PlayerViewModel->>PlayerScreen: Emit localized exit notice
Loading
Suggested reviewers:rhainland, rxwatcher
Merge Risk: Low · up to 70221
Phone and TV players now stop with a localized notice when the server ends a session that was paused too long. A late paused-timeout response from a subtitle change on a previous session could occasionally close newly started playback. The impact is limited and recoverable, so the change is mergeable with that follow-up in mind.
Security architecture risk: Low · up to 70221
Pause timeouts use the existing playback exit. One track or quality change path does not verify that the timed-out session is still the one on screen before requesting that exit, so a delayed response could close replacement playback on the same device.
Retained concerns
Low · reliability · inferred: The phone and TV staged-replan adapters request a player exit on a timeout without passing the affected session identity. They do this before returning the error to the transaction's generation-scoped failure handler. If playback is replaced while the stage request is settling, a late timeout for the old session can request an exit for the replacement. The base did not turn this response into an exit on the staged path.
Security review details
Security Blast Radius
inferred — The identified stale-response exposure is bounded by the reviewed sink: an exit request to the phone or TV player handling the response. It can interrupt replacement playback on that device, but the callback does not target a remote account or another device.
Trust Boundaries and Controls
observed — The staged commit checks the base attempt, session, and plan before publishing a replacement. That commit guard does not govern the new exit side effect on a stage error, which occurs before commit.
Resilience and Maintainability Implications
observed — After a screen accepts the exit request, its exit flag suppresses repeated notices and prevents re-entry into the playback exit routine. This does not bind the first exit request to a session.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the Android player now shows a notice when playback stops because it was paused too long. The changeset adds the 410 playback_session_paused_timeout handling, the paus…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description states the problem, approach, validation, and risks for the change. It names the paused-timeout handling, the 410 problem code, the advertised paused_timeout_v1 feature on phone and TV…
Full details: Title check
Explanation
The title names the main change: the Android player now shows a notice when playback stops because it was paused too long. The changeset adds the 410 playback_session_paused_timeout handling, the paused_timeout_v1 feature advertisement, and the localized notice text, so the title matches the primary change.
Full details: Description check
Explanation
The description states the problem, approach, validation, and risks for the change. It names the paused-timeout handling, the 410 problem code, the advertised paused_timeout_v1 feature on phone and TV video starts, and the localized notice. It also lists tests, emulator runs, and risks. It is directly related to the changeset.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Resolved: Android TV before-and-after captures and timeout-exit recordings now cover the original missing-artifact request, and the PR explains why tablet and foldable captures were not taken separately. Recording playback has not been independently verified.
Original request
The PR changes the timeout notice and exit behavior on Android TV, but the validation section says TV was built and unit-tested without being run. Please add before-and-after Android TV captures of the timeout notice and a short recording showing the player exit. CONTRIBUTING.md also asks for tablet and foldable (folded/open) captures, or an explanation of why those devices are unaffected.
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
…wn session
A stage or commit answered 410 playback_session_paused_timeout called
the player's exit whatever session it was about, so a late answer for a
session the player had moved on from could stop the playback that
replaced it. The callback now carries the request's session, and the
phone and TV players leave only while it is still the active one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Added Android TV before-and-after captures (API 36 emulator, main at bbbfdee vs this branch at 702217c) of the timeout notice and the page it returns to, a recording of each run from pause to exit, and a pause-then-resume check; they're on the evidence page linked in the description. Tablet and foldable aren't captured separately: the change is the toast's text and the existing exit path in the shared phone player, with no layout change, so they show the same toast as the phone capture.
The paused-timeout exit and notice are visible on Android TV, but the PR says TV was not run; the evidence link therefore needs a short recording of the timeout and player exit on TV. The same change reaches the phone, tablet, and foldable (folded and open); the linked evidence should show those form factors too.
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.
Android TV was run and is on the evidence page (before and after, with recordings of the timed exit). The page now also covers the tablet and the foldable, folded and open, before and after, each with a recording of the timed exit; the Validation section lists the results.
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
enhancementNew feature or requestimpact: polishAnnoyance, cosmetic, or nice-to-havepriority: P2Limited scope, workaround exists, or polishsize/XL500–999 added + deleted lines (all files); change volume, not priority.
1 participant
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.
Problem
Related issue: N/A
Validation tasks: none (no validated case covers a server ending a paused session)
Other clients: Apple Silo-Server/silo-apple#1261; Roku Silo-Server/silo-roku#107; Web Silo-Server/silo-server#5180
Silo-Server/silo-server#5180 lets an admin end playback that stays paused too long (default 15 minutes). Today the Android player treats that server answer as an administrator's end and shows "An administrator ended this playback session."
This advertises the new
paused_timeout_v1client feature on phone and TV video starts. When the server answers410 playback_session_paused_timeout, the player leaves the way it does for an administrator's end, and shows the localized "Playback stopped because it was paused for too long." The server keeps the viewer's position.Approach
PlaybackServerEnd(ADMIN,PAUSED_TIMEOUT) is read from the 410 problem code, andsessionEndedEventscarries the reason. The progress reporter checks it before the sequenced-progress branch, so a paused timeout never turns into "Playback progress is pending" or a renewal.remoteStopRequestsnow carriesUiText, so the paused-timeout notice comes from the string catalog. The admin notice text is unchanged.playbackClientFeaturesV3(context, pausedTimeout)adds the feature only for the phone and TV video starters, and the attempt keeps the choice for its replans. Cast and audiobook starts, which share the list, don't send it.replayedwith the stored receipt, which settles the session. A test covers it.Validation
:shared,:android-shared,:androidAppand:androidTvApp: 7,287 passed. The new progress test fails when the paused-timeout check is removed.mainbuild showed "An administrator ended this playback session." for the same answer.mainbuild showed the administrator wording.6f2d9c57aandmainatbbbfdeeb5:mainshowed "An administrator ended this playback session.";Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/paused-playback-timeout/
Risks
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Show exit notice when playback ends due to paused-timeout or admin server stop
PlaybackServerEndenum withADMINandPAUSED_TIMEOUTreasons, each with its own exit notice string. A newApiResult.playbackServerEndmapper recognizes 410 responses with matching problem codes.PlaybackSessionEndedlifecycle events now carry the session ID plus reason, andPlayerViewModel/TvPlayerViewModelleave playback with the reason's notice instead of always showing the admin notice.PAUSED_TIMEOUT_V1_FEATUREviaplaybackClientFeaturesV3); Cast and audiobook starts omit it. The stored attempt repeats the feature on replan and seek-recovery paths.StringtoPlaybackSessionEnded, and the remote-stop flow in both view models now carriesUiTextinstead ofString— any collector of these flows must be updated (the in-tree screens in PlayerScreen.kt and TvPlayerScreen.kt are).Macroscope summarized 6f2d9c5.