diff --git a/_includes/video/head.html b/_includes/video/head.html index b9f1c0060e..121d87ad5b 100644 --- a/_includes/video/head.html +++ b/_includes/video/head.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -110,7 +103,13 @@ pbjs.addAdUnits(videoAdUnit); // add your ad units to the bid request pbjs.setConfig({ - usePrebidCache: true + usePrebidCache: true, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-cp-fp.html b/_includes/video/pb-cp-fp.html index e5a888138f..be466652c8 100644 --- a/_includes/video/pb-cp-fp.html +++ b/_includes/video/pb-cp-fp.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-cp-jw.html b/_includes/video/pb-cp-jw.html index eb1416d7f2..1aaf88766a 100644 --- a/_includes/video/pb-cp-jw.html +++ b/_includes/video/pb-cp-jw.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-cp-kl.html b/_includes/video/pb-cp-kl.html index 9f74b04a7c..e73d9331c2 100644 --- a/_includes/video/pb-cp-kl.html +++ b/_includes/video/pb-cp-kl.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-cp-vjs.html b/_includes/video/pb-cp-vjs.html index bbf866872d..3fa559e3c8 100644 --- a/_includes/video/pb-cp-vjs.html +++ b/_includes/video/pb-cp-vjs.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-cp.html b/_includes/video/pb-cp.html index d5b9f110a6..8d436cd9be 100644 --- a/_includes/video/pb-cp.html +++ b/_includes/video/pb-cp.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -117,7 +110,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ bidsBackHandler: function(bids) { diff --git a/_includes/video/pb-is-app.html b/_includes/video/pb-is-app.html index 82498b5a45..e4d960dd1a 100644 --- a/_includes/video/pb-is-app.html +++ b/_includes/video/pb-is-app.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -103,7 +96,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-bc.html b/_includes/video/pb-is-bc.html index cce13fa854..f85454e2fa 100644 --- a/_includes/video/pb-is-bc.html +++ b/_includes/video/pb-is-bc.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -117,7 +110,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ bidsBackHandler: function(bids) { diff --git a/_includes/video/pb-is-br.html b/_includes/video/pb-is-br.html index a3bde786ef..0ad926b189 100644 --- a/_includes/video/pb-is-br.html +++ b/_includes/video/pb-is-br.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -112,7 +105,13 @@ usePrebidCache: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + } , + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-fp.html b/_includes/video/pb-is-fp.html index 124b2bd6ac..440c539f60 100644 --- a/_includes/video/pb-is-fp.html +++ b/_includes/video/pb-is-fp.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -138,7 +131,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-jw01.html b/_includes/video/pb-is-jw01.html index 2e81441be0..a34e7f85ec 100644 --- a/_includes/video/pb-is-jw01.html +++ b/_includes/video/pb-is-jw01.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -106,7 +99,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-jw02.html b/_includes/video/pb-is-jw02.html index 3e127bb343..36aa1d2603 100644 --- a/_includes/video/pb-is-jw02.html +++ b/_includes/video/pb-is-jw02.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -109,7 +102,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-jw03.html b/_includes/video/pb-is-jw03.html index a33fdce9e8..41bef67035 100644 --- a/_includes/video/pb-is-jw03.html +++ b/_includes/video/pb-is-jw03.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -129,7 +122,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); requestVideoAd(); diff --git a/_includes/video/pb-is-kl.html b/_includes/video/pb-is-kl.html index cb5d6aaf48..9900acbe8a 100644 --- a/_includes/video/pb-is-kl.html +++ b/_includes/video/pb-is-kl.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -124,7 +117,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-ol.html b/_includes/video/pb-is-ol.html index 49af8a060e..9d5a765f87 100644 --- a/_includes/video/pb-is-ol.html +++ b/_includes/video/pb-is-ol.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -150,7 +143,13 @@ debug: true, cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-is-rd.html b/_includes/video/pb-is-rd.html index 588059d56d..e5864e101f 100644 --- a/_includes/video/pb-is-rd.html +++ b/_includes/video/pb-is-rd.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-is-vjs.html b/_includes/video/pb-is-vjs.html index eb7e1b61a7..e888365696 100644 --- a/_includes/video/pb-is-vjs.html +++ b/_includes/video/pb-is-vjs.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -75,6 +68,11 @@ - - - + @@ -153,7 +146,13 @@ }, adpod: { brandCategoryExclusion: true - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pb-os-app.html b/_includes/video/pb-os-app.html index 8a2af8afba..160d65d8d3 100644 --- a/_includes/video/pb-os-app.html +++ b/_includes/video/pb-os-app.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-os-dfp.html b/_includes/video/pb-os-dfp.html index e88b8eac8e..9ab786b2dd 100644 --- a/_includes/video/pb-os-dfp.html +++ b/_includes/video/pb-os-dfp.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -102,6 +95,14 @@ pbjs.que.push(function() { pbjs.addAdUnits(adUnits); + pbjs.setConfig({ + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } + }); pbjs.requestBids({ bidsBackHandler: initAdserver }); diff --git a/_includes/video/pb-os-nas.html b/_includes/video/pb-os-nas.html index dded18c34c..7ec5afba0d 100644 --- a/_includes/video/pb-os-nas.html +++ b/_includes/video/pb-os-nas.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -94,6 +87,14 @@ pbjs.que.push(function() { pbjs.addAdUnits(adUnits); + pbjs.setConfig({ + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } + }); pbjs.requestBids({ timeout: 1000, bidsBackHandler: function(bids) { diff --git a/_includes/video/pb-os-rd.html b/_includes/video/pb-os-rd.html index b82498d133..f3407f29b0 100644 --- a/_includes/video/pb-os-rd.html +++ b/_includes/video/pb-os-rd.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pb-ve-lf-fw.html b/_includes/video/pb-ve-lf-fw.html index 875f0bd6e2..2564876673 100644 --- a/_includes/video/pb-ve-lf-fw.html +++ b/_includes/video/pb-ve-lf-fw.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -154,7 +147,13 @@ }, adpod: { brandCategoryExclusion: true - } + }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } }); pbjs.requestBids({ diff --git a/_includes/video/pbs-br.html b/_includes/video/pbs-br.html index 67433c7d0e..11aef5ce48 100644 --- a/_includes/video/pbs-br.html +++ b/_includes/video/pbs-br.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -125,6 +118,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, enableSendAllBids: true, s2sConfig: { diff --git a/_includes/video/pbs-jw01.html b/_includes/video/pbs-jw01.html index ddc6aa3707..540773ebb5 100644 --- a/_includes/video/pbs-jw01.html +++ b/_includes/video/pbs-jw01.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -119,6 +112,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, s2sConfig: { endpoint: 'http://prebid.adnxs.com/pbs/v1/openrtb2/auction', diff --git a/_includes/video/pbs-jw02.html b/_includes/video/pbs-jw02.html index 68a85f8ab1..0bc1456b7a 100644 --- a/_includes/video/pbs-jw02.html +++ b/_includes/video/pbs-jw02.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -129,6 +122,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, enableSendAllBids: true, s2sConfig: { diff --git a/_includes/video/pbs-jw03.html b/_includes/video/pbs-jw03.html index 56bd88963f..6895037347 100644 --- a/_includes/video/pbs-jw03.html +++ b/_includes/video/pbs-jw03.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -130,6 +123,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, s2sConfig: { endpoint: 'http://prebid.adnxs.com/pbs/v1/openrtb2/auction', diff --git a/_includes/video/pbs-jw04.html b/_includes/video/pbs-jw04.html index 51d171f703..f40aa90b61 100644 --- a/_includes/video/pbs-jw04.html +++ b/_includes/video/pbs-jw04.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -128,6 +121,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, enableSendAllBids: true, s2sConfig: { diff --git a/_includes/video/pbs-kl.html b/_includes/video/pbs-kl.html index 8868614093..23b5112c24 100644 --- a/_includes/video/pbs-kl.html +++ b/_includes/video/pbs-kl.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -124,6 +117,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, s2sConfig: { endpoint: 'http://prebid.adnxs.com/pbs/v1/openrtb2/auction', diff --git a/_includes/video/pbs-oy.html b/_includes/video/pbs-oy.html index 8f296c77c5..ce859d86ee 100644 --- a/_includes/video/pbs-oy.html +++ b/_includes/video/pbs-oy.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -154,6 +147,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, s2sConfig: { endpoint: 'http://prebid.adnxs.com/pbs/v1/openrtb2/auction', diff --git a/_includes/video/pbs-rd.html b/_includes/video/pbs-rd.html index ef2d279761..fcf633b1ec 100644 --- a/_includes/video/pbs-rd.html +++ b/_includes/video/pbs-rd.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + diff --git a/_includes/video/pbs-vjs.html b/_includes/video/pbs-vjs.html index 278feeb60d..bf32f9fc7e 100644 --- a/_includes/video/pbs-vjs.html +++ b/_includes/video/pbs-vjs.html @@ -17,14 +17,7 @@ {{page.title}} for Header Bidding {% endif %} - - - - - - + @@ -134,6 +127,12 @@ cache: { url: 'https://prebid.adnxs.com/pbc/v1/cache' }, + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + }, debug: true, s2sConfig: { endpoint: 'http://prebid.adnxs.com/pbs/v1/openrtb2/auction', diff --git a/dev-docs/getting-started.md b/dev-docs/getting-started.md index 4620480d17..052d9492e0 100644 --- a/dev-docs/getting-started.md +++ b/dev-docs/getting-started.md @@ -23,9 +23,8 @@ The easiest way to get started with Prebid.js is to use the example code below. diff --git a/examples/video/crossplayer/jwplayer/pb-cp-jwplayer.html b/examples/video/crossplayer/jwplayer/pb-cp-jwplayer.html index 2140606937..8eb6dfdd5a 100644 --- a/examples/video/crossplayer/jwplayer/pb-cp-jwplayer.html +++ b/examples/video/crossplayer/jwplayer/pb-cp-jwplayer.html @@ -172,7 +172,21 @@

