Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Module: Initial Release #8858

Merged
merged 254 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
254 commits
Select commit Hold shift + click to select a range
336cc36
registers as module
Aug 4, 2021
d106e51
adds vendor consts
Aug 4, 2021
00738fb
registers jwplayer submodule
Aug 4, 2021
2193d74
renames render ad
Aug 4, 2021
f6f749e
checks config autostart
Aug 4, 2021
3c73c27
moves private functions to a util obj
Aug 4, 2021
5b7ff15
introduces ad optimization
Aug 5, 2021
d8259d9
tests state.js
Aug 9, 2021
8795a73
introduces submodule tests
Aug 9, 2021
95d68a7
populates utils tests
Aug 9, 2021
6a5f0f1
tests callback storage
Aug 9, 2021
743d99a
tests ad and time states
Aug 10, 2021
9084143
introduces provider tests:
Aug 10, 2021
7050786
tests init
Aug 10, 2021
d2177ff
tests get ortb
Aug 10, 2021
b8f2d69
tests event listeners
Aug 11, 2021
1113b15
supports removing all event handlers when explicit
Aug 13, 2021
f10476f
splits clear all event listeners from early return
Aug 13, 2021
93c2a57
removes hook
Aug 20, 2021
0ce3c73
shares directory
Aug 20, 2021
61cbf09
prevents registering a same provider twice
karimMourra Aug 31, 2021
ac8f9f4
adds pb video
karimMourra Aug 31, 2021
3477515
adds video module to submodules list
karimMourra Sep 1, 2021
58dcf57
adds integration example
karimMourra Sep 1, 2021
d40f478
implements ad unit enrichment
karimMourra Sep 1, 2021
b166b00
moves submodule to parent dir
karimMourra Sep 1, 2021
972bb4d
removes comment
karimMourra Sep 1, 2021
227807b
implements event listener
karimMourra Sep 2, 2021
805e8a8
adds unit tests
karimMourra Sep 2, 2021
cb2c4ec
tests updating video config
karimMourra Sep 7, 2021
a925e56
tests events surfacing
karimMourra Sep 7, 2021
02a4b7d
nests the event trigger tests
karimMourra Sep 7, 2021
7afb97a
restores factory
karimMourra Sep 7, 2021
3ba4787
adds adServer
karimMourra Oct 7, 2021
44abd5f
shares base parent module logic
karimMourra Oct 7, 2021
ccc2783
register gam submodule
karimMourra Oct 7, 2021
76e2d44
tests submodule builder
karimMourra Oct 8, 2021
1025e0f
instantiates ad server
karimMourra Oct 8, 2021
deb2d9b
tests parent module
karimMourra Oct 8, 2021
9216a73
updates core video tests
karimMourra Oct 8, 2021
4f81a06
adds ad server tests
karimMourra Oct 8, 2021
a2c9846
obtains vast ad to render
karimMourra Oct 11, 2021
27a0017
passes options
karimMourra Oct 11, 2021
16acf42
tests ad tag obtention
karimMourra Oct 12, 2021
aacb0fc
tests settings tags without ad server
karimMourra Oct 12, 2021
942fc2d
adds vast xml builder
karimMourra Oct 22, 2021
ea0853c
tests node makers
karimMourra Oct 22, 2021
486e5bf
implments vast xml build fn
karimMourra Oct 22, 2021
8aaeafc
renames wrapper builder
karimMourra Oct 22, 2021
2105b5b
adds vast xml editor
karimMourra Nov 1, 2021
82e925a
modifies vast xml
karimMourra Nov 1, 2021
dd622c1
moves logic to helper
karimMourra Nov 1, 2021
4e8d7da
appends doc element
karimMourra Nov 1, 2021
e01d34a
copies node when required multiple times
karimMourra Nov 1, 2021
d520bb6
improves copy check
karimMourra Nov 1, 2021
bc0366a
adds tests for error node
karimMourra Nov 1, 2021
d75bf7d
adds tests cases for different config
karimMourra Nov 2, 2021
cea37a3
pulls vast wrapper builders from xml editor
karimMourra Nov 2, 2021
b9d0f4d
adds tracking tests
karimMourra Nov 2, 2021
48308fc
tests arguments
karimMourra Nov 2, 2021
be52af3
removes obsolete path
karimMourra Nov 3, 2021
60c3c4c
polls for duration when absent
karimMourra Dec 31, 2021
2712a52
sets up video module
karimMourra Jan 5, 2022
e58f071
prevents ad load if bidding is used
karimMourra Jan 11, 2022
fe4128a
triggers event before loading ad
karimMourra Jan 25, 2022
73c3548
adds inline docs to shared modules
karimMourra Feb 2, 2022
23c6682
adds inline docs
karimMourra Feb 2, 2022
4b9637c
documents providers
karimMourra Feb 3, 2022
05f4bc1
adds inline docs for ortb
karimMourra Feb 4, 2022
dc5aa6f
adds missing ortb params
karimMourra Feb 4, 2022
946a4cf
obtains language code
karimMourra Feb 4, 2022
00c582b
makes placement more precise
karimMourra Feb 4, 2022
8dd5735
adds notes
karimMourra Feb 4, 2022
6697679
updates todo
karimMourra Feb 7, 2022
e0cba98
early exit if not video media type
karimMourra Feb 8, 2022
a08bf29
loads ad server config
karimMourra Feb 8, 2022
b4578ac
filters for highest bids before rendering
karimMourra Feb 8, 2022
52bf82d
emits event even on loss
karimMourra Feb 8, 2022
2b16a6f
registers video auction events
karimMourra Feb 8, 2022
5394ae0
updates events
karimMourra Feb 9, 2022
50f3904
includes ad unit code in loss
karimMourra Feb 9, 2022
f48f520
uses config fallback
karimMourra Feb 10, 2022
47faf18
tracks bids sent for rendering
karimMourra Feb 22, 2022
fa1e07b
adds video impression verification
karimMourra Feb 23, 2022
4f3004e
shares code
karimMourra Feb 23, 2022
39ea7f4
triggers bid video events
karimMourra Feb 23, 2022
39a5dcf
matches ad event to bid
karimMourra Feb 24, 2022
c6b28d4
adds inline documentation
karimMourra Feb 24, 2022
f43bd87
allows URL import
karimMourra Mar 4, 2022
ca28129
updates vast xml editor tests
karimMourra Mar 4, 2022
50e9ef3
tests ad event processsing
karimMourra Mar 7, 2022
fdb46b9
includes ad wrapper ids
karimMourra Mar 7, 2022
66c8ed8
updates ad tag injection tests
karimMourra Mar 8, 2022
4e6c006
tests impression tracking
karimMourra Mar 9, 2022
2bff9aa
updates for new find
karimMourra Mar 9, 2022
07f474d
removes unused var
karimMourra Mar 9, 2022
ccc3488
uses find polyfill
karimMourra Mar 23, 2022
592f160
updates event import
karimMourra Mar 25, 2022
c47c0b4
exposes addEvents
karimMourra Mar 25, 2022
2927fa1
checks for bid identifiers bfore accessing properties
karimMourra Mar 25, 2022
60a82c3
checks for bid identifiers bfore accessing properties
karimMourra Mar 25, 2022
82b6ffd
exposes video bid events
karimMourra Mar 28, 2022
941c619
converts ortb params to insternal fields
karimMourra Mar 28, 2022
b58bf95
reads from video
karimMourra Mar 29, 2022
549629c
removes typo
karimMourra Mar 31, 2022
64a631e
sets ortb video to media type video
karimMourra Apr 1, 2022
69117d4
sets ortb2 obj
karimMourra Apr 1, 2022
b924439
gets impression url from fn
karimMourra Apr 12, 2022
f934557
tmg uses mediatype video
karimMourra Apr 13, 2022
de22d46
configures provider to properly render ads
karimMourra Apr 13, 2022
020d1ef
sets up player in demo
karimMourra Apr 13, 2022
7caa854
triggers load abort
karimMourra Apr 13, 2022
b23d8bc
uses appnexys
karimMourra Apr 14, 2022
25124ef
uses getGlobal
karimMourra Apr 14, 2022
ac694a8
protects against missing params
karimMourra Apr 18, 2022
cf2411f
breaks out shared and adserver from videoModule
karimMourra Apr 18, 2022
432556d
updates import
karimMourra Apr 18, 2022
9499084
resolves lgtm errors
karimMourra Apr 19, 2022
2a65182
uses submodule pattern
karimMourra Apr 19, 2022
2e66a47
uses uuid generator util
karimMourra Apr 20, 2022
4bb92d5
removes adServer module
karimMourra Apr 25, 2022
c98320a
moves shared to video folder
karimMourra Apr 25, 2022
850052c
prefix events with video_
karimMourra Apr 26, 2022
8ba264a
adds auction end listener when no bids back handler
karimMourra May 9, 2022
1afe8b7
fixes tests
karimMourra May 9, 2022
5915c90
refactors render
karimMourra May 9, 2022
cf16c42
exposes rendering
karimMourra May 10, 2022
f3259a9
uses mergeDeep
karimMourra May 10, 2022
5d928b6
shares constants
karimMourra May 11, 2022
e0b686e
populates ortb content.data
karimMourra May 11, 2022
e07a1fe
register events as prefixed
karimMourra May 13, 2022
c53b8fa
adds test bidders
karimMourra May 13, 2022
7b3582d
moves videoModule to library
karimMourra Jun 30, 2022
6ef31a3
Added draft for videojs integration example
AnirudhRahul Jan 5, 2022
9467c28
Moved jwplayer integration example, added draft for videojs example
AnirudhRahul Jan 5, 2022
bfc68f9
Created integration example for a mocked videojs adapter
AnirudhRahul Jan 5, 2022
98e7536
Fixed call order for integration examples, moved imports up
AnirudhRahul Jan 5, 2022
b22205e
Finished init for videojs provider
AnirudhRahul Jan 13, 2022
59e9f49
Setup videojs init unit tests
AnirudhRahul Jan 14, 2022
515b793
Formatting to pass linter
AnirudhRahul Jan 18, 2022
efce855
Removed comments/redundant tests, clarified some sections of code
AnirudhRahul Jan 20, 2022
68645d9
Added semicolon
AnirudhRahul Jan 21, 2022
c9bfdb3
Videojs ortb params, added ortb constants
AnirudhRahul Jan 24, 2022
ba24658
Fixed integration examples, ortb adjustments
AnirudhRahul Jan 24, 2022
c2d2dcd
Cleaned up code added comments
AnirudhRahul Jan 24, 2022
8d7f6b7
Renamed test file
AnirudhRahul Jan 24, 2022
86525c2
Removed videojs mock in favor of videojs
AnirudhRahul Jan 24, 2022
f44dd6b
Changed video source, finished tests for ortb
AnirudhRahul Jan 24, 2022
eb3c317
Cleaned up spacing added some comments
AnirudhRahul Jan 26, 2022
1261d00
Added ad position to ortb
AnirudhRahul Jan 27, 2022
f45173b
Cleaned up playback methods code
AnirudhRahul Jan 27, 2022
59b8eb5
Omitted skip variable per ortb spec
AnirudhRahul Jan 27, 2022
c8a1a7e
Added unit tests for ima integration
AnirudhRahul Jan 28, 2022
720b358
Added util function, and corresponding tests
AnirudhRahul Jan 28, 2022
e42e2a1
Added code for placement
AnirudhRahul Jan 28, 2022
f297915
Linter pass through
AnirudhRahul Jan 28, 2022
6bff965
Added videojs-ima to integration example
AnirudhRahul Jan 28, 2022
117489d
Removed duplicate tests
AnirudhRahul Feb 16, 2022
80599f4
Removed non bidding module tests
AnirudhRahul Feb 16, 2022
a54b567
Added clarifying comments
AnirudhRahul Feb 16, 2022
6cc29e9
Updated name mapping for videojs events
AnirudhRahul Mar 11, 2022
924322e
Added callback factory, and presetup listeners
AnirudhRahul Mar 11, 2022
771c8b3
Filled in initialization events
AnirudhRahul Mar 11, 2022
a6ac680
Importing event constants
AnirudhRahul Mar 11, 2022
d2997ff
Fixing setup failed event handler
AnirudhRahul Mar 11, 2022
2d2eca5
Fixed init behavior to work with setupCompleteCallback
AnirudhRahul Mar 11, 2022
93436ef
Added pre setup callback tests
AnirudhRahul Mar 11, 2022
9e2ef60
Setup presetupListeners/moved away from callbackStorage
AnirudhRahul Mar 25, 2022
08a30e3
Added missing case for setup failure
AnirudhRahul Mar 25, 2022
976f84f
Basic event handling
AnirudhRahul Jun 6, 2022
d2bde62
adds ortb constants
karimMourra Jun 30, 2022
6fcad77
removes trailing file
karimMourra Jun 30, 2022
a4a141e
uses hook.js
karimMourra Jun 30, 2022
5df7648
marks winning bid as used
karimMourra Jul 13, 2022
d438b16
gets adWrapper regardless of property name
karimMourra Jul 13, 2022
4ece8dc
rename vars
karimMourra Jul 13, 2022
7f610d4
fixes init and loadAdTag
karimMourra Jul 14, 2022
6254910
renames videojs var
karimMourra Jul 14, 2022
d37024f
supports media events
karimMourra Jul 18, 2022
c9fb218
addresses size events
karimMourra Jul 21, 2022
35ad18b
registers ad events
karimMourra Jul 29, 2022
ce9ad5f
implements get ad info
karimMourra Aug 1, 2022
c88e797
generates ad pauload
karimMourra Aug 2, 2022
1b78a8a
includes wrapper ids
karimMourra Aug 3, 2022
98d1d2f
supports ad config
karimMourra Aug 3, 2022
16ccad9
populates ad config
karimMourra Aug 3, 2022
9a6da51
adds event listener at every manager change
karimMourra Aug 3, 2022
3355f45
handles setupfailure
karimMourra Aug 3, 2022
1f3220d
renames video js example
karimMourra Aug 3, 2022
1f99b1b
updates time
karimMourra Aug 3, 2022
64341d9
supports loadstart
karimMourra Aug 4, 2022
9c5bba1
supports multiple setup callbacks
karimMourra Aug 16, 2022
ce1daeb
removes global ima for test
karimMourra Aug 16, 2022
671b10b
removes obsolete IMA checks
karimMourra Aug 16, 2022
03be735
requests ad unit
karimMourra Aug 16, 2022
99d64f3
uses vendor config to setup
karimMourra Aug 16, 2022
b5ff571
listens for playlist events
karimMourra Aug 16, 2022
90051c9
restors src tag
karimMourra Aug 16, 2022
c2e9342
resolves build fail
karimMourra Aug 17, 2022
ad36229
splits library from module
karimMourra Aug 17, 2022
5b4e9de
allows obtaining ortb obj
karimMourra Aug 17, 2022
a2604bd
uses safe getConfig
karimMourra Aug 17, 2022
7136e24
adds metadata demo
karimMourra Aug 17, 2022
fcf89a9
improves metadata util
karimMourra Aug 17, 2022
93f7fe2
triggers playlist event at first load
karimMourra Aug 17, 2022
a403c99
adds bid request scheduling demo
karimMourra Aug 18, 2022
228f010
obtains bid adId
karimMourra Aug 18, 2022
4b0e33d
sets proper context
karimMourra Aug 18, 2022
af39dd1
combines all possible adServer configs
karimMourra Aug 19, 2022
ead090c
configures ad tag
karimMourra Aug 19, 2022
a9c90a7
adds demos
karimMourra Aug 19, 2022
880256e
adServerConfig getter is nullable
karimMourra Aug 19, 2022
5fc1e74
adds demos
karimMourra Aug 22, 2022
bcfbdc7
triggers setup fail when ima is missing
karimMourra Aug 22, 2022
f94e32f
checks for player existence
karimMourra Aug 23, 2022
01dede3
updates tests
karimMourra Aug 23, 2022
90e16c6
adds tests
karimMourra Aug 23, 2022
9552ed1
tests media parsers
karimMourra Aug 23, 2022
cd3c193
returns empty object when no config gound
karimMourra Aug 23, 2022
adc6fe9
adds integrity
karimMourra Aug 24, 2022
24d453d
removes library map
karimMourra Sep 7, 2022
21b07a8
prioritizes bidder params
karimMourra Sep 7, 2022
07f4855
uses camel casing for event names
karimMourra Sep 7, 2022
99f5cd1
support multiple setup successful callbacks
karimMourra Sep 7, 2022
16eb673
supports multiple setup fail ballbacks
karimMourra Sep 7, 2022
e9ef1ca
moves early return to core
karimMourra Sep 7, 2022
3af5b97
registers one event at a time
karimMourra Sep 7, 2022
cb257a3
uses event handler builder
karimMourra Sep 8, 2022
abbd00c
uses name conversion util
karimMourra Sep 8, 2022
2b20e62
refactors event handling
karimMourra Sep 9, 2022
3389600
refactors ima listeners
karimMourra Sep 9, 2022
630ea7d
simplifies event logic
karimMourra Sep 9, 2022
7dcfaf9
checks for existence
karimMourra Sep 9, 2022
c99c9ca
offevent singular
karimMourra Sep 10, 2022
86834d5
adds fn desc
karimMourra Sep 12, 2022
5653a25
splits ortb video from content
karimMourra Sep 12, 2022
482eb6c
checks for player existence
karimMourra Sep 12, 2022
86f7b3e
enrichment rules
karimMourra Sep 13, 2022
d684804
only sets main content div when enabled
karimMourra Sep 13, 2022
f760063
sets ortb2 in the bidRequest
karimMourra Sep 13, 2022
ce7aa3d
tests re ortb
karimMourra Sep 13, 2022
eaef25f
refactor tests
karimMourra Sep 13, 2022
04280c2
resolves instability
karimMourra Sep 30, 2022
bd26b76
removes auction end event listener
karimMourra Oct 3, 2022
2e4e8a1
rebuilds dependencies
karimMourra Oct 3, 2022
cc87757
sets ortb site.content
karimMourra Oct 11, 2022
5df9f4b
renames auctionRequest
karimMourra Oct 11, 2022
4a5ddef
renames optimizeAds
karimMourra Oct 20, 2022
6d4aae5
adds module docs
karimMourra Oct 21, 2022
896a11a
adds event doc
karimMourra Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<html>

