-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Video support in PubMatic adapter (#2807)
* merging latest prebid master with video changes * fixed linting errors * moved data types to constants * fixes for code review comments on PR
- Loading branch information
1 parent
8995c80
commit 4ffc421
Showing
4 changed files
with
368 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ Maintainer: [email protected] | |
|
||
Connects to PubMatic exchange for bids. | ||
|
||
PubMatic bid adapter supports Banner currently. | ||
PubMatic bid adapter supports Video and Banner currently. | ||
|
||
# Sample Ad Unit: For Publishers | ||
# Sample Banner Ad Unit: For Publishers | ||
``` | ||
var adUnits = [ | ||
{ | ||
|
@@ -35,7 +35,43 @@ var adUnits = [ | |
kadfloor: '0.50' // optional | ||
} | ||
}] | ||
} | ||
}]; | ||
``` | ||
|
||
# Sample Video Ad Unit: For Publishers | ||
``` | ||
var adVideoAdUnits = [ | ||
{ | ||
code: 'test-div-video', | ||
mediaTypes: { | ||
video: { | ||
playerSize: [640, 480], // required | ||
context: 'instream' | ||
} | ||
}, | ||
bids: [{ | ||
bidder: 'pubmatic', | ||
params: { | ||
publisherId: '351', // required | ||
adSlot: '1363568@300x250', // required | ||
video: { | ||
mimes: ['video/mp4','video/x-flv'], // required | ||
skippable: true, // optional | ||
minduration: 5, // optional | ||
maxduration: 30, // optional | ||
startdelay: 5, // optional | ||
playbackmethod: [1,3], // optional | ||
api: [ 1, 2 ], // optional | ||
protocols: [ 2, 3 ], // optional | ||
battr: [ 13, 14 ], // optional | ||
linearity: 1, // optional | ||
placement: 2, // optional | ||
minbitrate: 10, // optional | ||
maxbitrate: 10 // optional | ||
} | ||
} | ||
}] | ||
}] | ||
``` | ||
|
||
### Configuration | ||
|
@@ -49,5 +85,15 @@ pbjs.setConfig({ | |
enabledBidders: ['pubmatic'], | ||
syncDelay: 6000 | ||
}}); | ||
|
||
|
||
For Video ads, prebid cache needs to be enabled for PubMatic adapter. | ||
pbjs.setConfig({ | ||
debug: true, | ||
cache: { | ||
url: 'https://prebid.adnxs.com/pbc/v1/cache' | ||
} | ||
}); | ||
|
||
``` | ||
Note: Combine the above the configuration with any other UserSync configuration. Multiple setConfig() calls overwrite each other and only last call for a given attribute will take effect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.