AdvertisingApi

AdvertisingApi

interface AdvertisingApi

Provides the means to interact with advertising features. Accessible through Player.ads.

Properties

NameSummary
scheduleabstract val schedule: List<AdBreak>
The current ad schedule of the active playback session.

Functions

NameSummary
scheduleabstract fun schedule(adItem: AdItem)
Schedules the adItem for playback.
setViewGroupabstract fun setViewGroup(adViewGroup: ViewGroup?)
Sets the ViewGroup in which the ad and the ad UI should be created.
skipabstract fun skip()
Skips the current ad. A successful skip is signaled via PlayerEvent.AdSkipped.