<head>
<script src="https://cdn.jwplayer.com/libraries/l5MchIxB.js"></script>
<script async src="../../../build/dev/prebid.js"></script>

<title>JW Player with Bid Marked As Used</title>

<!--This demo listens to the Video events that are fired when an ad impression or ad error came from a bid. -->

<script>
// Setup ad units
var adUnits = [{
code: 'div-gpt-ad-51545-0',
mediaTypes: {
video: {}
},
video: {
divId: 'player', // required to indicate which player is being used to render this ad unit.
},

bids: [{
bidder: 'ix',
params: {
siteId: '300',
}
}]
}];

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

pbjs.que.push(function () {
pbjs.setConfig({
video: {
providers: [{
divId: 'player',
vendorCode: 1, // jwplayer vendorCode
playerConfig: {
licenseKey: 'IAjLREYRLylTWsfLN3FoN/O3iQLbs+AfgZLlkAoyH8gSf7TnNtmOLcR8CUY=',
params: {
vendorConfig: {
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
advertising: { client: 'vast' }
}
}
},
},]
},
debugging: {
enabled: true,
intercept: [
{
when: {
adUnitCode: 'div-gpt-ad-51545-0',
},
then: {
cpm: 25,
mediaType: "video",
vastUrl: "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",
// vastXml: "<VAST version=\"3.0\"> <Ad id=\"123\"> <InLine> <AdSystem>PubMatic</AdSystem> <AdTitle>VAST 2.0 Instream Test</AdTitle> <Description>VAST 2.0 Instream Test</Description> <Error> <![CDATA[https://aktrack.pubmatic.com/er=[ERRORCODE]]]> </Error> <Impression> <![CDATA[https://aktrack.pubmatic.com?e=impression]]> </Impression> <Creatives> <Creative AdID=\"123\"> <Linear> <Duration>00:00:30</Duration> <TrackingEvents> <Tracking event=\"creativeView\"> <![CDATA[https://aktrack.pubmatic.com?e=creativeView]]> </Tracking> <Tracking event=\"start\"> <![CDATA[https://aktrack.pubmatic.com?e=start]]> </Tracking> <Tracking event=\"midpoint\"> <![CDATA[https://aktrack.pubmatic.com?e=midpoint]]> </Tracking> <Tracking event=\"firstQuartile\"> <![CDATA[https://aktrack.pubmatic.com?e=firstQuartile]]> </Tracking> <Tracking event=\"thirdQuartile\"> <![CDATA[https://aktrack.pubmatic.com?e=thirdQuartile]]> </Tracking> <Tracking event=\"complete\"> <![CDATA[https://aktrack.pubmatic.com?e=complete]]> </Tracking> </TrackingEvents> <VideoClicks> <ClickThrough> <![CDATA[https://www.pubmatic.com]]> </ClickThrough> </VideoClicks> <MediaFiles> <MediaFile delivery=\"progressive\" type=\"video/mp4\" bitrate=\"500\" width=\"480\" height=\"460\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/spinning-logo-480x360_video.mp4]]> </MediaFile> <MediaFile delivery=\"progressive\" type=\"video/ogg\" bitrate=\"500\" width=\"480\" height=\"460\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/spinning-logo-480x360_video.ogg]]> </MediaFile> <MediaFile delivery=\"progressive\" type=\"video/x-flv\" bitrate=\"500\" width=\"400\" height=\"300\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_test_video.flv]]> </MediaFile> </MediaFiles> </Linear> </Creative> <Creative AdID=\"123\"> <NonLinearAds> <TrackingEvents></TrackingEvents> <NonLinear height=\"50\" width=\"300\" minSuggestedDuration=\"00:00:05\"> <StaticResource creativeType=\"image/jpeg\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_LetsBeClear_300x50.jpeg]]> </StaticResource> <NonLinearClickThrough> <![CDATA[https://www.pubmatic.com]]> </NonLinearClickThrough> </NonLinear> </NonLinearAds> </Creative> <Creative AdID=\"123\"> <CompanionAds> <Companion width=\"300\" height=\"250\"> <StaticResource creativeType=\"image/jpeg\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_LetsBeClear_320x250.jpg]]> </StaticResource> <CompanionClickThrough> <![CDATA[https://www.pubmatic.com]]> </CompanionClickThrough> </Companion> </CompanionAds> </Creative> </Creatives> </InLine> </Ad> </VAST>",
ad: "<VAST version=\"3.0\"> <Ad id=\"123\"> <InLine> <AdSystem>PubMatic</AdSystem> <AdTitle>VAST 2.0 Instream Test</AdTitle> <Description>VAST 2.0 Instream Test</Description> <Error> <![CDATA[https://aktrack.pubmatic.com/er=[ERRORCODE]]]> </Error> <Impression> <![CDATA[https://aktrack.pubmatic.com?e=impression]]> </Impression> <Creatives> <Creative AdID=\"123\"> <Linear> <Duration>00:00:30</Duration> <TrackingEvents> <Tracking event=\"creativeView\"> <![CDATA[https://aktrack.pubmatic.com?e=creativeView]]> </Tracking> <Tracking event=\"start\"> <![CDATA[https://aktrack.pubmatic.com?e=start]]> </Tracking> <Tracking event=\"midpoint\"> <![CDATA[https://aktrack.pubmatic.com?e=midpoint]]> </Tracking> <Tracking event=\"firstQuartile\"> <![CDATA[https://aktrack.pubmatic.com?e=firstQuartile]]> </Tracking> <Tracking event=\"thirdQuartile\"> <![CDATA[https://aktrack.pubmatic.com?e=thirdQuartile]]> </Tracking> <Tracking event=\"complete\"> <![CDATA[https://aktrack.pubmatic.com?e=complete]]> </Tracking> </TrackingEvents> <VideoClicks> <ClickThrough> <![CDATA[https://www.pubmatic.com]]> </ClickThrough> </VideoClicks> <MediaFiles> <MediaFile delivery=\"progressive\" type=\"video/mp4\" bitrate=\"500\" width=\"480\" height=\"460\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/spinning-logo-480x360_video.mp4]]> </MediaFile> <MediaFile delivery=\"progressive\" type=\"video/ogg\" bitrate=\"500\" width=\"480\" height=\"460\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/spinning-logo-480x360_video.ogg]]> </MediaFile> <MediaFile delivery=\"progressive\" type=\"video/x-flv\" bitrate=\"500\" width=\"400\" height=\"300\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_test_video.flv]]> </MediaFile> </MediaFiles> </Linear> </Creative> <Creative AdID=\"123\"> <NonLinearAds> <TrackingEvents></TrackingEvents> <NonLinear height=\"50\" width=\"300\" minSuggestedDuration=\"00:00:05\"> <StaticResource creativeType=\"image/jpeg\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_LetsBeClear_300x50.jpeg]]> </StaticResource> <NonLinearClickThrough> <![CDATA[https://www.pubmatic.com]]> </NonLinearClickThrough> </NonLinear> </NonLinearAds> </Creative> <Creative AdID=\"123\"> <CompanionAds> <Companion width=\"300\" height=\"250\"> <StaticResource creativeType=\"image/jpeg\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_LetsBeClear_320x250.jpg]]> </StaticResource> <CompanionClickThrough> <![CDATA[https://www.pubmatic.com]]> </CompanionClickThrough> </Companion> </CompanionAds> </Creative> </Creatives> </InLine> </Ad> </VAST>"
}
},
]
}
});

pbjs.addAdUnits(adUnits);

pbjs.onEvent('videoSetupComplete', (e) => {
console.log('player setup complete: ', e);
});

pbjs.onEvent('videoSetupFailed', e => {
console.log('player setup failed: ', e);
});

pbjs.onEvent('videoPlaybackRequest', (e) => {
pbjs.requestBids(adUnits);
});

pbjs.onEvent('videoBidError', e => {
console.log('An Ad Error came from a Bid: ', e);
});

pbjs.onEvent('videoBidImpression', e => {
console.log('An Ad Impression came from a Bid: ', e);
});
});
</script>
</head>

