TimelineAdsProvider

Providers that splice ads into the Media3 timeline (IMA). The content engine plays the ad media; the provider supplies the Media3 ads loader.

Functions

Link copied to clipboard
open fun clickAd()

Opens the current ad's clickthrough, firing the provider's click tracking. Default no-op (IMA renders and handles its own click UI).

Link copied to clipboard
abstract fun createAdsLoader(callbacks: AdsProviderCallbacks): Any

Creates the underlying Media3 ads loader, reporting events through callbacks. Returns an androidx.media3.exoplayer.source.ads.AdsLoader.

Link copied to clipboard
abstract fun release()

Releases all provider resources. Called from OGPlayer.release().

Link copied to clipboard
abstract fun setPlayer(player: Any?)

Attaches or detaches (null) the playback engine (androidx.media3.common.Player).

Link copied to clipboard
open fun skipAd()

Skips the currently playing ad, if any and if it is skippable. Whether a programmatic skip is honored is provider-dependent.