AdBreak

class AdBreak

An ad break consisting of one or more ads and an indication of the point in time when it should start. Ad breaks that are marked as Roll.PRE or Roll.POST can only contain one ad. In order to have multiple ads during an ad break, an offset needs to be passed. This class provides two different constructors to enforce this requirement.

Constructors

Link copied to clipboard
constructor(adTag: String, roll: AdBreak.Roll)

Creates a pre-roll or a post-roll ad break that consists of a single ad.

constructor(adTags: ArrayList<String>, offset: Long)

Creates an ad break that starts playing at the specified offset.

Types

Link copied to clipboard

Enum that can be used for creating an ad break that is either a pre-roll or a post-roll, instead of specifying an offset.

Properties

Link copied to clipboard

List of ad tag URL(s) that can be passed as parameter to the constructor.

Link copied to clipboard
val offset: Long?

If the ad break doesn't have a Roll specified, then this offset indicates the position (in seconds) when the break should start.

Link copied to clipboard

Defines the ad break as pre-roll or post-roll.