Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get latest player options when handling encrypted and msneedkey events #207

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
Expand Down
Loading