Package-level declarations

The Media3 player adapter, the overlay ad renderer with its scaling and audio focus options, the GAM stream manager and its configuration, the VAST ad manager, and the device type detection.

Types

Link copied to clipboard

Thrown to represent an ad asset that failed to play (surfaced via aderror).

Link copied to clipboard
interface AdAudioFocus

The renderer's handle on audio focus for ad playback. request/abandon bracket a break; focus transitions while held arrive via AdAudioFocusCallbacks.

Link copied to clipboard

What the renderer does when the system moves audio focus around during a break. Split from the platform calls so unit tests can drive focus transitions directly.

Link copied to clipboard

How ad creatives scale inside the ad surface — the Kotlin mirror of the iOS runtime's AdScaling.

Link copied to clipboard
Link copied to clipboard

Media3/ExoPlayer implementation of the portable PlayerAdapter (P4b-2).

Link copied to clipboard

Callbacks for IMA ad-progress events (mirrors the web GamAdEventCallbacks).

Link copied to clipboard
data class GamLiveStreamConfig(val assetKey: String, val adTagParameters: Map<String, String> = emptyMap(), val streamActivityMonitorId: String? = null, val apiKey: String? = null)

Configuration for a full-service IMA DAI live-stream session (ADS-326 steered ssai): the ads are stitched by Google and the SDK plays the single returned stream, so this carries the DAI assetKey rather than the pod-serving customAssetKey.

Link copied to clipboard

Thrown when the IMA DAI session fails to initialize.

Link copied to clipboard
data class GamStreamConfig(val networkCode: String, val customAssetKey: String, val adTagParameters: Map<String, String> = emptyMap(), val streamActivityMonitorId: String? = null, val apiKey: String? = null)

Configuration for a GAM/IMA DAI pod-serving session (mirrors GamStreamConfig).

Link copied to clipboard
class GamStreamManager(context: Context, adUiContainer: ViewGroup, adPlayerVolumeProvider: () -> Int = { 100 })

Manages a Google IMA DAI SDK pod-serving session on Android — the Kotlin mirror of the web GamStreamManager. Initializes an IMA StreamManager via a PodStreamRequest, exposes the resulting streamId for pod-manifest URL construction (delegated to the portable buildGamPodUrl), and forwards ad progress/quartile events.

Link copied to clipboard
class ImaVastAdManager(context: Context, adUiContainer: ViewGroup, adPlayer: ExoPlayer) : VastAdManager

Real IMA client-side VastAdManager. Drives AdsLoader.requestAds with the VAST tag URL, renders via an AdVideoPlayer backed by the SDK's ad ExoPlayer, and maps IMA AdEvent/AdErrorEvent to VastAdEventCallbacks

Link copied to clipboard
class OverlayAdRenderer(context: Context, overlayContainer: ViewGroup, contentPlayer: PlayerAdapter, gamConfig: GamConfig? = null, adBreakCutSafetyMarginSec: Double = DEFAULT_AD_BREAK_CUT_SAFETY_MARGIN_SEC, ioDispatcher: CoroutineDispatcher = Dispatchers.IO, vastAdManagerFactory: (player: ExoPlayer, container: ViewGroup) -> VastAdManager?? = null, adPlayerFactory: (Context) -> ExoPlayer? = null, pauseVastFetcher: suspend (url: String) -> String?? = null, pauseBeaconSink: (url: String) -> Unit? = null, clock: Clock = systemClock, contentContainer: View? = null, contentSurfaceTransformable: Boolean = true, deviceTypeOverride: DeviceType? = null, transitionMs: Long = FADE_MS, audioFocusFactory: (Context, AdAudioFocusCallbacks) -> AdAudioFocus? = null, adScaling: AdScaling = AdScaling.FIT, companionContainer: ViewGroup? = null) : AdRenderer

Overlay AdRenderer for Android: plays break assets on a dedicated ad ExoPlayer in a PlayerView above the integrator's content surface. Event ORDER comes from the portable AdBreakSequencer; this class only performs side effects and reports outcomes back.

Link copied to clipboard

Ad-progress callbacks fired during a single VAST (CSAI) ad — the Kotlin mirror of the web VastAdManager callbacks. Quartiles map onto the SDK's existing GAM quartile event stream in OverlayAdRenderer.

Link copied to clipboard
class VastAdException(message: String) : Exception

Thrown when the IMA client-side (CSAI) SDK fails to load or play a VAST ad.

Link copied to clipboard
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.

Functions

Link copied to clipboard

Classify the host device into a DeviceType for per-URI asset targeting (see resolveTargetedUri).