Skip to content

Commit 5f41f0e

Browse files
DeepthiNeeladriDeepthi Neeladri SravanaDeepthi Neeladri SravanaDeepthi Neeladri SravanaDeepthi Neeladri Sravana
authored andcommitted
Support min &max duration for onevideo (prebid#5079)
* outstream changes * removing global filtet * reverting page * message * adapter change * remove space * testcases * testpage * spaces for test page * renderer exist case * reverting package-lock.json * adding schain object * adding tagid * syntaxx error fix * video.html * space trailing * space * tagid * inventoryId and placement * rewarded video * added unit test case * comment * changes * min max dduration * .md file * min max * md change * version * tests fix Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]> Co-authored-by: Deepthi Neeladri Sravana <[email protected]>
1 parent 57b26a0 commit 5f41f0e

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

modules/oneVideoBidAdapter.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
33
const BIDDER_CODE = 'oneVideo';
44
export const spec = {
55
code: 'oneVideo',
6-
gvlid: 25,
7-
VERSION: '3.0.0',
6+
VERSION: '3.0.1',
87
ENDPOINT: 'https://ads.adaptv.advertising.com/rtb/openrtb?ext_id=',
98
SYNC_ENDPOINT1: 'https://cm.g.doubleclick.net/pixel?google_nid=adaptv_dbm&google_cm&google_sc',
109
SYNC_ENDPOINT2: 'https://pr-bh.ybp.yahoo.com/sync/adaptv_ortb/{combo_uid}',
@@ -215,6 +214,14 @@ function getRequestData(bid, consentData, bidRequest) {
215214
if (bid.params.video.placement) {
216215
bidData.imp[0].banner.placement = bid.params.video.placement
217216
}
217+
if (bid.params.video.maxduration) {
218+
bidData.imp[0].banner.ext = bidData.imp[0].banner.ext || {}
219+
bidData.imp[0].banner.ext.maxduration = bid.params.video.maxduration
220+
}
221+
if (bid.params.video.minduration) {
222+
bidData.imp[0].banner.ext = bidData.imp[0].banner.ext || {}
223+
bidData.imp[0].banner.ext.minduration = bid.params.video.minduration
224+
}
218225
}
219226
if (bid.params.video.inventoryid) {
220227
bidData.imp[0].ext.inventoryid = bid.params.video.inventoryid

modules/oneVideoBidAdapter.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Connects to One Video demand source to fetch bids.
3737
sid: <scpid>,
3838
rewarded: 1,
3939
placement: 1,
40-
inventoryid: 123
40+
inventoryid: 123,
41+
minduration: 10,
42+
maxduration: 30,
4143
},
4244
site: {
4345
id: 1,

test/spec/modules/oneVideoBidAdapter_spec.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ describe('OneVideoBidAdapter', function () {
136136
const placement = bidRequest.params.video.placement;
137137
const rewarded = bidRequest.params.video.rewarded;
138138
const inventoryid = bidRequest.params.video.inventoryid;
139-
const VERSION = '3.0.0';
139+
const VERSION = '3.0.1';
140140
expect(data.imp[0].video.w).to.equal(width);
141141
expect(data.imp[0].video.h).to.equal(height);
142142
expect(data.imp[0].bidfloor).to.equal(bidRequest.params.bidfloor);
@@ -292,7 +292,9 @@ describe('OneVideoBidAdapter', function () {
292292
placement: 1,
293293
inventoryid: 123,
294294
sid: 134,
295-
display: 1
295+
display: 1,
296+
minduration: 10,
297+
maxduration: 30
296298
},
297299
site: {
298300
id: 1,
@@ -314,6 +316,8 @@ describe('OneVideoBidAdapter', function () {
314316
expect(data.imp[0].ext.inventoryid).to.equal(bidRequest.params.video.inventoryid);
315317
expect(data.imp[0].banner.mimes).to.equal(bidRequest.params.video.mimes);
316318
expect(data.imp[0].banner.placement).to.equal(bidRequest.params.video.placement);
319+
expect(data.imp[0].banner.ext.minduration).to.equal(bidRequest.params.video.minduration);
320+
expect(data.imp[0].banner.ext.maxduration).to.equal(bidRequest.params.video.maxduration);
317321
expect(data.site.id).to.equal(bidRequest.params.site.id);
318322
});
319323
it('should send video object when display is other than 1', function () {
@@ -384,7 +388,9 @@ describe('OneVideoBidAdapter', function () {
384388
delivery: [2],
385389
playbackmethod: [1, 5],
386390
placement: 123,
387-
sid: 134
391+
sid: 134,
392+
minduration: 10,
393+
maxduration: 30
388394
},
389395
site: {
390396
id: 1,
@@ -406,6 +412,8 @@ describe('OneVideoBidAdapter', function () {
406412
expect(data.imp[0].video.mimes).to.equal(bidRequest.params.video.mimes);
407413
expect(data.imp[0].video.protocols).to.equal(bidRequest.params.video.protocols);
408414
expect(data.imp[0].video.linearity).to.equal(1);
415+
expect(data.imp[0].video.maxduration).to.equal(bidRequest.params.video.maxduration);
416+
expect(data.imp[0].video.minduration).to.equal(bidRequest.params.video.minduration);
409417
});
410418
describe('getUserSyncs', function () {
411419
const GDPR_CONSENT_STRING = 'GDPR_CONSENT_STRING';

0 commit comments

Comments
 (0)