Constructor

RemotePlayer

new RemotePlayer()

Implements
cast.common.RemotePlayer.PlayerInterface

Properties

canControlVolume

boolean

Indicate the receiver support changing volume.

canPause

boolean

True if receiver allows pause.

canSeek

boolean

True if receiver allows seeking.

controller

nullable cast.common.RemotePlayer.ControllerInterface

The controller for the player.

currentTime

number

The current media playback position in seconds. In order to do playback seek, change this value and call cast.framework.RemotePlayerController#seek. When media is playing, this value will update every second.

displayName

string

Receiver application display name.

displayStatus

string

Receiver status for display: it is the media title, if available, or, otherwise, the receiver status text.

duration

number

The duration of current loaded media in seconds.

imageUrl

nullable string

Currently playing media thumbnail url.

isConnected

boolean

True if the app is connected to a cast device.

isMediaLoaded

boolean

True if media is loaded on the cast device.

isMuted

boolean

True if device is muted.

isPaused

boolean

True if current media is paused.

mediaInfo

nullable chrome.cast.media.MediaInfo

Currently playing media info.

playerState

nullable chrome.cast.media.PlayerState

Current media playback state.

savedPlayerState

nullable {mediaInfo: nullable chrome.cast.media.PlayerState, currentTime: number, isPaused: boolean}

Remote player state saved when the session has disconnected. Can be used to continue playing locally from same location on disconnect event.

statusText

string

Descriptive text for the current application content.

title

nullable string

Current media title.

volumeLevel

number

The current receiver volume level as a value between 0.0 and 1.0. 1.0 is the maximum volume possible on the receiver or stream. In order to change receiver volume, change this value and call cast.framework.RemotePlayerController#setVolumeLevel.