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

Krushmedia: changing traffic definition #11631

Merged
merged 16 commits into from
Jun 3, 2024
4 changes: 3 additions & 1 deletion modules/krushmediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ export const spec = {
const placement = {
key: bid.params.key,
bidId: bid.bidId,
traffic: bid.params.traffic || BANNER,
schain: bid.schain || {},
bidFloor: getBidFloor(bid)
};

if (bid.mediaTypes && bid.mediaTypes[BANNER] && bid.mediaTypes[BANNER].sizes) {
placement.traffic = BANNER;
placement.sizes = bid.mediaTypes[BANNER].sizes;
} else if (bid.mediaTypes && bid.mediaTypes[VIDEO] && bid.mediaTypes[VIDEO].playerSize) {
placement.traffic = VIDEO;
placement.wPlayer = bid.mediaTypes[VIDEO].playerSize[0];
placement.hPlayer = bid.mediaTypes[VIDEO].playerSize[1];
placement.minduration = bid.mediaTypes[VIDEO].minduration;
Expand All @@ -115,6 +116,7 @@ export const spec = {
placement.api = bid.mediaTypes[VIDEO].api;
placement.linearity = bid.mediaTypes[VIDEO].linearity;
} else if (bid.mediaTypes && bid.mediaTypes[NATIVE]) {
placement.traffic = NATIVE;
placement.native = bid.mediaTypes[NATIVE];
}
placements.push(placement);
Expand Down
3 changes: 1 addition & 2 deletions test/spec/modules/krushmediaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ describe('KrushmediabBidAdapter', function () {
}
},
params: {
key: 783,
traffic: BANNER
key: 783
}
};

Expand Down