VastAdManager

interface VastAdManager

Plays a single VAST ad tag client-side (CSAI) — the Kotlin counterpart of the web @dolby-optiview/ads-sdk-core VastAdManager. This is the client-side IMA surface (AdsLoader/AdsManager/AdDisplayContainer + a VideoAdPlayer), distinct from the DAI pod-serving GamStreamManager: here IMA fetches/parses the VAST document and the SDK's ad ExoPlayer renders the creative.

Modeled behind an interface so OverlayAdRenderer can be unit-tested with a fake (the IMA SDK has no headless mode; the real device path is exercised by native e2e). playVast suspends until the ad completes (ALL_ADS_COMPLETED) and throws VendorAdException (carrying IMA's error code) on an IMA error, or VastAdException for SDK-side misuse.

Inheritors

Functions

Link copied to clipboard
abstract fun destroy()

Release all IMA + ad-player resources.

Link copied to clipboard
abstract suspend fun playVast(adTagUrl: String, callbacks: VastAdEventCallbacks)

Request, render, and play adTagUrl; suspends until complete, throws on error.

Link copied to clipboard
abstract fun preloadedTagUrl(): String?

The tag currently warmed and waiting, or null.

Link copied to clipboard
abstract suspend fun preloadVast(adTagUrl: String)

Phase 1 of the two-phase path: fetch, parse and init() the ad for adTagUrl WITHOUT starting it. Suspends until IMA has an AdsManager ready to play.

Link copied to clipboard
abstract suspend fun startPreloaded(callbacks: VastAdEventCallbacks)

Phase 2: start the ad warmed by preloadVast. Suspends until complete, like playVast, and throws if nothing is warmed.