diff --git a/src/utils/rendition-helper.ts b/src/utils/rendition-helper.ts index 1e733489bb6..63dee30a3de 100644 --- a/src/utils/rendition-helper.ts +++ b/src/utils/rendition-helper.ts @@ -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 diff --git a/tests/functional/auto/setup.js b/tests/functional/auto/setup.js index 44b76df8f36..45b44167e42 100644 --- a/tests/functional/auto/setup.js +++ b/tests/functional/auto/setup.js @@ -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