Cherry-pick changes from #7799

This commit is contained in:
Rob Walch
2026-04-13 09:10:41 -07:00
committed by Rob Walch
parent 1596a02ff1
commit 7e19f21a69
+5 -1
View File
@@ -1042,7 +1042,9 @@ export default class InterstitialsController
if (timelinePos === -1) {
const startPosition = this.hls.startPosition;
this.timelinePos = startPosition;
if (interstitialEvents.length && interstitialEvents[0].cue.pre) {
if (interstitialEvents.length === 0) {
this.setSchedulePosition(0);
} else if (interstitialEvents[0].cue.pre) {
this.log(timelineMessage('checkStart (preroll)', startPosition));
const index = schedule.findEventIndex(interstitialEvents[0].identifier);
this.setSchedulePosition(index);
@@ -1052,6 +1054,8 @@ export default class InterstitialsController
startPosition > 0 ? startPosition : 0);
const index = schedule.findItemIndexAtTime(start);
this.setSchedulePosition(index);
} else if (this.hls.liveSyncPosition === 0) {
this.setSchedulePosition(0);
} else {
this.log('[checkStart] waiting for live start');
}