Skip to content

Stream switcher in the video information panel #117 - #132

Draft
Drvolks wants to merge 2 commits into
mainfrom
issue-117-stream-switch
Draft

Stream switcher in the video information panel #117#132
Drvolks wants to merge 2 commits into
mainfrom
issue-117-stream-switch

Conversation

@Drvolks

@Drvolks Drvolks commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Closes #117. Follow-up to #116 — the stream (source) picker the stats page shows per active channel is now available while a channel is playing, in the Video tab of the player's stream settings panel.

What changed

  • PlayerStreamSwitcher (new, Features/Player/) — holds the playing channel's streams, the source /proxy/ts/status reports, and a short-lived pending selection so the picker doesn't snap back to the old source while the proxy restarts the stream (same 20s settle rule as the stats page).
  • PlayerView — renders the picker in videoTabContent, reusing the existing /proxy/ts/status poll (every 8s, already there for the profile badge) to track the active stream. Shown only for live playback with admin access (userLevel >= 10, not output-only, not demo).
  • tvOS — remote focus in the Video tab now walks the stream rows. Chapters and streams never coexist (chapters need a seekable recording, streams a live proxy channel), so they share the index space.
  • DispatcherClient.channelUUID(forId:) — the id → UUID direction; the player knows the channel id it started from, while change_stream / status are keyed by UUID.
  • TestsPlayerStreamSwitcherTests covers status matching, pending-selection precedence and expiry, labelling, and reset.
  • Also drops the "never build after a change" rule from CLAUDE.md (separate commit).

Verification

Check Result
Dispatcharr — iOS / tvOS / macOS build
NextPVR — iOS build
NexusPVRTests (both schemes, iOS sim) ✅ 624 tests, 50 suites

Not yet exercised against a real Dispatcharr server — the mock server already serves the #116 endpoints.

Note

Switching does not reload the player: the proxy keeps the client connection and swaps the source behind it, matching the web app's behaviour. Worth confirming on a live server.

🤖 Generated with Claude Code

Drvolks and others added 2 commits August 13, 2026 16:30
Follow-up to #116: the same source switch the stats page offers per active
channel is now available while watching a channel, in the Video tab of the
player's stream settings panel.

- PlayerStreamSwitcher holds the playing channel's streams, the source the
  proxy reports, and a short-lived pending selection so the picker doesn't
  snap back while the proxy restarts the source.
- PlayerView reuses its existing /proxy/ts/status poll to track the active
  stream, and gates the picker on live playback + admin (userLevel >= 10),
  non-output, non-demo access.
- tvOS remote focus in the Video tab now walks the stream rows (chapters and
  streams never coexist: one needs a recording, the other a live channel).
- DispatcherClient.channelUUID(forId:) exposes the id -> UUID direction the
  proxy endpoints need.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Builds are now allowed whenever they're useful to verify a change compiles.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream switcher in the video panel (player view)

1 participant