Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Patch for light player exception with audio groups #6342

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -619,7 +619,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;
}

const isSafari = browserConfig.name === 'safari';
Expand Down
Loading