We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
官方文档地址:https://muiplayer.js.org/zh/guide/subtitle.html 原文
var mp = new MuiPlayer({ container:'#mui-player', src:'../media/media.mp4', ... subtitle{ tracks:[ { kind:'subtitles', src:'./static/subtitle/sintel-en.vtt', label:'英语', srclang:'en', default:true, }, { kind:'subtitles', src:'./static/subtitle/sintel-de.vtt', label:'德语', srclang:'de', }, { kind:'subtitles', src:'./static/subtitle/sintel-es.vtt', label:'西班牙语', srclang:'es', } ], styles:{ // 字幕默认样式 color:'#FFFFFF', background:'transparent', textShadow:'0px 0px 1px #000000', }, } });
注意到 subtitle 处,没有打冒号,所以会失效
修改后:
var mp = new MuiPlayer({ container:'#mui-player', src:'../media/media.mp4', ... subtitle:{ tracks:[ { kind:'subtitles', src:'./static/subtitle/sintel-en.vtt', label:'英语', srclang:'en', default:true, }, { kind:'subtitles', src:'./static/subtitle/sintel-de.vtt', label:'德语', srclang:'de', }, { kind:'subtitles', src:'./static/subtitle/sintel-es.vtt', label:'西班牙语', srclang:'es', } ], styles:{ // 字幕默认样式 color:'#FFFFFF', background:'transparent', textShadow:'0px 0px 1px #000000', }, } });
这样一来就可以正常加载了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
官方文档地址:https://muiplayer.js.org/zh/guide/subtitle.html
原文
注意到 subtitle 处,没有打冒号,所以会失效
修改后:
这样一来就可以正常加载了
The text was updated successfully, but these errors were encountered: