Skip to content

Commit

Permalink
Beachfront Bid Adapter : add plcmt support (#11558)
Browse files Browse the repository at this point in the history
* change placement to plcmt

* add placement param

---------

Co-authored-by: John Salis <john@beachfront.com>
  • Loading branch information
jsalis and John Salis authored May 28, 2024
1 parent a5eaf63 commit 6957843
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions modules/beachfrontBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {Renderer} from '../src/Renderer.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {find, includes} from '../src/polyfill.js';

const ADAPTER_VERSION = '1.20';
const ADAPTER_VERSION = '1.21';
const ADAPTER_NAME = 'BFIO_PREBID';
const OUTSTREAM = 'outstream';
const CURRENCY = 'USD';
Expand All @@ -26,7 +26,7 @@ export const OUTSTREAM_SRC = 'https://player-cdn.beachfrontmedia.com/playerapi/l
export const SYNC_IFRAME_ENDPOINT = 'https://sync.bfmio.com/sync_iframe';
export const SYNC_IMAGE_ENDPOINT = 'https://sync.bfmio.com/syncb';

export const VIDEO_TARGETING = ['mimes', 'playbackmethod', 'maxduration', 'placement', 'skip', 'skipmin', 'skipafter'];
export const VIDEO_TARGETING = ['mimes', 'playbackmethod', 'maxduration', 'placement', 'plcmt', 'skip', 'skipmin', 'skipafter'];
export const DEFAULT_MIMES = ['video/mp4', 'application/javascript'];

export const SUPPORTED_USER_IDS = [
Expand Down
14 changes: 7 additions & 7 deletions test/spec/modules/beachfrontBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,28 +245,28 @@ describe('BeachfrontAdapter', function () {
const mimes = ['video/webm'];
const playbackmethod = 2;
const maxduration = 30;
const placement = 4;
const plcmt = 4;
const skip = 1;
bidRequest.mediaTypes = {
video: { mimes, playbackmethod, maxduration, placement, skip }
video: { mimes, playbackmethod, maxduration, plcmt, skip }
};
const requests = spec.buildRequests([ bidRequest ], {});
const data = requests[0].data;
expect(data.imp[0].video).to.deep.contain({ mimes, playbackmethod, maxduration, placement, skip });
expect(data.imp[0].video).to.deep.contain({ mimes, playbackmethod, maxduration, plcmt, skip });
});

it('must override video params from the bidder object', function () {
const bidRequest = bidRequests[0];
const mimes = ['video/webm'];
const playbackmethod = 2;
const maxduration = 30;
const placement = 4;
const plcmt = 4;
const skip = 1;
bidRequest.mediaTypes = { video: { placement: 3, skip: 0 } };
bidRequest.params.video = { mimes, playbackmethod, maxduration, placement, skip };
bidRequest.mediaTypes = { video: { plcmt: 3, skip: 0 } };
bidRequest.params.video = { mimes, playbackmethod, maxduration, plcmt, skip };
const requests = spec.buildRequests([ bidRequest ], {});
const data = requests[0].data;
expect(data.imp[0].video).to.deep.contain({ mimes, playbackmethod, maxduration, placement, skip });
expect(data.imp[0].video).to.deep.contain({ mimes, playbackmethod, maxduration, plcmt, skip });
});

it('must add US privacy data to the request', function () {
Expand Down

0 comments on commit 6957843

Please sign in to comment.