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

Onetag Bid Adapter: extend mediaType support #7363

Merged
merged 2 commits into from
Sep 2, 2021
Merged
Changes from 1 commit
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
9 changes: 3 additions & 6 deletions modules/onetagBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import find from 'core-js-pure/features/array/find.js';
import { getStorageManager } from '../src/storageManager.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { createEidsArray } from './userId/eids.js';
import { deepClone } from '../src/utils.js';

const ENDPOINT = 'https://onetag-sys.com/prebid-request';
const USER_SYNC_ENDPOINT = 'https://onetag-sys.com/usync/';
Expand Down Expand Up @@ -239,15 +240,10 @@ function requestsToBids(bidRequests) {
// Pass parameters
// Context: instream - outstream - adpod
videoObj['context'] = bidRequest.mediaTypes.video.context;
// MIME Video Types
videoObj['mimes'] = bidRequest.mediaTypes.video.mimes;
// Sizes
videoObj['playerSize'] = parseVideoSize(bidRequest);
// Other params
videoObj['protocols'] = bidRequest.mediaTypes.video.protocols;
videoObj['maxDuration'] = bidRequest.mediaTypes.video.maxduration;
videoObj['api'] = bidRequest.mediaTypes.video.api;
videoObj['playbackmethod'] = bidRequest.mediaTypes.video.playbackmethod || [];
videoObj['mediaTypeInfo'] = deepClone(bidRequest.mediaTypes.video);
videoObj['type'] = VIDEO;
return videoObj;
});
Expand All @@ -256,6 +252,7 @@ function requestsToBids(bidRequests) {
setGeneralInfo.call(bannerObj, bidRequest);
bannerObj['sizes'] = parseSizes(bidRequest);
bannerObj['type'] = BANNER;
bannerObj['mediaTypeInfo'] = deepClone(bidRequest.mediaTypes.banner);
return bannerObj;
});
return videoBidRequests.concat(bannerBidRequests);
Expand Down