interface SxInstreamPlayerDelegate
This interface has to be implemented by the content and advertisement video displaying unit in an instream use case.
See Also
currentVideoDuration |
Provides the current (content or advertisement) video currentDuration in milliseconds. abstract val currentVideoDuration: Long? |
currentVideoPosition |
Provides the current (content or advertisement) video position in milliseconds. abstract val currentVideoPosition: Long? |
mute |
True if the content is/should be muted by software and not media volume. abstract var mute: Boolean |
applyLayoutConfiguration |
Optional open suspend fun applyLayoutConfiguration(configuration: SxLayoutConfiguration): Unit |
onContentVideoSought |
Is called when a seek of the content video was detected. It allows to change the remaining advertisement slots. open suspend fun onContentVideoSought(remainingAdSlots: List<SxSequencerAdSlot>, removedAdSlots: List<SxSequencerAdSlot>): List<SxSequencerAdSlot> |
onNewAdInfo |
Optional open suspend fun onNewAdInfo(adInfo: SxAdInfo): Unit |
seek |
Optional: Is called when a seek of the current media was requested. open suspend fun seek(offset: Long): Unit |
sequenceFinished |
Is called when the content and all advertisement videos have finished playback. open suspend fun sequenceFinished(): Unit |
setPlaybackActive |
Sets playback state of the video. No matter if content or advertisement is active. abstract suspend fun setPlaybackActive(active: Boolean): Unit |
showAd |
Is called when an advertisement should be played back. This can be called multiple times for an advertisement slot. The first call of an advertisement slot should remember the current playback position of the content video. abstract suspend fun showAd(videoUrl: String): Unit |
showContent |
Is called when the content playback should be started or resumed. abstract suspend fun showContent(): Unit |