TextTrack Style API

TextTrackStyle (≥ 2.27.4)

The TextTrack style API allows you to style the renderable texttracks through the textTrackStyle property on the player. The adjustable style properties are given below. All of them can be set to undefined which means taking the streams' custom styling if any. This API is available from version 2.27.1 onward and only if you have a player with this feature enabled.

Properties

Property Type Description
fontFamily string | undefined The text font family.
fontColor string | undefined The text color.
fontSize '50%' | '75%' | '100%' | '150%' | '200%' | undefined The font size of the text in percentage, eg. '50%' for half size.
backgroundColor string | undefined The text background color.
windowColor string | undefined The background color of the text container.
edgeStyle 'none' | 'dropshadow' | 'raised' | 'depressed' | 'uniform' | undefined The character edge style of the text, this has to be one of the options given in the type definition.