Skip to content

Commit

Permalink
AdagioBidAdapter: validate plcmt video param () (prebid#11487)
Browse files Browse the repository at this point in the history
  • Loading branch information
osazos authored and mefjush committed May 21, 2024
1 parent 9061a6f commit 5e79893
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ export const ORTB_VIDEO_PARAMS = {
'w': (value) => isInteger(value),
'h': (value) => isInteger(value),
'startdelay': (value) => isInteger(value),
'placement': (value) => isInteger(value),
'placement': (value) => {
logWarn(LOG_PREFIX, 'The OpenRTB video param `placement` is deprecated and should not be used anymore.');
return isInteger(value)
},
'plcmt': (value) => isInteger(value),
'linearity': (value) => isInteger(value),
'skip': (value) => [1, 0].includes(value),
'skipmin': (value) => isInteger(value),
Expand Down Expand Up @@ -964,6 +968,7 @@ export const spec = {

autoFillParams(bid);

// Note: `bid.params.placement` is not related to the video param `placement`.
if (!(bid.params.organizationId && bid.params.site && bid.params.placement)) {
logWarn(`${LOG_PREFIX} at least one required param is missing.`);
// internal.enqueue(debugData());
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/adagioBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ describe('Adagio bid adapter', () => {
skipafter: 4,
minduration: 10,
maxduration: 30,
placement: 3,
plcmt: 4,
protocols: [8]
}
}).build();
Expand All @@ -508,7 +508,7 @@ describe('Adagio bid adapter', () => {
skipafter: 4,
minduration: 10,
maxduration: 30,
placement: 3,
plcmt: 4,
protocols: [8],
w: 300,
h: 250
Expand Down

0 comments on commit 5e79893

Please sign in to comment.