The Prebid Plugin for the Brightcove Player can be registered either directly on the publisher page or it can be registered in Brightcove Player Studio. This page describes how to register this plugin in Brightcove Studio.
bcPrebidVastPlugin
BCVideo_PrebidVastPlugin
You can specify all options needed by the plugin in the Studio:
There are two ways to register the Brightcove Prebid Plugin in Brightcove Studio:
renderAd()
as described in the Brightcove Prebid Plugin API.adServerCallback
function by name.Details for each option are provided below.
renderAd()
on the Plugin Component Name BCVideo_PrebidVastPlugin
after the player has been embedded.You should use this integration option when you use the same player instance on a number of publisher pages but different targeting parameters on some of those pages.
Link to the plugin:
http://acdn.adnxs.com/video/plugins/bc/prebid/bc_prebid_vast.min.js
http://acdn.adnxs.com/video/plugins/css/mol/bc_vpaid_vast_mo.css
http://acdn.adnxs.com/video/plugins/bc/prebid/bc_prebid_vast_vjs.css
bcPrebidVastPlugin
To use the General Integration method in Brightcove Studio, use the following steps:
In Brightcove Studio:
https://studio.brightcove.com/
and login using your credentials.Players
page by selecting the Players
option from the Home
menu.EDIT
button for the PLUGINS
section and enter the following values specified in the fields provided:
Javascript URL
- enter the path to your prebid plugin buildCSS
, enter the following two paths to CSS files
Name, Options
section
bcPrebidVastPlugin
SAVE
button.PUBLISH
button. You should then see the Preview Player for your updated instance. NOTE: You will not see an ad play since this method requires that you add code on your page to call play on the plugin. However, you should see your content video playing.EMBED CODE & URL
button at the top of the page. Select PUBLISHED PLAYER
from the options provided.ADVANCED CODE
fieldid
attribute to the <video>
tag present in the embed code to specify the id for the Brightcove Player video element.Example:
<video id='bcplayer' ...
renderAd()
method on BCVideo_PrebidVastPlugin
.
Pass in the required arguments:
options
- the JSON object containing the prebid options and other desired options as described in Prebid Options and Render Options. Examples are also provided below.id
- id of the Brightcove Player video tag - this is value you specified in the preceding step.Example:
// create the options object
var adOptions =
{"prebidPath": "//files.prebid.org/prebid-org.js", // not for production use
"biddersSpec": {
”code": "my-video-tag",
"mediaTypes": {
"video": {
"context": "instream",
"playerSize": [640,480],
"mimes": ["video/mp4","application/javascript"],
"protocols": [1,2,3,4,5,6,7,8],
"playbackmethod": [1,2],
"api": [1,2 ]
}
},
"bids": [{
"bidder": "appnexus",
"params": {
"placementId": 8845778
}
}]
},
"prebidConfigOptions": {
"cache": {"url": "https://prebid.adnxs.com/pbc/v1/cache"},
"enableSendAllBids": true
},
"prebidTimeout": 700,
"enablePrebidCache": true
};
// add in the render options
// other publisher preferences can be passed in if needed
adOptions.skippable = {enabled: true, videoThreshold : 16, videoOffset : 5};
// call renderAd on the plugin
BCVideo_PrebidVastPlugin.renderAd(adOptions, 'bcplayer');
Visit sample publisher page using the General Integration Method for details.
Use this integration option when:
adServerCallback
as part of the configuration options defined in the Studio.You can create different player instances, each with their own targeting parameters, if you have different targeting requirements on pages.
Link to the plugin:
http://acdn.adnxs.com/video/plugins/bc/prebid/bc_prebid_vast.min.js
http://acdn.adnxs.com/video/plugins/css/mol/bc_vpaid_vast_mo.css
http://acdn.adnxs.com/video/plugins/bc/prebid/bc_prebid_vast_vjs.css
bcPrebidVastPlugin
Complete set of prebid options and other parameters that should be passed to the plugin to retrieve and render the ad. Options and targeting parameters are specified in a JSON object as described on these pages:
Examples are provided below.
To use the Configured Integration method in Brightcove Studio, use the following steps
In Brightcove Studio:
https://studio.brightcove.com/
and login using your credentialsPlayers
page by selecting the Players
option from the Home
menuEDIT
button for the PLUGINS
section and enter the following values specified in the fields provided:
Javascript URL
- enter the path to your prebid plugin buildCSS
, enter the following two paths to CSS files
Name, Options
section
bcPrebidVastPlugin
SAVE
button.PUBLISH
button. You should then see the Preview Player for your updated instance. NOTE: You should see your ad playing in the preview.EMBED CODE & URL
button at the top of the page. Select PUBLISHED PLAYER
from the options provided.ADVANCED CODE
fieldNone
{
"prebidPath": "//files.prebid.org/prebid-org.js", // not for production use
"bidderAliases": [
{
"name": "alias1",
"bidderName": "appnexus"
}
],
"biddersSpec": {
"code": "my-video-tag",
"mediaTypes": {
"video": {
"context": "instream",
"playerSize": [640,480],
"mimes": ["video/mp4","application/javascript"],
"protocols": [1,2,3,4,5,6,7,8],
"playbackmethod": [1,2],
"api": [1,2 ]
}
},
"bids": [{
"bidder": "appnexus",
"params": {
"placementId": 8845778,
"video": {"skippable": true,
"playback_method":
["auto_play_sound_off"]
}
}
},
{
"bidder": "alias1",
"params": {
"placementId": 12531984,
"video": {"skippable": true,
"playback_method":
["auto_play_sound_off"]
}
}
}]
},
"bidderSettings": {
"standard": {
"adserverTargeting": [
{
"key": "hb_bidder",
"val": [
"valueIsFunction",
"function (bidResponse) {",
" return bidResponse.bidderCode;",
"}"
]
},
{
"key": "hb_adid",
"val": [
"valueIsFunction",
"function (bidResponse) {",
" return bidResponse.adId;",
"}"
]
},
{
"key": "hb_pb",
"val": [
"valueIsFunction",
"function (bidResponse) {",
" return bidResponse.pbMg;",
"}"
]
},
{
"key": "hb_size",
"val": [
"valueIsFunction",
"function (bidResponse) {",
" return bidResponse.size;",
"}"
]
}
]
},
"appnexus": {
"adserverTargeting": [
{
"key": "hb_size",
"val": "640x480"
}
]
},
"alias1": {
"adserverTargeting": [
{
"key": "hb_pb",
"val": [
"valueIsFunction",
"function (bidResponse) {",
" return bidResponse.pbHg;",
"}"
]
}
]
}
},
"prebidConfigOptions": {
"cache": {
"url": "https://prebid.adnxs.com/pbc/v1/cache"
},
"enableSendAllBids": true
},
"skippable": {
"enabled": true,
"videoThreshold": 16,
"videoOffset": 5
},
"prebidTimeout": 700,
"enablePrebidCache": true
}
Visit sample publisher page after using the Configured Integration Method for details.
The plugin API supports a few other methods, which can be used even if you have registered the plugin in Brightcove Studio. See Brightcove Prebid Plugin API for complete details about the API for this plugin.
To use any of the additional API methods for the plugin, you must first call the init()
method on the Plugin Component name BCVideo_PrebidVastPlugin
. You only need to call the init()
method once even if you call the other API methods multiple times. Any use of these additional API methods should be used after the Brightcove Player has been embedded on the page.
This method is used to stop the plugin from managing ad playback.
The following sample shows you how to stop the plugin after you have embedded the Brightcove Player with the plugin already added and running.
// init the plugin
BCVideo_PrebidVastPlugin.init();
// terminate the rendering process of the Brightcove Plugin for Prebid
BCVideo_PrebidVastPlugin.stop();
See Dynamic Plugin Integration With Brightcove Player - On the Page
Information about the plugin API can be found at Prebid Plugin for Brightcove (Videojs) Player API
Details about the options supported by the Brightcove Prebid Plugin can be found at: Prebid Plugin for Brightcove (Videojs) Player - Plugin Options