From 031e860a7df83e4831d620a38e4a52f37b106854 Mon Sep 17 00:00:00 2001 From: Adam Waldron Date: Fri, 22 Mar 2024 09:24:29 -0700 Subject: [PATCH] pass keysystems on keysystemaccess error --- src/plugin.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugin.js b/src/plugin.js index 6280803..18be4d7 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -64,10 +64,9 @@ export const handleEncryptedEvent = (player, event, options, sessions, eventBus, } let initData = event.initData; - let keySystem; return getSupportedKeySystem(options.keySystems).then((keySystemAccess) => { - keySystem = keySystemAccess.keySystem; + const keySystem = keySystemAccess.keySystem; // Use existing init data from options if provided if (options.keySystems[keySystem] && @@ -104,7 +103,7 @@ export const handleEncryptedEvent = (player, event, options, sessions, eventBus, }).catch((error) => { const metadata = { errorType: videojs.Error.EMEFailedToRequestMediaKeySystemAccess, - keySystem + config: options.keySystems }; emeError(error, metadata);