The PRO version of the plugin supports VMAP specification, which allows to play multiple ads at desired time position (mid-roll, post-roll). Apart of linear video ads, VAST plugin PRO support also nonlinear ads, industry icons and ad companions. Sequential ads as defined in the VAST 3 spec as ad pods are supported as well. The plugin includes option to build ads waterfall to maximize ad revenue by attempting to show a valid ad.
The plugin setup is not difficult.
Load player skins css stylesheet in website HEAD or BODY element.<link href="/videojs/skins/skin-name/videojs.min.css" rel="stylesheet" type="text/css" />
Load player, vast/vpaid and nuevo plugin js<script src="/videojs/video.min.js"></script><script src="/videojs/nuevo.min.js"></script><script src="/videojs/plugins/vastpro.js"></script>
Initialize player and plugins<script>var options = { option1: value, option2: value, option3: value }; Nuevo plugin optionsvar player=videojs("'example_video_1");player.nuevo({ options });player.vastAds ({ tagURL: "vast-ad-tag-url-here" });</script>
player.vastAds ({ tagURL: "vast-ad-tag-url-here", withCredentials:true });
<script>player.on('vast', (e, data) => {console.log(data.eventType);});</script>
player.on('playlist_change', function(event,data) {player.vastReset();})
var new_source = {src: "//www.domain.com/path-to-video-playlist.m3u8", type: "application/x-mpegURL"};player.vastReset();player.changeSource(new_source);
player.on('playlist_change', function(event,data) {player.vastAds ({tagURL: "new-vast-ad-tag-url-here" });});
player.vastAds ({skipInText:"Skip Ad in %%TIME%% seconds", skipAdText:"Skip Ad", tagURL: new-vast-ad-tag-url-here" });
player.vastAds ({audio:'off', tagURL: "vast-ad-tag-url-here" });
player.vastAds ({midrollSkip:true, tagURL: "vast-ad-tag-url-here" });
player.vastAds ({widthCredentials:true, tagURL: "vast-ad-tag-url-here" });