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
  • Loading branch information
avelad committed May 9, 2023
1 parent 654a028 commit 1c89204
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/hls/hls_parser.js
Expand Up @@ -314,6 +314,9 @@ shaka.hls.HlsParser = class {
this.presentationTimeline_.setDuration(Math.min(...maxTimestamps));
this.playerInterface_.updateDuration();
}
if (stillLive) {
this.determineDuration_();
}
}

/**
Expand Down Expand Up @@ -401,6 +404,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 @@ -411,7 +416,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 1c89204

Please sign in to comment.