# cast.[framework](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework).[ui](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui).PlayerData

class static

Player data. Provide the player media and break state.

## Constructor

### PlayerData

new
PlayerData()

## Properties

### activeTrackIds

non-null Array of number

Active track ids of current media.

### applicationData

nullable [cast.framework.ui.ApplicationData](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui.ApplicationData)

Application data.

### breakPercentagePositions

non-null Array of number

Array of breaks positions in percentage.
Deprecated - is not updated for breaks in live or dynamic breaks.

Deprecated
:   Use the \`breaks\` property of
    [cast.framework.ui.PlayerData#media](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui.PlayerData#media) instead.

### breakTitle

string

Title of the current playing break.

### currentBreakClipNumber

number

The number of the current playing break clip in the break.

### currentTime

number

Media current position in seconds, or break current position if playing
break.

### customState

nullable Object

User custom state, Should be used to separate playback and UI logic,
to allow same UI code to run in a remote control.
The state can be set by calling
[cast.framework.PlayerManager#sendCustomState](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.PlayerManager#sendCustomState)

### displayStatus

boolean

Whether the player metadata (ie: title, currentTime) should be displayed.
This will be true if at least one field in the metadata should be
displayed. In some cases, displayStatus will be true, but parts of the
metadata should be hidden (ie: the media title while media is seeking).
In these cases, additional css can be applied to hide those elements. For
cases where the media is audio-only, this will almost always be true. In
cases where the media is video, this will be true when: (1) the video is
loading, buffering, or seeking (2) a play request was made in the last
five seconds while media is already playing, (3) there is a request made
to show the status in the last five seconds, or (4) the media was paused
in the last five seconds.

### displayType

string

Property to differentiate between different screen types. TV is default.

### duration

number

Media duration in seconds, Or break duration if playing break.

### isAtLiveEdge

boolean

Indicate if the media stream is playing at live edge.

### isBreakExpanded

boolean

Indicate that the receiver is playing an expanded break. This is only
relevant for dynamic breaks.

### isBreakSkippable

boolean

Indicate that break clip can be skipped at the current moment. True when
whenSkippable == 0.

### isLive

boolean

Indicate if the content is a live stream.

### isPlayingBreak

boolean

Indicate that the receiver is playing a break.

### isSeeking

boolean

Indicate the player is seeking (can be either during playing or pausing).

### liveSeekableRange

nullable [cast.framework.messages.LiveSeekableRange](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.LiveSeekableRange)

Indicate the seekable range of the content if it is a live stream.

### media

(nullable [cast.framework.messages.MediaInformation](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.MediaInformation) or undefined)

Current media information.

### mediaCategory

nullable [cast.framework.messages.MediaCategory](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.MediaCategory)

The media category (video, audio, or image).

### mediaSessionId

number

Unique id for media session. It is updated when a new load request
is received.

### mediaStartAbsoluteTime

nullable number

Indicates absolute time (Epoch time in seconds) for live streams.
For live event it would be the time the event started, otherwise
it will be start of the seekable range when the streaming started.

### metadata

(nullable [cast.framework.messages.MediaMetadata](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.MediaMetadata) or nullable Object)

Media metadata.

### nextMetadata

(nullable [cast.framework.messages.MediaMetadata](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.MediaMetadata) or nullable Object)

Next item metadata.

### nextSubtitle

string

Next Item subtitle.

### nextThumbnailUrl

string

Next Item thumbnail url.

### nextTitle

string

Next Item title.

### numberBreakClips

number

Number of break clips in current break.

### playbackRate

number

Media playback rate.

### preloadingNext

boolean

Flag to show/hide next item metadata.

### queueData

(nullable [cast.framework.messages.QueueData](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.QueueData) or undefined)

Queue data.

### secondaryImageUrl

string

Content secondary image url.

### sectionDuration

nullable number

Indicate the section duration in seconds.

### sectionStartTimeInMedia

nullable number

Indicate the section start time, in media time in seconds.

### state

[cast.framework.ui.State](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.State)

Current player state.

### supportedMediaCommands

number

The commands supported by this player.

See also
:   [cast.framework.messages.Command](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.Command)

### thumbnailUrl

string

Content thumbnail url.

### title

string

Content title.

### whenSkippable

(number or undefined)

Provide the time remaining till a break will become skippable relative
to current playback time. Undefined or a negative value if break is not
skippable.