Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
artemAdp committed Dec 19, 2024
1 parent 381aa79 commit ef06804
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions modules/adplayerproVideoProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,13 @@ export const utils = {
},

getPlcmt: function ({type, autoplay, muted, file}) {
type = type || "inStream";
type = type || 'inStream';
if (!file) {
//INTERSTITIAL: primary focus of the page and take up the majority of the viewport and cannot be scrolled out of view.
return type === "rewarded" || type === "inView" ? PLCMT.INTERSTITIAL : PLCMT.OUTSTREAM;
// INTERSTITIAL: primary focus of the page and take up the majority of the viewport and cannot be scrolled out of view.
return type === 'rewarded' || type === 'inView' ? PLCMT.INTERSTITIAL : PLCMT.OUTSTREAM;
}
//INSTREAM must be set to “sound on” by default at player start
return type === "inStream" && (!muted || !autoplay) ? PLCMT.INSTREAM : PLCMT.ACCOMPANYING_CONTENT;
// INSTREAM must be set to “sound on” by default at player start
return type === 'inStream' && (!muted || !autoplay) ? PLCMT.INSTREAM : PLCMT.ACCOMPANYING_CONTENT;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,15 @@ describe('AdPlayerProProvider utils', function () {
expect(utils.getPlcmt({type, autoplay, muted, file})).to.be.equal(expected);
}

test("inStream", false, false, "f", PLCMT.INSTREAM);
test(undefined, false, false, "f", PLCMT.INSTREAM);
test("inStream", false, true, "f", PLCMT.INSTREAM);
test("inStream", true, false, "f", PLCMT.INSTREAM);
test("inStream", true, true, "f", PLCMT.ACCOMPANYING_CONTENT);

test("rewarded", true, false, undefined, PLCMT.INTERSTITIAL);
test("inView", true, false, undefined, PLCMT.INTERSTITIAL);
test("InPage", true, false, undefined, PLCMT.OUTSTREAM);
test('inStream', false, false, 'f', PLCMT.INSTREAM);
test(undefined, false, false, 'f', PLCMT.INSTREAM);
test('inStream', false, true, 'f', PLCMT.INSTREAM);
test('inStream', true, false, 'f', PLCMT.INSTREAM);
test('inStream', true, true, 'f', PLCMT.ACCOMPANYING_CONTENT);

test('rewarded', true, false, undefined, PLCMT.INTERSTITIAL);
test('inView', true, false, undefined, PLCMT.INTERSTITIAL);
test('InPage', true, false, undefined, PLCMT.OUTSTREAM);
});
});

Expand Down

0 comments on commit ef06804

Please sign in to comment.