Skip to content

Commit 6472bbe

Browse files
committed
StreamController: handle new duration in setMediaDuration in case of duration updating
1 parent 21cb800 commit 6472bbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/streaming/controllers/StreamController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ function StreamController() {
546546
});
547547
}
548548

549-
function setMediaDuration() {
550-
const manifestDuration = activeStream.getStreamInfo().manifestInfo.duration;
549+
function setMediaDuration(duration) {
550+
const manifestDuration = duration ? duration : activeStream.getStreamInfo().manifestInfo.duration;
551551
const mediaDuration = mediaSourceController.setDuration(mediaSource, manifestDuration);
552552
logger.debug('Duration successfully set to: ' + mediaDuration);
553553
}

0 commit comments

Comments
 (0)