lib / tv.smartclip.smartclientandroid.lib.video_player / SxVideoPlayerWrapper

SxVideoPlayerWrapper

interface SxVideoPlayerWrapper : Releasable

Describes the outstream video player with support for observing the different properties of the player.

Properties

duration

abstract val duration: Long

durationObservable

Duration of the current media playback in milliseconds.

abstract val durationObservable: IObservable<Long>

event

abstract val event: SxVideoPlayerEvent

eventsObservable

abstract val eventsObservable: IObservable<SxVideoPlayerEvent>

mediaUrl

Url of the last loaded media file or null if no file was loaded yet.

abstract var mediaUrl: String?

overlayContainer

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

abstract val overlayContainer: ViewGroup

playbackState

abstract val playbackState: PlaybackState

playbackStateObservable

PlaybackState of the current media playback.

abstract val playbackStateObservable: IObservable<PlaybackState>

playWhenReady

abstract var playWhenReady: Boolean

playWhenReadyControllable

true for active playback.

abstract val playWhenReadyControllable: IControllable<Boolean>

position

abstract val position: Long

positionObservable

Position of the current media playback in milliseconds.

abstract val positionObservable: IObservable<Long>

surfaceView

Surface view of the video player.

abstract val surfaceView: View

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.

abstract fun loadAd(url: String): Unit

seek

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

abstract fun seek(offset: Long): Unit

Inheritors

AbsVideoPlayerWrapper

Implements Observables/Controllable and links them with their corresponding property. Also triggers new event when one of the properties changes.

abstract class AbsVideoPlayerWrapper : SxVideoPlayerWrapper

SxInstreamVideoPlayerWrapper

Describes the instream video player with support for observing the different properties of the player.

interface SxInstreamVideoPlayerWrapper : SxVideoPlayerWrapper