Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 777a1fb

Browse files
committed
MssParser: If live manifest with Duration and no DVRWindowLength, we consider it as a start-over manifest
1 parent e4ca54f commit 777a1fb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/js/mss/MssParser.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,15 @@ Mss.dependencies.MssParser = function() {
505505
mpd.type = (isLive !== null && isLive.toLowerCase() === 'true') ? 'dynamic' : 'static';
506506
mpd.timeShiftBufferDepth = parseFloat(this.domParser.getAttributeValue(smoothNode, 'DVRWindowLength')) / TIME_SCALE_100_NANOSECOND_UNIT;
507507
var duration = parseFloat(this.domParser.getAttributeValue(smoothNode, 'Duration'));
508+
509+
// If live manifest with Duration and no DVRWindowLength, we consider it as a start-over manifest
510+
if (mpd.type === "dynamic" && duration > 0) {
511+
mpd.timeShiftBufferDepth = duration / TIME_SCALE_100_NANOSECOND_UNIT;
512+
duration = 0;
513+
mpd.startOver = true;
514+
}
515+
516+
// Complete manifest/mpd initialization
508517
mpd.mediaPresentationDuration = (duration === 0) ? Infinity : (duration / TIME_SCALE_100_NANOSECOND_UNIT);
509518
mpd.BaseURL = baseURL;
510519
mpd.minBufferTime = MediaPlayer.dependencies.BufferExtensions.DEFAULT_MIN_BUFFER_TIME;

0 commit comments

Comments
 (0)