videojs / videojs-contrib-ads

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

How to avoid preroll checks every time when change video source src? #560

Open JonasWater opened 1 year ago

JonasWater commented 1 year ago

I found that the preroll check will be performed every time the video source is switched, even if it has already successfully loaded an ad? It alwaystakes several seconds(equal the prerollTimeout) to wait every time, which is not friendly to users.

So, how to avoid preroll checks every time when change video source src?

Thank for your help~

alex-barstow commented 1 year ago

Are you triggering 'adsready' after source change? See relevant docs on 'contentchanged' and 'adsready'.

If you are not able to resolve this it would be helpful if you could share a test page so we can see your specific implementation.