Thẻ Ngôn ngữ theo tiêu chuẩn RFC 5646. Bắt buộc khi loại phụ là PHỤ ĐỀ.
tên
chuỗi có tính chất rỗng
Tên của bản nhạc có tính chất mô tả mà con người có thể đọc được. Ví dụ: "Tiếng Tây Ban Nha".
Ngôn ngữ này có thể được giao diện người dùng của người gửi sử dụng, chẳng hạn như để tạo hộp thoại lựa chọn. Nếu tên trống thì hộp thoại sẽ chứa một ô trống.
Đối với bản âm thanh văn bản, đó là loại bản âm thanh.
trackContentId
chuỗi có tính chất rỗng
Giá trị nhận dạng nội dung của bản nhạc. Đó có thể là URL của bản nhạc hoặc bất kỳ giá trị nhận dạng nào khác cho phép trình nhận tìm thấy nội dung (khi bản nhạc không nằm trong dải hoặc được đưa vào tệp kê khai). Ví dụ: đó có thể là URL của tệp vtt.
trackContentType
chuỗi có tính chất rỗng
Loại MIME của nội dung bản nhạc. Ví dụ: nếu bản nhạc là tệp vtt, thì trường này sẽ là "text/vtt". Trường này cần thiết cho các bản nhạc không thuộc nhóm nhạc, vì vậy, trường này thường được cung cấp nếu bạn cũng cung cấp trackContentId. Bạn không bắt buộc phải làm thế nếu receiver có cách xác định nội dung trong trackContentId, nhưng nên làm như vậy. Loại nội dung bản nhạc (nếu được cung cấp) phải phù hợp với loại bản nhạc.
trackId
number
Giá trị nhận dạng duy nhất của bản nhạc trong ngữ cảnh của đối tượng chrome.cast.media.MediaInfo.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 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."]]