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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003e\u003ccode\u003echrome.cast.media.Track\u003c/code\u003e describes metadata information for media tracks, like audio, video, or subtitles.\u003c/p\u003e\n"],["\u003cp\u003eTracks are uniquely identified within media by a \u003ccode\u003etrackId\u003c/code\u003e and categorized by a \u003ccode\u003etrackType\u003c/code\u003e (e.g., AUDIO, VIDEO, TEXT).\u003c/p\u003e\n"],["\u003cp\u003eImportant properties include \u003ccode\u003elanguage\u003c/code\u003e, \u003ccode\u003ename\u003c/code\u003e, and \u003ccode\u003esubtype\u003c/code\u003e for describing the track's characteristics.\u003c/p\u003e\n"],["\u003cp\u003eTracks can have content located externally, identified by \u003ccode\u003etrackContentId\u003c/code\u003e and \u003ccode\u003etrackContentType\u003c/code\u003e for the receiver to access.\u003c/p\u003e\n"]]],[],null,["# Class: Track\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).Track\n===========================================================================================================================\n\nclass static\n\nDescribes track metadata information.\n\nConstructor\n-----------\n\n### Track\n\nnew\nTrack(trackId, trackType)\n\n| #### Parameter ||\n|-----------|----------------------------------------------------------------------------------------------------------------------------------------|\n| trackId | number Unique identifier of the track within the context of a chrome.cast.media.MediaInfo object. |\n| trackType | [chrome.cast.media.TrackType](/cast/docs/reference/web_sender/chrome.cast.media#.TrackType) The type of track. Value must not be null. |\n\nProperties\n----------\n\n### customData\n\nnullable Object\n\nCustom application data.\n\n### language\n\nnullable string\n\nLanguage tag as per RFC 5646. Mandatory when the subtype is SUBTITLES.\n\n### name\n\nnullable string\n\nA descriptive, human-readable name for the track. For example, \"Spanish\".\nThis can be used by the sender UI for example, to create a selection\ndialog. If the name is empty the dialog would contain an empty slot.\n\n### subtype\n\nnullable [chrome.cast.media.TextTrackType](/cast/docs/reference/web_sender/chrome.cast.media#.TextTrackType)\n\nFor text tracks, the type of text track.\n\n### trackContentId\n\nnullable string\n\nIdentifier of the track's content. It can be the URL of the track or any\nother identifier that allows the receiver to find the content (when the\ntrack is not inband or included in the manifest). For example it can be\nthe URL of a vtt file.\n\n### trackContentType\n\nnullable string\n\nThe MIME type of the track content. For example if the track is a vtt\nfile it will be 'text/vtt'. This field is needed for out of band tracks,\nso it is usually provided if a trackContentId has also been provided. It\nis not mandatory if the receiver has a way to identify the content from\nthe trackContentId, but recommended. The track content type, if provided,\nmust be consistent with the track type.\n\n### trackId\n\nnumber\n\nUnique identifier of the track within the context of a\nchrome.cast.media.MediaInfo object.\n\n### type\n\nnon-null [chrome.cast.media.TrackType](/cast/docs/reference/web_sender/chrome.cast.media#.TrackType)\n\nThe type of track."]]