Class: TextTrackStyle

  • TextTrackStyle defines the visual appearance of text tracks, including font, color, background, and window styles.

  • It provides properties to customize aspects like font family, size, color, background color, edge style, and window type for text tracks.

  • Developers can use this class to control how text tracks are displayed within a Cast application, ensuring readability and visual appeal.

  • These 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.

  • TextTrackStyle helps ensure text tracks are displayed with appropriate styling, enhancing the user experience by making them clear and legible.

Constructor

TextTrackStyle

new TextTrackStyle()

Properties

backgroundColor

(string or undefined)

The background 32-bit RGBA color, represented as #RRGGBBAA. The alpha channel should be used for transparent backgrounds.

customData

(non-null Object or undefined)

Custom data set by the receiver application.

edgeColor

(string or undefined)

RGBA color for the edge, this value will be ignored if edgeType is NONE.

edgeType

(non-null cast.framework.messages.TextTrackEdgeType or undefined)

fontFamily

(string or undefined)

If the font is not available in the receiver, the fontGenericFamily is used.

fontGenericFamily

(non-null cast.framework.messages.TextTrackFontGenericFamily or undefined)

The text track font's generic family.

fontScale

(number or undefined)

The font-scaling factor for the text track (the default is 1).

fontStyle

(non-null cast.framework.messages.TextTrackFontStyle or undefined)

The text track font style.

foregroundColor

(string or undefined)

The foreground 32-bit RGBA color, represented as #RRGGBBAA.

windowColor

(string or undefined)

32-bit RGBA color for the window, represented as #RRGGBBAA. This value will be ignored if windowType is NONE.

windowRoundedCornerRadius

(number or undefined)

The absolute radius of the rounded corners of the window, in pixels (px). This value will be ignored if windowType is not ROUNDED_CORNERS.

windowType

(non-null cast.framework.messages.TextTrackWindowType or undefined)

The window concept as defined in CEA-608 and CEA-708. In WebVTT, this is called a region.