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

fix: Use audio label on ExampleBasedCriteria #7971

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 4 additions & 3 deletions lib/media/example_based_criteria.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ shaka.media.ExampleBasedCriteria = class {
* } adaptationSetCriteriaFactory
*/
constructor(example, codecSwitchingStrategy, adaptationSetCriteriaFactory) {
// We can't know if role and label are really important, so we don't use
// role and label for this.
// We can't know if role and video label are really important, so we don't
// use role and video label for this.
const role = '';
const audioLabel = '';
const audioLabel = example.video && example.audio.label ?
example.audio.label : '';
avelad marked this conversation as resolved.
Show resolved Hide resolved
const videoLabel = '';
const hdrLevel = example.video && example.video.hdr ?
example.video.hdr : '';
Expand Down
3 changes: 2 additions & 1 deletion lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -5187,7 +5187,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
if (this.config_.abr.enabled && (active.video != variant.video ||
(active.audio && variant.audio &&
active.audio.language == variant.audio.language &&
active.audio.channelsCount == variant.audio.channelsCount))) {
active.audio.channelsCount == variant.audio.channelsCount &&
active.audio.label == variant.audio.label))) {
shaka.log.alwaysWarn('Changing tracks while abr manager is enabled ' +
'will likely result in the selected track ' +
'being overridden. Consider disabling abr ' +
Expand Down