Skip to content

v0.1.115 — Live TV remote viewing: auto MPEG-TS / HLS pick

Choose a tag to compare

@NebulaSleuth NebulaSleuth released this 02 Jun 20:24
· 131 commits to main since this release

Live TV remote viewing — auto-pick MPEG-TS vs HLS

Adds dual detection to `/api/live/stream/:channelId` so direct-tuner clients on the LAN keep low-latency MPEG-TS while remote clients (cellular, Tailscale, anything off-LAN) automatically get the ffmpeg HLS proxy and can actually play the stream.

Decision order

  1. `?format=hls` → force HLS (Roku, browsers — unchanged)
  2. `?format=direct` or `?format=mpeg-ts` → force direct (manual override for testing)
  3. `X-Plex-Connection: remote` → HLS
  4. `X-Plex-Connection: local` → MPEG-TS
  5. Auto-detect by client IP — RFC1918 / loopback / link-local / IPv6 ULA → MPEG-TS, else HLS

Tailscale's `100.64.0.0/10` deliberately falls OUTSIDE the local set — Tailscale clients can't reach the tuner's LAN IP without subnet routing, so they correctly auto-fall to HLS.

Every decision is logged: `[live.stream] channel=hdhr-5.1 → hls (X-Plex-Connection: remote)`.