Skip to content

Commit

Permalink
JW Player Bid Adapter : initial release (#11344)
Browse files Browse the repository at this point in the history
* jwplayerBidAdapter module created

* created initial skeleton of jwplayerBidAdapter

* cleaned up initial skeleton for jwplayerBidAdapter

* added description to jwplayerBidAdapter.md

* created jwplayerBidAdapter unit test suite

* implemented isBidRequestValid with unit tests

* initial creation of the buildRequests function

* incorporated feedback from pr and refactored.

* added video object, impExt object, and site content object to jwplayerBidAdapter

* added feedback from pr

* fixed parameters for methods in jwplayerBidAdapter

* added feedback from pr and unit tests

* removed superfluous array

* fixed nits

* added feedback to jw adapter and tests for buildRequests

* added feedback

* one last feedback for request site

* added site object unit test

* fixed buildRequestSite object

* added unit tests for site object

* fixed unit tests for buildRequestSite

* skeleton of interpretResponse

* initial attempt at interpretResponse

* started unit test

* finished interpretResponse with unit test

* populates schain as well as other params

* reads schain from bidrequest

* updates unit tests

* improves tests

* tests tmax

* deletes obsolete comments

* errors when url is missing

* updates tests

* implements usersync

* supports iframe sync

* registers user sync properly

* tests user sync

* uses boost email

* improves ortb reqs

* interprets response

* updates tests

* updates tests

* removes playerSize official support

* adds md

* updates demo

* adds content url

* adds jwplayer ssp

* renames demo

---------

Co-authored-by: Jorge Rocha <jrocha@jwplayer.com>
  • Loading branch information
karimMourra and jorgeluisrocha authored Apr 25, 2024
1 parent be66a45 commit fadc303
Show file tree
Hide file tree
Showing 21 changed files with 1,092 additions and 4 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
Loading

0 comments on commit fadc303

Please sign in to comment.