From 5a62db7ccaea2723b12f2de95b2b5c7ffa97a23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Wed, 8 Jan 2025 13:58:42 +0100 Subject: [PATCH] chore(Demo): Fix "Custom DRM System" field when set to known drm system (#7843) Related to https://github.com/shaka-project/shaka-player/issues/7546 --- demo/custom.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/demo/custom.js b/demo/custom.js index 09fc435f6d..315deaa82c 100644 --- a/demo/custom.js +++ b/demo/custom.js @@ -442,12 +442,9 @@ shakaDemo.Custom = class { // Make the drm system field. const drmSetup = (input, container) => { customDrmSystemInput = input; - const drmSystems = assetInProgress.licenseServers.keys(); - for (const drmSystem of drmSystems) { - if (!shakaDemo.Main.commonDrmSystems.includes(drmSystem)) { - input.value = drmSystem; - break; - } + if (assetInProgress.licenseServers.size == 1) { + const drmSystems = assetInProgress.licenseServers.keys(); + input.value = Array.from(drmSystems)[0]; } }; const drmOnChange = (input) => {