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

Dxkulture Bid Adapter: changing default video placement value #10473

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 1 addition & 4 deletions modules/dxkultureBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const OPENRTB_VIDEO_PARAMS = [
'minduration',
'maxduration',
'placement',
'plcmt',
'protocols',
'startdelay',
'skip',
Expand Down Expand Up @@ -327,10 +328,6 @@ function buildVideoRequestData(bidRequest, bidderRequest) {
}
});

// Placement Inference Rules:
// - If no placement is defined then default to 1 (In Stream)
video.placement = video.placement || 2;

// - If product is instream (for instream context) then override placement to 1
if (params.context === 'instream') {
video.startdelay = video.startdelay || 0;
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/dxkultureBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ describe('dxkultureBidAdapter:', function () {
sid: 134,
rewarded: 1,
placement: 1,
plcmt: 1,
hp: 1,
inventoryid: 123
},
Expand Down Expand Up @@ -403,6 +404,8 @@ describe('dxkultureBidAdapter:', function () {
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(videoBidRequest.params.bidfloor);
expect(data.imp[0]['video']['placement']).to.equal(videoBidRequest.params.video['placement']);
expect(data.imp[0]['video']['plcmt']).to.equal(videoBidRequest.params.video['plcmt']);
expect(data.ext.prebidver).to.equal('$prebid.version$');
expect(data.ext.adapterver).to.equal(spec.VERSION);
});
Expand Down