Skip to content

Commit

Permalink
Core: use playbackmethod instead of playmethod for video (#10442)
Browse files Browse the repository at this point in the history
* Core: fill in `video.plcmt` when possible

* Core: use `playbackmethod` instead of `playmethod` for video
  • Loading branch information
dgirardi authored Sep 6, 2023
1 parent 3fa0dd6 commit 1f839bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function fillVideoDefaults(adUnit) {
if (video != null && video.plcmt == null) {
if (video.context === OUTSTREAM || [2, 3, 4].includes(video.placement)) {
video.plcmt = 4;
} else if (video.context !== OUTSTREAM && [2, 6].includes(video.playmethod)) {
} else if (video.context !== OUTSTREAM && [2, 6].includes(video.playbackmethod)) {
video.plcmt = 2;
}
}
Expand Down
8 changes: 4 additions & 4 deletions test/spec/video_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ describe('video.js', function () {
});
});
describe('should set plcmt = 2 when', () => {
[2, 6].forEach(playmethod => {
it(`playmethod is "${playmethod}"`, () => {
expect(fillDefaults({playmethod})).to.eql({
playmethod,
[2, 6].forEach(playbackmethod => {
it(`playbackmethod is "${playbackmethod}"`, () => {
expect(fillDefaults({playbackmethod})).to.eql({
playbackmethod,
plcmt: 2,
});
});
Expand Down

0 comments on commit 1f839bf

Please sign in to comment.