Skip to content

Add Correct Initial Audio Settings#375

Merged
terminal-overflow merged 4 commits intomasterfrom
default-player-settings
Mar 26, 2025
Merged

Add Correct Initial Audio Settings#375
terminal-overflow merged 4 commits intomasterfrom
default-player-settings

Conversation

@terminal-overflow
Copy link
Copy Markdown
Member

📺 What

Dash.js caches the last track used in local storage and selects the audio track based on selection priority and then max bitrate. This can result in the BroadcastMixAD (Audio Described) being selected against the users preference. This can manifest in two scenarios.

  1. When the last track selected was BroadcastMixAD, the user turns off their preference out of stream and then the user plays a stream with a BroadcastMixAD track, the BroadcastMixAD track will be selected.
  2. If the BroadcastMixAD track has a higher track selection priority in the manifest or has a higher max bitrate, the BroadcastMixAD audio track will be selected.

In both scenarios, the BroadcastMixAD track is selected when the users AD preference is off. This PR disables dash.js's media track caching and sets an initial audio preference.

🛠 How

  • Disables lastMediaSettingsCachingInfo
  • Sets initial audio settings to select role: main if Audio Described is not enabled at the start of stream.
  • Adds relevant units tests.

@terminal-overflow terminal-overflow added the semver minor This PR is a semver minor release label Mar 24, 2025
@terminal-overflow terminal-overflow requested a review from a team as a code owner March 24, 2025 14:08
@terminal-overflow terminal-overflow changed the title Enforce Non Audio Settings Add Correct Initial Audio Settings Mar 24, 2025
ShiningTrapez
ShiningTrapez previously approved these changes Mar 24, 2025
@ShiningTrapez
Copy link
Copy Markdown
Contributor

Good Work! 👏

eirikbjornr
eirikbjornr previously approved these changes Mar 24, 2025
Copy link
Copy Markdown
Contributor

@eirikbjornr eirikbjornr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! One nitpick improvement so feel free to go ahead without it

Comment thread src/playbackstrategy/msestrategy.js Outdated
ShiningTrapez
ShiningTrapez previously approved these changes Mar 24, 2025
eirikbjornr
eirikbjornr previously approved these changes Mar 24, 2025
@terminal-overflow terminal-overflow merged commit 38e1009 into master Mar 26, 2025
4 checks passed
@terminal-overflow terminal-overflow deleted the default-player-settings branch March 26, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver minor This PR is a semver minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants