VdoPlayer

interface VdoPlayer

Interface for controlling playback.

The VdoPlayer instance returned in onInitializationSuccess can be used to load media and control playback.

Types

Link copied to clipboard
Interface for callbacks related to playback events.

Functions

Link copied to clipboard
Register callbacks for playback events from this VdoPlayer
Link copied to clipboard
abstract fun getAvailableTracks(): Array<Track>
Returns the available tracks for the currently playing media.
Link copied to clipboard
abstract fun getBufferedTime(): Long
Gets the time till which video is buffered
Link copied to clipboard
abstract fun getCurrentMedia(): MediaInfo
Returns a MediaInfo object containing info corresponding to the currently playing media.
Link copied to clipboard
abstract fun getCurrentTime(): Long
Gets the current playback time of the video from the beginning.
Link copied to clipboard
abstract fun getDuration(): Long
Gets the duration of the current video.
Link copied to clipboard
abstract fun getPlaybackProperty(propertyName: String): Any
Returns values of additional properties specific to current playback session.
Link copied to clipboard
abstract fun getPlaybackSpeed(): Float
Returns the currently active playback speed.
Link copied to clipboard
abstract fun getPlaybackState(): Int
Returns the current state of the player.
Link copied to clipboard
* Called when the player configuration for requested media is loaded.
Link copied to clipboard
abstract fun getPlayWhenReady(): Boolean
Whether playback will proceed when getPlaybackState == STATE_READY.
Link copied to clipboard
abstract fun getSelectedTracks(): Array<Track>
Returns the selected tracks for the currently playing media.
Link copied to clipboard
abstract fun isAdaptive(): Boolean
Returns if the current playback is adaptive.
Link copied to clipboard
Returns if the current player supports changing the playback speed.
Link copied to clipboard
abstract fun load(vdoParams: VdoInitParams)
Immediately starts loading a media for the player to play.
Link copied to clipboard
abstract fun release()
Release system resources used by this VdoPlayer.
Link copied to clipboard
Remove a registered playback event listener from this VdoPlayer
Link copied to clipboard
abstract fun retry()
Attempt to prepare the media while maintaining its playback state.
Link copied to clipboard
abstract fun searchInSelectedSubtitle(searchText: String, subtitleSearchListener: SubtitleSearchListener)
Search in selected subtitle and seek to matching cues.
Link copied to clipboard
abstract fun seekTo(timeInMillis: Long)
Seeks to a particular time in the video.
Link copied to clipboard
abstract fun setAutoResumeCallback(autoResumeCallback: AutoResumeCallback)
Set callback to provide event when video start resume from saved seek position
Link copied to clipboard
abstract fun setPlaybackSpeed(speed: Float)
Sets the playback speed.
Link copied to clipboard
abstract fun setPlayWhenReady(playWhenReady: Boolean)
Sets whether playback should proceed when getPlaybackState == STATE_READY.
Link copied to clipboard
abstract fun setSelectedTracks(tracks: Array<Track>)
Sets a fixed (non-adaptive) selection of tracks.
Link copied to clipboard
abstract fun stop()
Stops the currently loaded video.

Properties

Link copied to clipboard
The player needs more data to be loaded to be ready to play or resume playback.
Link copied to clipboard
val STATE_ENDED: Int = 4
The player has finished playing all the media enqueued.
Link copied to clipboard
val STATE_IDLE: Int = 1
No media is currently queued for playback.
Link copied to clipboard
val STATE_READY: Int = 3
The player is able to immediately play from the current position.
Link copied to clipboard
val TOTAL_COVERED: String = "totalCovered"
Get playback property from the player getPlaybackProperty
Link copied to clipboard
val TOTAL_PLAYED: String = "totalPlayed"
Get playback property from the player getPlaybackProperty

Inheritors

Link copied to clipboard