|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 | 3 | import { registerBidder } from '../src/adapters/bidderFactory.js';
|
4 |
| -import { BANNER, VIDEO } from '../src/mediaTypes.js'; |
| 4 | +import { BANNER, VIDEO, ADPOD } from '../src/mediaTypes.js'; |
5 | 5 |
|
6 | 6 | const BIDDER_CODE = 'adhese';
|
7 | 7 | const GVLID = 553;
|
@@ -97,16 +97,25 @@ function adResponse(bid, ad) {
|
97 | 97 | adhese: {
|
98 | 98 | originData: adDetails.originData,
|
99 | 99 | origin: adDetails.origin,
|
100 |
| - originInstance: adDetails.originInstance |
| 100 | + originInstance: adDetails.originInstance, |
101 | 101 | }
|
102 | 102 | });
|
103 | 103 |
|
104 | 104 | if (bidResponse.mediaType === VIDEO) {
|
| 105 | + bidResponse.meta = { |
| 106 | + primaryCatId: 'IAB2-10', |
| 107 | + adServerCatId: 399 |
| 108 | + } |
105 | 109 | bidResponse.vastXml = markup;
|
| 110 | + bidResponse.video = { |
| 111 | + context: ADPOD, |
| 112 | + durationSeconds: 30 |
| 113 | + } |
106 | 114 | } else {
|
107 | 115 | const counter = ad.impressionCounter ? "<img src='" + ad.impressionCounter + "' style='height:1px; width:1px; margin: -1px -1px; display:none;'/>" : '';
|
108 | 116 | bidResponse.ad = markup + counter;
|
109 |
| - } |
| 117 | + } |
| 118 | + |
110 | 119 | return bidResponse;
|
111 | 120 | }
|
112 | 121 |
|
@@ -193,7 +202,8 @@ function getAdDetails(ad) {
|
193 | 202 | if (isAdheseAd(ad)) {
|
194 | 203 | creativeId = ad.id;
|
195 | 204 | dealId = ad.orderId;
|
196 |
| - originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id }; |
| 205 | + originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id |
| 206 | + }; |
197 | 207 | } else {
|
198 | 208 | creativeId = ad.origin + (ad.originInstance ? '-' + ad.originInstance : '');
|
199 | 209 | if (ad.originData) {
|
|
0 commit comments