Skip to content

Commit

Permalink
Krushmedia: changing traffic definition (#11631)
Browse files Browse the repository at this point in the history
* inital

* fix

* fix

* fix

* fix

* fix

* fix

* add maintener to md

* Added native support

* add syncing

* updates for prebid 5 compliance

* changing traffic definition

* upd

---------

Co-authored-by: Aiholkin <[email protected]>
  • Loading branch information
Krushmedia and Aiholkin authored Jun 3, 2024
1 parent 07e6e30 commit 1e820bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 1e820bf

Please sign in to comment.