Skip to content

Commit

Permalink
Update prebid.js CDN URLs to use jsDelivr
Browse files Browse the repository at this point in the history
Starting from version 6.12.0 the complete prebid.js bundle is included in the npm package and fronted by jsDelivr; this is a search-and-replace across the whole site to use the new URL.
  • Loading branch information
dgirardi committed Feb 16, 2022
1 parent 7f7cdbd commit 9c62696
Show file tree
Hide file tree
Showing 57 changed files with 385 additions and 394 deletions.
2 changes: 1 addition & 1 deletion _includes/video/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% include head--common.html %}

<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>
<script type="text/javascript" src="//services.brid.tv/player/build/brid.min.js"></script>

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion _includes/video/pb-cp-fp.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
{% include head--common.html %}
<!--production version of prebid.js-->
<!--<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>-->
<!--<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>-->

<!--flowplayer & prebid js code-->
<link rel="stylesheet" href="//cdn.flowplayer.com/releases/native/stable/style/flowplayer.css">
Expand Down
10 changes: 5 additions & 5 deletions _includes/video/pb-cp-jw.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<!--<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>-->
<!--<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>-->

<!--jwplayer & prebid js code-->
<script type="text/javascript">
var options = {
Expand Down Expand Up @@ -50,9 +50,9 @@
function doHeaderBidding() {
window.prebidPluginCP.doPrebid(options);
}

</script>
<script src="//acdn.adnxs.com/video/plugins/cp/PrebidPluginCP.min.js" onload="doHeaderBidding()"></script>
<script src="//acdn.adnxs.com/video/plugins/cp/PrebidPluginCP.min.js" onload="doHeaderBidding()"></script>
</head>

<body>
12 changes: 6 additions & 6 deletions _includes/video/pb-cp-kl.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}

<!--production version of prebid.js-->
<!--<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>-->
<!--<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>-->

<!--kaltura & prebid js code-->
<script type="text/javascript">
var options = {
Expand Down Expand Up @@ -51,9 +51,9 @@
function doHeaderBidding() {
window.prebidPluginCP.doPrebid(options);
}

</script>
<script src="//acdn.adnxs.com/video/plugins/cp/PrebidPluginCP.min.js" onload="doHeaderBidding()"></script>
<script src="//acdn.adnxs.com/video/plugins/cp/PrebidPluginCP.min.js" onload="doHeaderBidding()"></script>
</head>

<body>
10 changes: 5 additions & 5 deletions _includes/video/pb-cp-vjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<!--<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>-->
<!--<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>-->

<!--videojs & prebid js code-->
<!-- use recent version of videojs to ensure proper functioning with the iOS devices -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.4.0/video-js.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.4.0/video.js"></script>
<!-- videojs-vast-vpaid -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/videojs-vast-vpaid/2.0.2/videojs.vast.vpaid.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-vast-vpaid/2.0.2/videojs_5.vast.vpaid.min.js"></script>

<script type="text/javascript">
var options = {
biddersSpec: {
Expand Down Expand Up @@ -57,7 +57,7 @@
function doHeaderBidding() {
window.prebidPluginCP.doPrebid(options);
}

</script>
<script src="//acdn.adnxs.com/video/plugins/cp/PrebidPluginCP.min.js" onload="doHeaderBidding()"></script>
</head>
Expand Down
10 changes: 5 additions & 5 deletions _includes/video/pb-cp.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<!--brightcove & prebid js code-->
<script>
var pbjs = pbjs || {};
Expand Down Expand Up @@ -43,7 +43,7 @@
bids: [{
bidder: 'appnexus',
params: {
placementId: iosDevice ? 13239390 : 13232361, // Add your own placement id here. Note, skippable video is not supported on iOS
placementId: iosDevice ? 13239390 : 13232361, // Add your own placement id here. Note, skippable video is not supported on iOS
video: {
skipppable: true,
playback_method: ['auto_play_sound_off']
Expand Down Expand Up @@ -79,7 +79,7 @@
});

</script>

</head>

<body>
2 changes: 1 addition & 1 deletion _includes/video/pb-is-amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>
<script type="text/javascript" src="https://amp.akamaized.net/hosted/1.1/player.esi?apikey=prebid.org.samples"></script>

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion _includes/video/pb-is-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<!--Ad Player Pro & prebid js code-->
<script type="text/javascript" src="https://static.adplayer.pro/player/demo.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions _includes/video/pb-is-bc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<!--flowplayer & prebid js code-->
<script>
var pbjs = pbjs || {};
Expand Down Expand Up @@ -79,7 +79,7 @@
});

</script>

</head>

<body>
36 changes: 18 additions & 18 deletions _includes/video/pb-is-br.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<!--brid & prebid js code-->
<script type="text/javascript" src="//services.brid.tv/player/build/brid.min.js"></script>
<script type="text/javascript" src="//services.brid.tv/player/build/brid.min.js"></script>

<script type="text/javascript">

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

// define invokeVideoPlayer in advance in case we get the bids back from prebid before the entire page loads
var tempTag = false;
var invokeVideoPlayer = function(url){
tempTag = url;
}

/*
Prebid Video adUnit
*/

var videoAdUnit = {
code: 'video1',
sizes: [640,480],
Expand All @@ -46,17 +46,17 @@
}
]
};

pbjs.que.push(function(){
pbjs.addAdUnits(videoAdUnit); // add your ad units to the bid request
pbjs.setConfig({

pbjs.setConfig({
usePrebidCache: true,
cache: {
url: 'https://prebid.adnxs.com/pbc/v1/cache'
}
}
});

pbjs.requestBids({
bidsBackHandler: function(bids) {
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
Expand All @@ -74,7 +74,7 @@
}
});
});

pbjs.bidderSettings =
{
standard: {
Expand All @@ -98,15 +98,15 @@
key: "hb_size",
val: function (bidResponse) {
return bidResponse.size;

}
}
]
}
};

