Skip to content

Commit

Permalink
pass keysystems on keysystemaccess error
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Mar 22, 2024
1 parent 27d7582 commit 031e860
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] &&
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 031e860

Please sign in to comment.