1

Currently working on a project using video.js and Google IMA to load prerolls (ads) to my videos. However, the problem is, is that the main video plays when ad is paused, and if the ad is resumed playing, then the main video is paused.

However, if I found out the ad information and if I knew when the ad is completed then I could reset the video to 0:00 and mute main video if ad is present.

I'm messing around right now with...

this.player.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED, function(){
    console.log('Ad completed!');
});

However, I know that I need to put adsManager.addEventListener instead of my this.player. The problem is, is that adsManager is not defined. and being unfamiliar as I am, I'm kind of lost.

If anyone could please explain how to set this up and to gather information on my preroll. That would be much appreciated.

Thanks!

Kasador
  • 405
  • 7
  • 18

0 Answers0