Skip to content

Commit

Permalink
Merge branch 'prebid:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
parthshah51999 authored Apr 25, 2024
2 parents 0f6f14e + fadc303 commit 71212aa
Show file tree
Hide file tree
Showing 29 changed files with 1,158 additions and 41 deletions.
75 changes: 75 additions & 0 deletions integrationExamples/noadserver/jwplayerBidAdapter_sample.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="../../../build/dev/prebid.js"></script>

<script>
const adUnit = {
code: 'test-ad-unit',
mediaTypes: {
video: {
pos: 0,
w: 640,
h: 480,
mimes : ['application/vnd.apple.mpegurl', 'video/mp4'],
minduration : 0,
maxduration: 60,
protocols : [2,3,7,5,6,8],
startdelay: 0,
placement: 1,
plcmt: 1,
skip: 1,
skipafter: 10,
playbackmethod: [3],
api: [2],
linearity: 1
}
},
bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}]
};

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
realTimeData: {
dataProviders: [{
name: "jwplayer",
waitForIt: true,
params: {
mediaIDs: ['test-media-id'],
overrideContentUrl: 'always',
overrideContentId: 'always',
overrideContentTitle: 'always',
overrideContentDescription: 'always'
}
}]
},
ortb2: {
site: {
content: {
url: 'test.mp4'
}
}
}
});
pbjs.addAdUnits([adUnit]);
pbjs.requestBids({
timeout: 4000
});
});
</script>
</head>
<body>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
},
// Replace this object to test a new Adapter!
bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@
mediationLayerAdServer: "dfp",
bidTimeout: 2000
},
bidders: [
{
bidders: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
name: "ix",
siteId: "300"
}
]
}]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/jwplayer/eventListeners.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@

// Replace this object to test a new Adapter!
bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/jwplayer/eventsUI.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
divId: 'player', // required to indicate which player is being used to render this ad unit.
},
bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/jwplayer/mediaMetadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/jwplayer/playlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/videojs/bidMarkedAsUsed.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/videojs/eventListeners.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/videojs/eventsUI.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
divId: 'player', // required to indicate which player is being used to render this ad unit.
},
bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/videojs/mediaMetadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
7 changes: 7 additions & 0 deletions integrationExamples/videoModule/videojs/playlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
},

bids: [{
bidder: 'jwplayer',
params: {
publisherId: 'test-publisher-id',
siteId: 'test-site-id',
placementId: 'test-placement-id'
}
}, {
bidder: 'ix',
params: {
siteId: '300',
Expand Down
4 changes: 2 additions & 2 deletions libraries/ortbConverter/processors/banner.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {createTrackPixelHtml, deepAccess, inIframe, mergeDeep} from '../../../src/utils.js';
import {createTrackPixelHtml, deepAccess, encodeMacroURI, inIframe, mergeDeep} from '../../../src/utils.js';
import {BANNER} from '../../../src/mediaTypes.js';
import {sizesToFormat} from '../lib/sizes.js';

Expand All @@ -24,7 +24,7 @@ export function fillBannerImp(imp, bidRequest, context) {
}
}

export function bannerResponseProcessor({createPixel = (url) => createTrackPixelHtml(decodeURIComponent(url))} = {}) {
export function bannerResponseProcessor({createPixel = (url) => createTrackPixelHtml(decodeURIComponent(url), encodeMacroURI)} = {}) {
return function fillBannerResponse(bidResponse, bid) {
if (bidResponse.mediaType === BANNER) {
if (bid.adm && bid.nurl) {
Expand Down
16 changes: 6 additions & 10 deletions modules/adgenerationBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const spec = {
buildRequests: function (validBidRequests, bidderRequest) {
// convert Native ORTB definition to old-style prebid native definition
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
const ADGENE_PREBID_VERSION = '1.6.2';
const ADGENE_PREBID_VERSION = '1.6.3';
let serverRequests = [];
for (let i = 0, len = validBidRequests.length; i < len; i++) {
const validReq = validBidRequests[i];
Expand Down Expand Up @@ -80,12 +80,12 @@ export const spec = {
}

data = tryAppendQueryString(data, 'tp', bidderRequest.refererInfo.page);
if (isIos()) {
const hyperId = getHyperId(validReq);
if (hyperId != null) {
data = tryAppendQueryString(data, 'hyper_id', hyperId);
}

const hyperId = getHyperId(validReq);
if (hyperId != null) {
data = tryAppendQueryString(data, 'hyper_id', hyperId);
}

// remove the trailing "&"
if (data.lastIndexOf('&') === data.length - 1) {
data = data.substring(0, data.length - 1);
Expand Down Expand Up @@ -337,8 +337,4 @@ function getHyperId(validReq) {
return null;
}

function isIos() {
return (/(ios|ipod|ipad|iphone)/i).test(window.navigator.userAgent);
}

registerBidder(spec);
2 changes: 1 addition & 1 deletion modules/engageyaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function parseBannerResponse(rec, response) {
const title = rec.title && rec.title.trim() ? `<div class="eng_tag_ttl" style="display: none">${rec.title}</div>` : '';
const displayName = rec.displayName && title ? `<div class="eng_tag_brnd" style="display: none">${rec.displayName}</div>` : '';
const trackers = getImpressionTrackers(rec, response)
.map(createTrackPixelHtml)
.map((url) => createTrackPixelHtml(url))
.join('');
return `<html><body>${style}<div id="ENG_TAG"><a href="${rec.clickUrl}" target=_blank><img class="eng_tag_img" src="${getImageSrc(rec)}" style="width:${response.imageWidth}px;height:${response.imageHeight}px;" alt="${rec.title}"/>${displayName}${title}</a>${trackers}</div></body></html>`;
}
Expand Down
Loading

0 comments on commit 71212aa

Please sign in to comment.