Migrating to videojs-contrib-ads 4.0.0
Version 4 of videojs-contrib-ads is mainly about improving code quality. Functional changes are in support of that effort.
Migration
- A
playingevent is no longer sent before a preroll ad. This is because aplayingevent should only be sent when content actually plays. If your ad plugin relies on this event being fired at this time, consider another solution. - Contrib-ads expects your plugin to send a “playing” event when an ad starts playing,
which will be redispatched as “adplaying”. This may happen automatically, for example,
if you play your ad in the content’s
videoelement. - The
contentplaybackevent has been removed. Useplayinginstead. videojs.ads.global.jsandvideojs.ads.global.min.jshave been removed. Usevideojs.ads.jsorvideojs.ads.min.jsinstead.videojs.ads.cssis now available in thedistfolder rather than thesrcfolder. Your ad plugin should be updated to include it from there.