Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support min &max duration for onevideo #5079

Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
62516db
outstream changes
Jun 27, 2019
05e333a
removing global filtet
Jun 27, 2019
054b515
reverting page
Jun 27, 2019
94cbc2d
message
Jul 2, 2019
d49e922
adapter change
Jul 3, 2019
7a43143
remove space
Jul 3, 2019
bc859b3
testcases
Jul 3, 2019
0a8a86c
testpage
Jul 3, 2019
22e4ec9
spaces for test page
Jul 3, 2019
9637b48
renderer exist case
Jul 4, 2019
0e2d31b
reverting package-lock.json
Jul 9, 2019
88ac283
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 11, 2019
d81769b
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 24, 2019
2d48e1e
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 1, 2019
63a37e3
adding schain object
Aug 2, 2019
873a2c1
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 4, 2019
7e68c35
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 7, 2019
e8c40c3
adding tagid
Aug 7, 2019
af32e45
syntaxx error fix
Aug 7, 2019
4bb7c45
video.html
Aug 7, 2019
caf81ac
space trailing
Aug 7, 2019
514f68d
space
Aug 7, 2019
5dc1086
tagid
Aug 7, 2019
606eb96
inventoryId and placement
Aug 14, 2019
4cfb6f4
rewarded video
Sep 3, 2019
e03ff33
added unit test case
Sep 5, 2019
a17b3d3
merge
Nov 14, 2019
31bd686
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 2, 2019
187b7af
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 11, 2019
918cc48
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 19, 2019
1cdef6d
comment
Dec 19, 2019
360009b
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 7, 2020
57b2089
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 10, 2020
b7bfbd0
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 11, 2020
bde4e23
Merge remote-tracking branch 'upstream/master'
Jan 30, 2020
f827464
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 5, 2020
6e28b00
Merge remote-tracking branch 'upstream/master'
Mar 2, 2020
6eb7d30
Merge remote-tracking branch 'upstream/master' into Support-Max-Durat…
Mar 26, 2020
694337c
changes
Mar 26, 2020
295d84b
min max dduration
Apr 6, 2020
c5a2c33
.md file
Apr 6, 2020
f1c690a
min max
Apr 7, 2020
58ce024
md change
Apr 7, 2020
3bd3f71
version
Apr 7, 2020
4b6f3fe
tests fix
Apr 7, 2020
ec5f450
Merge branch 'master' into Support-Max-Duration-for-Onevideo
DeepthiNeeladri Apr 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion modules/oneVideoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
const BIDDER_CODE = 'oneVideo';
export const spec = {
code: 'oneVideo',
VERSION: '3.0.0',
VERSION: '3.0.1',
FilipStamenkovic marked this conversation as resolved.
Show resolved Hide resolved
ENDPOINT: 'https://ads.adaptv.advertising.com/rtb/openrtb?ext_id=',
SYNC_ENDPOINT1: 'https://cm.g.doubleclick.net/pixel?google_nid=adaptv_dbm&google_cm&google_sc',
SYNC_ENDPOINT2: 'https://pr-bh.ybp.yahoo.com/sync/adaptv_ortb/{combo_uid}',
Expand Down Expand Up @@ -214,6 +214,18 @@ function getRequestData(bid, consentData, bidRequest) {
if (bid.params.video.placement) {
bidData.imp[0].banner.placement = bid.params.video.placement
}
if (bid.params.video.maxduration) {
if (!bidData.imp[0].banner.ext) {
bidData.imp[0].banner.ext = {}
}
FilipStamenkovic marked this conversation as resolved.
Show resolved Hide resolved
bidData.imp[0].banner.ext.maxduration = bid.params.video.maxduration
}
FilipStamenkovic marked this conversation as resolved.
Show resolved Hide resolved
if (bid.params.video.minduration) {
if (!bidData.imp[0].banner.ext) {
bidData.imp[0].banner.ext = {}
}
bidData.imp[0].banner.ext.minduration = bid.params.video.minduration
}
}
if (bid.params.video.inventoryid) {
bidData.imp[0].ext.inventoryid = bid.params.video.inventoryid
Expand Down
4 changes: 3 additions & 1 deletion modules/oneVideoBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Connects to One Video demand source to fetch bids.
sid: <scpid>,
rewarded: 1,
placement: 1,
inventoryid: 123
inventoryid: 123,
minduration: 10,
maxduration: 30,
},
site: {
id: 1,
Expand Down
12 changes: 10 additions & 2 deletions test/spec/modules/oneVideoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ describe('OneVideoBidAdapter', function () {
placement: 1,
inventoryid: 123,
sid: 134,
display: 1
display: 1,
minduration: 10,
maxduration: 30
},
site: {
id: 1,
Expand All @@ -314,6 +316,8 @@ describe('OneVideoBidAdapter', function () {
expect(data.imp[0].ext.inventoryid).to.equal(bidRequest.params.video.inventoryid);
expect(data.imp[0].banner.mimes).to.equal(bidRequest.params.video.mimes);
expect(data.imp[0].banner.placement).to.equal(bidRequest.params.video.placement);
expect(data.imp[0].banner.ext.minduration).to.equal(bidRequest.params.video.minduration);
expect(data.imp[0].banner.ext.maxduration).to.equal(bidRequest.params.video.maxduration);
expect(data.site.id).to.equal(bidRequest.params.site.id);
});
it('should send video object when display is other than 1', function () {
Expand Down Expand Up @@ -384,7 +388,9 @@ describe('OneVideoBidAdapter', function () {
delivery: [2],
playbackmethod: [1, 5],
placement: 123,
sid: 134
sid: 134,
minduration: 10,
maxduration: 30
},
site: {
id: 1,
Expand All @@ -406,6 +412,8 @@ describe('OneVideoBidAdapter', function () {
expect(data.imp[0].video.mimes).to.equal(bidRequest.params.video.mimes);
expect(data.imp[0].video.protocols).to.equal(bidRequest.params.video.protocols);
expect(data.imp[0].video.linearity).to.equal(1);
expect(data.imp[0].video.maxduration).to.equal(bidRequest.params.video.maxduration);
expect(data.imp[0].video.minduration).to.equal(bidRequest.params.video.minduration);
});
describe('getUserSyncs', function () {
const GDPR_CONSENT_STRING = 'GDPR_CONSENT_STRING';
Expand Down