diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index 940bad503e..bcaca4cc42 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -1665,9 +1665,16 @@ shaka.hls.HlsParser = class { /** @type {!Map.} */ 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);