videojs / videojs-contrib-ads

A Tool for Building Video.js Ad Plugins
http://videojs.github.io/videojs-contrib-ads/
Other
384 stars 257 forks source link

feat: add a cancelContentTimeout option #279

Closed brandonocasey closed 7 years ago

brandonocasey commented 7 years ago

This is a workaround for a problem that we are seeing which is going to be rather hard to solve.

The basic gist comes from this line of code: https://github.com/videojs/videojs-contrib-ads/blob/master/src/cancelContentPlay.js#L69

A play promise is in flight as this code runs so the player is not technically playing (although it will be). So we think that we need to pause the video for contrib-ads loading. This cancels the promise and the state of play is lost. This causes the play button to show back up during a preroll even though the user just clicked it.

misteroneill commented 7 years ago

I wonder if, instead of adding a new option, it would be better to use the existing stitchedAds option here.

misteroneill commented 7 years ago

As discussed elsewhere, I think we're going to take a different approach here.