VideoContext.sendDanmu 报错?
请帮忙解答,谢谢!
data: {
src: 'http://localhost:3000/1.mp4',
danmuList: [{ text: '第 1s 出现的弹幕', color:'#ff0000', time: 1 },
{ text: '第 3s 出现的弹幕', color: '#ff00ff', time: 3 }]
},
videoContext : null,
inputValue: '',
onReady() {
this.videoContext = wx.createVideoContext('myVideo')
},
bindInputBlur(e) {
this.inputValue = e.detail.value
},
bindSendDanmu() {
this.videoContext.sendDanmu({
text: this.inputValue,
color: '#f90'
} )
},
无法发送弹幕 报错:Cannot read property 'sendDanmu' of null