From f7675bb8465df4ee79e716678d7bd49de5334226 Mon Sep 17 00:00:00 2001 From: Matt Dwyer Date: Tue, 27 Feb 2024 10:16:56 -0500 Subject: [PATCH 1/2] Get latest player options when handling encrypted and msneedkey events --- src/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin.js b/src/plugin.js index 07e654a..07c167d 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -239,7 +239,7 @@ const onPlayerReady = (player, emeError) => { player.tech_.el_.addEventListener('encrypted', (event) => { videojs.log.debug('eme', 'Received an \'encrypted\' event'); setupSessions(player); - handleEncryptedEvent(player, event, playerOptions, player.eme.sessions, player.tech_) + handleEncryptedEvent(player, event, getOptions(player), player.eme.sessions, player.tech_) .catch(emeError); }); } else if (window.WebKitMediaKeys) { @@ -254,7 +254,7 @@ const onPlayerReady = (player, emeError) => { videojs.log.debug('eme', 'Received an \'msneedkey\' event'); setupSessions(player); try { - handleMsNeedKeyEvent(event, playerOptions, player.eme.sessions, player.tech_); + handleMsNeedKeyEvent(event, getOptions(player), player.eme.sessions, player.tech_); } catch (error) { emeError(error); } From 0c8b5596f269fa3176a11973037f27cca8b0146d Mon Sep 17 00:00:00 2001 From: Matt Dwyer Date: Tue, 27 Feb 2024 10:21:02 -0500 Subject: [PATCH 2/2] Update package-lock.json videojs dependency --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 800802e..2d09c95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "global": "^4.3.2", - "video.js": "^6 || ^7" + "video.js": "^6 || ^7 || ^8" }, "devDependencies": { "conventional-changelog-cli": "^2.0.12",