Skip to content

Subtitle text properties #8297

Answered by amtins
belbernard asked this question in Q&A
May 30, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

@belbernard fontPercent must be a valid entry see the array below:

options: [
['0.50', '50%'],
['0.75', '75%'],
['1.00', '100%'],
['1.25', '125%'],
['1.50', '150%'],
['1.75', '175%'],
['2.00', '200%'],
['3.00', '300%'],
['4.00', '400%']
],

player.textTrackSettings.setValues({
backgroundColor: '#00F',
backgroundOpacity: '100',
fontPercent: 2,
});

player.textTrackSettings.updateDisplay();

I also need to increase the size of subtitle texts when playing full screen.

Maybe listening for the fullscreenchange event and then modifying the font size:

player.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@belbernard
Comment options

Answer selected by belbernard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants