From 1e820bf0cafa488d087bd2a31c5e8affedf3e876 Mon Sep 17 00:00:00 2001 From: Krushmedia <71434282+Krushmedia@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:24:26 +0300 Subject: [PATCH] Krushmedia: changing traffic definition (#11631) * 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 --- modules/krushmediaBidAdapter.js | 4 +++- test/spec/modules/krushmediaBidAdapter_spec.js | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/krushmediaBidAdapter.js b/modules/krushmediaBidAdapter.js index 876f0ebabc6..c4507201064 100644 --- a/modules/krushmediaBidAdapter.js +++ b/modules/krushmediaBidAdapter.js @@ -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; @@ -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); diff --git a/test/spec/modules/krushmediaBidAdapter_spec.js b/test/spec/modules/krushmediaBidAdapter_spec.js index fcdcc942290..86437180e94 100644 --- a/test/spec/modules/krushmediaBidAdapter_spec.js +++ b/test/spec/modules/krushmediaBidAdapter_spec.js @@ -12,8 +12,7 @@ describe('KrushmediabBidAdapter', function () { } }, params: { - key: 783, - traffic: BANNER + key: 783 } };