Skip to content

Commit

Permalink
fix(DASH): Fix dynamic manifests from edgeware
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Jan 23, 2023
1 parent a5f8b43 commit 1916749
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dash/segment_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@ shaka.dash.SegmentTemplate = class {
const periodStart = context.periodInfo.start;
const periodEnd = context.periodInfo.duration ?
context.periodInfo.start + context.periodInfo.duration : Infinity;
const isLastPeriod = context.periodInfo.isLastPeriod;

// Don't fit live content, since it might receive more segments.
// Unless that live content is multi-period; it's safe to fit every period
// but the last one, since only the last period might receive new
// segments.
const shouldFit = periodEnd != Infinity;
const shouldFit =
periodEnd != Infinity && (!isLastPeriod || !context.dynamic);

if (segmentIndex) {
if (shouldFit) {
Expand Down

0 comments on commit 1916749

Please sign in to comment.