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

ExoWrapper

open class ExoWrapper : AbsVideoPlayerWrapper, IExoVideoLoader

Implements the SxVideoPlayerWrapper for the SimpleExoPlayer.

Parameters

videoLoader - Implementation of IExoVideoLoader.

Constructors

<init>

Implements the SxVideoPlayerWrapper for the SimpleExoPlayer.

ExoWrapper(videoLoader: IExoVideoLoader)

Properties

context

val context: Context

mainScope

CoroutineScope used to call any method on the ExoPlayer. Must be a scope using Dispatchers.Main.

val mainScope: CoroutineScope

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. It is required that the view's parent is placed in a ConstraintLayout.

open val surfaceView: View

updateJob

val updateJob: <ERROR CLASS>

Functions

buildPlaybackState

fun buildPlaybackState(playWhenReady: Boolean, isPlaying: Boolean, playbackState: Int): PlaybackState

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, closedCaptions: List<SxClosedCaption>): <ERROR CLASS>

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): <ERROR CLASS>

update

open fun update(): <ERROR CLASS>

Companion Object Functions

createDefaultPlayer

fun createDefaultPlayer(context: Context): ExoPlayer

Inheritors

InstreamExoWrapper

Implements the SxInstreamVideoPlayerWrapper for the SimpleExoPlayer.

open class InstreamExoWrapper : ExoWrapper, SxInstreamVideoPlayerWrapper, IExoVideoSwitcher