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)
  • Loading branch information
avelad committed Feb 26, 2024
1 parent 783603c commit 6a8f972
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/hls/hls_parser.js
Expand Up @@ -31,6 +31,7 @@ goog.require('shaka.util.Error');
goog.require('shaka.util.FakeEvent');
goog.require('shaka.util.LanguageUtils');
goog.require('shaka.util.ManifestParserUtils');
goog.require('shaka.util.Networking');
goog.require('shaka.util.OperationManager');
goog.require('shaka.util.Pssh');
goog.require('shaka.media.SegmentUtils');
Expand Down Expand Up @@ -912,8 +913,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 6a8f972

Please sign in to comment.