Specifies the time in seconds, how much the VAST tag is loaded prior to the ad playback. By default the VAST tag is loaded at player startup.
Defines a custom message that will be displayed to the user instead of the progress bar during ad playback.
Has the placeholders '{remainingTime[formatString]}', '{playedTime[formatString]}' and '{adDuration[formatString]}', which are replaced by the remaining time until the ad can be skipped, the current time or the ad duration. The format string is optional. If not specified, the placeholder is replaced by the time in seconds. If specified, it must be of the following format:
If set to true
, mid-roll ads are only played during normal playback. Seeking to a time after the
mid-roll ads doesn't trigger ad playback.
Mandatory. Specifies which ad client to use.
Defines when the ad shall be played.
Allowed values are:
List of placeholder strings that will be replaced in the ad manifest URL with the corresponding values.
Is called when the AdManager is loaded and ready and results in an AdReady
object.
Only available for the 'ima' client
Contains one or more ad breaks. Each ad break defines when an ad shall be played and must contain an offset and a tag property.
Is called during the advertisement implementation setup and results in a AdConfig
.
Only available for the 'ima' client.
Defines a custom message that will be displayed to the user as a skip button.
Defines the path to an ad manifest. Can be used to schedule a single ad without setting the schedule property, that will be played at the time defined in the offset property. It will be played as pre-roll add by default if no offset is set, or when a schedule with additional ads is provided. The array is used for ad waterfalling: all entries beyond the first are fallbacks if the previous ones did not work.
Specifies that cookies are send along with the ad request. The server needs to explicitly accept them for CORS requests, otherwise the request will fail.
Generated using TypeDoc
Simple example:
advertising: { client : 'vast', tag : 'http://your.ad.provider/manifest.xml' }
This is the most simple config example to play a single pre-roll ad.
Advanced example:
advertising: { admessage: 'This ad will end in {remainingTime} seconds', skipmessage: { countdown: 'Skip in {remainingTime} seconds...', skip: 'SKIP' }, schedule: { 'pre-roll-ad': { client: 'vast', offset: 'pre', tag: 'http://your.ad.provider/pre-roll-ad-manifest.xml' }, 'mid-roll-ad': { client: 'vpaid', offset: '50%', tag: 'http://your.ad.provider/mid-roll-ad-manifest.xml' } } }
This example plays a pre-roll and a mid-roll ad after 50% of the playback and displays custom countdown messages to the user (if used with the default UI).