DPlayer
DPlayer copied to clipboard
咨询下,subtitle.url 怎么动态赋值?以下示例是视频的动态赋值,能实现。
mounted() { this.dp = new DPlayer({ container: document.getElementById('dplayer'), video: {url:'', pic:''}, subtitle:{ url: '', type: 'webvtt', fontSize: '20px', bottom: '5%', color: '#ffffff', } }) },
methods:{
// 设置视频播放路径
setVideoUrl (e) {
this.dp.switchVideo({url: e})
},
}