Skip to content

Commit

Permalink
Rubicon skip video request in mutlti format when video is not setup (p…
Browse files Browse the repository at this point in the history
…rebid#3167)

* Update rubiconBidAdapter.js
  • Loading branch information
Antoine Jacquemin (Rubicon) authored and Pedro López Jiménez committed Mar 18, 2019
1 parent b5e1fee commit 468f0b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,11 @@ function mapSizes(sizes) {
* @returns {boolean}
*/
export function hasVideoMediaType(bidRequest) {
return bidRequest.mediaType === VIDEO || typeof utils.deepAccess(bidRequest, `mediaTypes.${VIDEO}`) !== 'undefined';
if (typeof utils.deepAccess(bidRequest, 'params.video') === 'undefined' && Array.isArray(utils.deepAccess(bidRequest, 'params.sizes'))) {
utils.logWarn('Rubicon bid adapter Warning: no video params found, convert to banner with the bidder size id');
return false;
}
return (bidRequest.mediaType === VIDEO || typeof utils.deepAccess(bidRequest, `mediaTypes.${VIDEO}`) !== 'undefined');
}

/**
Expand Down

0 comments on commit 468f0b8

Please sign in to comment.