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 Isaac Dettman committed Nov 12, 2018
1 parent 0ecf17e commit ac437a3
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 @@ -720,7 +720,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 ac437a3

Please sign in to comment.