cast.receiver. media
Cast receiver media namespace.
Classes
AudiobookChapterMediaMetadata
An audiobook chapter description.
AudiobookContainerMetadata
An audiobook container description.
Break
Represents a break (e.g. ad break) included in the main video.
BreakClip
Represents a break clip (e.g. a clip of ad during ad break)
BreakStatus
Represents current status of break.
CloudMediaStatus
Cloud media status. Media status that is only sent to the cloud sender.
ContainerMetadata
Common container metadata used as part of QueueData.
ContentRating
Content rating (parental rating, maturity rating).
ExtendedMediaStatus
Extended media status information
GenericMediaMetadata
A generic media description.
Image
An image that describes a receiver application or media item. This could be an application icon, cover art, or a thumbnail.
ItemsInfo
Represents a data message containing item information for each requested ids.
LiveSeekableRange
Provides the live seekable range with start and end time in seconds.
LoadOptions
Provides additional options for load requests.
MediaInformation
Represents the media information.
MediaMetadata
Common media metadata used as part of MediaInformation or to describe a media section as part of the container metadata.
MediaStatus
Represents the status of a media session.
MovieMediaMetadata
A movie media description.
MusicTrackMediaMetadata
A music track media description.
PhotoMediaMetadata
A photo media description.
QueueChange
Represents a queue change message, such as insert, remove, and update.
QueueData
Queue data as part of the LOAD request.
QueueIds
Represents a data message containing the full list of queue ids.
QueueItem
Queue item information. Application developers may need to create a QueueItem to insert a queue element using cast.receiver.MediaManager#InsertQueueItems. In this case they should not provide an itemId (as the actual itemId will be assigned when the item is inserted in the queue). This prevents ID collisions with items added from a sender app.
SeekableRange
Provides seekable range in seconds.
TextTrackStyle
Describes style information for a text track.
Track
Describes track metadata information.
TracksInfo
Tracks information.
TvShowMediaMetadata
A TV episode media description.
UserActionState
Represent User Action state for media.
VastAdsRequest
VAST ad request configuration.
VideoInformation
Video information such as video resolution and High Dynamic Range (HDR).
Volume
Represents the volume of a media session stream.
Interface
Player
Enumerations
CaptionMimeType
string
Possible caption mimetype of text track.
Value |
|
---|---|
CEA608 |
CEA 608 |
TTML |
TTML |
VTT |
VTT |
TTML_MP4 |
TTML MP4 |
Command
number
Commands supported by cast.receiver.media.MediaStatus#supportedMediaCommands.
Value |
|
---|---|
PAUSE |
Pause Command. |
SEEK |
Seek Command. |
STREAM_VOLUME |
Stream Volume Command. |
STREAM_MUTE |
Stream Volume Command. |
ALL_BASIC_MEDIA |
All basic media. Includes the mandatory commands and PAUSE, SEEK, STREAM_VOLUME, STREAM_MUTE. EDIT_TRACKS, PLAYBACK_RATE |
QUEUE_NEXT |
Queue Next Command. |
QUEUE_PREV |
Queue Prev Command. |
QUEUE_SHUFFLE |
Queue Shuffle Command. |
QUEUE_REPEAT_ALL |
Queue Repeat All mode. |
QUEUE_REPEAT_ONE |
Queue Repeat One mode. |
QUEUE_REPEAT |
Queue Repeat modes. |
SKIP_AD |
Skip AD Command. |
EDIT_TRACKS |
Edit tracks Commands. |
PLAYBACK_RATE |
Pleyback Rate Command. |
LIKE |
User action Like command. |
DISLIKE |
User action Dislike command. |
FOLLOW |
User action Follow command. |
UNFOLLOW |
User action Unfollow command. |
ContainerType
number
Possible types of container metadata.
Value |
|
---|---|
GENERIC_CONTAINER |
Generic template suitable for most media types. Used by cast.receiver.media.ContainerMetadata. |
AUDIOBOOK_CONTAINER |
Metadata for an audiobook. Used by cast.receiver.media.AudiobookContainerMetadata. |
- See also
- cast.receiver.media.QueueData.containerMetadata
ContentFilteringMode
string
Provides content filtering mode.
Value |
|
---|---|
FILTER_EXPLICIT |
Do not play explicit content. |
ErrorReason
string
Represents media error message reasons.
Value |
|
---|---|
INVALID_COMMAND |
Returned when the command is not valid. |
INVALID_PARAMS |
Returned when the params are not valid or a non optional param is missing. |
INVALID_MEDIA_SESSION_ID |
Returned when the media session does not exist. |
SKIP_LIMIT_REACHED |
Returned when cannot skip more items due to reaching skip limit. |
NOT_SUPPORTED |
Returned when the request is not supported by the application. |
LANGUAGE_NOT_SUPPORTED |
Returned when the requested language is not supported. |
END_OF_QUEUE |
Returned when skip is not possible due to going back beyond the first item or forward beyond the last item in the queue. |
DUPLICATE_REQUEST_ID |
Returned when the request ID is not unique (the receiver is processing a request with the same ID). |
VIDEO_DEVICE_REQUIRED |
Returned when the request cannot be completed because a video-capable device is required. |
PREMIUM_ACCOUNT_REQUIRED |
Returned when the request cannot be completed because a premium account is required. |
ErrorType
string
Represents media error message types.
Value |
|
---|---|
INVALID_PLAYER_STATE |
Returned when the player state is invalid to fulfill the request. |
LOAD_FAILED |
Returned when the LOAD request failed. |
LOAD_CANCELLED |
Returned when the LOAD request is cancelled by a second incoming LOAD request. |
INVALID_REQUEST |
Returned when the request is not valid. |
ERROR |
Generic error, for any other error case. |
ExtendedPlayerState
string
Extended player state information.
Value |
|
---|---|
LOADING |
The player is in LOADING state. |
GetStatusOptions
number
The Get Status flag options determine the amount of data that must be included in the media status response.
Value |
|
---|---|
NO_METADATA |
Do not include metadsta flag. |
NO_QUEUE_ITEMS |
Do not include the queue items flag. |
HdrType
string
Represents video High Dynamic Range (HDR) types.
Value |
|
---|---|
SDR |
Standard Dynamic Range. |
HDR |
High Dynamic Range. |
DV |
Dolby Vision. |
HlsSegmentFormat
string
Format of an HLS audio segment.
Value |
|
---|---|
AAC |
|
AC3 |
|
MP3 |
|
TS |
|
TS_AAC |
|
E_AC3 |
|
FMP4 |
HlsVideoSegmentFormat
string
Format of HLS video segment.
Value |
|
---|---|
MPEG2_TS |
MPEG2 TS format. |
FMP4 |
Fragmented MP4. |
IdleReason
string
The reason for the player to be in IDLE state.
Value |
|
---|---|
CANCELLED |
A sender requested to stop playback using the STOP command. |
INTERRUPTED |
A sender requested playing a different media using the LOAD command. |
FINISHED |
The media playback completed. |
ERROR |
The media was interrupted due to an error, this could happen if, for example, the player could not download media due to networking errors. |
MediaCategory
string
The media category.
Value |
|
---|---|
AUDIO |
Media is audio only. |
VIDEO |
Media is video and audio (the default). |
IMAGE |
Media is a picture. |
MessageType
string
Represents media message types.
MetadataType
number
Possible types of media metadata.
Value |
|
---|---|
GENERIC |
Generic template suitable for most media types. Used by cast.receiver.media.GenericMediaMetadata. |
MOVIE |
A full length movie. Used by cast.receiver.media.MovieMediaMetadata. |
TV_SHOW |
An episode of a TV series. Used by cast.receiver.media.TvShowMediaMetadata. |
MUSIC_TRACK |
A music track. Used by cast.receiver.media.MusicTrackMediaMetadata. |
PHOTO |
Photo. Used by cast.receiver.media.PhotoMediaMetadata. |
AUDIOBOOK_CHAPTER |
Audiobook chapter. Used by cast.receiver.media.AudiobookChapterMediaMetadata. |
- See also
- cast.receiver.media.MediaInformation.metadata
PlayerState
string
Represents the player state.
Value |
|
---|---|
IDLE |
The player is in IDLE state. |
PLAYING |
The player is in PLAYING state. |
PAUSED |
The player is in PAUSED state. |
BUFFERING |
The player is in BUFFERING state. |
QueueChangeType
string
Queue change types used by QUEUE_CHANGE outgoing message.
Value |
|
---|---|
INSERT |
Queue had items inserted. |
REMOVE |
Queue had items removed. |
ITEMS_CHANGE |
A list of items changed. |
UPDATE |
The queue went through an update and a new ordered list is sent. |
NO_CHANGE |
The queue had no change. This is used to echo back when multiple senders ended up requesting the same data. |
QueueType
string
Types of media container/queue.
Value |
|
---|---|
ALBUM |
Music album. |
PLAYLIST |
Music playlist, such as private playlist, public playlist, auto-generated playlist, etc. |
AUDIOBOOK |
Audiobook. |
RADIO_STATION |
Traditional radio station. |
PODCAST_SERIES |
Podcast series. |
TV_SERIES |
TV Series. |
VIDEO_PLAYLIST |
Videos playlist. |
LIVE_TV |
Live TV channel. |
MOVIE |
Movie. |
RepeatMode
string
Behavior of the queue when all items have been played.
Value |
|
---|---|
REPEAT_OFF |
When the queue is completed the media session is terminated. |
REPEAT_ALL |
All the items in the queue will be played indefinitely, when the last item is played it will play the first item again. |
REPEAT_SINGLE |
The current item will be played repeatedly. |
REPEAT_ALL_AND_SHUFFLE |
All the items in the queue will be played indefinitely, when the last item is played it will play the first item again (the list will be shuffled by the receiver first). |
SeekResumeState
string
Represents the playback state after a SEEK request.
Value |
|
---|---|
PLAYBACK_START |
It will force media to start. |
PLAYBACK_PAUSE |
It will force media to pause. |
StreamingProtocolType
number
The streaming protocol types.
Value |
|
---|---|
UNKNOWN |
Unknown streaming protocol type. |
MPEG_DASH |
MPEG-DASH (Dynamic Adaptive Streaming over HTTP) protocol type. |
HLS |
HLS (Http Live Streaming) protocol type. |
SMOOTH_STREAMING |
Smooth Streaming protocol type. |
StreamType
string
Represents the stream types.
Value |
|
---|---|
BUFFERED |
|
LIVE |
|
NONE |
TextTrackEdgeType
string
Possible text track edge type.
Value |
|
---|---|
NONE |
|
OUTLINE |
|
DROP_SHADOW |
|
RAISED |
|
DEPRESSED |
TextTrackFontGenericFamily
string
Text track font generic family.
Value |
|
---|---|
SANS_SERIF |
|
MONOSPACED_SANS_SERIF |
|
SERIF |
|
MONOSPACED_SERIF |
|
CASUAL |
|
CURSIVE |
|
SMALL_CAPITALS |
TextTrackFontStyle
string
Possible text track font style.
Value |
|
---|---|
NORMAL |
|
BOLD |
|
BOLD_ITALIC |
|
ITALIC |
TextTrackType
string
Possible text track type (follows the HTML5 text track type definitions).
Value |
|
---|---|
SUBTITLES |
Transcription or translation of the dialogue, suitable for when the sound is available but not understood (e.g. because the user does not understand the language of the media resource's soundtrack). |
CAPTIONS |
Transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information, suitable for when the soundtrack is unavailable (e.g. because it is muted or because the user is deaf). Displayed over the video; labeled as appropriate for the hard-of-hearing. |
DESCRIPTIONS |
Textual descriptions of the video component of the media resource, intended for audio synthesis when the visual component is unavailable (e.g. because the user is interacting with the application without a screen, or because the user is blind). Synthesized as separate audio track. |
CHAPTERS |
Chapter titles, intended to be used for navigating the media resource. |
METADATA |
Tracks intended for use from script. |
TextTrackWindowType
string
Text track window type.
Value |
|
---|---|
NONE |
|
NORMAL |
|
ROUNDED_CORNERS |
TrackType
string
Possible media track type.
Value |
|
---|---|
TEXT |
Text track. |
AUDIO |
Audio track. |
VIDEO |
Video track. |
UserAction
string
User actions.
Value |
|
---|---|
LIKE |
User indicates a like preference for the currently playing content. |
DISLIKE |
User indicates a dislike preference for the currently playing content. |
FOLLOW |
User wants to follow or star currently playing content. |
UNFOLLOW |
User wants to stop following currently playing content. |
Properties
CaptionMimeType
string
Possible caption mimetype of text track.
Value |
|
---|---|
CEA608 |
CEA 608 |
TTML |
TTML |
VTT |
VTT |
TTML_MP4 |
TTML MP4 |
Command
number
Commands supported by cast.receiver.media.MediaStatus#supportedMediaCommands.
Value |
|
---|---|
PAUSE |
Pause Command. |
SEEK |
Seek Command. |
STREAM_VOLUME |
Stream Volume Command. |
STREAM_MUTE |
Stream Volume Command. |
ALL_BASIC_MEDIA |
All basic media. Includes the mandatory commands and PAUSE, SEEK, STREAM_VOLUME, STREAM_MUTE. EDIT_TRACKS, PLAYBACK_RATE |
QUEUE_NEXT |
Queue Next Command. |
QUEUE_PREV |
Queue Prev Command. |
QUEUE_SHUFFLE |
Queue Shuffle Command. |
QUEUE_REPEAT_ALL |
Queue Repeat All mode. |
QUEUE_REPEAT_ONE |
Queue Repeat One mode. |
QUEUE_REPEAT |
Queue Repeat modes. |
SKIP_AD |
Skip AD Command. |
EDIT_TRACKS |
Edit tracks Commands. |
PLAYBACK_RATE |
Pleyback Rate Command. |
LIKE |
User action Like command. |
DISLIKE |
User action Dislike command. |
FOLLOW |
User action Follow command. |
UNFOLLOW |
User action Unfollow command. |
ContainerType
number
Possible types of container metadata.
Value |
|
---|---|
GENERIC_CONTAINER |
Generic template suitable for most media types. Used by cast.receiver.media.ContainerMetadata. |
AUDIOBOOK_CONTAINER |
Metadata for an audiobook. Used by cast.receiver.media.AudiobookContainerMetadata. |
- See also
- cast.receiver.media.QueueData.containerMetadata
ContentFilteringMode
string
Provides content filtering mode.
Value |
|
---|---|
FILTER_EXPLICIT |
Do not play explicit content. |
ErrorReason
string
Represents media error message reasons.
Value |
|
---|---|
INVALID_COMMAND |
Returned when the command is not valid. |
INVALID_PARAMS |
Returned when the params are not valid or a non optional param is missing. |
INVALID_MEDIA_SESSION_ID |
Returned when the media session does not exist. |
SKIP_LIMIT_REACHED |
Returned when cannot skip more items due to reaching skip limit. |
NOT_SUPPORTED |
Returned when the request is not supported by the application. |
LANGUAGE_NOT_SUPPORTED |
Returned when the requested language is not supported. |
END_OF_QUEUE |
Returned when skip is not possible due to going back beyond the first item or forward beyond the last item in the queue. |
DUPLICATE_REQUEST_ID |
Returned when the request ID is not unique (the receiver is processing a request with the same ID). |
VIDEO_DEVICE_REQUIRED |
Returned when the request cannot be completed because a video-capable device is required. |
PREMIUM_ACCOUNT_REQUIRED |
Returned when the request cannot be completed because a premium account is required. |
ErrorType
string
Represents media error message types.
Value |
|
---|---|
INVALID_PLAYER_STATE |
Returned when the player state is invalid to fulfill the request. |
LOAD_FAILED |
Returned when the LOAD request failed. |
LOAD_CANCELLED |
Returned when the LOAD request is cancelled by a second incoming LOAD request. |
INVALID_REQUEST |
Returned when the request is not valid. |
ERROR |
Generic error, for any other error case. |
ExtendedPlayerState
string
Extended player state information.
Value |
|
---|---|
LOADING |
The player is in LOADING state. |
GetStatusOptions
number
The Get Status flag options determine the amount of data that must be included in the media status response.
Value |
|
---|---|
NO_METADATA |
Do not include metadsta flag. |
NO_QUEUE_ITEMS |
Do not include the queue items flag. |
HdrType
string
Represents video High Dynamic Range (HDR) types.
Value |
|
---|---|
SDR |
Standard Dynamic Range. |
HDR |
High Dynamic Range. |
DV |
Dolby Vision. |
HlsSegmentFormat
string
Format of an HLS audio segment.
Value |
|
---|---|
AAC |
|
AC3 |
|
MP3 |
|
TS |
|
TS_AAC |
|
E_AC3 |
|
FMP4 |
HlsVideoSegmentFormat
string
Format of HLS video segment.
Value |
|
---|---|
MPEG2_TS |
MPEG2 TS format. |
FMP4 |
Fragmented MP4. |
IdleReason
string
The reason for the player to be in IDLE state.
Value |
|
---|---|
CANCELLED |
A sender requested to stop playback using the STOP command. |
INTERRUPTED |
A sender requested playing a different media using the LOAD command. |
FINISHED |
The media playback completed. |
ERROR |
The media was interrupted due to an error, this could happen if, for example, the player could not download media due to networking errors. |
MEDIA_NAMESPACE
string
The media namespace.
MediaCategory
string
The media category.
Value |
|
---|---|
AUDIO |
Media is audio only. |
VIDEO |
Media is video and audio (the default). |
IMAGE |
Media is a picture. |
MessageType
string
Represents media message types.
MetadataType
number
Possible types of media metadata.
Value |
|
---|---|
GENERIC |
Generic template suitable for most media types. Used by cast.receiver.media.GenericMediaMetadata. |
MOVIE |
A full length movie. Used by cast.receiver.media.MovieMediaMetadata. |
TV_SHOW |
An episode of a TV series. Used by cast.receiver.media.TvShowMediaMetadata. |
MUSIC_TRACK |
A music track. Used by cast.receiver.media.MusicTrackMediaMetadata. |
PHOTO |
Photo. Used by cast.receiver.media.PhotoMediaMetadata. |
AUDIOBOOK_CHAPTER |
Audiobook chapter. Used by cast.receiver.media.AudiobookChapterMediaMetadata. |
- See also
- cast.receiver.media.MediaInformation.metadata
PlayerState
string
Represents the player state.
Value |
|
---|---|
IDLE |
The player is in IDLE state. |
PLAYING |
The player is in PLAYING state. |
PAUSED |
The player is in PAUSED state. |
BUFFERING |
The player is in BUFFERING state. |
QueueChangeType
string
Queue change types used by QUEUE_CHANGE outgoing message.
Value |
|
---|---|
INSERT |
Queue had items inserted. |
REMOVE |
Queue had items removed. |
ITEMS_CHANGE |
A list of items changed. |
UPDATE |
The queue went through an update and a new ordered list is sent. |
NO_CHANGE |
The queue had no change. This is used to echo back when multiple senders ended up requesting the same data. |
QueueType
string
Types of media container/queue.
Value |
|
---|---|
ALBUM |
Music album. |
PLAYLIST |
Music playlist, such as private playlist, public playlist, auto-generated playlist, etc. |
AUDIOBOOK |
Audiobook. |
RADIO_STATION |
Traditional radio station. |
PODCAST_SERIES |
Podcast series. |
TV_SERIES |
TV Series. |
VIDEO_PLAYLIST |
Videos playlist. |
LIVE_TV |
Live TV channel. |
MOVIE |
Movie. |
RepeatMode
string
Behavior of the queue when all items have been played.
Value |
|
---|---|
REPEAT_OFF |
When the queue is completed the media session is terminated. |
REPEAT_ALL |
All the items in the queue will be played indefinitely, when the last item is played it will play the first item again. |
REPEAT_SINGLE |
The current item will be played repeatedly. |
REPEAT_ALL_AND_SHUFFLE |
All the items in the queue will be played indefinitely, when the last item is played it will play the first item again (the list will be shuffled by the receiver first). |
SeekResumeState
string
Represents the playback state after a SEEK request.
Value |
|
---|---|
PLAYBACK_START |
It will force media to start. |
PLAYBACK_PAUSE |
It will force media to pause. |
StreamingProtocolType
number
The streaming protocol types.
Value |
|
---|---|
UNKNOWN |
Unknown streaming protocol type. |
MPEG_DASH |
MPEG-DASH (Dynamic Adaptive Streaming over HTTP) protocol type. |
HLS |
HLS (Http Live Streaming) protocol type. |
SMOOTH_STREAMING |
Smooth Streaming protocol type. |
StreamType
string
Represents the stream types.
Value |
|
---|---|
BUFFERED |
|
LIVE |
|
NONE |
TextTrackEdgeType
string
Possible text track edge type.
Value |
|
---|---|
NONE |
|
OUTLINE |
|
DROP_SHADOW |
|
RAISED |
|
DEPRESSED |
TextTrackFontGenericFamily
string
Text track font generic family.
Value |
|
---|---|
SANS_SERIF |
|
MONOSPACED_SANS_SERIF |
|
SERIF |
|
MONOSPACED_SERIF |
|
CASUAL |
|
CURSIVE |
|
SMALL_CAPITALS |
TextTrackFontStyle
string
Possible text track font style.
Value |
|
---|---|
NORMAL |
|
BOLD |
|
BOLD_ITALIC |
|
ITALIC |
TextTrackType
string
Possible text track type (follows the HTML5 text track type definitions).
Value |
|
---|---|
SUBTITLES |
Transcription or translation of the dialogue, suitable for when the sound is available but not understood (e.g. because the user does not understand the language of the media resource's soundtrack). |
CAPTIONS |
Transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information, suitable for when the soundtrack is unavailable (e.g. because it is muted or because the user is deaf). Displayed over the video; labeled as appropriate for the hard-of-hearing. |
DESCRIPTIONS |
Textual descriptions of the video component of the media resource, intended for audio synthesis when the visual component is unavailable (e.g. because the user is interacting with the application without a screen, or because the user is blind). Synthesized as separate audio track. |
CHAPTERS |
Chapter titles, intended to be used for navigating the media resource. |
METADATA |
Tracks intended for use from script. |
TextTrackWindowType
string
Text track window type.
Value |
|
---|---|
NONE |
|
NORMAL |
|
ROUNDED_CORNERS |
TrackType
string
Possible media track type.
Value |
|
---|---|
TEXT |
Text track. |
AUDIO |
Audio track. |
VIDEO |
Video track. |
UserAction
string
User actions.
Value |
|
---|---|
LIKE |
User indicates a like preference for the currently playing content. |
DISLIKE |
User indicates a dislike preference for the currently playing content. |
FOLLOW |
User wants to follow or star currently playing content. |
UNFOLLOW |
User wants to stop following currently playing content. |