Skip to content

Commit

Permalink
fix: Add missing AdvancedRequestType in some requests (#5113)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Mar 23, 2023
1 parent 4d487e4 commit b60bf16
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,11 @@ shaka.hls.HlsParser = class {
const requestType = shaka.net.NetworkingEngine.RequestType.SEGMENT;
const segmentRequest = shaka.net.NetworkingEngine.makeRequest(
segmentUris, this.config_.retryParameters);
const type = initSegmentRef ?
shaka.net.NetworkingEngine.AdvancedRequestType.INIT_SEGMENT :
shaka.net.NetworkingEngine.AdvancedRequestType.MEDIA_SEGMENT;
const response = await this.makeNetworkRequest_(
segmentRequest, requestType);
segmentRequest, requestType, {type});

let contentMimeType = response.headers['content-type'];
if (contentMimeType) {
Expand Down Expand Up @@ -3214,9 +3217,9 @@ shaka.hls.HlsParser = class {
const headRequest = shaka.net.NetworkingEngine.makeRequest(
[middleSegmentUri], this.config_.retryParameters);
headRequest.method = 'HEAD';

const type = shaka.net.NetworkingEngine.AdvancedRequestType.MEDIA_SEGMENT;
const response = await this.makeNetworkRequest_(
headRequest, requestType);
headRequest, requestType, {type});

const contentMimeType = response.headers['content-type'];
if (contentMimeType) {
Expand Down

0 comments on commit b60bf16

Please sign in to comment.