有人能告诉我如何在jw播放器上正确设置我的标题样式。它如下所示,对用户来说有点烦人。
tracks: [{
file: "subs/<?php echo $a; ?>-en.vtt",
label: "English",
kind: "captions",
"default": true,
fontSize: 24,
backgroundOpacity: 50
}]
答案 0 :(得分:0)
他们在自己的网站上有一个关于如何设置字幕样式的演示:
https://developer.jwplayer.com/jw-player/demos/customization/captions-styling/
答案 1 :(得分:0)
我遇到了同样的问题,以这种方式设置字幕样式对我有用:
jwplayer("video-player").setup({
file: "https://content.jwplatform.com/manifests/#{jw_identifier}.m3u8",
image: "#{videoable.poster_url(1920)}",
captions: {
color: "#4D4D4F",
fontFamily: "Arial",
fontOpacity: 100,
edgeStyle: "none",
backgroundColor: "#ffffff",
windowColor: "#ffffff",
windowOpacity: 0,
backgroundOpacity: 100
}
})
这里是指向JW Player文档的链接,其中概述了字幕的样式配置:https://developer.jwplayer.com/jw-player/docs/developer-guide/customization/configuration-reference/#captions