Skip to content

Commit

Permalink
fix(hls): Fix av1 codec selection in HLS. (#4203)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjywbs authored and joeyparrish committed May 17, 2022
1 parent 0b03e79 commit 4d418be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/manifest_parser_utils.js
Expand Up @@ -167,7 +167,7 @@ shaka.util.ManifestParserUtils.VIDEO_CODEC_REGEXPS_ = [
/^hev/,
/^hvc/,
/^vp0?[89]/,
/^av1$/,
/^av01/,
];


Expand Down
19 changes: 19 additions & 0 deletions test/hls/manifest_text_parser_unit.js
Expand Up @@ -238,6 +238,25 @@ describe('ManifestTextParser', () => {
'#EXTM3U\n' +
'#EXT-X-MEDIA:CODECS="avc1.64002a,mp4a.40.2",AUDIO="a1,a2"',

// manifest URI:
'https://test/manifest.m3u8');

verifyPlaylist(
{
type: shaka.hls.PlaylistType.MASTER,
tags: [
new shaka.hls.Tag(/* id= */ 3, 'EXT-X-MEDIA',
[
new shaka.hls.Attribute('CODECS',
'av01.0.08M.08,mp4a.40.2'),
]),
],
},

// playlist text:
'#EXTM3U\n' +
'#EXT-X-MEDIA:CODECS="av01.0.08M.08,mp4a.40.2"',

// manifest URI:
'https://test/manifest.m3u8');
});
Expand Down

0 comments on commit 4d418be

Please sign in to comment.