CastVdoPlayer

A VdoPlayer implementation that can be used to interact with the VdoCipher Cast receiver app.

In order to use this class, you must pass a CastContext to create an instance.

To track cast session availability, use isCastSessionAvailable to get session status at start, and attach a CastSessionAvailabilityListener using setSessionAvailabilityListener to get further session availability updates.

To join an existing playback session on the receiver app, use joinSession; to load a new session, use load.

Constructors

Link copied to clipboard
open fun CastVdoPlayer(@NonNull castContext: CastContext)

Functions

Link copied to clipboard
Register callbacks for playback events from this VdoPlayer
Link copied to clipboard
Returns the available tracks for the currently playing media.
Link copied to clipboard
open fun getBufferedTime(): Long
Gets the time till which video is buffered
Link copied to clipboard
Returns a MediaInfo object containing info corresponding to the currently playing media.
Link copied to clipboard
open fun getCurrentTime(): Long
Gets the current playback time of the video from the beginning.
Link copied to clipboard
open fun getDuration(): Long
Gets the duration of the current video.
Link copied to clipboard
open fun getPlaybackProperty(propertyName: String): Any
Returns values of additional properties specific to current playback session.
Link copied to clipboard
Returns the currently active playback speed.
Link copied to clipboard
* Called when the player configuration for requested media is loaded.
Link copied to clipboard
Returns the selected tracks for the currently playing media.
Link copied to clipboard
open fun isAdaptive(): Boolean
Returns if the current playback is adaptive.
Link copied to clipboard
Link copied to clipboard
Returns if the current player supports changing the playback speed.
Link copied to clipboard
Link copied to clipboard
open fun joinSession(@NonNull vdoParams: VdoInitParams): Boolean
Join an existing cast session if the provided VdoInitParams is being played.
Link copied to clipboard
open fun load(vdoParams: VdoInitParams)
Immediately starts loading a media for the player to play.
Link copied to clipboard
open 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
open fun retry()
Attempt to prepare the media while maintaining its playback state.
Link copied to clipboard
open fun searchInSelectedSubtitle(searchText: String, subtitleSearchListener: SubtitleSearchListener)
Search in selected subtitle and seek to matching cues.
Link copied to clipboard
open fun seekTo(timeInMillis: Long)
Seeks to a particular time in the video.
Link copied to clipboard
open fun setAutoResumeCallback(autoResumeCallback: AutoResumeCallback)
Set callback to provide event when video start resume from saved seek position
Link copied to clipboard
open fun setPlaybackSpeed(speed: Float)
Sets the playback speed.
Link copied to clipboard
open fun setSelectedTracks(tracks: Array<Track>)
Sets a fixed (non-adaptive) selection of tracks.
Link copied to clipboard
open fun stop()
Stops the currently loaded video.
Link copied to clipboard

Properties

Link copied to clipboard
open val playbackState: Int
Link copied to clipboard
Link copied to clipboard