BreakPlaybackCallbacks

Progress callbacks the renderer fires across a single break. Ad-level callbacks carry the asset id (String), matching the portable brain's id-based break/asset model and the conformance sdkSequence shape.

Functions

Link copied to clipboard
abstract fun onAdEnd(brk: Break, assetId: String, index: Int, total: Int)

Asset assetId of brk finished playing as ad index (0-based) of total.

open fun onAdEnd(brk: Break, assetId: String, index: Int, total: Int, identity: AdCreativeIdentity?, asset: Asset? = null)

The identity-carrying counterpart of onAdEnd for the ads of a GAM pod; see the onAdStart overload.

Link copied to clipboard
abstract fun onAdError(brk: Break, assetId: String?, error: Throwable)

Asset assetId of brk failed with error; null assetId when no asset was playing yet.

Link copied to clipboard
abstract fun onAdPlaying(brk: Break, assetId: String?)

The ad player started or resumed playing asset assetId of brk.

Link copied to clipboard
abstract fun onAdStart(brk: Break, assetId: String, index: Int, total: Int)

Asset assetId of brk started playing as ad index (0-based) of total.

open fun onAdStart(brk: Break, assetId: String, index: Int, total: Int, identity: AdCreativeIdentity?, asset: Asset? = null)

identity-carrying overloads for the ads of a GAM pod (PLAYG-362): IMA reports an adId/creativeId per creative that the manifest cannot know. asset is the synthetic per-ad asset when the manifest does not list it. Default to the plain callbacks so existing implementations (and fakes) that never see a pod need not override.

Link copied to clipboard
abstract fun onAdTimeUpdate(brk: Break, assetId: String, currentTime: Double, duration: Double)

Playback of asset assetId of brk is at currentTime of duration seconds.

Link copied to clipboard
abstract fun onAdWaiting(brk: Break, assetId: String?)

The ad player stalled for buffering while playing asset assetId of brk.

Link copied to clipboard
open fun onBreakCut(brk: Break)

The break-cut timer expired with an ad still in flight; fired before that ad's adend.

Link copied to clipboard
abstract fun onBreakEnd(brk: Break)

The whole break brk ended and content may resume.

Link copied to clipboard

A content-covering break ended before its deferred content pause ever landed — an ad that failed faster than the reveal fade (J1/J6). Content never stopped, so no player state transition will announce "break over, content rolling"; the SDK emits the content playing the resumed path would have produced. Defaults to a no-op so fakes need not override.

Link copied to clipboard
abstract fun onChainedBreakBegin(next: Break)

The renderer soft-ended the current break into its chained successor next, which starts now.

Link copied to clipboard
open fun onContentResumeSeek(targetSeconds: Double, breakEndSeconds: Double)

The renderer is about to seek content back to targetSeconds as its own post-break resume-seek, for a break ending at breakEndSeconds.