Video Advertising Suite

Docs

Classes

AdPlaylistAPI

Typedefs

AdPlaylistSetup : Object

Ad configuration for the upcoming content video.

AdSlotSetup : Object

Configuration for each of the four ad-slot types.

SeparationClip : Object

A short video from the publisher that is played before (opener) or after (closer) an ad-break. Also, a short video that is played between commercial and sponsored ads (bumper).

AdPlaylistAPI

Kind: global class

new AdPlaylistAPI(playerProxy, adsAPI)

Param Type Description
playerProxy Object extended from FacadeBase
adsAPI Object is a reference to the session AdSlotAPI

adPlaylistAPI.error ⇒ PluginError

Requests details about the most recent error that has occurred.

Kind: instance property of AdPlaylistAPI
Returns: PluginError - Description object of the most recent error or null.

adPlaylistAPI.rawVMAP ⇒ XML

Returns the VMAP that has been collected for the current (content) session

Kind: instance property of AdPlaylistAPI
Returns: XML - XML as live parsable DOM representation, querySelector and similar work on this

adPlaylistAPI.initAdPlaylist(playlistSpecs, vastMacros) ⇒ Promise

Starts requesting a VMAP from the ad server

Kind: instance method of AdPlaylistAPI
Returns: Promise - Resolves if loading the VMAP has been completed

Param Type Description
playlistSpecs AdPlaylistSetup Ad configuration for the upcoming content video.
vastMacros Object VAST macros and their values as defined in https://interactiveadvertisingbureau.github.io/vast/vast4macros/vast4-macros-latest.html

adPlaylistAPI.startAdPlaylist() ⇒ Promise

Starts playback and monitoring of the content and automatically inserts ad-slots based on the timeOffset values of each VMAP AdBreak. AdBreaks with a timeOffset equally to 0, "start" or "0%" get requested immediately.

Kind: instance method of AdPlaylistAPI
Returns: Promise - Resolves if the playback started

adPlaylistAPI.stopAdPlaylist() ⇒ Promise

Immediately stops monitoring content playback. AdBreaks that have already started remain until they complete. If necessary, they must be canceled via the AdSlotAPI.stopAdSlot().

Kind: instance method of AdPlaylistAPI
Returns: Promise - - Whether the ad slot could be closed and cleaned up or not.

AdPlaylistSetup : Object

Ad configuration for the upcoming content video.

Kind: global typedef
Properties

Name Type Description
tag string VMAP request URL or...
response string direct VMAP XML
preroll AdSlotSetup Separation Clip and Prefetching setup for the adBreak
midroll AdSlotSetup Separation Clip and Prefetching setup
postroll AdSlotSetup Separation Clip and Prefetching setup
overlay AdSlotSetup Prefetching setup

AdSlotSetup : Object

Configuration for each of the four ad-slot types.

Kind: global typedef
Properties

Name Type Description
opener SeparationClip Setup for a short video to play before the commercial ads.
bumper SeparationClip Setup for a short video to play between commercial and sponsored ads.
closer SeparationClip Setup for a short video to play after the commercial ads.
prefetchOffset Number Time in seconds Defaulting to 0 seconds if omitted. The preroll ad-slot is always defaulting to 0.

SeparationClip : Object

A short video from the publisher that is played before (opener) or after (closer) an ad-break. Also, a short video that is played between commercial and sponsored ads (bumper).

Kind: global typedef
Properties

Name Type Description
progressive string Video asset URL
forcePlay Boolean Whether the clip needs to be played even if the ad-server does not return any ads. Defaulting to false if omitted and ignored if the clip is declared as a bumper.