[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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')."]]