Skip to content

Commit

Permalink
fix: Disable smooth codec switch if changeType is unavailable (#7414)
Browse files Browse the repository at this point in the history
  • Loading branch information
tykus160 authored Oct 11, 2024
1 parent 7268a2b commit c90d5ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/util/player_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ goog.require('shaka.abr.SimpleAbrManager');
goog.require('shaka.config.AutoShowText');
goog.require('shaka.config.CodecSwitchingStrategy');
goog.require('shaka.log');
goog.require('shaka.media.Capabilities');
goog.require('shaka.net.NetworkingEngine');
goog.require('shaka.util.ConfigUtils');
goog.require('shaka.util.FairPlayUtils');
Expand Down Expand Up @@ -104,7 +105,8 @@ shaka.util.PlayerConfiguration = class {

let codecSwitchingStrategy = shaka.config.CodecSwitchingStrategy.RELOAD;
let multiTypeVariantsAllowed = false;
if (shaka.util.Platform.supportsSmoothCodecSwitching()) {
if (shaka.media.Capabilities.isChangeTypeSupported() &&
shaka.util.Platform.supportsSmoothCodecSwitching()) {
codecSwitchingStrategy = shaka.config.CodecSwitchingStrategy.SMOOTH;
multiTypeVariantsAllowed = true;
}
Expand Down

0 comments on commit c90d5ff

Please sign in to comment.