Good afternoon all,
I'm working on the videoJS player and we're using the IMA SDK.
I'm trying to figure out how to stop the situation where the video plays a fraction of the video to a few seconds of the video before the ad starts playing.
It seems to be longer or shorter depending on whatever site is using the player but there is always some video playing before the ad.
Is there anyway to fix this?
I looked at the demo on codepen as well and built my own demo serving from a python server - google makes mention of it in the documentation.
On the codepen demo, it seems to run with out any part of the video playing before the ad.
But on my sample, I do see a slight frame or 2 that plays before the ad.
index.html
ads.js
| setTimeout(function() { |
| var target = document.getElementById('content_video_ima-ad-container'); |
| target.style.display = 'none'; |
| }, 2000); |
|
|
| var canvas = videojs('content_video'); |
|
|
|
|
| var options2 = { |
| id: 'content_video', |
| adTagUrl: 'vast tag' |
| }; |
|
|
| canvas.ima(options2); |
|
|
This isn't normal behavior is it?
As a solution in our project, I've realized that if I turn off our autostart code, that will stop the video from playing before the ad but it also stops the ad from initiating.
Is there an ima.command that will allow me to just start the ad first and then run our
canvas.play() after the ad is done?
Thanks!