Skip to content

Commit

Permalink
fix(MCap): Remove robustness when robustness value is default (#4953)
Browse files Browse the repository at this point in the history
Fixes #4659
  • Loading branch information
avelad authored and joeyparrish committed Feb 9, 2023
1 parent 3d4d0a1 commit 762b1e7
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions lib/util/stream_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,26 +703,38 @@ shaka.util.StreamUtils = class {
}

if (audio) {
if (!keySystemConfig.audio) {
// See: https://github.com/shaka-project/shaka-player/issues/4659
if (info.audioRobustness != '') {
if (!keySystemConfig.audio) {
// KeySystemTrackConfiguration
keySystemConfig.audio = {
robustness: info.audioRobustness,
};
} else {
keySystemConfig.audio.robustness =
keySystemConfig.audio.robustness || info.audioRobustness;
}
} else if (!keySystemConfig.audio) {
// KeySystemTrackConfiguration
keySystemConfig.audio = {
robustness: info.audioRobustness,
};
} else {
keySystemConfig.audio.robustness =
keySystemConfig.audio.robustness || info.audioRobustness;
keySystemConfig.audio = {};
}
}

if (video) {
if (!keySystemConfig.video) {
// See: https://github.com/shaka-project/shaka-player/issues/4659
if (info.videoRobustness != '') {
if (!keySystemConfig.video) {
// KeySystemTrackConfiguration
keySystemConfig.video = {
robustness: info.videoRobustness,
};
} else {
keySystemConfig.video.robustness =
keySystemConfig.video.robustness || info.videoRobustness;
}
} else if (!keySystemConfig.video) {
// KeySystemTrackConfiguration
keySystemConfig.video = {
robustness: info.videoRobustness,
};
} else {
keySystemConfig.video.robustness =
keySystemConfig.video.robustness || info.videoRobustness;
keySystemConfig.video = {};
}
}
}
Expand Down

0 comments on commit 762b1e7

Please sign in to comment.