Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(HLS): Fix HLS load when using #EXT-X-I-FRAME-STREAM-INF without resolution #6680

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,18 @@ shaka.hls.HlsParser = class {
/** @type {!Array.<!shaka.extern.Stream>} */
let imageStreams = [];

// This assert is our own sanity check.
goog.asserts.assert(this.presentationTimeline_ == null,
'Presentation timeline created early!');
// We don't know if the presentation is VOD or live until we parse at least
// one media playlist, so make a VOD-style presentation timeline for now
// and change the type later if we discover this is live.
// Since the player will load the first variant chosen early in the process,
// there isn't a window during playback where the live-ness is unknown.
this.presentationTimeline_ = new shaka.media.PresentationTimeline(
/* presentationStartTime= */ null, /* delay= */ 0);
this.presentationTimeline_.setStatic(true);

const getUris = () => {
return [uri];
};
Expand Down Expand Up @@ -845,18 +857,6 @@ shaka.hls.HlsParser = class {
shaka.util.Error.Code.OPERATION_ABORTED);
}

// This assert is our own sanity check.
goog.asserts.assert(this.presentationTimeline_ == null,
'Presentation timeline created early!');
// We don't know if the presentation is VOD or live until we parse at least
// one media playlist, so make a VOD-style presentation timeline for now
// and change the type later if we discover this is live.
// Since the player will load the first variant chosen early in the process,
// there isn't a window during playback where the live-ness is unknown.
this.presentationTimeline_ = new shaka.media.PresentationTimeline(
/* presentationStartTime= */ null, /* delay= */ 0);
this.presentationTimeline_.setStatic(true);

// Single-variant streams aren't lazy-loaded, so for them we already have
// enough info here to determine the presentation type and duration.
if (playlist.type == shaka.hls.PlaylistType.MEDIA) {
Expand Down
Loading