googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

Added option to prevent ad playing after content start #859

Closed mimse closed 4 years ago

mimse commented 4 years ago

We are sometimes seeing ads starting after the content is already playing.

Others have reported this issue as well

https://github.com/googleads/videojs-ima/issues/558 https://github.com/googleads/videojs-ima/issues/167

People have solved the issue with various hacks, but I found this in the videojs-contrib-ads plugin.

http://videojs.github.io/videojs-contrib-ads/integrator/options.html

Some ad plugins may want to play a preroll ad even after the timeout has expired and content has begun playing. To facilitate this, videojs-contrib-ads will respond to an adsready event during content playback with a readyforpreroll event. If you want to avoid this behavior, make sure your plugin does not send adsready after adtimeout

This PR implements this functionality

I´m not sure about the name doNotPlayAdAfterContentStart though. But have not been able to find a better name.

Kiro705 commented 4 years ago

Hi @mimse ,

Thank you for your PR for this issue. In testing the fix, if the condition occurs where this.controller.onAdsReady(); is not called, no preroll, midroll, or postroll ads are displayed. Because of that, I am unsure if this is a desired addition to the plugin.

Please update the description of this setting in the README to be clear that all ad playback is disabled (preroll, midroll, and postroll).

Also, I will reopen https://github.com/googleads/videojs-ima/issues/558 to see if the solution is what solves the issue for other devs.

Thank you, Jackson IMA SDK DevRel

mimse commented 4 years ago

Hi @Kiro705

Thank you for the feedback. I have updated the readme.

I can see it is sup optimal that either midroll or postroll will be played if the adtimed out. I have been looking at both contribs and ima plugins trying to figure out of there is a way to only skip the preroll and not midroll, postroll, and have yet to come up with an idea on how to solve this.

We only have prerolls at the company I´m working at, so I would still love to see this feature be supported by this plugin.

mimse commented 4 years ago

That is a better name for it 😊