Skip to content

added flushImmediate to audioPreference options#7746

Open
krseager wants to merge 1 commit intovideo-dev:masterfrom
krseager:add-flush-immediate-to-audioselectionoption
Open

added flushImmediate to audioPreference options#7746
krseager wants to merge 1 commit intovideo-dev:masterfrom
krseager:add-flush-immediate-to-audioselectionoption

Conversation

@krseager
Copy link
Collaborator

@krseager krseager commented Mar 6, 2026

This PR will add the ability to set the default behavior of audio track switching to default to smooth or immediate audio track switching.

Why is this Pull Request needed?

Without it, you have to conditionally call the setting of nextAudioTrack vs. audioTrack for differentiating between smooth and immediate audio track switching.

Are there any points in the code the reviewer needs to double check?

Resolves issues:

#7692

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Copy link
Collaborator

@robwalch robwalch left a comment

Choose a reason for hiding this comment

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

#7692 describes enhancing hls.setAudioOption({}) not the hls.audioTrack setter. The preference argument with the flush option would passed to the setAudioOption method rather than set on the player config and read on each call.

Without it, you have to conditionally call the setting of nextAudioTrack vs. audioTrack for differentiating between smooth and immediate audio track switching.

That’s intentional. The different audio setters should continue to work as they do, similar to the level setters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants