OrbiSubs: master advertises the real resolution and bitrate; players jump to live by hand

The master playlist had BANDWIDTH and RESOLUTION hard-coded to T13's values
(2.6 Mb/s, 1280x720), so ecuadortv (1080p60, ~8 Mb/s) was announced as 720p.
They are now measured from the ingest's own segments in a side thread and the
master is rewritten when they change; --bandwidth/--resolution still pin them.

4f7a685 passed liveMaxLatencyDurationCount alone, which hls.js rejects
("Illegal hls.js config"), so no channel played in player.html or in the
panel's preview. The jump back to live is now done on LEVEL_UPDATED, which
keeps the HOLD-BACK published by the channel as the target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guy
2026-11-18 22:28:08 -05:00
parent 4f7a685571
commit a6668f1601
3 changed files with 111 additions and 13 deletions
+7 -1
View File
@@ -473,7 +473,13 @@ function openView(c) {
// los 3 segmentos de hls.js, que es lo que usaba la 076 para que el inglés llegue a tiempo.
// Con hasta 1,1x de velocidad llega al objetivo (hls.js arranca más atrás del HOLD-BACK).
// Con más de 6 segmentos de atraso (después de un corte de la fuente) salta al vivo (083).
hls = new Hls({ maxLiveSyncPlaybackRate: 1.1, liveMaxLatencyDurationCount: 6 });
// A mano y no con liveMaxLatencyDurationCount: sin liveSyncDurationCount hls.js tira
// "Illegal hls.js config" y no reproduce nada, y con él se pisa el HOLD-BACK (2026-11-19).
hls = new Hls({ maxLiveSyncPlaybackRate: 1.1 });
hls.on(Hls.Events.LEVEL_UPDATED, (ev, d) => {
const td = d.details.targetduration, obj = hls.targetLatency, pos = hls.liveSyncPosition;
if (td && obj && pos && hls.latency > obj + 6 * td) v.currentTime = pos;
});
hls.on(Hls.Events.ERROR, (ev, d) => { if (!d.fatal) return; if (d.type === Hls.ErrorTypes.MEDIA_ERROR) hls.recoverMediaError(); else hls.startLoad(); });
hls.loadSource(src); hls.attachMedia(v);
hls.on(Hls.Events.SUBTITLE_TRACKS_UPDATED, () => {