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 and joeyparrish committed Dec 8, 2022
1 parent 2987451 commit c4ef744
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 @@ -1665,9 +1665,16 @@ shaka.hls.HlsParser = class {
/** @type {!Map.<number, number>} */
const mediaSequenceToStartTime = new Map();

const prevLowLatencyMode = this.lowLatencyMode_;
const segments = this.createSegments_(verbatimMediaPlaylistUri, playlist,
type, mimeType, mediaSequenceToStartTime, mediaVariables, codecs);

// 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 c4ef744

Please sign in to comment.