اطلاعات سبک را برای یک آهنگ متنی توصیف می کند. رنگ ها به صورت رشته های "#RRGGBBAA" نشان داده می شوند که در آن XX دو نماد هگزادسیمال هستند که مقدار 0-255 را برای کانال/رنگ خاص نشان می دهند. از نماد رنگی هشت رقمی CSS پیروی می کند. (به http://dev.w3.org/csswg/css-color/#hex-notation مراجعه کنید).
سازنده
TextTrackStyle
TextTrackStyle () جدید
خواص
رنگ پس زمینه
رشته پوچ
رنگ RGBA پسزمینه، بهعنوان "#RRGGBBAA" نشان داده میشود. کانال آلفا باید برای پس زمینه های شفاف استفاده شود.
داده های سفارشی
شیء پوچ
داده های برنامه سفارشی
edgeColor
رشته پوچ
رنگ RGBA برای لبه، نشان داده شده به عنوان "#RRGGBBAA". اگر edgeType NONE باشد، این مقدار نادیده گرفته می شود.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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."]]