Optional
adDefines a collection of ad breaks which will be played at the specified position in each AdBreakConfig.
Optional
adDefines a function which returns a container that is used for displaying ads.
Optional
companionDefines a function which returns an array of containers for the ad module to fill with companion ads.
Optional
disableWhen set to true, the ad module will be prohibited from using the browser's localStorage
.
Defaults to disableStorageApi, if present, and falls back to false
.
v8.91.0
Optional
placeholdersList of placeholder strings that will be replaced in the ad manifest URL with the corresponding values.
8.1.0
Optional
strategyDefines an object with two functions which will be called if an ad break is about to start or when ads are seeked over. If this property is not set manually, then only the last ad that was seeked over will be played.
Optional
trackersDefines tracker configurations for the relevant packages such as the Open measurement which will be loaded to provide additional tracking information for ads.
Optional
videoSpecifies the amount of milliseconds before the loading of an ad from a given ad manifest times out. Default is 8000.
Optional
withSpecifies whether to send credentials such as cookies or authorization headers along with the ad requests. The
server needs to explicitly accept them for CORS requests, otherwise the request will fail.
Default is true
.
Single VAST tag example:
This is the most simple config example to play a single pre-roll ad.
Single VMAP tag example:
This config example will immediately download the VMAP manifest and schedule the resulting ad break(s) based on information in the manifest.
This example plays all the ad breaks in the VMAP manifest based on timing information in the manifest itself, while the three VAST ads are played as a pre-roll, mid-roll at 8 minutes and 30 seconds and a post-roll ad. Additionally, the strategy chosen here will result in every seeked-over ad break being played. The latter two manifests are loaded 5 seconds in advance.
Mixed example: