Skip to content

Commit 7ea5fe8

Browse files
authored
Ozone Bid Adapter : support vastURL & vastXML (#12936)
* Update ozoneBidAdapter.js support for vastXML/vastURL * Update ozoneBidAdapter_spec.js updated spec test
1 parent c6dc75b commit 7ea5fe8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

modules/ozoneBidAdapter.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const AUCTIONURI = '/openrtb2/auction';
2222
const OZONECOOKIESYNC = '/static/load-cookie.html';
2323
const OZONE_RENDERER_URL = 'https://prebid.the-ozone-project.com/ozone-renderer.js';
2424
const ORIGIN_DEV = 'https://test.ozpr.net';
25-
const OZONEVERSION = '2.9.5';
25+
const OZONEVERSION = '3.0.0';
2626
export const spec = {
2727
gvlid: 524,
2828
aliases: [{code: 'venatus', gvlid: 524}],
@@ -551,11 +551,11 @@ export const spec = {
551551
if (videoContext === 'outstream') {
552552
logInfo('setting thisBid.mediaType = VIDEO & attach a renderer to OUTSTREAM video');
553553
thisBid.renderer = newRenderer(thisBid.bidId);
554+
thisBid.vastUrl = `https://${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_host', 'missing_host')}${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_path', 'missing_path')}?uuid=${deepAccess(thisBid, 'ext.prebid.targeting.hb_uuid', 'missing_uuid')}`;
555+
thisBid.vastXml = thisBid.adm;
554556
} else {
555-
logInfo('not an outstream video, will set thisBid.mediaType = VIDEO and thisBid.vastUrl and not attach a renderer');
556-
thisBid.vastUrl = `https://${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_host', 'missing_host')}${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_path', 'missing_path')}?id=${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_id', 'missing_id')}`; // need to see if this works ok for ozone
557-
adserverTargeting['hb_cache_host'] = deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_host', 'no-host');
558-
adserverTargeting['hb_cache_path'] = deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_path', 'no-path');
557+
logInfo('not an outstream video (presumably instream), will set thisBid.mediaType = VIDEO and thisBid.vastUrl and not attach a renderer');
558+
thisBid.vastUrl = `https://${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_host', 'missing_host')}${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_path', 'missing_path')}?uuid=${deepAccess(thisBid, 'ext.prebid.targeting.hb_uuid', 'missing_uuid')}`; // need to see if this works ok for ozone
559559
if (!thisBid.hasOwnProperty('videoCacheKey')) {
560560
let videoCacheUuid = deepAccess(thisBid, 'ext.prebid.targeting.hb_uuid', 'no_hb_uuid');
561561
logInfo(`Adding videoCacheKey: ${videoCacheUuid}`);
@@ -567,6 +567,7 @@ export const spec = {
567567
} else {
568568
this.setBidMediaTypeIfNotExist(thisBid, BANNER);
569569
}
570+
adserverTargeting = Object.assign(adserverTargeting, deepAccess(thisBid, 'ext.prebid.targeting', {}));
570571
if (enhancedAdserverTargeting) {
571572
let allBidsForThisBidid = ozoneGetAllBidsForBidId(thisBid.bidId, serverResponse.seatbid, defaultWidth, defaultHeight);
572573
logInfo('Going to iterate allBidsForThisBidId', deepClone(allBidsForThisBidid));

0 commit comments

Comments
 (0)