Skip to content

Commit

Permalink
fix(HLS): Report HLS playlist updates as media playlist in network fi…
Browse files Browse the repository at this point in the history
…lters (#5120)
  • Loading branch information
avelad authored Mar 29, 2023
1 parent 3f35f5d commit c2a59d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ shaka.hls.HlsParser = class {
// 'EXT-X-SKIP' tag in the media playlist.
uriObj.setQueryData(new goog.Uri.QueryData('_HLS_skip=YES'));
}
const response = await this.requestManifest_(uriObj.toString());
const response =
await this.requestManifest_(uriObj.toString(), /* isPlaylist= */ true);
if (!streamInfo.stream.segmentIndex) {
// The stream was closed since the update was first requested.
return;
Expand Down
6 changes: 3 additions & 3 deletions test/hls/hls_live_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ describe('HlsParser live', () => {

// We saw one request for the video playlist, which signalled "ENDLIST".
const type =
shaka.net.NetworkingEngine.AdvancedRequestType.MASTER_PLAYLIST;
shaka.net.NetworkingEngine.AdvancedRequestType.MEDIA_PLAYLIST;

fakeNetEngine.expectRequest(
'test:/video',
Expand Down Expand Up @@ -844,7 +844,7 @@ describe('HlsParser live', () => {
// No segment requests were needed to get the start time.
expect(fakeNetEngine.request).toHaveBeenCalledTimes(1);
const type =
shaka.net.NetworkingEngine.AdvancedRequestType.MASTER_PLAYLIST;
shaka.net.NetworkingEngine.AdvancedRequestType.MEDIA_PLAYLIST;
fakeNetEngine.expectRequest(
'test:/video',
shaka.net.NetworkingEngine.RequestType.MANIFEST,
Expand Down Expand Up @@ -892,7 +892,7 @@ describe('HlsParser live', () => {
'test:/video?_HLS_skip=YES',
shaka.net.NetworkingEngine.RequestType.MANIFEST,
{type:
shaka.net.NetworkingEngine.AdvancedRequestType.MASTER_PLAYLIST});
shaka.net.NetworkingEngine.AdvancedRequestType.MEDIA_PLAYLIST});
});

it('skips older segments', async () => {
Expand Down

0 comments on commit c2a59d0

Please sign in to comment.