Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Feature use max segment duration (Dash-Industry-Forum#3292)
Browse files Browse the repository at this point in the history
* Use @maxSegmentDuration for live delay calculation if present

* Use @maxSegmentDuration for live delay calculation if present
  • Loading branch information
dsilhavy authored and jeffcunat committed Jul 6, 2020
1 parent f7cb33d commit 6f983e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/streaming/controllers/StreamController.js
Expand Up @@ -693,13 +693,13 @@ function StreamController() {
try {
let fragmentDuration = NaN;

// For multiperiod manifests we use the maxFragmentDuration attribute as we do not know the correct starting period
if (streamInfos && streamInfos.length > 1) {
fragmentDuration = manifestInfo && !isNaN(manifestInfo.maxFragmentDuration) ? manifestInfo.maxFragmentDuration : NaN;
// We use the maxFragmentDuration attribute if present
if (manifestInfo && !isNaN(manifestInfo.maxFragmentDuration) && isFinite(manifestInfo.maxFragmentDuration)) {
return manifestInfo.maxFragmentDuration;
}

// For single period manifests we iterate over all AS and use the maximum segment length
else if (streamInfos && streamInfos.length === 1) {
// For single period manifests we can iterate over all AS and use the maximum segment length
if (streamInfos && streamInfos.length === 1) {
const streamInfo = streamInfos[0];
const mediaTypes = [Constants.VIDEO, Constants.AUDIO, Constants.FRAGMENTED_TEXT];

Expand Down

0 comments on commit 6f983e0

Please sign in to comment.