From 84a6670451a55313aa391dd4aad698dfb2d7af52 Mon Sep 17 00:00:00 2001 From: Carlos Felix Date: Wed, 15 May 2024 16:48:35 -0500 Subject: [PATCH] 33across - use video.plcmt instead of video.placement --- modules/33acrossBidAdapter.js | 10 +++++----- test/spec/modules/33acrossBidAdapter_spec.js | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/33acrossBidAdapter.js b/modules/33acrossBidAdapter.js index 0e9beb22013..1c379d83b3b 100644 --- a/modules/33acrossBidAdapter.js +++ b/modules/33acrossBidAdapter.js @@ -35,7 +35,7 @@ const VIDEO_ORTB_PARAMS = [ 'mimes', 'minduration', 'maxduration', - 'placement', + 'plcmt', 'protocols', 'startdelay', 'skip', @@ -141,8 +141,8 @@ function _validateVideo(bid) { // If placement if defined, it must be a number if ( - typeof videoParams.placement !== 'undefined' && - typeof videoParams.placement !== 'number' + typeof videoParams.plcmt !== 'undefined' && + typeof videoParams.plcmt !== 'number' ) { return false; } @@ -491,11 +491,11 @@ function _buildVideoORTB(bidRequest) { // Placement Inference Rules: // - If no placement is defined then default to 2 (In Banner) // - If product is instream (for instream context) then override placement to 1 - video.placement = video.placement || 2; + video.plcmt = video.plcmt || 2; if (product === PRODUCT.INSTREAM) { video.startdelay = video.startdelay || 0; - video.placement = 1; + video.plcmt = 1; } // bidfloors diff --git a/test/spec/modules/33acrossBidAdapter_spec.js b/test/spec/modules/33acrossBidAdapter_spec.js index 9cc038428bc..42c058ec23d 100644 --- a/test/spec/modules/33acrossBidAdapter_spec.js +++ b/test/spec/modules/33acrossBidAdapter_spec.js @@ -121,7 +121,7 @@ describe('33acrossBidAdapter:', function () { video: { w: 300, h: 250, - placement: 2, + plcmt: 2, ...params } }); @@ -734,7 +734,7 @@ describe('33acrossBidAdapter:', function () { ]; invalidPlacement.forEach((placement) => { - this.bid.mediaTypes.video.placement = placement; + this.bid.mediaTypes.video.plcmt = placement; expect(spec.isBidRequestValid(this.bid)).to.be.false; }); }); @@ -1533,7 +1533,7 @@ describe('33acrossBidAdapter:', function () { .withProduct('instream') .build(); - ttxRequest.imp[0].video.placement = 1; + ttxRequest.imp[0].video.plcmt = 1; ttxRequest.imp[0].video.startdelay = 0; const serverRequest = new ServerRequestBuilder() @@ -1552,7 +1552,7 @@ describe('33acrossBidAdapter:', function () { ); const ttxRequest = new TtxRequestBuilder() - .withVideo({startdelay: -2, placement: 1}) + .withVideo({startdelay: -2, plcmt: 1}) .withProduct('instream') .build(); @@ -1575,7 +1575,7 @@ describe('33acrossBidAdapter:', function () { .withProduct('siab') .build(); - ttxRequest.imp[0].video.placement = 2; + ttxRequest.imp[0].video.plcmt = 2; const serverRequest = new ServerRequestBuilder() .withData(ttxRequest) @@ -1588,12 +1588,12 @@ describe('33acrossBidAdapter:', function () { it('builds siab request with video params passed', function() { const bidRequests = ( new BidRequestsBuilder() - .withVideo({context: 'outstream', placement: 3, playbackmethod: [2]}) + .withVideo({context: 'outstream', plcmt: 3, playbackmethod: [2]}) .build() ); const ttxRequest = new TtxRequestBuilder() - .withVideo({placement: 3, playbackmethod: [2]}) + .withVideo({plcmt: 3, playbackmethod: [2]}) .withProduct('siab') .build(); @@ -1686,7 +1686,7 @@ describe('33acrossBidAdapter:', function () { .withProduct('siab') .build(); - ttxRequest.imp[0].video.placement = 2; + ttxRequest.imp[0].video.plcmt = 2; const serverRequest = new ServerRequestBuilder() .withData(ttxRequest)