Skip to content

Commit

Permalink
updates docs and demo for fpd changes (prebid#6302)
Browse files Browse the repository at this point in the history
Co-authored-by: karimJWP <karimJWP@github.com>
  • Loading branch information
2 people authored and stsepelin committed May 28, 2021
1 parent 17b34fd commit 527e2c9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
48 changes: 23 additions & 25 deletions integrationExamples/gpt/jwplayerRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,30 @@
var PREBID_TIMEOUT = 1000;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
fpd: {
context: {
data: {
jwTargeting: {
// Note: the following Ids are placeholders and should be replaced with your Ids.
playerID: '123',
mediaID: 'abc'
code: 'div-gpt-ad-1460505748561-0',
ortb2Imp: {
ext: {
data: {
jwTargeting: {
// Note: the following Ids are placeholders and should be replaced with your Ids.
playerID: '123',
mediaID: 'abc'
}
}
}
},
}
},

mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
}
},
// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}]

},
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
}
},
// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}]
}];

var pbjs = pbjs || {};
Expand Down
12 changes: 8 additions & 4 deletions modules/jwplayerRtdProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ pbjs.setConfig({
}
});
```
Lastly, include the content's media ID and/or the player's ID in the matching AdUnit's `fpd.context.data`:
Lastly, include the content's media ID and/or the player's ID in the matching AdUnit's `ortb2Imp.ext.data`:

```javascript
const adUnit = {
code: '/19968336/prebid_native_example_1',
...
fpd: {
context: {
ortb2Imp: {
ext: {
data: {
jwTargeting: {
// Note: the following Ids are placeholders and should be replaced with your Ids.
Expand All @@ -52,7 +52,7 @@ pbjs.que.push(function() {
});
```

**Note**: You may also include `jwTargeting` information in the prebid config's `fpd.context.data`. Information provided in the adUnit will always supersede, and information in the config will be used as a fallback.
**Note**: You may also include `jwTargeting` information in the prebid config's `ortb2.site.ext.data`. Information provided in the adUnit will always supersede, and information in the config will be used as a fallback.

##Prefetching
In order to prefetch targeting information for certain media, include the media IDs in the `jwplayerDataProvider` var and set `waitForIt` to `true`:
Expand Down Expand Up @@ -117,3 +117,7 @@ To view an example:
`http://localhost:9999/integrationExamples/gpt/jwplayerRtdProvider_example.html`

**Note:** the mediaIds in the example are placeholder values; replace them with your existing IDs.

#Maintainer info

Maintained by JW Player. For any questions, comments or feedback please contact Karim Mourra, karim@jwplayer.com

0 comments on commit 527e2c9

Please sign in to comment.