Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adagio Bid Adapter: validate plcmt video param #11487

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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