Skip to content

Commit

Permalink
Apply a minor offset when using MPD anchors with #t=0 for dynamic str…
Browse files Browse the repository at this point in the history
…eams when calcFromSegmentTimeline is enabled (#3833)
  • Loading branch information
dsilhavy committed Dec 20, 2021
1 parent 5c9be46 commit 57c0f0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/streaming/controllers/StreamController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,9 @@ function StreamController() {
const startTimeFromUri = _getStartTimeFromUriParameters(true);
if (!isNaN(startTimeFromUri)) {
logger.info('Start time from URI parameters: ' + startTimeFromUri);
startTime = Math.max(Math.min(startTime, startTimeFromUri), dvrWindow.start);
// If calcFromSegmentTimeline is enabled we saw problems caused by the MSE.seekableRange when starting at dvrWindow.start. Apply a small offset to avoid this problem.
const offset = settings.get().streaming.timeShiftBuffer.calcFromSegmentTimeline ? 0.1 : 0;
startTime = Math.max(Math.min(startTime, startTimeFromUri), dvrWindow.start + offset);
}
}
} else {
Expand Down

0 comments on commit 57c0f0b

Please sign in to comment.