I have implemented video js player in my video streaming website and trying to play the vast tag ads but videojs-ima plugin is not loading properly.
Please help me to revolve this issue.
VIDEOJS: ERROR: videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see .html
I have implemented video js player in my video streaming website and trying to play the vast tag ads but videojs-ima plugin is not loading properly.
Please help me to revolve this issue.
VIDEOJS: ERROR: videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html
Share Improve this question asked Mar 30 at 18:24 user9171561user9171561 1 1- Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Bot Commented Apr 3 at 0:33
1 Answer
Reset to default 0The error is telling you that the contrib-ads plugin (a dependency of the IMA plugin) was initialized too late, after the video source was loaded. Since you haven't provided reproducible code it's not possible to say what exactly must change. You may need to change the order scripts are loaded, or the way you are initializing the plugins. You will likely find it easiest to not load the video source until after the plugins are ready, i.e. don't include it in a <video>
element before the player is initialized.
videojs-ima has example code to follow: https://github/googleads/videojs-ima/tree/main/examples