Place this code in the page body.

diff --git a/examples/video/crossplayer/kaltura/pb-cp-kaltura.html b/examples/video/crossplayer/kaltura/pb-cp-kaltura.html index 241021d5ce..89e1d9d3e7 100644 --- a/examples/video/crossplayer/kaltura/pb-cp-kaltura.html +++ b/examples/video/crossplayer/kaltura/pb-cp-kaltura.html @@ -199,6 +199,20 @@

Place this code in the page body.

diff --git a/examples/video/crossplayer/videojs/pb-cp-videojs.html b/examples/video/crossplayer/videojs/pb-cp-videojs.html index b01ae04fa4..53dc533811 100644 --- a/examples/video/crossplayer/videojs/pb-cp-videojs.html +++ b/examples/video/crossplayer/videojs/pb-cp-videojs.html @@ -220,7 +220,21 @@

Place this code in the page body.

var vid1 = videojs('vid1'); page_load_time = new Date().getTime() - performance.timing.navigationStart; console.log(page_load_time + "ms -- Player loaded!"); - function invokeVideoPlayer(url) { + + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + videoHasConsent(); + } else { // doesn't have consent + document.getElementById("vid1").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + purposeIds: [1] // asking for ability to set cookies + }] + }); + + function videoHasConsent() { + invokeVideoPlayer=function (url) { page_load_time = new Date().getTime() - performance.timing.navigationStart; console.log(page_load_time + "ms -- Prebid VAST url = " + url); /* Access the player instance by calling `videojs()` and passing @@ -288,5 +302,6 @@

Place this code in the page body.

.catch(function() { invokeVideoPlayer(null); }); + } diff --git a/examples/video/instream/adplayerpro/pb-ve-adplayerpro.html b/examples/video/instream/adplayerpro/pb-ve-adplayerpro.html index 44af13a673..ca5b426d45 100644 --- a/examples/video/instream/adplayerpro/pb-ve-adplayerpro.html +++ b/examples/video/instream/adplayerpro/pb-ve-adplayerpro.html @@ -139,7 +139,9 @@

