OrbiSubs players: jump back to live when more than 6 segments behind (after a source outage)

This commit is contained in:
guy
2026-11-17 14:49:13 -03:00
parent 02bce44857
commit 4f7a685571
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -472,7 +472,8 @@ function openView(c) {
// Colchón al borde: el HOLD-BACK de video.m3u8 (lo fija el canal, tarea 081); sin él,
// 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).
hls = new Hls({ maxLiveSyncPlaybackRate: 1.1 });
// 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 });
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, () => {