You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
videojs('example_video_1', {}, function(){
var player = this;
player.preroll({
src:"advertisement.mp4"
});
});
This initializes the preroll plugin on player ready, which in turn initializes videojs-contrib-ads.
We have had a lot of bugs where people initialized this way because contrib-ads' redispatch feature is not initialized until player ready, which means a lot of events don't get redispatched up until when then. We've seen people rely on those events for analytics, for example.
Other work may need to be done to support this, but you'll want config to look something like this:
var player = videojs('example_video_1');
player.preroll({
src:"advertisement.mp4"
});
I'm referring to this part:
This initializes the preroll plugin on player ready, which in turn initializes videojs-contrib-ads.
We have had a lot of bugs where people initialized this way because contrib-ads'
redispatch
feature is not initialized until player ready, which means a lot of events don't get redispatched up until when then. We've seen people rely on those events for analytics, for example.Other work may need to be done to support this, but you'll want config to look something like this:
More information in the videojs-contrib-ads readme
The text was updated successfully, but these errors were encountered: