Brightcove samples
Interactivity on top of Brightcove
Adways builds the interactivity on top of a Brightcove player already existing
<div style="width:712px;height:400px;">
<video id="really-cool-video"
data-account="3748832271001"
data-player="ea7afd72-47b5-441b-a9d7-a176ae4ed54f"
data-embed="default"
width="100%"
height="100%"
data-video-id="3749329081001"
class="video-js" controls>
</video>
</div>
<script src="//players.brightcove.net/3748832271001/ea7afd72-47b5-441b-a9d7-a176ae4ed54f_default/index.min.js"></script>
<script type="text/javascript">
var brightcovePlayer = videojs('really-cool-video');
var experience = new adways.interactive.Experience();
experience.setPublicationID("mpNHyTH");
experience.setPlayerAPI(brightcovePlayer);
experience.setPlayerClass("brightcove");
experience.load();
</script>
Adways Brightcove plugin
The plugin can read the video metadatas to get an Adways publication ID
See this Adways help section: How to use Brightcove with Adways?
<script type="text/javascript" src="//dj5ag5n6bpdxo.cloudfront.net/libs/plugins/brightcove.js"></script>
<script type="text/javascript">
// Gathering the player instance
var player = videojs("really-cool-video");
// Using the plugin
var experience = player.AdwaysInteractiveBrightcovePlugin({
/* publication: string|object
* compulsory.
* The id of the publication to load, or the JSON publication
*/
"publication": "mpNHyTH",
/* autoLoad: boolean
* optional, default value is true.
* Whether to automatically load the publication.
* When set to "false", the "load" method has to be explicitly called on the returned object.
* That lets the ability to set up some event listeners before starting the loading process.
*/
"autoLoad": true
/* experienceCreatedCBs: Array<function>
* optional, default value is null.
* If not null, on each newly created experience, the current plugin will call all the methods found
* in the experienceCreatedCBs array. Those methods' signature is :
* function(experience:adways.interactive.Experience):void
*
* For an example, see : //dj5ag5n6bpdxo.cloudfront.net/demos/brightcoveplugin-dependencies
*/
//"experienceCreatedCBs": null
});
experience.addEventListener(adways.interactive.Experience.Event.READY, function(){
console.log("READY");
});
</script>
Registering the Adways Brightcove plugin via the Brightcove studio
See this Adways help section: How to use Brightcove with Adways?
Adways Brightcove VAST Loader plugin
This plugin loads a VAST (non-linear creative) from the video metadatas or from the plugin parameter
<script type="text/javascript" src="//dj5ag5n6bpdxo.cloudfront.net/libs/plugins/brightcovevastloader.js"></script>
<script type="text/javascript">
var player = videojs("really-cool-video-2");
var experience = player.AdwaysBrightcoveVastLoaderPlugin({
"adwaysVastURL": "https://vast.adpaths.com/GXqkkZ8.xml"
});
</script>
See this Adways help section: How to use Brightcove with Adways?