Skip to content

Commit

Permalink
fix(HLS): Fix seekRange for EVENT playlist not using EXT-X-PLAYLIST-T…
Browse files Browse the repository at this point in the history
…YPE (#5220)
  • Loading branch information
avelad authored and joeyparrish committed May 30, 2023
1 parent 1a89daa commit 562831b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ shaka.hls.HlsParser = class {
this.presentationTimeline_.setDuration(Math.min(...maxTimestamps));
this.playerInterface_.updateDuration();
}
if (stillLive) {
this.determineDuration_();
}
}

/**
Expand Down Expand Up @@ -403,6 +406,8 @@ shaka.hls.HlsParser = class {
const newestSegment = segments[segments.length - 1];
goog.asserts.assert(newestSegment, 'Should have segments!');

streamInfo.maxTimestamp = newestSegment.endTime;

// Once the last segment has been added to the playlist,
// #EXT-X-ENDLIST tag will be appended.
// If that happened, treat the rest of the EVENT presentation as VOD.
Expand All @@ -413,7 +418,6 @@ shaka.hls.HlsParser = class {
// Flag this for later. We don't convert the whole presentation into VOD
// until we've seen the ENDLIST tag for all active playlists.
streamInfo.hasEndList = true;
streamInfo.maxTimestamp = newestSegment.endTime;
}
}

Expand Down

0 comments on commit 562831b

Please sign in to comment.