> Documentation-Index > Setup Guide
AdBreak
Setup for an ad-break that defines the sequence of commercial ads, sponsored ads and separation clips.
Commercial and sponsored ads (variant NORMAL and SPONSORED) are defined by the ad-server VAST manifest.
Separation clips (variant OPENER, CLOSER, BUMPER) are optional. They can be defined by the publisher. Most likely they depend on the upcoming TV show or editorial video.
AdBreakPosition
Optional. Defines the position of the ad break within the timeline of the underlying content.
One of the values listed in the table below is expected. If omitted, the position of a linear ad break will be
calculated from the content progress. A non-linear ad break is by default 4
regardless of the content progress.
Value | Description |
---|---|
PREROLL |
for preroll, content currentTime = 0 |
MIDROLL |
for midroll, content 0 < currentTime < duration |
POSTROLL |
for postroll content currentTime = duration |
NON_LINEAR |
for overlay/non-linear and standalone (Outstream), AdBreak.type = smartclientcore.AD_TYPE.NON_LINEAR |
AUTO |
for none of the above/other |
String
Optional. Specifies the desired linearity of the upcoming ad slot.
Possible values are smartclientcore.AD_TYPE.LINEAR
(the default if omitted) and smartclientcore.AD_TYPE.NON_LINEAR
.
string, Array<String>
Mandatory *. Defines the ad-request URL(s) that return a VAST manifest. Allowed values are:
String
Mandatory *. Defines a VAST manifest directly as a String.
* One of the tag or response property is required but both are not supported. If both have been specified, tag will get preferred.
adSlotAPI.initAdSlot(adBreak = AdBreak(tag = "https://adserver-1.com/tag-pre?type=vast3xml"))
// or...
adSlotAPI?.initAdSlot(adBreak = AdBreak(
response = """
<VAST version="4.0">
<Ad id="example-inline-tag">
<InLine>
<!-- example code -->
</InLine>
</Ad>
</VAST>
"""
))
Number
Optional and applicable with Waterfalling only. Defines the maximum number of impressions to be delivered from a chain of ad-requests.
All SPONSORED ads are also counted as valid impression. The limit value should be increased accordingly
adSlotAPI.initAdSlot(
adBreak = AdBreak(
tag = arrayOf(
"https://adserver-1.com/tag-pre?type=vast3xml",
"https://adserver-2.com/tag-pre?type=vast3xml",
"https://fallback-adserver.com/tag-pre?type=vast3xml",
),
limit = 2
)
)
SeperationClip
Optional. Applies to NORMAL and SPONSORED ads. Intro video for the upcoming ad break, played before all other ads.
String
- Mandatory. An Array of objects to video files, used for progressive download.
Multiple progressive files can be used, e.g. .mp4 and .webm files to support as many browsers as possible.Boolean
- Optional. Defines whether the separation clip must be delivered with ads or always. Defaulting to false
.Other source properties are currently not supported nor required by the add-on. Future versions of the add-on may include streaming resources.
SeperationClip
Optional. Applies to NORMAL and SPONSORED ads. Outro video, played after all other ads.
progressive : String
- Mandatory. An Array of objects to video files, used for progressive download.
Multiple progressive files can be used, e.g. .mp4 and .webm files to support as many browsers as possible.
forcePlay : Boolean
- Optional. Defines whether the separation clip must be delivered with ads or always. Defaulting to false
.
Other source properties are neither supported nor required by the add-on.
SeperationClip
Optional. Applies to NORMAL and SPONSORED ads. Special intro video, played once when switching from commercial to sponsored ads or vice versa. Not served if the ad-server response contains no ads of variant NORMAL or SPONSORED.
progressive : String
- Mandatory. An Array of objects to video files, used for progressive download.
Multiple progressive files can be used, e.g. .mp4 and .webm files to support as many browsers as possible.
forcePlay : Boolean
- Optional. Defines whether the separation clip must be delivered with ads or always. Defaulting to false
.
Other source properties are neither supported nor required by the add-on.
adSlotAPI.initAdSlot(
adBreak = AdBreak(
tag = "https://adserver-1.com/tag-pre?type=vast3xml",
opener = SeparationClip(
progressive = "https://yourpage.com/assets/opener-pre.mp4"
)
)
)
Example setup to play a static "Station Bumper"
adSlotAPI.initAdSlot(
adBreak = AdBreak(
opener = SeparationClip(
progressive = "https://yourpage.com/assets/opener-pre.mp4",
forcePlay: true
)
)
)
EnvironmentVars
Used for passing implementation-specific runtime variables.
desiredBitrate : Number
- Optional. Indicates the desired bitrate in kilobits per second (kbps).
The player uses this information to select media files with an appropriate bitrate. Defaulting to 1000
.
desiredMimeTypes : Array<String>
- Optional. Declaration of accepted media types (whitelist).
Defaulting to types that the browser eventually is able to play. Types must be compliant with the IANA Media Type standard
Note: If set, this will override the plugin-internal media types.
desiredVPAIDVendors : Array<String>
- Optional. Declaration of accepted VPAID vendors (whitelist).
Each specified String has to represent an unique identifier that can be found within the creative media file URL, most likely the domain name.
If omitted, the plugin tries to deliver VPAID creatives from each vendor.
deviceType : String
- Optional. Can be either mobile
, tablet
, desktop
or tv
. Defaulting to null
.
deviceScreenSize : Rect
- Optional. Maximum size we can achieve when entering fullscreen.
vastMacros : VastMacros
- Recommended. A list of VAST macros to provide details about how and where the upcoming ad-break is shown.
Macro names must be compliant with the VAST 4.x Macros.
Beispiel
networkReachability : String
- Optional. Can be either wwan
, wifi
or unreachable
. Defaulting to null
.
prefetchBuffetAds : Boolean
- Optional. In order to replace invalid ads in a pod of ads instantly at runtime,
buffet ads from wrapper responses must be loaded up-front. prefetchBuffetAds
determines whether stand-alone ads (buffet) from
wrapper tags will be loaded together with the pod of ads or not. Defaulting to false
if omitted.
timeouts : Timeouts
- Optional. Definition of timeouts
that replace global settings for the upcoming ad-break.
Take a look at section Global Config timeouts for relevant information.