Skip to content

Commit

Permalink
feat: Add encryptionScheme support on MCap polyfill (#6482)
Browse files Browse the repository at this point in the history
Related to #1419
  • Loading branch information
avelad committed Apr 26, 2024
1 parent 064c3b7 commit 5a0e60a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/polyfill/media_capabilities.js
Expand Up @@ -208,14 +208,29 @@ shaka.polyfill.MediaCapabilities = class {
};
}

if (mediaCapkeySystemConfig.audio.encryptionScheme) {
capability = {
robustness: capability.robustness,
contentType: capability.contentType,
encryptionScheme: mediaCapkeySystemConfig.audio.encryptionScheme,
};
}

audioCapabilities.push(capability);
}

if (mediaCapkeySystemConfig.video) {
const capability = {
let capability = {
robustness: mediaCapkeySystemConfig.video.robustness || '',
contentType: mediaDecodingConfig.video.contentType,
};
if (mediaCapkeySystemConfig.video.encryptionScheme) {
capability = {
robustness: capability.robustness,
contentType: capability.contentType,
encryptionScheme: mediaCapkeySystemConfig.video.encryptionScheme,
};
}
videoCapabilities.push(capability);
}

Expand Down

0 comments on commit 5a0e60a

Please sign in to comment.