com.bitmovin.player.api.ssai
SsaiApi
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
| Name | Summary |
|---|---|
| clearAdBreaks | abstract fun clearAdBreaks() Clears all SSAI ad state and removes all known SSAI ad breaks from Player.ads schedule. |
| finishAd | abstract fun finishAd() Finishes the currently active individual SSAI ad. |
| finishAdBreak | abstract fun finishAdBreak() Finishes the currently active SSAI ad break. |
| registerAdBreak | abstract fun registerAdBreak(adBreak: SsaiAdBreak): SsaiAdBreak Adds or replaces an SSAI ad break and exposes it through Player.ads schedule. |
| registerAdBreaks | abstract fun registerAdBreaks(adBreaks: List<SsaiAdBreak>) Adds or replaces multiple SSAI ad breaks and exposes them through Player.ads schedule. |
| removeAdBreak | abstract fun removeAdBreak(adBreak: SsaiAdBreak) Removes a previously registered SSAI ad break with the same SsaiAdBreak.id as adBreak from Player.ads schedule. |
| reportAdError | abstract fun reportAdError(message: String, code: Int) Reports a non-fatal SSAI ad error. |
| reportAdQuartile | abstract fun reportAdQuartile(quartile: AdQuartile) Reports an SSAI ad quartile. |
| reportFatalError | abstract fun reportFatalError(message: String, code: PlayerErrorCode = PlayerErrorCode.General) Reports a fatal SSAI error through the player error event flow. |
| startAd | abstract fun startAd(ad: SsaiAd) Starts an individual SSAI ad inside the active ad break. |
| startAdBreak | abstract fun startAdBreak(adBreak: SsaiAdBreak) Starts treating playback as an SSAI ad break. |