File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1042,7 +1042,9 @@ export default class InterstitialsController
10421042 if ( timelinePos === - 1 ) {
10431043 const startPosition = this . hls . startPosition ;
10441044 this . timelinePos = startPosition ;
1045- if ( interstitialEvents . length && interstitialEvents [ 0 ] . cue . pre ) {
1045+ if ( interstitialEvents . length === 0 ) {
1046+ this . setSchedulePosition ( 0 ) ;
1047+ } else if ( interstitialEvents [ 0 ] . cue . pre ) {
10461048 this . log ( timelineMessage ( 'checkStart (preroll)' , startPosition ) ) ;
10471049 const index = schedule . findEventIndex ( interstitialEvents [ 0 ] . identifier ) ;
10481050 this . setSchedulePosition ( index ) ;
@@ -1052,6 +1054,8 @@ export default class InterstitialsController
10521054 startPosition > 0 ? startPosition : 0 ) ;
10531055 const index = schedule . findItemIndexAtTime ( start ) ;
10541056 this . setSchedulePosition ( index ) ;
1057+ } else if ( this . hls . liveSyncPosition === 0 ) {
1058+ this . setSchedulePosition ( 0 ) ;
10551059 } else {
10561060 this . log ( '[checkStart] waiting for live start' ) ;
10571061 }
You can’t perform that action at this time.
0 commit comments