forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from jwplayer/AD-1646
Get Ortb Params
- Loading branch information
Showing
8 changed files
with
4,787 additions
and
4,199 deletions.
There are no files selected for viewing
182 changes: 98 additions & 84 deletions
182
integrationExamples/videoModule/videojsAdapter/index.html
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 |
---|---|---|
@@ -1,105 +1,119 @@ | ||
<html> | ||
|
||
<head> | ||
<script async src="../../../build/dev/prebid.js"></script> | ||
<link href="https://vjs.zencdn.net/7.17.0/video-js.css" rel="stylesheet" /> | ||
<!-- Setup ad units --> | ||
<script> | ||
var adUnits = [{ | ||
code: 'div-gpt-ad-51545-0', | ||
sizes: [[600, 500]], | ||
mediaTypes: { | ||
video: { | ||
sizes: [[600, 500]] | ||
} | ||
}, | ||
video: { | ||
divId: 'vid-div-1', | ||
adServer: { | ||
vendorCode: "gam", | ||
params: { | ||
iu: '/19968336/prebid_cache_video_adunit', | ||
cust_params: { | ||
section: 'blog', | ||
anotherKey: 'anotherValue' | ||
}, | ||
output: 'vast' | ||
} | ||
}, | ||
}, | ||
<script async src="../../../build/dev/prebid.js"></script> | ||
<link href="https://vjs.zencdn.net/7.17.0/video-js.css" rel="stylesheet" /> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-ads/6.9.0/videojs-contrib-ads.css" | ||
integrity="sha512-0gIqgiX1dWTChdWUl8XGIBDFvLo7aTvmd6FAhJjzWx5bzYsCJTiPJLKqLF3q31IN4Kfrc0NbTO+EthoT6O0olQ==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer" /> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/videojs-ima/1.11.0/videojs.ima.css" | ||
integrity="sha512-vvsEsf+dZDp6wbommO1Jbb2bpFhVQjw6pIzfE5fUY5Fgkmsgn/16sQWegqrd236T69kK5F1SbGZ+yK46a9il5A==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer" /> | ||
|
||
bids: [{ | ||
bidder: 'ix', | ||
<!-- Setup ad units --> | ||
<script> | ||
var adUnits = [{ | ||
code: 'div-gpt-ad-51545-0', | ||
sizes: [[600, 500]], | ||
mediaTypes: { | ||
video: { | ||
sizes: [[600, 500]] | ||
} | ||
}, | ||
video: { | ||
divId: 'vid-div-1', | ||
adServer: { | ||
vendorCode: "gam", | ||
params: { | ||
siteId: '300', | ||
size: [600, 500] | ||
iu: '/19968336/prebid_cache_video_adunit', | ||
cust_params: { | ||
section: 'blog', | ||
anotherKey: 'anotherValue' | ||
}, | ||
output: 'vast' | ||
} | ||
}] | ||
}]; | ||
}, | ||
}, | ||
|
||
bids: [{ | ||
bidder: 'ix', | ||
params: { | ||
siteId: '300', | ||
size: [600, 500] | ||
} | ||
}] | ||
}]; | ||
|
||
var pbjs = pbjs || {}; | ||
pbjs.que = pbjs.que || []; | ||
var pbjs = pbjs || {}; | ||
pbjs.que = pbjs.que || []; | ||
|
||
pbjs.que.push(function () { | ||
pbjs.onEvent('adImpression', event => { | ||
console.log('adImpression: ', event); | ||
}); | ||
pbjs.setConfig({ | ||
video: { | ||
providers: [{ | ||
divId: 'vid-div-1', | ||
// vendorCode for videojs | ||
vendorCode: 2, | ||
playerConfig: { | ||
params: { | ||
vendorConfig: { | ||
mediaid: 'd9J2zcaA', | ||
advertising: { | ||
adscheduleid: "00000000", | ||
client: 'vast', | ||
offset: "10", | ||
tag: [ | ||
"http://playertest.longtailvideo.com/pre-bad.xml", | ||
"http://playertest.longtailvideo.com/mid.xml" | ||
], | ||
} | ||
pbjs.que.push(function () { | ||
pbjs.onEvent('adImpression', event => { | ||
console.log('adImpression: ', event); | ||
}); | ||
pbjs.setConfig({ | ||
video: { | ||
providers: [{ | ||
divId: 'vid-div-1', | ||
// vendorCode for videojs | ||
vendorCode: 2, | ||
playerConfig: { | ||
params: { | ||
vendorConfig: { | ||
mediaid: 'd9J2zcaA', | ||
advertising: { | ||
adscheduleid: "00000000", | ||
client: 'vast', | ||
offset: "10", | ||
tag: [ | ||
'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&' + | ||
'iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&' + | ||
'impl=s&gdfp_req=1&env=vp&output=xml_vmap1&unviewed_position_start=1&' + | ||
'cust_params=sample_ar%3Dpremidpostpod%26deployment%3Dgmf-js&cmsid=496&' + | ||
'vid=short_onecue&correlator=', | ||
"http://playertest.longtailvideo.com/mid.xml" | ||
], | ||
} | ||
} | ||
} | ||
},] | ||
} | ||
}); | ||
pbjs.addAdUnits(adUnits); | ||
pbjs.requestBids(); | ||
} | ||
},] | ||
} | ||
}); | ||
</script> | ||
pbjs.addAdUnits(adUnits); | ||
pbjs.requestBids(); | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<h2>VideoJS Adapter Test</h2> | ||
|
||
<h5>Div-1 existing Player</h5> | ||
<div id='vid-div-1'> | ||
<video class="video-js vjs-big-play-centered" data-setup='{"controls": true, "autoplay": false, "preload": "auto"}'> | ||
<source src="http://content.bitsontherun.com/videos/3XnJSIm4-52qL9xLP.mp4" type="video/mp4"> | ||
</video> | ||
</div> | ||
<h2>VideoJS Adapter Test</h2> | ||
|
||
<h5>Div-2 existing player without automatic setup</h5> | ||
<div id='vid-div-2'> | ||
<video-js data-setup='{"controls": true}'> | ||
<source src="http://content.bitsontherun.com/videos/3XnJSIm4-52qL9xLP.mp4" type="video/mp4"> | ||
</video-js> | ||
</div> | ||
<h5>Div-1 existing Player</h5> | ||
|
||
<h5>Div-3 controlled Player</h5> | ||
<div id='vid-div-3'></div> | ||
<video id='vid-div-1' class="video-js vjs-big-play-centered" | ||
data-setup='{"controls": true, "autoplay": false, "preload": "auto"}'> | ||
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4"> | ||
</video> | ||
|
||
<h5>Div-2 existing player without automatic setup</h5> | ||
<video-js id='vid-div-2' data-setup='{"controls": true}'> | ||
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4"> | ||
</video-js> | ||
|
||
<h5>Div-3 controlled Player</h5> | ||
<div id='vid-div-3'></div> | ||
|
||
<script src="https://vjs.zencdn.net/7.17.0/video.min.js"></script> | ||
<script> | ||
</script> | ||
</body> | ||
|
||
</html> | ||
<script src="https://vjs.zencdn.net/7.17.0/video.min.js"></script> | ||
<script src="https://imasdk.googleapis.com/js/sdkloader/ima3.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-ads/6.9.0/videojs-contrib-ads.js" | ||
integrity="sha512-XjyyAijQGlXZET35toG8igvVs8HvfVgKXGnbfAs2EpZ0o8vjJoIrxL9RBBQbQjzAODIe0jvWelFfZOA3Z/vdWg==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-ima/1.11.0/videojs.ima.js" | ||
integrity="sha512-9ocW9fl8CKJhZp4cmDpLDGPuTQ93gvw1iIS6daMYc5Y0Xh1all8iwdoI+iNmZpiydpdDGyKMTriXDX0wfs2OEg==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
|
||
</body> | ||
|
||
</html> |
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
Oops, something went wrong.