Frontend: update for SourceUri + Playout Service HLS #12

Closed
opened 2026-07-12 05:49:21 +00:00 by GKaszewski · 0 comments
Owner

Parent

#2

What to build

Update the k-tv-frontend to work with the new architecture. The backend's stream endpoint now returns a SourceUri (not a direct stream URL), and the Playout Service serves HLS streams.

Changes:

  • The stream API route (app/api/stream/[channelId]/route.ts) should point to the Playout Service's HLS endpoint instead of resolving a provider stream URL
  • useStreamUrl hook should return the Playout Service's playlist URL for the channel (e.g., {PLAYOUT_URL}/playout/:channelId/playlist.m3u8)
  • hls.js should connect to the Playout Service endpoint
  • Remove any provider-specific streaming logic (Jellyfin HLS URL construction, mediaSourceId, etc.)
  • Add NEXT_PUBLIC_PLAYOUT_URL env var for the Playout Service base URL

Acceptance criteria

  • TV page plays HLS from the Playout Service endpoint
  • NEXT_PUBLIC_PLAYOUT_URL env var configures the playout endpoint
  • hls.js connects to the playout HLS playlist
  • Shared broadcast works: two browser tabs on the same channel show the same content at the same offset
  • No references to Jellyfin stream URLs in the frontend
  • Fallback: when Playout Service is unavailable, show an error state (not a crash)

Blocked by

  • #9 (Playout Service core — must serve HLS for the frontend to connect to)
## Parent #2 ## What to build Update the k-tv-frontend to work with the new architecture. The backend's stream endpoint now returns a SourceUri (not a direct stream URL), and the Playout Service serves HLS streams. Changes: - The stream API route (`app/api/stream/[channelId]/route.ts`) should point to the Playout Service's HLS endpoint instead of resolving a provider stream URL - `useStreamUrl` hook should return the Playout Service's playlist URL for the channel (e.g., `{PLAYOUT_URL}/playout/:channelId/playlist.m3u8`) - hls.js should connect to the Playout Service endpoint - Remove any provider-specific streaming logic (Jellyfin HLS URL construction, mediaSourceId, etc.) - Add `NEXT_PUBLIC_PLAYOUT_URL` env var for the Playout Service base URL ## Acceptance criteria - [ ] TV page plays HLS from the Playout Service endpoint - [ ] `NEXT_PUBLIC_PLAYOUT_URL` env var configures the playout endpoint - [ ] hls.js connects to the playout HLS playlist - [ ] Shared broadcast works: two browser tabs on the same channel show the same content at the same offset - [ ] No references to Jellyfin stream URLs in the frontend - [ ] Fallback: when Playout Service is unavailable, show an error state (not a crash) ## Blocked by - #9 (Playout Service core — must serve HLS for the frontend to connect to)
GKaszewski added the ready-for-agent label 2026-07-12 05:49:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-tv#12