Skip to content

Commit

Permalink
fix(HLS): Fix bad init segment request with byterange when using medi…
Browse files Browse the repository at this point in the history
…a playlist (#6297)

Backported to v4.7.x
  • Loading branch information
avelad authored and joeyparrish committed Feb 26, 2024
1 parent bc6dbf5 commit 6fb0587
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/hls/hls_parser.js
Expand Up @@ -32,6 +32,7 @@ goog.require('shaka.util.FakeEvent');
goog.require('shaka.util.LanguageUtils');
goog.require('shaka.util.ManifestParserUtils');
goog.require('shaka.util.MimeUtils');
goog.require('shaka.util.Networking');
goog.require('shaka.util.OperationManager');
goog.require('shaka.util.Pssh');
goog.require('shaka.media.SegmentUtils');
Expand Down Expand Up @@ -909,8 +910,11 @@ shaka.hls.HlsParser = class {
playlist, middleSegment.tags, getUris);
this.mapTagToInitSegmentRefMap_.clear();
if (initSegmentRef) {
const initSegmentRequest = shaka.net.NetworkingEngine.makeRequest(
initSegmentRef.getUris(), this.config_.retryParameters);
const initSegmentRequest = shaka.util.Networking.createSegmentRequest(
initSegmentRef.getUris(),
initSegmentRef.getStartByte(),
initSegmentRef.getEndByte(),
this.config_.retryParameters);
const initType =
shaka.net.NetworkingEngine.AdvancedRequestType.INIT_SEGMENT;
const initResponse = await this.makeNetworkRequest_(
Expand Down

0 comments on commit 6fb0587

Please sign in to comment.