AdBreakStatus

data class AdBreakStatus(val phase: AdBreakPhase, val break_: Break?, val format: BreakFormat? = null, val secondsUntilBreak: Int? = null, val breakRemainingSec: Double? = null, val adIndex: Int? = null, val totalAds: Int? = null, val adsRemaining: Int? = null, val ticking: Boolean, val warningSec: Int? = null, val externalPlaybackAllowed: Boolean? = null, val deliveryMode: SessionDeliveryMode? = null)

Playback-gated snapshot of an ad break for UI countdowns — the Kotlin mirror of the web AdBreakStatus (packages/core/src/types/Events.ts). The SDK owns the timebase and the player-gated ticking flag; the application renders the badge/overlay. Emitted on the AdBreakStatusEvent and returned by OptiViewAds.getAdBreakStatus.

Constructors

Link copied to clipboard
constructor(phase: AdBreakPhase, break_: Break?, format: BreakFormat? = null, secondsUntilBreak: Int? = null, breakRemainingSec: Double? = null, adIndex: Int? = null, totalAds: Int? = null, adsRemaining: Int? = null, ticking: Boolean, warningSec: Int? = null, externalPlaybackAllowed: Boolean? = null, deliveryMode: SessionDeliveryMode? = null)

Properties

Link copied to clipboard
val adIndex: Int?

0-based index of the ad currently playing within the break.

Link copied to clipboard

Number of ads remaining including the currently playing one.

Link copied to clipboard

The break this status describes; null when phase is AdBreakPhase.IDLE.

Link copied to clipboard

Estimated seconds remaining in the currently active break, when it can be derived from playback progress. null when not yet known (e.g. a backdrop break with no per-ad timeupdate).

Link copied to clipboard

Delivery mode of the active session; SessionDeliveryMode.SSB while AirPlay plays the server-side beaconing stream. Null between sessions.

Link copied to clipboard

Whether the content player may start AirPlay right now: false during a break and in the seconds before one. null unless the SDK manages the AirPlay gate (the manifest carries a server-side beaconing stream and the adapter can gate external playback).

Link copied to clipboard

Declared format of the break's selected variant, when known.

Link copied to clipboard

Current lifecycle phase of the ad break.

Link copied to clipboard

Seconds until the break starts. Populated for upcoming warnings — the live countdown value at the moment the warning fired.

Link copied to clipboard

Whether the break countdown is actively advancing — the ad is rendered and playback is progressing. false while buffering or before the first frame.

Link copied to clipboard

Total number of ads in the break, when known.

Link copied to clipboard

When this status was emitted because of a configured pre-break warning, the configured warning second that was crossed.