Skip to content

TV playback parity on Media3 with the Back-button state machine #34

Open
0 of 1 issue completed

Description

@altaywtf

Part of putdotio/putio-ios#14 (W4 — Android TV parity). Blocked by putdotio/putio-ios#33; playback model putdotio/putio-sdk-kotlin#23. Closes putdotio/putio-ios#9 (UI-1528).

Outcome

Playback parity with the RN app's custom Android TV controls (17–31), adapted to Media3 and the current Android TV design contract, plus the Back-button state machine putdotio/putio-ios#9 demands. HLS/MP4 ship first; libVLC remains post-v1 under putdotio/putio-ios#52.

Scope

  • Player with custom controls overlay: ~3s auto-hide, any-key reveal, raw filename title chrome; Language only when >1 audio track, Subtitles only when tracks exist, Speed always (0.25–2x, resets per file)
  • Resume is a play-time M3 text/progress dialog, never a poster and never an in-app Continue Watching shelf: show the raw filename and LinearProgressIndicator; stack full-width pill buttons; prefer Continue; Start from the beginning resets to zero
  • Show resume only when duration and saved start_from are positive; progress previews the focused choice; Back leaves playback, as the RN prompt does (fix(playback): clear finished positions, resume audio silently, stop forcing landscape #266)
  • Start-from write-back remains throttled + debounced with a final flush; never write per progress tick
  • Subtitles: embedded + sidecar, autoselect gated by dont_autoselect_subtitles, MP4 label rewriting; audio-language picker; respect user subtitle style settings
  • Seek: D-pad accumulating press-count scrubbing (15s × count), auto-pause while scrubbing + resume on commit, FF/REW focus capture
  • Back-button state machine (Dismiss playback overlays before exiting on TV Back #9): Back with any overlay/picker/seek mode open dismisses the topmost layer preserving time/pause/tracks/focus; Back with nothing open exits playback. Uniform across all overlays; Fire TV remote must never skip straight out
  • HLS/MP4 selection from user config via the SDK playback source; tv-native's default buffer (Android TV has no buffer setting); conversion starts automatically on open, with the interstitial (feat(playback): start MP4 conversion on opening a video that needs it #260); typed recoverable media errors; MediaSession for system controls
  • Fire TV hardware smoke for remote/back behavior

Remaining: L6: Fire TV remote smoke and oracle 17–31 capture parity (#51); putdotio/putio-ios#9 on Fire TV.

Acceptance criteria

  • Playback captures match oracle 17–31 route/state names
  • A recording proves Continue preferred, Start from beginning, Back-to-saved-position, scrub/pickers, and the overlay Back sequence
  • chore(env): hardcode 1Password vault/item; rename helper script putio-ios#9's contract is demonstrated on Fire TV
  • DoD: ./gradlew verify, both flavor assembles, TV harness proof, and published recordings pass

Activity

  1. altaywtf commented on Aug 8, 2026

    @altaywtf
    MemberAuthor

    Write-pattern caution from the parallel Apple lane: putdotio/putio-tv-native-legacy#27 is a live watchdog termination on shipped tvOS whose prior diagnosis (Linear UI-874) was excessive setStartFrom calls. This issue's start-from write-back must stay throttled + debounced (tv-native's reference behavior is 15s throttle, flush on unmount) and never write per-progress-tick. Same applies to mobile playback putdotio/putio-ios#27. Also note putdotio/putio-ios#45 adds subtitle-state and audio-passthrough acceptance criteria to this slice.

  2. altaywtf commented on Sep 12, 2026

    @altaywtf
    MemberAuthor

    Carried over from putdotio/putio-ios#33: the oracle's files-conversion (conversion-in-progress interstitial) capture belongs to this playback slice. Everything else in the browse oracle is captured natively on putdotio/putio-ios#165–#171.

  3. altaywtf commented on Sep 30, 2026

    @altaywtf
    MemberAuthor

    Reopening: the squash merge of layer 1 (#217, f02280e) closed this, though that PR is only part of putdotio/putio-ios#34. Layers 1–3 have merged (#217, putdotio/putio-ios#219, putdotio/putio-ios#220). Tracks and subtitles (layer 4), MediaSession and conversion (layer 5), and the Fire TV and oracle parity check (layer 6) remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions