Skip to content

Commit

Permalink
Quick function to mark a video-bid as used
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspervw committed Jun 15, 2018
1 parent be614db commit 36843ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,18 @@ $$PREBID_GLOBAL$$.getHighestCpmBids = function (adUnitCode) {
.map(removeRequestId);
};

/**
* Mark the winning video bid as used
* @param {string} adUnitCode - required ad unit code
* @alias module:pbjs.markWinningVideoBidAsUsed
*/
$$PREBID_GLOBAL$$.markWinningVideoBidAsUsed = function (adUnitCode) {
const bids = targeting.getWinningBids(adUnitCode);
if (bids.length > 0) {
bids[0].status = RENDERED;
}
};

/**
* Get Prebid config options
* @param {Object} options
Expand Down

0 comments on commit 36843ac

Please sign in to comment.