Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
harisha-swaminathan committed Aug 21, 2024
1 parent c664833 commit 0ea624e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/eme.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ export const makeNewRequest = (player, requestOptions) => {
let pauseTimer;

player.on('pause', () => {
if (options.limitRenewalsOnPause && typeof options.limitRenewalsOnPause === 'number') {
if (options.limitRenewalsOnPauseTime && typeof options.limitRenewalsOnPauseTime === 'number') {

pauseTimer = setInterval(() => {
timeElapsed++;
if (timeElapsed >= options.limitRenewalsOnPause) {
if (timeElapsed >= options.limitRenewalsOnPauseTime) {
clearInterval(pauseTimer);
}
}, 1000);
Expand Down Expand Up @@ -194,10 +194,10 @@ export const makeNewRequest = (player, requestOptions) => {

if (event.messageType === 'license-renewal') {
const limitRenewalsBeforePlay = options.limitRenewalsBeforePlay;
const limitRenewalsOnPause = options.limitRenewslsOnPause;
const limitRenewalsOnPauseTime = options.limitRenewalsOnPauseTime;

if (!player.hasStarted() && limitRenewalsBeforePlay ||
player.paused() && typeof limitRenewalsOnPause === 'number' && timeElapsed >= limitRenewalsOnPause) {
player.paused() && typeof limitRenewalsOnPauseTime === 'number' && timeElapsed >= limitRenewalsOnPauseTime) {

closeAndRemoveSession();
return;
Expand Down

0 comments on commit 0ea624e

Please sign in to comment.