Skip to content

Commit

Permalink
Fix ScheduleController (re) start in case of track switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertrand Berthelot committed Jul 3, 2020
1 parent 75cd9e8 commit 60f6471
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/streaming/Stream.js
Expand Up @@ -633,11 +633,13 @@ function Stream(config) {
streamInfo: streamInfo,
liveStartTime: getLiveStartTime()
});
}

// Start ScheduleController in case stream initialization has been completed after 'play' event (case for SegmentBase streams)
for (let i = 0; i < ln && streamProcessors[i]; i++) {
streamProcessors[i].getScheduleController().start();
}
// (Re)start ScheduleController:
// - in case stream initialization has been completed after 'play' event (case for SegmentBase streams)
// - in case stream is complete but a track switch has been requested
for (let i = 0; i < ln && streamProcessors[i]; i++) {
streamProcessors[i].getScheduleController().start();
}
}

Expand Down

0 comments on commit 60f6471

Please sign in to comment.