问题描述
如何在 JWPlayer 配置中更改 subtitles 或 caption 字体大小属性以使用某些选择值使字体大小默认。
解决方法
在我们的代码中配置 JWPlayer 设置时,如官方文档中所述。 Link here
我们可以设置fontSize; 使用您想要的值设置后插入 fontSize 属性 .setCaptions(),如下例 12px
jwplayer("myElement").setup({
"playlist": "https://cdn.jwplayer.com/v2/media/hWF9vG66","height": 360,"width": 640,"autostart": "viewable","advertising": {
"client": "vast","tag": "http://adserver.com/vastTag.xml"
}
}).setCaptions({
'fontSize' : 12
});