From 3c789eca4222bb5d26c09b4d5755cd890b964ff0 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Wed, 12 Mar 2025 03:35:51 -0400 Subject: [PATCH] docs: update drm robustness docs (#8247) This change was prompted by #8239 as it was missed during the original PR https://github.com/shaka-project/shaka-player/pull/7753 --- docs/tutorials/drm-config.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/drm-config.md b/docs/tutorials/drm-config.md index 0e6cd1dc2..182dfc94b 100644 --- a/docs/tutorials/drm-config.md +++ b/docs/tutorials/drm-config.md @@ -158,8 +158,8 @@ player.configure({ }, advanced: { 'com.widevine.alpha': { - 'videoRobustness': 'HW_SECURE_ALL', - 'audioRobustness': 'HW_SECURE_ALL' + 'videoRobustness': ['HW_SECURE_ALL'], + 'audioRobustness': ['HW_SECURE_ALL'] } } } @@ -196,11 +196,35 @@ Robustness refers to how securely the content is handled by the key system. This is a key-system-specific string that specifies the requirements for successful playback. Passing in a higher security level than can be supported will cause `player.load()` to fail with `REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE`. The -default is the empty string, which is the lowest security level supported by the +default is an empty array, which is the lowest security level supported by the key system. Each key system has their own values for robustness. +##### Multiple Robustness + +As the video and audio robustness config options are now arrays, it's possible +to set multiple values in the array. When setting up DRM, the first robustness +available will be used. + +For example, to set both hardware and software security in Widevine: + +```js +player.configure({ + drm: { + servers: { + 'com.widevine.alpha': 'https://foo.bar/drm/widevine' + }, + advanced: { + 'com.widevine.alpha': { + 'videoRobustness': ['HW_SECURE_ALL', 'SW_SECURE_CRYPTO'], + 'audioRobustness': ['HW_SECURE_ALL', 'SW_SECURE_CRYPTO'] + } + } + } +}); +``` + ##### Widevine Chromium sources: https://cs.chromium.org/chromium/src/components/cdm/renderer/widevine_key_system_properties.h?q=SW_SECURE_CRYPTO&l=22