Changes the appearance of captions without having to reload the player. All colors should be in hex value.
Attribute | Description |
---|---|
styles* object | An object containing the desired caption styles and values (See example below) |
Value | Description |
---|---|
backgroundColor string | The color of the text background Default: #000000 |
backgroundOpacity number | Adjusts the transparency of the text background as a percentage Default: 100 |
color string | Text color Default: #ffffff |
edgeStyle string | Surrounds text with a particular style Default: none Possible Values:    • none    • depressed    • dropshadow    • raised    • uniform |
fontFamily string | The style of text to use Default: Arial, sans-serif |
fontOpacity number | Adjusts the transparency of text as a percentage Default: 100 |
fontSize number | The size of text. Note: Does not affect cases where native rendering occurs Default: 20 |
windowColor string | Surrounds text box with chosen color from edge to edge of the video |
windowOpacity number | Sets the transparency of the window as a percentage |
Example:
jwplayer().setCaptions({"color": "#ffffff", "backgroundColor": "#000000"});