Skip to content

Commit

Permalink
one more getOptions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Mar 12, 2024
1 parent 81dd072 commit 0f295c0
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 @@ -356,20 +356,19 @@ const eme = function(options = {}) {
}
},
initLegacyFairplay() {
const playerOptions = getOptions(player);
const handleFn = (event) => {
videojs.log.debug('eme', 'Received a \'webkitneedkey\' event');
// TODO it's possible that the video state must be cleared if reusing the same video
// element between sources
setupSessions(player);
handleWebKitNeedKeyEvent(event, playerOptions, player.tech_)
handleWebKitNeedKeyEvent(event, getOptions(player), player.tech_)
.catch(emeError);
};

// Support Safari EME with FairPlay
// (also used in early Chrome or Chrome with EME disabled flag)
player.tech_.el_.addEventListener('webkitneedkey', (event) => {
const firstWebkitneedkeyTimeout = playerOptions.firstWebkitneedkeyTimeout || 1000;
const firstWebkitneedkeyTimeout = getOptions(player).firstWebkitneedkeyTimeout || 1000;
const src = player.src();
// on source change or first startup reset webkitneedkey options.

Expand Down

0 comments on commit 0f295c0

Please sign in to comment.