v2: tune playback for bursty upstream + clean overflow handling

- Player: match webplayer.online's proven mpegts.js live-sync config
  (deep 30-90s buffer, 45s target latency, 1.1x catch-up). The upstream
  delivers in bursts with multi-second gaps (measured up to ~6s); the
  deep buffer rides over them so 4K HEVC plays smoothly.
- Hub: on subscriber buffer overflow, cleanly disconnect the client so
  it reconnects and resyncs from a TS packet boundary instead of
  dropping bytes mid-stream (which corrupted alignment / sync_byte).
- Enlarge per-client buffer (256 -> 2048 chunks).
- Refresh real1.m3u from upstream.
This commit is contained in:
2026-06-12 19:48:33 -07:00
parent 723ae1f1ac
commit 03296e7572
4 changed files with 410 additions and 328 deletions

View File

@@ -32,6 +32,9 @@ func (a *App) HandleTS(w http.ResponseWriter, r *http.Request) {
return
case <-sub.Done():
return
case <-sub.Overflow():
// Client fell too far behind; close so it reconnects and resyncs.
return
case chunk, ok := <-sub.Chan():
if !ok {
return