Skip to content

Commit

Permalink
fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
mkomorski committed Jan 9, 2025
1 parent 3477406 commit 939f476
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/auction.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,18 +572,19 @@ function tryAddVideoBid(auctionInstance, bidResponse, afterBidAdded, {index = au
ignoreBidderCacheKey
} = config.getConfig('cache') || {};

if (cacheUrl && (useCacheKey || context !== OUTSTREAM)) {
if (useLocal) {
// stores video bid vast as local blob in the browser
storeLocally(bidResponse);
} else if (cacheUrl && (useCacheKey || context !== OUTSTREAM)) {
if (!bidResponse.videoCacheKey || ignoreBidderCacheKey) {
addBid = false;
callPrebidCache(auctionInstance, bidResponse, afterBidAdded, videoMediaType);
} else if (!bidResponse.vastUrl) {
logError('videoCacheKey specified but not required vastUrl for video bid');
addBid = false;
}
} else if (useLocal) {
// stores video bid vast as local blob in the browser
storeLocally(bidResponse);
}

if (addBid) {
addBidToAuction(auctionInstance, bidResponse);
afterBidAdded();
Expand Down

0 comments on commit 939f476

Please sign in to comment.