diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js
index c287bc2f3b7..8a71910e8fc 100644
--- a/modules/oneVideoBidAdapter.js
+++ b/modules/oneVideoBidAdapter.js
@@ -4,7 +4,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
const BIDDER_CODE = 'oneVideo';
export const spec = {
code: 'oneVideo',
- VERSION: '3.0.4',
+ VERSION: '3.0.5',
ENDPOINT: 'https://ads.adaptv.advertising.com/rtb/openrtb?ext_id=',
E2ETESTENDPOINT: 'https://ads-wc.v.ssp.yahoo.com/rtb/openrtb?ext_id=',
SYNC_ENDPOINT1: 'https://pixel.advertising.com/ups/57304/sync?gdpr=&gdpr_consent=&_origin=0&redir=true',
@@ -99,7 +99,7 @@ export const spec = {
width: size.width,
height: size.height,
currency: response.cur,
- ttl: 100,
+ ttl: (bidRequest.params.video.ttl > 0 && bidRequest.params.video.ttl <= 3600) ? bidRequest.params.video.ttl : 300,
netRevenue: true,
adUnitCode: bidRequest.adUnitCode
};
@@ -113,7 +113,6 @@ export const spec = {
} else if (bid.adm) {
bidResponse.vastXml = bid.adm;
}
-
if (bidRequest.mediaTypes.video) {
bidResponse.renderer = (bidRequest.mediaTypes.video.context === 'outstream') ? newRenderer(bidRequest, bidResponse) : undefined;
}
diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md
index 92958af9e83..d413c9d64e5 100644
--- a/modules/oneVideoBidAdapter.md
+++ b/modules/oneVideoBidAdapter.md
@@ -40,6 +40,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to
inventoryid: 123,
minduration: 10,
maxduration: 30,
+ ttl: 300,
custom: {
key1: "value1",
key2: 123345
@@ -89,6 +90,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to
inventoryid: 123,
minduration: 10,
maxduration: 30,
+ ttl: 250
},
site: {
id: 1,
diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js
index 331ac8976e6..83adf8a4b11 100644
--- a/test/spec/modules/oneVideoBidAdapter_spec.js
+++ b/test/spec/modules/oneVideoBidAdapter_spec.js
@@ -217,7 +217,7 @@ describe('OneVideoBidAdapter', function () {
const placement = bidRequest.params.video.placement;
const rewarded = bidRequest.params.video.rewarded;
const inventoryid = bidRequest.params.video.inventoryid;
- const VERSION = '3.0.4';
+ const VERSION = '3.0.5';
expect(data.imp[0].video.w).to.equal(width);
expect(data.imp[0].video.h).to.equal(height);
expect(data.imp[0].bidfloor).to.equal(bidRequest.params.bidfloor);
@@ -407,7 +407,7 @@ describe('OneVideoBidAdapter', function () {
height: 480,
mediaType: 'video',
currency: 'USD',
- ttl: 100,
+ ttl: 300,
netRevenue: true,
adUnitCode: bidRequest.adUnitCode,
renderer: (bidRequest.mediaTypes.video.context === 'outstream') ? newRenderer(bidRequest, bidResponse) : undefined,
@@ -434,6 +434,30 @@ describe('OneVideoBidAdapter', function () {
expect(bidResponse.mediaType).to.equal('banner');
expect(bidResponse.renderer).to.be.undefined;
});
+
+ it('should default ttl to 300', function () {
+ const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'};
+ const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest });
+ expect(bidResponse.ttl).to.equal(300);
+ });
+ it('should not allow ttl above 3601, default to 300', function () {
+ bidRequest.params.video.ttl = 3601;
+ const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'};
+ const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest });
+ expect(bidResponse.ttl).to.equal(300);
+ });
+ it('should not allow ttl below 1, default to 300', function () {
+ bidRequest.params.video.ttl = 0;
+ const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'};
+ const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest });
+ expect(bidResponse.ttl).to.equal(300);
+ });
+ it('should use custom ttl if under 3600', function () {
+ bidRequest.params.video.ttl = 1000;
+ const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'};
+ const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest });
+ expect(bidResponse.ttl).to.equal(1000);
+ });
});
describe('when GDPR and uspConsent applies', function () {