Concept de fenêtre tel que défini dans les normes CEA-608 et CEA-708. Dans WebVTT, il s'agit d'une région.
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\u003eTextTrackStyle\u003c/code\u003e defines the visual appearance of text tracks, including font, color, background, and window styles.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties to customize aspects like font family, size, color, background color, edge style, and window type for text tracks.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to control how text tracks are displayed within a Cast application, ensuring readability and visual appeal.\u003c/p\u003e\n"],["\u003cp\u003eThese style properties can be set using RGBA color values for background, foreground, edge and window colors, along with options for font family, style, scale and edge type.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTextTrackStyle\u003c/code\u003e helps ensure text tracks are displayed with appropriate styling, enhancing the user experience by making them clear and legible.\u003c/p\u003e\n"]]],["The `TextTrackStyle` class defines the visual styling for text tracks. Key properties include: `backgroundColor`, `foregroundColor`, and `windowColor` (all RGBA colors); `edgeColor` and `edgeType` for text outlining; `fontFamily`, `fontGenericFamily`, `fontScale`, and `fontStyle` for text appearance. `windowType` and `windowRoundedCornerRadius` define window or region attributes. `customData` allows for application-specific styling. These properties determine how text tracks are displayed on a receiver.\n"],null,["# Class: TextTrackStyle\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).TextTrackStyle\n=======================================================================================================================================================\n\nclass static\n\nDescribes style information for a text track.\n\nConstructor\n-----------\n\n### TextTrackStyle\n\nnew\nTextTrackStyle()\n\nProperties\n----------\n\n### backgroundColor\n\n(string or undefined)\n\nThe background 32-bit RGBA color, represented as `#RRGGBBAA`. The alpha\nchannel should be used for transparent backgrounds.\n\n### customData\n\n(non-null Object or undefined)\n\nCustom data set by the receiver application.\n\n### edgeColor\n\n(string or undefined)\n\nRGBA color for the edge, this value will be ignored if `edgeType` is\n`NONE`.\n\n### edgeType\n\n(non-null [cast.framework.messages.TextTrackEdgeType](/cast/docs/reference/web_receiver/cast.framework.messages#.TextTrackEdgeType) or undefined)\n\n### fontFamily\n\n(string or undefined)\n\nIf the font is not available in the receiver, the `fontGenericFamily` is\nused.\n\n### fontGenericFamily\n\n(non-null [cast.framework.messages.TextTrackFontGenericFamily](/cast/docs/reference/web_receiver/cast.framework.messages#.TextTrackFontGenericFamily) or undefined)\n\nThe text track font's generic family.\n\n### fontScale\n\n(number or undefined)\n\nThe font-scaling factor for the text track (the default is 1).\n\n### fontStyle\n\n(non-null [cast.framework.messages.TextTrackFontStyle](/cast/docs/reference/web_receiver/cast.framework.messages#.TextTrackFontStyle) or undefined)\n\nThe text track font style.\n\n### foregroundColor\n\n(string or undefined)\n\nThe foreground 32-bit RGBA color, represented as `#RRGGBBAA`.\n\n### windowColor\n\n(string or undefined)\n\n32-bit RGBA color for the window, represented as `#RRGGBBAA`. This value\nwill be ignored if `windowType` is `NONE`.\n\n### windowRoundedCornerRadius\n\n(number or undefined)\n\nThe absolute radius of the rounded corners of the window, in pixels (px).\nThis value will be ignored if `windowType` is not `ROUNDED_CORNERS`.\n\n### windowType\n\n(non-null [cast.framework.messages.TextTrackWindowType](/cast/docs/reference/web_receiver/cast.framework.messages#.TextTrackWindowType) or undefined)\n\nThe window concept as defined in CEA-608 and CEA-708. In WebVTT, this is\ncalled a *region*."]]