Yokan / rebuild
Course 1 8624561

PLAYER_PLAYBACK.md

docs/features/PLAYER_PLAYBACK.md

documentation / design asset68 lines
1# Player playback options23Covers seek previews, the sleep timer, stream failover, remembered volume and4brightness, and speed presets. Settings are stored in5`DbSettings.features.player` (`DbPlayerPreferences`). Defaults keep the6previous behavior.78## Seek previews910- Sources can supply a WebVTT thumbnail track through `thumbnailTrack`11  (or `thumbnails`) on the video object. A subtitle entry labelled `thumbnails`,12  `sprites` or `storyboard` is treated as that track and removed from the13  subtitles.14- Cues point to whole images or sprite tiles (`#xywh=`). Relative URLs resolve15  against the track URL. The track and sprite sheets are fetched with the16  stream's headers.17- While the seek bar is dragged, the tile for the target time is shown above18  the thumb. Each sheet is loaded on first use and kept for that stream. A new19  stream cancels outstanding loads. Failed requests are logged and not retried.20- Works on all platforms through shared HTTP and image decoding. Browsers also21  need CORS on the image host.2223## Sleep timer2425- The player's timer menu offers Off, 5, 15, 30, 45, 60 or 90 minutes, or End of26  episode. The remaining minutes (or "End") are shown on the button.27- When it is due, playback pauses and the timer clears. It is held per profile28  session, so it continues across episode changes. It is not persisted across29  restarts.3031## Stream failover3233- Off by default (`switchStreamOnFailure`). When a stream reports a playback34  error, it is marked failed for the episode, and the next untried stream loads35  at the current position.36- Each stream is tried at most once, so failover cannot loop. When none remain,37  or failover is off, the player shows the error.38- Errors come from mpv end-file errors and load timeouts, and from39  compose-mediaplayer's error state (web and fallback backends).4041## Volume and brightness4243- The player sheet has a volume slider (0–100 %) on the audio tab and a44  brightness slider on the video tab. "Use system brightness" removes the45  override.46- With Remember volume or Remember brightness on (both off by default), the47  last value is saved after it settles and restored in later sessions.48- Volume uses mpv `volume` or compose-mediaplayer's volume. Brightness sets the49  window brightness on Android and `UIScreen` brightness on iOS, restoring the50  previous value on exit. On desktop and web there is no app-controlled display51  brightness, so the video is dimmed with an overlay instead.5253## Speed presets5455- `speedPresets` defaults to the previously offered speeds (0.25–2.0 in steps of56  0.25). Edit them in Internal player settings as a comma-separated list. Values57  must be within 0.25–4; they are rounded to two decimals, deduplicated and58  sorted, and an invalid list is rejected.59- The player's speed button opens a menu of the presets instead of cycling. The60  default-speed choice uses the same presets.6162## Verification63642026-10-18: `PlaybackPoliciesTest` (6), `MpvFeaturesTest` (5),65`ComposeControllerRetirementTest` (2) and `VideoFromJsonTest` (2) passed on66desktop JVM and Kotlin/Wasm. The focused desktop run of the media, player and67codec packages passed 169 tests. Android, iOS simulator, desktop and Wasm68compiled.69

Search chapters, reference and source filenames.