Skip to content
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
6 changes: 3 additions & 3 deletions modules/cadent_aperture_mxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import { getDNT } from '../libraries/dnt/index.js';

const BIDDER_CODE = 'cadent_aperture_mx';
const ENDPOINT = 'hb.emxdgt.com';
const RENDERER_URL = 'https://js.brealtime.com/outstream/1.30.0/bundle.js';
const ENDPOINT = 'hb-pub.ssp.cadent.com';
const RENDERER_URL = 'https://js.ssp.cadent.com/outstream/1.30.0/bundle.js';
const ADAPTER_VERSION = '1.5.1';
const DEFAULT_CUR = 'USD';
const ALIASES = [
Expand Down Expand Up @@ -46,8 +46,8 @@
let sizes;
bid.mediaTypes && bid.mediaTypes.banner && bid.mediaTypes.banner.sizes ? sizes = bid.mediaTypes.banner.sizes : sizes = bid.sizes;
if (!cadentAdapter.validateSizes(sizes)) {
logWarn(BIDDER_CODE + ': could not detect mediaType banner sizes. Assigning to bid sizes instead');
sizes = bid.sizes;

Check warning on line 50 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

49-50 lines are not covered with tests
}
return {
format: sizes.map((size) => {
Expand Down Expand Up @@ -93,22 +93,22 @@
cleanProtocols: (video) => {
if (video.protocols && video.protocols.includes(7)) {
// not supporting VAST protocol 7 (VAST 4.0);
logWarn(BIDDER_CODE + ': VAST 4.0 is currently not supported. This protocol has been filtered out of the request.');
video.protocols = video.protocols.filter(protocol => protocol !== 7);

Check warning on line 97 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

96-97 lines are not covered with tests
}
return video;
},
outstreamRender: (bid) => {
bid.renderer.push(function () {
const params = (bid && bid.params && bid.params[0] && bid.params[0].video) ? bid.params[0].video : {};
window.emxVideoQueue = window.emxVideoQueue || [];
window.queueEmxVideo({

Check warning on line 105 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

102-105 lines are not covered with tests
id: bid.adUnitCode,
adsResponses: bid.vastXml,
options: params
});
if (window.emxVideoReady && window.videojs) {
window.emxVideoReady();

Check warning on line 111 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

110-111 lines are not covered with tests
}
});
},
Expand All @@ -121,7 +121,7 @@
try {
renderer.setRender(cadentAdapter.outstreamRender);
} catch (err) {
logWarn('Prebid Error calling setRender on renderer', err);

Check warning on line 124 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

124 line is not covered with tests
}

return renderer;
Expand All @@ -133,8 +133,8 @@
videoObj['w'] = bid.mediaTypes.video.playerSize[0][0];
videoObj['h'] = bid.mediaTypes.video.playerSize[0][1];
} else {
videoObj['w'] = bid.mediaTypes.video.playerSize[0];
videoObj['h'] = bid.mediaTypes.video.playerSize[1];

Check warning on line 137 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

136-137 lines are not covered with tests
}
return cadentAdapter.cleanProtocols(videoObj);
},
Expand All @@ -142,7 +142,7 @@
try {
return decodeURIComponent(bidResponseAdm.replace(/%(?![0-9][0-9a-fA-F]+)/g, '%25'));
} catch (err) {
logError('cadent_aperture_mxBidAdapter', 'error', err);

Check warning on line 145 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

145 line is not covered with tests
}
},
getSite: (refInfo) => {
Expand Down Expand Up @@ -176,8 +176,8 @@
if (bidRequest.gppConsent) {
const { gppString: gpp, applicableSections: gppSid } = bidRequest.gppConsent;
if (cadentData.regs) {
cadentData.regs.gpp = gpp;
cadentData.regs.gpp_sid = gppSid;

Check warning on line 180 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

179-180 lines are not covered with tests
} else {
cadentData.regs = {
gpp: gpp,
Expand Down Expand Up @@ -251,8 +251,8 @@
}

if (!bid.mediaTypes.video.playerSize) {
logWarn(BIDDER_CODE + ': Missing video playerSize');
return false;

Check warning on line 255 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

254-255 lines are not covered with tests
}
}

Expand Down Expand Up @@ -313,7 +313,7 @@
const eids = cadentAdapter.getEids(bidderRequest);
if (eids.length > 0) {
if (cadentData.user && cadentData.user.ext) {
cadentData.user.ext.eids = eids;

Check warning on line 316 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

316 line is not covered with tests
} else {
cadentData.user = {
ext: { eids }
Expand Down Expand Up @@ -374,7 +374,7 @@
const syncs = [];
const consentParams = [];
if (syncOptions.iframeEnabled) {
let url = 'https://biddr.brealtime.com/check.html';
let url = 'https://js.ssp.cadent.com/check.html';
if (gdprConsent && typeof gdprConsent.consentString === 'string') {
// add 'gdpr' only if 'gdprApplies' is defined
if (typeof gdprConsent.gdprApplies === 'boolean') {
Expand Down
10 changes: 5 additions & 5 deletions test/spec/modules/cadent_aperture_mxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ describe('cadent_aperture_mx Adapter', function () {
const ad0 = result[0];
const ad1 = result[1];
expect(ad0.renderer).to.exist.and.to.be.a('object');
expect(ad0.renderer.url).to.equal('https://js.brealtime.com/outstream/1.30.0/bundle.js');
expect(ad0.renderer.url).to.equal('https://js.ssp.cadent.com/outstream/1.30.0/bundle.js');
expect(ad0.renderer.id).to.equal('987654321cba');
expect(ad1.renderer).to.equal(undefined);
});
Expand Down Expand Up @@ -794,7 +794,7 @@ describe('cadent_aperture_mx Adapter', function () {
expect(syncs).to.not.be.an('undefined');
expect(syncs).to.have.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html');
expect(syncs[0].url).to.equal('https://js.ssp.cadent.com/check.html');
});

it('should pass gdpr params', function () {
Expand All @@ -805,7 +805,7 @@ describe('cadent_aperture_mx Adapter', function () {
expect(syncs).to.have.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.contains('gdpr=0');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=0&gdpr_consent=test');
expect(syncs[0].url).to.equal('https://js.ssp.cadent.com/check.html?gdpr=0&gdpr_consent=test');
});

it('should pass us_privacy string', function () {
Expand All @@ -832,7 +832,7 @@ describe('cadent_aperture_mx Adapter', function () {
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.contains('gdpr=1');
expect(syncs[0].url).to.contains('usp=test');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=1&gdpr_consent=test&usp=test');
expect(syncs[0].url).to.equal('https://js.ssp.cadent.com/check.html?gdpr=1&gdpr_consent=test&usp=test');
});

it('should pass gpp string and section id', function() {
Expand Down Expand Up @@ -865,7 +865,7 @@ describe('cadent_aperture_mx Adapter', function () {
expect(syncs[0].url).to.contains('gdpr=1');
expect(syncs[0].url).to.contains('usp=test');
expect(syncs[0].url).to.contains('gpp=abcdefgs');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=1&gdpr_consent=test&usp=test&gpp=abcdefgs&gpp_sid=1,2,4');
expect(syncs[0].url).to.equal('https://js.ssp.cadent.com/check.html?gdpr=1&gdpr_consent=test&usp=test&gpp=abcdefgs&gpp_sid=1,2,4');
});
});
});
Loading