<body>
<div id ="player"></div>
</body>

</html>
89 changes: 89 additions & 0 deletions integrationExamples/videoModule/jwplayer/bidRequestScheduling.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<html>

<head>
<script src="https://cdn.jwplayer.com/libraries/l5MchIxB.js"></script>
<script async src="../../../build/dev/prebid.js"></script>

<title>JW Player with Bid Request Scheduling</title>

<!--This demo configures JW Player's Player Bidding product to handle ad scheduling-->

<script>

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

pbjs.que.push(function () {
pbjs.setConfig({
video: {
providers: [{
divId: 'player',
vendorCode: 1, // JW Player vendorCode
playerConfig: {
licenseKey: 'IAjLREYRLylTWsfLN3FoN/O3iQLbs+AfgZLlkAoyH8gSf7TnNtmOLcR8CUY=',
params: {
vendorConfig: {
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
advertising: {
client: "googima",
schedule: {
adBreak1: {
tag: "//pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/137679306/HB_Dev_Center_Example&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&correlator=",
offset: "pre"
},
adBreak2: {
tag: "//pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/137679306/HB_Dev_Center_Example&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&correlator=",
offset: "10"
},
adBreak3: {
tag: "//pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/137679306/HB_Dev_Center_Example&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&correlator=",
offset: "20"
},
adBreak4: {
tag: "//pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/137679306/HB_Dev_Center_Example&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&correlator=",
offset: "post"
}
},
bids: {
client: "bidding",
settings: {
mediationLayerAdServer: "dfp",
bidTimeout: 2000
},
bidders: [
{
name: "ix",
siteId: "300"
}
]
}
}
}
}
}
},]
},
});

pbjs.onEvent('videoSetupComplete', e => {
console.log('player setup complete: ', e);
});

pbjs.onEvent('videoSetupFailed', e => {
console.log('player setup failed: ', e);
});

pbjs.onEvent('videoAdError', e => {
console.log('adError: ', e);
});
});
</script>
</head>

<body>
<h2>JW Player with Bid Request Scheduling</h2>
<h5>Div-1: Player placeholder div</h5>
<div id='player'></div>
</body>

</html>
Loading