برچسب زبان مطابق با RFC 5646. زمانی که نوع فرعی SUBTITLES باشد اجباری است.
نام
رشته پوچ
نامی توصیفی و قابل خواندن توسط انسان برای آهنگ. به عنوان مثال، "اسپانیایی". برای مثال، رابط کاربر فرستنده میتواند از آن برای ایجاد یک گفتگوی انتخاب استفاده کند. اگر نام خالی باشد، دیالوگ حاوی یک شکاف خالی است.
شناسه محتوای تراک این می تواند نشانی وب تراک یا هر شناسه دیگری باشد که به گیرنده امکان می دهد محتوا را پیدا کند (زمانی که آهنگ داخل باند نیست یا در مانیفست گنجانده شده است). به عنوان مثال می تواند URL یک فایل vtt باشد.
trackContentType
رشته پوچ
نوع MIME محتوای آهنگ. به عنوان مثال اگر آهنگ یک فایل vtt باشد، "text/vtt" خواهد بود. این فیلد برای ترکهای خارج از باند مورد نیاز است، بنابراین معمولاً اگر یک trackContentId نیز ارائه شده باشد، ارائه میشود. اگر گیرنده راهی برای شناسایی محتوا از trackContentId داشته باشد، اجباری نیست، اما توصیه می شود. نوع محتوای آهنگ، در صورت ارائه، باید با نوع آهنگ مطابقت داشته باشد.
شناسه مسیر
عدد
شناسه منحصر به فرد تراک در زمینه یک شی chrome.cast.media.MediaInfo.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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."]]