Place this code in the page body.

diff --git a/examples/video/instream/brightcove/pb-ve-brightcove.html b/examples/video/instream/brightcove/pb-ve-brightcove.html index cc2dea6a3a..4acff0ba51 100644 --- a/examples/video/instream/brightcove/pb-ve-brightcove.html +++ b/examples/video/instream/brightcove/pb-ve-brightcove.html @@ -225,10 +225,24 @@

Place this code in the page body.

- - \ No newline at end of file + diff --git a/examples/video/instream/flowplayer/pb-ve-flowplayer.html b/examples/video/instream/flowplayer/pb-ve-flowplayer.html index 42ec91f94e..0165121656 100644 --- a/examples/video/instream/flowplayer/pb-ve-flowplayer.html +++ b/examples/video/instream/flowplayer/pb-ve-flowplayer.html @@ -201,6 +201,8 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/instream/jwplayer/pb-ve-jwplayer-hosted.html b/examples/video/instream/jwplayer/pb-ve-jwplayer-hosted.html index a43faf483d..22d5e0bd5d 100644 --- a/examples/video/instream/jwplayer/pb-ve-jwplayer-hosted.html +++ b/examples/video/instream/jwplayer/pb-ve-jwplayer-hosted.html @@ -152,7 +152,19 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/instream/jwplayer/pb-ve-jwplayer-platform.html b/examples/video/instream/jwplayer/pb-ve-jwplayer-platform.html index 2d77f94e26..49e7113955 100644 --- a/examples/video/instream/jwplayer/pb-ve-jwplayer-platform.html +++ b/examples/video/instream/jwplayer/pb-ve-jwplayer-platform.html @@ -157,7 +157,21 @@

