Changes the appearance of captions without having to reload the player
π
All colors should be in hex value.
jwplayer().setCaptions({
"backgroundColor": "#000000",
"backgroundOpacity": 100,
"color": "#ffffff",
"edgeColor": "ffff00",
"edgeStyle": "none",
"fontFamily": "Arial, sans-serif",
"fontOpacity": 100,
"fontSize": 20,
"windowColor": "000000",
"windowOpacity": 20
});
Item |
Description |
backgroundColor string |
Color of the text background |
backgroundOpacity number |
Adjusts the transparency of the text background as a percentage |
color string |
Text color |
edgeColor 8.36.2+ string |
Color of the outline around the letters in captions to enhance readability
Default: #000000 |
edgeStyle string |
Surrounds text with a particular style
Possible Values:
none (default)
depressed
dropshadow
raised
uniform
|
fontFamily string |
Style of text to use |
fontOpacity number |
Adjusts the transparency of text as a percentage |
fontSize number |
Size of text
NOTE: This does not affect cases where native rendering occurs.
|
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 |