Class: Track

Constructor

Track

new Track(trackId, trackType)

Parameter

trackId

number

Unique identifier of the track within the context of a chrome.cast.media.MediaInfo object.

trackType

chrome.cast.media.TrackType

The type of track.

Value must not be null.

Properties

customData

nullable Object

Custom application data.

language

nullable string

Language tag as per RFC 5646. Mandatory when the subtype is SUBTITLES.

name

nullable string

A descriptive, human-readable name for the track. For example, “Spanish”. This can be used by the sender UI for example, to create a selection dialog. If the name is empty the dialog would contain an empty slot.

subtype

nullable chrome.cast.media.TextTrackType

For text tracks, the type of text track.

trackContentId

nullable string

Identifier of the track’s content. It can be the URL of the track or any other identifier that allows the receiver to find the content (when the track is not inband or included in the manifest). For example it can be the URL of a vtt file.

trackContentType

nullable string

The MIME type of the track content. For example if the track is a vtt file it will be ‘text/vtt’. This field is needed for out of band tracks, so it is usually provided if a trackContentId has also been provided. It is not mandatory if the receiver has a way to identify the content from the trackContentId, but recommended. The track content type, if provided, must be consistent with the track type.

trackId

number

Unique identifier of the track within the context of a chrome.cast.media.MediaInfo object.

type

non-null chrome.cast.media.TrackType

The type of track.