Place this code in the page body.

// we initialize our player instance, specifying the div to load it into var playerInstance = jwplayer('myElement1'); - function invokeVideoPlayer(url) { + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + hasVideoConsent(); + } else { // doesn't have consent + document.getElementById("myElement1").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + purposeIds: [1] // asking for ability to set cookies + }] + }); + +function hasVideoConsent() { + + invokeVideoPlayer= function (url) { // this calls setup on the player we initialized // this will use the settings defined in the player we loaded above unless you override them here playerInstance.setup({ @@ -180,9 +194,9 @@

Place this code in the page body.

invokeVideoPlayer(tempTag); tempTag = false; } - +} - \ No newline at end of file + diff --git a/examples/video/instream/jwplayer/pb-ve-jwplayer-playlist.html b/examples/video/instream/jwplayer/pb-ve-jwplayer-playlist.html index 3fa853d63d..de799c60fd 100644 --- a/examples/video/instream/jwplayer/pb-ve-jwplayer-playlist.html +++ b/examples/video/instream/jwplayer/pb-ve-jwplayer-playlist.html @@ -186,6 +186,19 @@

Place this code in the page body.

var adTag = ""; var playerInstance = jwplayer('myElement1'); + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + hasVideoConsent(); + } else { // doesn't have consent + document.getElementById("myElement1").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + purposeIds: [1] // asking for ability to set cookies + }] + }); + + function hasVideoConsent() { invokeVideoPlayer = function(url) { adTag = url; console.log("MESSAGE: invoking the video player"); @@ -232,8 +245,8 @@

Place this code in the page body.

invokeVideoPlayer(tempTag); tempTag = false; } - + } - \ No newline at end of file + diff --git a/examples/video/instream/kaltura/pb-ve-kaltura.html b/examples/video/instream/kaltura/pb-ve-kaltura.html index a6262d565a..1291718fb7 100644 --- a/examples/video/instream/kaltura/pb-ve-kaltura.html +++ b/examples/video/instream/kaltura/pb-ve-kaltura.html @@ -212,6 +212,8 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/instream/ooyala/pb-ve-ooyala.html b/examples/video/instream/ooyala/pb-ve-ooyala.html index 30f7b32390..cfba599d4b 100644 --- a/examples/video/instream/ooyala/pb-ve-ooyala.html +++ b/examples/video/instream/ooyala/pb-ve-ooyala.html @@ -259,100 +259,109 @@

Place this code in the page body.

- - \ No newline at end of file + diff --git a/examples/video/instream/radiant/pb-ve-radiant.html b/examples/video/instream/radiant/pb-ve-radiant.html index c1f9d7278f..110310f278 100644 --- a/examples/video/instream/radiant/pb-ve-radiant.html +++ b/examples/video/instream/radiant/pb-ve-radiant.html @@ -273,6 +273,9 @@

