Skip to content

Commit

Permalink
IX Bid Adapter : GPID and Bug Fix (prebid#8698)
Browse files Browse the repository at this point in the history
* beginning work

* wip

* Build GPID manually when dp_ad_unit_code is present and gpid doesnt already exist

* resolve conflict

* remove pb ad slot

* merge conflict resolved

* fixed video warning

Co-authored-by: Chris Corbo <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
  • Loading branch information
3 people committed Jul 27, 2022
1 parent f99a5b0 commit a81e1e2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,17 @@ export const spec = {
}

if (mediaTypeVideoRef && paramsVideoRef) {
const videoImp = bidToVideoImp(bid).video;
const errorList = checkVideoParams(mediaTypeVideoRef, paramsVideoRef);
if (deepAccess(bid, 'mediaTypes.video.context') === OUTSTREAM && isIndexRendererPreferred(bid) && videoImp) {
const outstreamPlayerSize = [deepAccess(videoImp, 'w'), deepAccess(videoImp, 'h')];
const isValidSize = outstreamPlayerSize[0] >= OUTSTREAM_MINIMUM_PLAYER_SIZE[0] && outstreamPlayerSize[1] >= OUTSTREAM_MINIMUM_PLAYER_SIZE[1];
if (!isValidSize) {
logError(`IX Bid Adapter: ${outstreamPlayerSize} is an invalid size for IX outstream renderer`);
return false;
}
}

if (errorList.length) {
errorList.forEach((err) => {
logError(err, { bidder: BIDDER_CODE, code: ERROR_CODES.PROPERTY_NOT_INCLUDED });
Expand All @@ -1666,16 +1676,6 @@ export const spec = {
}
}

const videoImp = bidToVideoImp(bid).video;
if (deepAccess(bid, 'mediaTypes.video.context') === OUTSTREAM && isIndexRendererPreferred(bid) && videoImp) {
const outstreamPlayerSize = [deepAccess(videoImp, 'w'), deepAccess(videoImp, 'h')];
const isValidSize = outstreamPlayerSize[0] >= OUTSTREAM_MINIMUM_PLAYER_SIZE[0] && outstreamPlayerSize[1] >= OUTSTREAM_MINIMUM_PLAYER_SIZE[1];
if (!isValidSize) {
logError(`IX Bid Adapter: ${outstreamPlayerSize} is an invalid size for IX outstream renderer`);
return false;
}
}

return nativeMediaTypeValid(mediaTypeNativeRef);
},

Expand Down

0 comments on commit a81e1e2

Please sign in to comment.