Namespace: media

Classes

Namespace

Enumerations

ContainerType

static

number

Possible types of container metadata.

Value

GENERIC_CONTAINER

number

Generic template suitable for most media types. Used by chrome.cast.media.ContainerMetadata.

AUDIOBOOK_CONTAINER

number

Metadata for an audiobook. Used by chrome.cast.media.AudiobookContainerMetadata.

See also
chrome.cast.media.QueueData.containerMetadata

HdrType

static

string

Represents video High Dynamic Range (HDR) types.

Value

SDR

string

Standard Dynamic Range.

HDR

string

High Dynamic Range.

DV

string

Dolby Vision.

HlsSegmentFormat

static

string

Format of an HLS audio segment.

Value

AAC

string

AC3

string

MP3

string

TS

string

TS_AAC

string

E_AC3

string

FMP4

string

HlsVideoSegmentFormat

static

string

Format of HLS video segment.

Value

MPEG2_TS

string

MPEG2 TS format.

FMP4

string

Fragmented MP4.

IdleReason

static

string

Possible reason why a media is idle.

Value

CANCELLED

string

A sender requested to stop playback using the STOP command.

INTERRUPTED

string

A sender requested playing a different media using the LOAD command.

FINISHED

string

The media playback completed.

ERROR

string

The media was interrupted due to an error, this could be for example if the player could not download media due to networking errors.

MediaCommand

static

string

Possible media commands supported by the receiver application.

Value

PAUSE

string

SEEK

string

STREAM_VOLUME

string

STREAM_MUTE

string

MetadataType

static

number

Possible types of media metadata.

Value

GENERIC

number

Generic template suitable for most media types. Used by chrome.cast.media.GenericMediaMetadata.

MOVIE

number

A full length movie. Used by chrome.cast.media.MovieMediaMetadata.

TV_SHOW

number

An episode of a TV series. Used by chrome.cast.media.TvShowMediaMetadata.

MUSIC_TRACK

number

A music track. Used by chrome.cast.media.MusicTrackMediaMetadata.

PHOTO

number

Photo. Used by chrome.cast.media.PhotoMediaMetadata.

AUDIOBOOK_CHAPTER

number

Audiobook chapter. Used by chrome.cast.media.AudiobookChapterMediaMetadata.

PlayerState

static

string

Possible states of the media player.

Value

IDLE

string

No media is loaded into the player.

PLAYING

string

The media is playing.

PAUSED

string

The media is not playing.

BUFFERING

string

Player is in PLAY mode but not actively playing content. currentTime will not change.

QueueType

static

string

Types of media container/queue.

Value

ALBUM

string

Music album.

PLAYLIST

string

Music playlist, such as private playlist, public playlist, auto-generated playlist, etc.

AUDIOBOOK

string

Audiobook.

RADIO_STATION

string

Traditional radio station.

PODCAST_SERIES

string

Podcast series.

TV_SERIES

string

TV Series.

VIDEO_PLAYLIST

string

Videos playlist.

LIVE_TV

string

Live TV channel.

MOVIE

string

Movie.

RepeatMode

static

string

Possible states of queue repeat mode.

Value

OFF

string

Items are played in order, and when the queue is completed (the last item has ended) the media session is terminated.

ALL

string

The items in the queue will be played indefinitely. When the last item has ended, the first item will be played again.

SINGLE

string

The current item will be repeated indefinitely.

ALL_AND_SHUFFLE

string

The items in the queue will be played indefinitely. When the last item has ended, the list of items will be randomly shuffled by the receiver, and the queue will continue to play starting from the first item of the shuffled items.

ResumeState

static

string

States of the media player after resuming.

Value

PLAYBACK_START

string

Force media to start.

PLAYBACK_PAUSE

string

Force media to pause.

StreamType

static

string

Possible media stream types.

Value

BUFFERED

string

Stored media streamed from an existing data store.

LIVE

string

Live media generated on the fly.

OTHER

string

None of the above.

TextTrackEdgeType

static

string

Possible text track edge types.

Value

NONE

string

OUTLINE

string

DROP_SHADOW

string

RAISED

string

DEPRESSED

string

TextTrackFontGenericFamily

static

string

Possible text track font generic family.

Value

SANS_SERIF

string

MONOSPACED_SANS_SERIF

string

SERIF

string

MONOSPACED_SERIF

string

CASUAL

string

CURSIVE

string

SMALL_CAPITALS

string

TextTrackFontStyle

static

string

Possible text track font style.

Value

NORMAL

string

BOLD

string

BOLD_ITALIC

string

ITALIC

string

TextTrackType

static

string

Possible text track types.

Value

SUBTITLES

string

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

string

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

string

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

string

Chapter titles, intended to be used for navigating the media resource.

METADATA

string

Tracks intended for use from script.

TextTrackWindowType

static

string

Possible text track window types.

Value

NONE

string

NORMAL

string

ROUNDED_CORNERS

string

TrackType

static

string

Possible media track types.

Value

TEXT

string

AUDIO

string

VIDEO

string

UserAction

static

string

User actions.

Value

LIKE

string

User indicates a like preference for the currently playing content.

DISLIKE

string

User indicates a dislike preference for the currently playing content.

FOLLOW

string

User wants to follow or star currently playing content.

UNFOLLOW

string

User wants to stop following currently playing content.

Properties

ContainerType

static

