Video Advertising Suite

Docs

Classes

AdPlaylistAPI

Typedefs

AdPlaylistSetup : Object

Ad configuration for the upcoming content video.

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
response string direct VMAP XML
preroll Object Separation Clip and Prefetching setup for the adBreak
midroll Object Separation Clip and Prefetching setup
postroll Object Separation Clip and Prefetching setup
overlay Object Prefetching setup