Skip to content

Commit

Permalink
changing traffic definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Krushmedia committed May 30, 2024
1 parent 5aaa526 commit 5ed03f4
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 5ed03f4

Please sign in to comment.