Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 2025/07/25 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eTracksInfo\u003c/code\u003e provides information about available media tracks, including active tracks, language, text track style, and overall track details.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify active tracks using either \u003ccode\u003eactiveTrackIds\u003c/code\u003e or prioritize language selection using the \u003ccode\u003elanguage\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTracksInfo\u003c/code\u003e includes details about text track style through \u003ccode\u003etextTrackStyle\u003c/code\u003e and a comprehensive list of tracks via the \u003ccode\u003etracks\u003c/code\u003e property.\u003c/p\u003e\n"]]],["`TracksInfo` class provides information about media tracks. Key properties include: `activeTrackIds`, an array of active track IDs; `language`, the preferred language, which overrides `activeTrackIds`; `textTrackStyle`, detailing the text track's style; and `tracks`, an array containing specific track details. The class constructor, `TracksInfo()`, initializes this information. These properties define how media tracks are managed and displayed.\n"],null,["# Class: TracksInfo\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).TracksInfo\n===================================================================================================================================================\n\nclass static\n\nTracks information.\n\nConstructor\n-----------\n\n### TracksInfo\n\nnew\nTracksInfo()\n\nProperties\n----------\n\n### activeTrackIds\n\n(non-null Array of number or undefined)\n\nThe track IDs that should be active.\n\n### language\n\n(string or undefined)\n\nLanguage for the tracks that should be active. The language field will\ntake precedence over `activeTrackIds` if both are specified.\n\n### textTrackStyle\n\n(non-null [cast.framework.messages.TextTrackStyle](/cast/docs/reference/web_receiver/cast.framework.messages.TextTrackStyle) or undefined)\n\nThe text track style.\n\n### tracks\n\n(non-null Array of non-null [cast.framework.messages.Track](/cast/docs/reference/web_receiver/cast.framework.messages.Track) or undefined)\n\nThe tracks information."]]