Skip to content

Commit

Permalink
fix(HLS): Fix lowLatencyPresentationDelay when using autoLowLatencyMo…
Browse files Browse the repository at this point in the history
…de (#4712)
  • Loading branch information
avelad authored Nov 18, 2022
1 parent cd1b7c0 commit 877e954
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1930,9 +1930,16 @@ shaka.hls.HlsParser = class {

const mediaSequenceToStartTime = this.isLive_() ?
this.mediaSequenceToStartTimeByType_.get(type) : new Map();
const prevLowLatencyMode = this.lowLatencyMode_;
const segments = this.createSegments_(verbatimMediaPlaylistUri, playlist,
type, mimeType, mediaSequenceToStartTime, mediaVariables);

// This happens when autoLowLatencyMode is true, so we need set the
// correct lowLatencyPresentationDelay_
if (prevLowLatencyMode != this.lowLatencyMode_) {
this.determinePresentationType_(playlist);
}

const lastEndTime = segments[segments.length - 1].endTime;
/** @type {!shaka.media.SegmentIndex} */
const segmentIndex = new shaka.media.SegmentIndex(segments);
Expand Down

0 comments on commit 877e954

Please sign in to comment.