Videojs VAST Multiple ads

AD EVENTS

The most often used method to play multiple VAST ads at different time positions is to use the VMAP protocol. VMAP is an XML template to describe the structure of multi-ad inventory. It can contain any combination of VAST pre-rolls, mid-rolls, and post-roll ads. The VAST plugin by Nuevodevel.com does support the VMAP protocol, and a demo example is included for review on this page.
An alternative to the VMAP protocol is Ads Scheduler, which also allows you to define and play multiple VAST ads. In the example above, you can see a total of 5 VAST ads. 2 x preroll, 2 x midroll at 00:15, and 1 x postroll ad. Below, you can see an example of a multiple-ad setup code.
Code snippet
player.vastAds ([
   {tagURL: "preroll-1-ad-tag-url", id: 'x01'},
   {tagURL: "preroll-2-ad-tag-url", id: 'x02'},
   {tagURL: "midroll-1-ad-tag-url", id: 'x03', timeOffset:"00:15"},
   {tagURL: "midroll-2-ad-tag-url", id: 'x04', timeOffset:'00:15'},
   {tagURL: "postrol-ad-tag-url", id: 'x04', timeOffset:'end'}
]);

For midroll ads, you must define the timeOffset option, represented as a number of seconds or as a string in time format, e.g., "00:15."
For a postroll ad, the timeOffset value must be represented as a string "end."
For a preroll ad, you don't have to include the timeOffset parameter at all.
The VAST/VPAID plugin is included for free only in the GOLD version of the Nuevo plugin.