Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

How to change captions font size


Hi,
I would like to ask, if there is a way to change font size of captions. I know, that I can use: captions: {fontSize: xx}, but in fact it doesn't work. I mean, if there is a way to change it in for example some .js or .css official file.

The only way I succeeded is, that I add in header of my .html site this:

<style>
.jw-captions {
font-size: xx!important;
}

.jwplayer video::-webkit-media-text-track-container {
font-size: xx!important;
}
</style>

It works, but it is not responsive - in small window or in fullscreen it's same.

Can you help me to find better way to solve this problem? What and where to change to reach a bit smaller font?

Thank you very much!

3 Community Answers

Daniel Berger

JW Player Support Agent  
0 rated :

Hi,

You can change the captions style in your setup block with something like this snippet:
captions: {
color: ‘#FF0000’,
fontSize: 24,
backgroundOpacity: 50
}

Here is a link with more information: https://support.jwplayer.com/customer/portal/articles/1482067-styling-captions-for-fcc-compliance

e...

User  
0 rated :

Hi,
thanks for your reply. I know about this option, but for example in Google Chrome or Opera it's not working.

Maybe we don't understand each other, I am just searching for some part of code, where responsive captions font size defined is and I can edit it there (for example to half font size). Because official font size is so big, that it occupies a lot of space in video.

I just spent a couple of hours of searching in jwplayer.js, but without success.

Daniel Berger

JW Player Support Agent  
0 rated :

Hi,

Thank you for clarifying. Do you have a page to illustrate your issue? The captions should resize relative to the screen size.

This question has received the maximum number of answers.