Décrit les informations de style pour une piste de texte.
Les couleurs sont représentées par des chaînes "#RRGGBBAA", où XX correspond aux deux symboles hexadécimaux représentant la valeur entre 0 et 255 pour le canal ou la couleur spécifique. Il suit la notation de couleur hexadécimale à 8 chiffres CSS.
(Voir http://dev.w3.org/csswg/css-color/#hex-notation).
Constructeur
TextTrackStyle
nouveau TextTrackStyle()
Propriétés
backgroundColor
chaîne pouvant avoir une valeur nulle
Couleur RVBA d'arrière-plan, représentée par "#RRGGBBAA".
Le canal alpha doit être utilisé pour les arrière-plans transparents.
customData
Objet pouvant avoir une valeur nulle
Données d'application personnalisées.
edgeColor
chaîne pouvant avoir une valeur nulle
Couleur RVBA pour le bord, représentée par "#RRGGBBAA".
Cette valeur sera ignorée si le champ "edgeType" est défini sur "NONE".
Le concept de fenêtre est défini dans les normes CEA-608 et CEA-708. Voir http://goo.gl/M3ea0X. WebVTT s'appelle 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\u003echrome.cast.media.TextTrackStyle\u003c/code\u003e defines the style of text tracks (e.g., captions or subtitles) in a Cast session.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties for customizing text appearance, such as font, color, background, and edge styles.\u003c/p\u003e\n"],["\u003cp\u003eColors are specified using 8-digit hexadecimal RGBA values ("#RRGGBBAA").\u003c/p\u003e\n"],["\u003cp\u003eIt also supports custom application data and window styling for text tracks.\u003c/p\u003e\n"],["\u003cp\u003eTextTrackStyle properties allow developers to control how text is displayed during media playback on Cast devices.\u003c/p\u003e\n"]]],["`TextTrackStyle` defines the visual appearance of text tracks, using RGBA color strings (\"#RRGGBBAA\"). Key properties include `backgroundColor`, `edgeColor`, `foregroundColor`, and `windowColor`. Font styling is adjusted via `fontFamily`, `fontGenericFamily`, `fontScale`, and `fontStyle`. `edgeType`, `windowType`, and `windowRoundedCornerRadius` further refine the track's display. `customData` allows for the addition of application-specific data. It uses the constructor `TextTrackStyle`.\n"],null,["# Class: TextTrackStyle\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).TextTrackStyle\n====================================================================================================================================\n\nclass static\n\nDescribes style information for a text track.\nColors are represented as strings \"#RRGGBBAA\" where XX are the two\nhexadecimal symbols that represent the 0-255 value for the specific\nchannel/color. It follows CSS 8-digit hex color notation.\n(See http://dev.w3.org/csswg/css-color/#hex-notation).\n\nConstructor\n-----------\n\n### TextTrackStyle\n\nnew\nTextTrackStyle()\n\nProperties\n----------\n\n### backgroundColor\n\nnullable string\n\nBackground RGBA color, represented as \"#RRGGBBAA\".\nThe alpha channel should be used for transparent backgrounds.\n\n### customData\n\nnullable Object\n\nCustom application data.\n\n### edgeColor\n\nnullable string\n\nRGBA color for the edge, represented as \"#RRGGBBAA\".\nThis value will be ignored if edgeType is NONE.\n\n### edgeType\n\nnullable [chrome.cast.media.TextTrackEdgeType](/cast/docs/reference/web_sender/chrome.cast.media#.TextTrackEdgeType)\n\n### fontFamily\n\nnullable string\n\nIf the font is not available in the receiver the fontGenericFamily will\nbe used.\n\n### fontGenericFamily\n\nnullable [chrome.cast.media.TextTrackFontGenericFamily](/cast/docs/reference/web_sender/chrome.cast.media#.TextTrackFontGenericFamily)\n\n### fontScale\n\nnullable number\n\nThe font scaling factor for the text track (the default is 1.0).\n\n### fontStyle\n\nnullable [chrome.cast.media.TextTrackFontStyle](/cast/docs/reference/web_sender/chrome.cast.media#.TextTrackFontStyle)\n\n### foregroundColor\n\nnullable string\n\nForeground RGBA color, represented as \"#RRGGBBAA\".\n\n### windowColor\n\nnullable string\n\nRGBA color for the window, represented as \"#RRGGBBAA\".\nThis value will be ignored if windowType is NONE.\n\n### windowRoundedCornerRadius\n\nnullable number\n\nRounded corner radius absolute value in pixels (px).\nThis value will be ignored if windowType is not ROUNDED_CORNERS.\n\n### windowType\n\nnullable [chrome.cast.media.TextTrackWindowType](/cast/docs/reference/web_sender/chrome.cast.media#.TextTrackWindowType)\n\nThe window concept is defined in CEA-608 and CEA-708, See\nhttp://goo.gl/M3ea0X. In WebVTT is called a region."]]