<link href="/videojs/skins/skin-name/videojs.min.css" rel="stylesheet" type="text/css" />
<script src="/videojs/video.min.js"></script>
<script src="/videojs/nuevo.min.js"></script>
<script src="/videojs/plugins/vastpro.js"></script>
<script>
var options = { option1: value, option2: value, option3: value };
var player=videojs("'example_video_1");
player.nuevo({ options });
player.vast ({ tagURL: "vast-ad-tag-url-here" });
</script>
Initially, the plugin makes XMLHttpRequest a false flag for the withCredentials property. This means that cookies are ignored in the XMLHttpRequest response. XMLHttpRequest responses from a different domain cannot set cookie values for their own domain unless withCredentials is set to true before making the request. You can enable the withCredentials flag in an easy way:VAST tracking is implemented using a number of individual VAST tracking elements that map to video events, such as video start or video completion. Each of these elements contains a reference to a server-side resource and is counted by the ad server or other measurement vendor.
Linear video events available to track are:
start, firstQuartile, midpoint, thiirdquartile, play, resume, mute, unmute, fullscreen, exitFullscreen, skip, complete, clickthrough.For industrial icons,
view and
clickthrough events are available to track. For nonlinear ads and companions, possible events to track are
impressions and
clickthrough.
The same set of events is triggered by the plugin, so the user can track events in Javascript, just like on this demo page.
player.on("vastEvent",function(e,data) {
console.log( data.eventName );
console.log( data.adType );
)}
VAST macros
VAST macros enable the video player to provide certain details to the ad server at the time tracking URIs are accessed. Macros are automatically replaced by the player when pinging tracking URIs. All macro names are surrounded by square brackets, for example:[EXAMPLE].The Vast Pro plugin supports the following generic macros:
[CACHEBUSTING] - replaced with a random 8-digit number
[TIMESTAMP] - replaced with a date and time at which the URI using this macro is accessed.
[DOMAIN] - replaced with domain name where the end user will view the ad.
[PAGEURL] - replaced with the full URL of the page where the end user will view the ad.
[DEVICEUA] - replaced with the User-Agent of the device that is rendering the ad to the end user.
[ADPLAYHEAD] - replaced with the current time offset “HH:MM:SS.mmm”.
[PLAYERSTATE] - replaced with the options indicating the current state of the player, e.g. “muted,fullscreen”.
[PLAYERSIZE] - replaced with integer width and height of the player measured in css pixels, separated by coma.
[ADTYPE] - replaced with the type of the ad (linear video, companion, nonlinear).
[ADSERVINGID] - replaced with the value of the <AdServingId> for the currently playing ad.
[UNIVERSALADID] - Indicates the creative, using UniversalAdId space separating registryID and value. Multiple UniversalAdID are coma separated.
The VAST PRO plugin is a separate product, working with th video.js player and Nuevo plugin.
A lifetime license can be ordered upon the first Nuevo software order, or at any time later in the client area.