VideoJS Plugin

Integrate VideoJS with Watching That

For ad support in VideoJS, you might need extra 3rd party plugins:

  • One for managing the lifecycle of ads, handling errors, switching from the ad to the content, triggering the proper events (like ad starting, ad 50% through, ad ended, etc)
  • One for setting up the ads, "telling" videojs what to play in an ad slot and communicating with DFP

Your tech stack might differ from what we're using in these examples, or you might have your own custom solution. In any case, our VideoJS plugin is just listening for events on the player, so it should be compatible with anything you have.

The demo here is built with videojs-contrib-ads and videojs-ima.

Demo

Load

You can load the plugin via a script tag:

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

Init

wtAdTracer({ apiKey: '<api key you got from WatchingThat>' });