Bitmovin Player

Setup#

1. Load the plugin script#

<script src="https://cdn.watchingthat.net/wtat.plugin-bm_ima.min.js"></script>

Or you can load the plugin programmatically from the same url.

2. Bitmovin configuration#

In the advertising section of your player config insert the following code

onAdsManagerAvailable: function(IMAAdManager) {
player.wtAdTracer.setAdManager(IMAAdManager);
}

so that your config object now looks similar to this:

const config = {
key: '...',
playback: {
// ...
},
advertising: {
adBreaks: [
// ...
],
onAdsManagerAvailable: function (IMAAdManager) {
player.wtAdTracer.setAdManager(IMAAdManager);
},
},
};

3. Start the plugin#

Start the plugin after instantiating the player but before calling player.load(...):

const player = new bitmovin.player.Player(container, conf);
wtAdTracer({ apiKey: '<Watching That API key>' }, player);
player.load(
// ...
).then(
() => {
console.log('Successfully created Bitmovin Player instance');
},
() => {
console.log('Error while creating Bitmovin Player instance');
}
);

See the configuration options for some other config params you can use for the plugin (only apiKey is required).

You can retrieve the API key from the Watching That app.