Skip to content

Commit

Permalink
fix(UI): Do not show codec name when the same codec is used for the s…
Browse files Browse the repository at this point in the history
…ame language (#7643)
  • Loading branch information
avelad authored Nov 22, 2024
1 parent ee72b89 commit 87f6aa6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/language_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ goog.require('shaka.ui.Overlay.TrackLabelFormat');
goog.require('shaka.ui.Utils');
goog.require('shaka.util.Dom');
goog.require('shaka.util.LanguageUtils');
goog.require('shaka.util.MimeUtils');
goog.requireType('shaka.ui.Localization');


Expand Down Expand Up @@ -49,7 +50,8 @@ shaka.ui.LanguageUtils = class {
if (!codecsByLanguage.has(track.language)) {
codecsByLanguage.set(track.language, new Set());
}
codecsByLanguage.get(track.language).add(track.audioCodec);
codecsByLanguage.get(track.language).add(
shaka.util.MimeUtils.getNormalizedCodec(track.audioCodec));
}
const hasDifferentAudioCodecs = (language) =>
codecsByLanguage.has(language) && codecsByLanguage.get(language).size > 1;
Expand Down

0 comments on commit 87f6aa6

Please sign in to comment.