live-player 在 Component中,无法调用play等方法
wxml
<live-player id=“player” src=“地址测试过可用” mode=“RTC” autoplay />
<button bindtap=“bindPlay”>播放</button>
js
Component({
ready:function(res){
this.ctx = wx.createLivePlayerContext(‘player’)
},
methods: {
bindPlay() {
this.ctx.play({
success: res => {
console.log(‘play success’)
},
fail: res => {
console.log(res)
}
})
}
}
})
调用play方法,没有任何反应