number

Possible types of container metadata.

Value

GENERIC_CONTAINER

number

Generic template suitable for most media types. Used by chrome.cast.media.ContainerMetadata.

AUDIOBOOK_CONTAINER

number

Metadata for an audiobook. Used by chrome.cast.media.AudiobookContainerMetadata.

See also
chrome.cast.media.QueueData.containerMetadata

DEFAULT_MEDIA_RECEIVER_APP_ID

constant   static

string

The app ID of the default media player.

HdrType

static

string

Represents video High Dynamic Range (HDR) types.

Value

SDR

string

Standard Dynamic Range.

HDR

string

High Dynamic Range.

DV

string

Dolby Vision.

HlsSegmentFormat

static

string

Format of an HLS audio segment.

Value

AAC

string

AC3

string

MP3

string

TS

string

TS_AAC

string

E_AC3

string

FMP4

string

HlsVideoSegmentFormat

static

string

Format of HLS video segment.

Value

MPEG2_TS

string

MPEG2 TS format.

FMP4

string

Fragmented MP4.

IdleReason

static

string

Possible reason why a media is idle.

Value

CANCELLED

string

A sender requested to stop playback using the STOP command.

INTERRUPTED

string

A sender requested playing a different media using the LOAD command.

FINISHED

string

The media playback completed.

ERROR

string

The media was interrupted due to an error, this could be for example if the player could not download media due to networking errors.

MediaCommand

static

string

Possible media commands supported by the receiver application.

Value

PAUSE

string

SEEK

string

STREAM_VOLUME

string

STREAM_MUTE

string

MetadataType

static

number

Possible types of media metadata.

Value

GENERIC

number

Generic template suitable for most media types. Used by chrome.cast.media.GenericMediaMetadata.

MOVIE

number

A full length movie. Used by chrome.cast.media.MovieMediaMetadata.

TV_SHOW

number

An episode of a TV series. Used by chrome.cast.media.TvShowMediaMetadata.

MUSIC_TRACK

number

A music track. Used by chrome.cast.media.MusicTrackMediaMetadata.

PHOTO

number

Photo. Used by chrome.cast.media.PhotoMediaMetadata.

AUDIOBOOK_CHAPTER

number

Audiobook chapter. Used by chrome.cast.media.AudiobookChapterMediaMetadata.

PlayerState

static

string

Possible states of the media player.

Value

IDLE

string

No media is loaded into the player.

PLAYING

string

The media is playing.

PAUSED

string

The media is not playing.

BUFFERING

string

Player is in PLAY mode but not actively playing content. currentTime will not change.

QueueType

static

string

Types of media container/queue.

Value

ALBUM

string

Music album.

PLAYLIST

string

Music playlist, such as private playlist, public playlist, auto-generated playlist, etc.

AUDIOBOOK

string

Audiobook.

RADIO_STATION

string

Traditional radio station.

PODCAST_SERIES

string

Podcast series.

TV_SERIES

string

TV Series.

VIDEO_PLAYLIST

string

Videos playlist.

LIVE_TV

string

Live TV channel.

MOVIE

string

Movie.

RepeatMode

static

string

Possible states of queue repeat mode.

Value

OFF

string

Items are played in order, and when the queue is completed (the last item has ended) the media session is terminated.

ALL

string

The items in the queue will be played indefinitely. When the last item has ended, the first item will be played again.

SINGLE

string

The current item will be repeated indefinitely.

ALL_AND_SHUFFLE

string

The items in the queue will be played indefinitely. When the last item has ended, the list of items will be randomly shuffled by the receiver, and the queue will continue to play starting from the first item of the shuffled items.

ResumeState

static

string

States of the media player after resuming.

Value

PLAYBACK_START

string

Force media to start.

PLAYBACK_PAUSE

string

Force media to pause.

StreamType

static

string

Possible media stream types.

Value

BUFFERED

string

Stored media streamed from an existing data store.

LIVE

string

Live media generated on the fly.

OTHER

string

None of the above.

TextTrackEdgeType

static

string

Possible text track edge types.

Value

NONE

string

OUTLINE

string

DROP_SHADOW

string

RAISED

string

DEPRESSED

string

TextTrackFontGenericFamily

static

string

Possible text track font generic family.

Value

SANS_SERIF

string

MONOSPACED_SANS_SERIF

string

SERIF

string

MONOSPACED_SERIF

string

CASUAL

string

CURSIVE

string

SMALL_CAPITALS

string

TextTrackFontStyle

static

string

Possible text track font style.

Value

NORMAL

string

BOLD

string

BOLD_ITALIC

string

ITALIC

string

TextTrackType

static

string

Possible text track types.

Value

SUBTITLES

string

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

string

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

string

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

string

Chapter titles, intended to be used for navigating the media resource.

METADATA

string

Tracks intended for use from script.

TextTrackWindowType

static

string

Possible text track window types.

Value

NONE

string

NORMAL

string

ROUNDED_CORNERS

string

TrackType

static

string

Possible media track types.

Value

TEXT

string

AUDIO

string

VIDEO

string

UserAction

static

string

User actions.

Value

LIKE

string

User indicates a like preference for the currently playing content.

DISLIKE

string

User indicates a dislike preference for the currently playing content.

FOLLOW

string

User wants to follow or star currently playing content.

UNFOLLOW

string

User wants to stop following currently playing content.