</script>

</head>

<body>
22 changes: 11 additions & 11 deletions _includes/video/pb-is-fp.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<!--pbjs and player code -->
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<!--pbjs and player code -->

<link rel="stylesheet" href="//cdn.flowplayer.com/releases/native/stable/style/flowplayer.css">
<script src="//cdn.flowplayer.com/releases/native/stable/flowplayer.min.js"></script>
<script src="//cdn.flowplayer.com/releases/native/stable/plugins/ads.min.js"></script>
<script src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>

<style>
#player {
max-width: 40em;
width: 100%;
float: left;
}

#controls {
float: left;
padding: 1em;
}
</style>

<script type="text/javascript">

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

Expand Down Expand Up @@ -100,9 +100,9 @@
}
});
});

</script>

</head>

<body>
28 changes: 14 additions & 14 deletions _includes/video/pb-is-jw01.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<html lang="en" class="html--no-js">

<head>
{% include head--common.html %}
{% include head--common.html %}
<!--production version of prebid.js-->
<script async src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js"></script>
<!--pbjs and player code -->
<script async src="//cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<!--pbjs and player code -->


<script type="text/javascript">

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

// define invokeVideoPlayer in advance in case we get the bids back from prebid before the entire page loads
var tempTag = false;
var invokeVideoPlayer = function(url) {
tempTag = url;
}

var videoAdUnit = {
code: 'video1',
mediaTypes: {
Expand All @@ -39,17 +39,17 @@
}
}]
};

pbjs.que.push(function() {
pbjs.addAdUnits(videoAdUnit); // add your ad units to the bid request

pbjs.setConfig({
debug: true,
cache: {
url: 'https://prebid.adnxs.com/pbc/v1/cache'
}
});

pbjs.requestBids({
bidsBackHandler: function(bids) {
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
Expand All @@ -66,9 +66,9 @@
invokeVideoPlayer(videoUrl);
}
});
});
});
</script>

</head>

<body>
Loading

0 comments on commit 9c62696

Please sign in to comment.