lib / tv.smartclip.smartclientandroid.lib.video_player / ExoWrapper

ExoWrapper

open class ExoWrapper : AbsVideoPlayerWrapper, IExoVideoLoader

Implements the SxVideoPlayerWrapper for the SimpleExoPlayer.

Constructors

<init>

Implements the SxVideoPlayerWrapper for the SimpleExoPlayer.

ExoWrapper(playerHolder: IExoHolder, videoLoader: IExoVideoLoader = ExoVideoLoader(playerHolder))

Properties

context

val context: Context

mainScope

val mainScope: MainCoroutineScope

overlayContainer

ViewGroup of the overlay container. Must be used to add any Views that should be shown above the media.

open val overlayContainer: ViewGroup

surfaceView

Surface view of the video player.

open val surfaceView: View

updateJob

val updateJob: IntervalExecutor

Functions

loadAd

Is called when a new advertising media should be loaded. Playback should be starting immediately after load. Seeking of the media should not be possible.

open fun loadAd(url: String): Unit

release

Removes all external class references. Has to be called when the implementing class is not needed anymore.

open fun release(): Unit

seek

Is called when the current media should be sought by an offset.

open fun seek(offset: Long): Unit

update

open fun update(): Unit

Companion Object Functions

createDefaultPlayer

fun createDefaultPlayer(context: Context): ExoPlayer

Inheritors

InstreamExoWrapper

Implements the SxInstreamVideoPlayerWrapper for the SimpleExoPlayer.

open class InstreamExoWrapper : ExoWrapper, SxInstreamVideoPlayerWrapper, IExoVideoSwitcher