Skip to content

Commit

Permalink
Merge pull request #3322 from Orange-OpenSource/fix-segmentbase-start
Browse files Browse the repository at this point in the history
Playback start for SegmentBase streams
  • Loading branch information
Bertrand Berthelot committed Jul 3, 2020
2 parents 38a0661 + 2f2bcfa commit 75cd9e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/streaming/Stream.js
Expand Up @@ -633,6 +633,11 @@ 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();
}
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/streaming/controllers/PlaybackController.js
Expand Up @@ -135,12 +135,9 @@ function PlaybackController() {
startTime = Math.max(startTime, startTimeFromUri);
}
}

// Check if not seeking at current time
if (startTime === videoModel.getTime()) return;
}

if (!isNaN(startTime)) {
if (!isNaN(startTime) && startTime !== videoModel.getTime()) {
// Trigger PLAYBACK_SEEKING event for controllers
eventBus.trigger(Events.PLAYBACK_SEEKING, {
seekTime: startTime
Expand Down

0 comments on commit 75cd9e8

Please sign in to comment.