SsaiApi

com.bitmovin.player.api.ssai

SsaiApi

@ExperimentalBitmovinApi

interface SsaiApi

Provides hooks for server-side ad insertion integrations.

Accessible through Player.ssai. Vendor adapters can use this API to expose stitched ad periods as regular player ad state without relying on player internals.

Unless stated otherwise, mutating and lifecycle calls have no effect and emit an incorrect API usage warning when there is no active playback session. Call these APIs after loading a source with Player.load.

Functions

NameSummary
clearAdBreaksabstract fun clearAdBreaks()
Clears all SSAI ad state and removes all known SSAI ad breaks from Player.ads schedule.
finishAdabstract fun finishAd()
Finishes the currently active individual SSAI ad.
finishAdBreakabstract fun finishAdBreak()
Finishes the currently active SSAI ad break.
registerAdBreakabstract fun registerAdBreak(adBreak: SsaiAdBreak): SsaiAdBreak
Adds or replaces an SSAI ad break and exposes it through Player.ads schedule.
registerAdBreaksabstract fun registerAdBreaks(adBreaks: List<SsaiAdBreak>)
Adds or replaces multiple SSAI ad breaks and exposes them through Player.ads schedule.
removeAdBreakabstract fun removeAdBreak(adBreak: SsaiAdBreak)
Removes a previously registered SSAI ad break with the same SsaiAdBreak.id as adBreak from Player.ads schedule.
reportAdErrorabstract fun reportAdError(message: String, code: Int)
Reports a non-fatal SSAI ad error.
reportAdQuartileabstract fun reportAdQuartile(quartile: AdQuartile)
Reports an SSAI ad quartile.
reportFatalErrorabstract fun reportFatalError(message: String, code: PlayerErrorCode = PlayerErrorCode.General)
Reports a fatal SSAI error through the player error event flow.
startAdabstract fun startAd(ad: SsaiAd)
Starts an individual SSAI ad inside the active ad break.
startAdBreakabstract fun startAdBreak(adBreak: SsaiAdBreak)
Starts treating playback as an SSAI ad break.