Place this code in the page body.

}); }); + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + /* here we re-define invokeVideoPlayer with Radiant Media Player set-up */ pbApp.invokeVideoPlayer = function (adTagUrl) { if (pbApp.playerSetup) { @@ -325,5 +328,13 @@

Place this code in the page body.

} pbApp.invokeVideoPlayer(pbApp.fallbackAdTagUrl); }, pbApp.playerSetupTimeout); + } else { // doesn't have consent + document.getElementById("rmpPlayer").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + purposeIds: [1] // asking for ability to set cookies + }] + }); diff --git a/examples/video/instream/videojs/pb-ve-videojs.html b/examples/video/instream/videojs/pb-ve-videojs.html index c4bf3d1bf7..f1679797ec 100644 --- a/examples/video/instream/videojs/pb-ve-videojs.html +++ b/examples/video/instream/videojs/pb-ve-videojs.html @@ -23,7 +23,7 @@

{{ page.title }}

-
+
+

Outstream AdUnit below

+ +

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

@@ -172,6 +188,14 @@

Place this code in the page body.

pbjs.que.push(function () { pbjs.addAdUnits(adUnits); + pbjs.setConfig({ + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } + }); pbjs.requestBids({ timeout: 1000, bidsBackHandler: function (bids) { diff --git a/examples/video/outstream/pb-ve-outstream-dfp.html b/examples/video/outstream/pb-ve-outstream-dfp.html index 21208d218e..20129af962 100644 --- a/examples/video/outstream/pb-ve-outstream-dfp.html +++ b/examples/video/outstream/pb-ve-outstream-dfp.html @@ -30,6 +30,20 @@

{{ page.title }}

Prebid Outstream Video Ad

+ - \ No newline at end of file + diff --git a/examples/video/outstream/pb-ve-outstream-no-server.html b/examples/video/outstream/pb-ve-outstream-no-server.html index 28f793f34a..b237d54e2c 100644 --- a/examples/video/outstream/pb-ve-outstream-no-server.html +++ b/examples/video/outstream/pb-ve-outstream-no-server.html @@ -108,9 +108,19 @@

Place this code in the page body.

- -
; -

Prebid Outstream Video Ad

-

+ diff --git a/examples/video/outstream/pb-ve-outstream-radiant.html b/examples/video/outstream/pb-ve-outstream-radiant.html index a32442769a..c37206af23 100644 --- a/examples/video/outstream/pb-ve-outstream-radiant.html +++ b/examples/video/outstream/pb-ve-outstream-radiant.html @@ -28,9 +28,26 @@

{{ page.title }}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Outstream AdUnit below

+
+ +

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

@@ -177,6 +194,14 @@

Place this code in the page body.

pbjs.que.push(function () { pbjs.addAdUnits(adUnits); + pbjs.setConfig({ + consentManagement: { + gdpr: { + cmpApi: "iab", + defaultGdprScope: true + } + } + }); pbjs.requestBids({ timeout: 1000, bidsBackHandler: function (bids) { diff --git a/examples/video/pb-video-template.html b/examples/video/pb-video-template.html index 9186a141bd..2c73cbc6ac 100644 --- a/examples/video/pb-video-template.html +++ b/examples/video/pb-video-template.html @@ -272,8 +272,21 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/server/brid/pbs-ve-brid.html b/examples/video/server/brid/pbs-ve-brid.html index e397824456..6a03ea1491 100644 --- a/examples/video/server/brid/pbs-ve-brid.html +++ b/examples/video/server/brid/pbs-ve-brid.html @@ -167,6 +167,19 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/server/jwplayer/pbs-ve-jwplayer-hosted.html b/examples/video/server/jwplayer/pbs-ve-jwplayer-hosted.html index 6e9695abf9..7541f8ea35 100644 --- a/examples/video/server/jwplayer/pbs-ve-jwplayer-hosted.html +++ b/examples/video/server/jwplayer/pbs-ve-jwplayer-hosted.html @@ -185,6 +185,19 @@

Place this code in the page body.

+ } + - \ No newline at end of file + diff --git a/examples/video/server/jwplayer/pbs-ve-jwplayer-jwplayer7.html b/examples/video/server/jwplayer/pbs-ve-jwplayer-jwplayer7.html index b97f5253f2..41cb675c72 100644 --- a/examples/video/server/jwplayer/pbs-ve-jwplayer-jwplayer7.html +++ b/examples/video/server/jwplayer/pbs-ve-jwplayer-jwplayer7.html @@ -175,6 +175,20 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/server/jwplayer/pbs-ve-jwplayer-platform.html b/examples/video/server/jwplayer/pbs-ve-jwplayer-platform.html index a791d730db..ee23fe90a9 100644 --- a/examples/video/server/jwplayer/pbs-ve-jwplayer-platform.html +++ b/examples/video/server/jwplayer/pbs-ve-jwplayer-platform.html @@ -179,7 +179,20 @@

Place this code in the page body.

// we initialize our player instance, specifying the div to load it into var playerInstance = jwplayer('myElement1'); - function invokeVideoPlayer(url) { + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + videoHasConsent(); + } else { // doesn't have consent + document.getElementById("myElement1").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + purposeIds: [1] // asking for ability to set cookies + }] + }); + +function videoHasConsent() { + invokeVideoPlayer=function (url) { // this calls setup on the player we initialized // this will use the settings defined in the player we loaded above unless you override them here playerInstance.setup({ @@ -202,7 +215,7 @@

Place this code in the page body.

invokeVideoPlayer(tempTag); tempTag = false; } - +} - \ No newline at end of file + diff --git a/examples/video/server/jwplayer/pbs-ve-jwplayer-playlist.html b/examples/video/server/jwplayer/pbs-ve-jwplayer-playlist.html index f2eb304e67..e29d5a5a6e 100644 --- a/examples/video/server/jwplayer/pbs-ve-jwplayer-playlist.html +++ b/examples/video/server/jwplayer/pbs-ve-jwplayer-playlist.html @@ -196,6 +196,19 @@

Place this code in the page body.

var adTag = ""; var playerInstance = jwplayer('myElement1'); + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + videoHasConsent(); + } else { // doesn't have consent + document.getElementById("myElement1").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + purposeIds: [1] // asking for ability to set cookies + }] + }); + +function videoHasConsent() { invokeVideoPlayer = function(url) { adTag = url; console.log("MESSAGE: invoking the video player"); @@ -242,7 +255,7 @@

Place this code in the page body.

invokeVideoPlayer(tempTag); tempTag = false; } - + } - \ No newline at end of file + diff --git a/examples/video/server/kaltura/pbs-ve-kaltura.html b/examples/video/server/kaltura/pbs-ve-kaltura.html index 63f2d0eb13..b09aaee354 100644 --- a/examples/video/server/kaltura/pbs-ve-kaltura.html +++ b/examples/video/server/kaltura/pbs-ve-kaltura.html @@ -232,6 +232,18 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/server/ooyala/pbs-ve-ooyala.html b/examples/video/server/ooyala/pbs-ve-ooyala.html index 7492ec603d..30943afb49 100644 --- a/examples/video/server/ooyala/pbs-ve-ooyala.html +++ b/examples/video/server/ooyala/pbs-ve-ooyala.html @@ -275,7 +275,22 @@

Place this code in the page body.

- \ No newline at end of file + diff --git a/examples/video/server/radiant/pbs-ve-radiant.html b/examples/video/server/radiant/pbs-ve-radiant.html index 1b8f4abe42..2ff222bab2 100644 --- a/examples/video/server/radiant/pbs-ve-radiant.html +++ b/examples/video/server/radiant/pbs-ve-radiant.html @@ -295,6 +295,20 @@

Place this code in the page body.

}); }); + __tcfapi("checkConsent", 2, (hasConsent, success) => { + if (hasConsent && success) { + videoHasConsent(); + } else { // doesn't have consent + document.getElementById("rmpPlayer").innerHTML += '(Cookie permissions needed to demo this video player. Update Privacy Settings.)'; + } + }, { + data: [{ + vendorId: 10064, + purposeIds: [1] // asking for ability to set cookies + }] + }); + + function videoHasConsent() { /* here we re-define invokeVideoPlayer with Radiant Media Player set-up */ pbApp.invokeVideoPlayer = function (adTagUrl) { if (pbApp.playerSetup) { @@ -347,5 +361,6 @@

Place this code in the page body.

} pbApp.invokeVideoPlayer(pbApp.fallbackAdTagUrl); }, pbApp.playerSetupTimeout); + } diff --git a/examples/video/server/videojs/pbs-ve-videojs.html b/examples/video/server/videojs/pbs-ve-videojs.html index 1154a644d2..1a444edce6 100644 --- a/examples/video/server/videojs/pbs-ve-videojs.html +++ b/examples/video/server/videojs/pbs-ve-videojs.html @@ -23,7 +23,7 @@

{{ page.title }}

-
+