Audio-specific information about the track.
Defined only forTrack#type === 'AUDIO'tracks.
customData
(non-null Object or undefined)
Custom data set by the receiver application.
isInband
(boolean or undefined)
trueindicates that the track is in-band and not a side-loaded track.
Relevant only for text tracks.
language
(string or undefined)
An RFC 5646 language tag. If the track subtype isSUBTITLES, this
field ismandatory.
name
(string or undefined)
A descriptive, human-readable name for the track, for example,Spanish.
roles
(non-null Array of string or undefined)
The role(s) of the track. The following values for each media type are
recognized, with value explanations described in ISO/IEC 23009-1, labeled
"DASH role scheme":
ThetrackContentIdcan be the URL of the track or any other identifier
that allows the receiver to find the content (when the track is not
in-band or is not included in the manifest). For example, this can be the
URL of a VTT file.
This represents the MIME type of the track content. For example, if the
track is a VTT file, this will have the value ‘text/vtt’. This field is
needed for out-of-band tracks, so it is usually provided if atrackContentIdhas also been provided. If the receiver has a way to
identify the content from thetrackContentId, this field is recommended
but isnotmandatory. The track content type, if provided, must be
consistent with the track type.
trackId
number
The unique identifier of the track within the context of aMediaInformationobject.
[[["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\u003ecast.framework.messages.Track\u003c/code\u003e provides metadata information for media tracks like audio, video, and text.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003etrackId\u003c/code\u003e, \u003ccode\u003etrackType\u003c/code\u003e, \u003ccode\u003elanguage\u003c/code\u003e, \u003ccode\u003ename\u003c/code\u003e, and custom data for describing the track.\u003c/p\u003e\n"],["\u003cp\u003eTracks can be identified as in-band or side-loaded using the \u003ccode\u003eisInband\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003etrackContentId\u003c/code\u003e and \u003ccode\u003etrackContentType\u003c/code\u003e can be used to specify external track resources if needed.\u003c/p\u003e\n"],["\u003cp\u003eAudio tracks have a dedicated \u003ccode\u003eaudioTrackInfo\u003c/code\u003e property for additional details.\u003c/p\u003e\n"]]],["The `Track` class describes metadata for media tracks, including `trackId` (unique identifier) and `trackType` ('TEXT', 'AUDIO', or 'VIDEO'). It supports properties like `language` (RFC 5646 tag, mandatory for subtitles), `name` (human-readable track name), `roles` (e.g., caption, dub), `subtype` (for text tracks), `trackContentId` (URL or identifier), and `trackContentType` (MIME type). `audioTrackInfo` is specific to audio tracks and `isInband` flag denotes if the track is in-band or not. `customData` allows for receiver-specific data.\n"],null,["# Class: Track\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).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 The unique identifier for the track. |\n| trackType | [cast.framework.messages.TrackType](/cast/docs/reference/web_receiver/cast.framework.messages#.TrackType) The type of track. Value must not be null. |\n\nProperties\n----------\n\n### audioTrackInfo\n\n(non-null [cast.framework.messages.AudioTrackInfo](/cast/docs/reference/web_receiver/cast.framework.messages.AudioTrackInfo) or undefined)\n\nAudio-specific information about the track.\nDefined only for `Track#type === 'AUDIO'` tracks.\n\n### customData\n\n(non-null Object or undefined)\n\nCustom data set by the receiver application.\n\n### isInband\n\n(boolean or undefined)\n\n`true` indicates that the track is in-band and not a side-loaded track.\nRelevant only for text tracks.\n\n### language\n\n(string or undefined)\n\nAn RFC 5646 language tag. If the track subtype is `SUBTITLES`, this\nfield is **mandatory**.\n\n### name\n\n(string or undefined)\n\nA descriptive, human-readable name for the track, for example, `Spanish`.\n\n### roles\n\n(non-null Array of string or undefined)\n\nThe role(s) of the track. The following values for each media type are\nrecognized, with value explanations described in ISO/IEC 23009-1, labeled\n\"DASH role scheme\":\n\n- VIDEO: caption, subtitle, main, alternate, supplementary, sign, emergency\n- AUDIO: main, alternate, supplementary, commentary, dub, emergency\n- TEXT: main, alternate, subtitle, supplementary, commentary, dub, description, forced_subtitle\n\n### subtype\n\n(string or undefined)\n\nFor text tracks, the type of the text track.\n\n### trackContentId\n\n(string or undefined)\n\nThe `trackContentId` can be the URL of the track or any other identifier\nthat allows the receiver to find the content (when the track is not\nin-band or is not included in the manifest). For example, this can be the\nURL of a VTT file.\n\n### trackContentType\n\n(string, non-null [cast.framework.messages.CaptionMimeType](/cast/docs/reference/web_receiver/cast.framework.messages#.CaptionMimeType), or undefined)\n\nThis represents the MIME type of the track content. For example, if the\ntrack is a VTT file, this will have the value 'text/vtt'. This field is\nneeded for out-of-band tracks, so it is usually provided if a\n`trackContentId` has also been provided. If the receiver has a way to\nidentify the content from the `trackContentId`, this field is recommended\nbut is *not* mandatory. The track content type, if provided, must be\nconsistent with the track type.\n\n### trackId\n\nnumber\n\nThe unique identifier of the track within the context of a\n`MediaInformation` object.\n\n### type\n\nnon-null [cast.framework.messages.TrackType](/cast/docs/reference/web_receiver/cast.framework.messages#.TrackType)\n\nThe type of track ('TEXT', 'AUDIO', or 'VIDEO')."]]