Skip to content

Commit

Permalink
Bugfix: Patch for light player exception with audio groups (video-dev…
Browse files Browse the repository at this point in the history
…#6342)

* Don't look through audio groups if environment __USE_ALT_AUDIO__ is false
* Update entries 10 -> 13 to add tests to light build
  • Loading branch information
iamboorrito committed Apr 10, 2024
1 parent 380076a commit 23dd8c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/utils/rendition-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,15 @@ export function getCodecTiers(
tier.fragmentError += level.fragmentError;
tier.videoRanges[level.videoRange] =
(tier.videoRanges[level.videoRange] || 0) + 1;
if (audioGroups) {
if (__USE_ALT_AUDIO__ && audioGroups) {
audioGroups.forEach((audioGroupId) => {
if (!audioGroupId) {
return;
}
const audioGroup = audioTracksByGroup.groups[audioGroupId];
if (!audioGroup) {
return;
}
// Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
tier.hasDefaultAudio =
tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/auto/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ describe(`testing hls.js playback in the browser on "${browserDescription}"`, fu

const entries = Object.entries(streams);
if (HlsjsLightBuild) {
entries.length = 10;
entries.length = 13;
}

entries
Expand Down

0 comments on commit 23dd8c9

Please sign in to comment.