AdvertisingConfig

data class AdvertisingConfig(val schedule: List<AdItem> = emptyList(), val companionAdContainers: List<CompanionAdContainer>? = null, var adsManagerAvailableCallback: AdsManagerAvailableCallback? = null, var beforeInitialization: BeforeInitializationCallback? = null, val imaUiElements: List<ImaUiElement>? = null) : Parcelable

Contains configuration values regarding the ads which should be played back by the player.

Constructors

Link copied to clipboard
constructor(schedule: List<AdItem> = emptyList(), companionAdContainers: List<CompanionAdContainer>? = null, adsManagerAvailableCallback: AdsManagerAvailableCallback? = null, beforeInitialization: BeforeInitializationCallback? = null)
constructor(companionAdContainers: List<CompanionAdContainer>? = null, vararg adItems: AdItem)
constructor(vararg adItems: AdItem)
constructor(schedule: List<AdItem> = emptyList(), companionAdContainers: List<CompanionAdContainer>? = null, adsManagerAvailableCallback: AdsManagerAvailableCallback? = null, beforeInitialization: BeforeInitializationCallback? = null, imaUiElements: List<ImaUiElement>? = null)

Properties

Link copied to clipboard

The AdsManagerAvailableCallback currently in use. Only relevant when the IMA SDK is used for ad playback.

Link copied to clipboard

Callback that provides access to the google.ima.ImaSdkSettings before any initialization happens.

Link copied to clipboard
Link copied to clipboard

A list of UI elements that should be displayed when an ad is active. When set to null the default IMA behavior is applied.

Link copied to clipboard

The ad items that are scheduled when a new playback session is started via Player.load. When loading multiple sources via a PlaylistConfig, the ads are only scheduled for the first source in the playlist.