你好,请问问题解决了吗?
SelectorQuery 查不到live-player节点?const query = wx.createSelectorQuery().in(this).select('#alan-player').boundingClientRect(rect => { console.error('alan-> query.rect', rect); }).exec(function(res){ console.error('alan-> query.exec', res); }) wxml [图片] 查询的结果为null [图片] 查询节点的时机,live-player已经创建出来,并且已经展示了,但就是查不到对应的节点,无法获取live-player的实例
2022-06-07请问一下,暂停播放这些方法有效果吗?我这边调用方法不报错也没反应
live-player在 ios 13、15上播放黑屏,ios 14和安卓播放正常,该如何解决?## 1.代码片段 https://developers.weixin.qq.com/s/G50RPomm7kyb ## 2. rtmp 格式测试情况 [图片] ## 3. flv格式测试情况 [图片] ## 4.主要代码 <view class="page-body"> <view class="page-section"> <live-player id="player" src="http://3891.liveplay.myqcloud.com/live/3891_user_6b3e1893_0773.flv" mode="live" autoplay bindstatechange="statechange" binderror="error" /> <view class="btn-area"> <button bindtap="bindPlay" class="page-body-button" type="primary">播放</button> <button bindtap="bindPause" class="page-body-button" type="primary">暂停</button> <button bindtap="bindStop" class="page-body-button" type="primary">停止</button> <button bindtap="bindResume" class="page-body-button" type="primary">恢复</button> <button bindtap="bindMute" class="page-body-button" type="primary">静音</button> </view> </view> </view> Page({ onReady(res) { this.ctx = wx.createLivePlayerContext('player') }, statechange(e) { console.log('live-player code:', e.detail.code) }, error(e) { console.error('live-player error:', e.detail.errMsg) }, bindPlay() { this.ctx.play({ success: res => { console.log(res, 'play success') }, fail: res => { console.log(res, 'play fail') } }) }, bindPause() { this.ctx.pause({ success: res => { console.log('pause success') }, fail: res => { console.log('pause fail') } }) }, bindStop() { this.ctx.stop({ success: res => { console.log('stop success') }, fail: res => { console.log('stop fail') } }) }, bindResume() { this.ctx.resume({ success: res => { console.log('resume success') }, fail: res => { console.log('resume fail') } }) }, bindMute() { this.ctx.mute({ success: res => { console.log('mute success') }, fail: res => { console.log('mute fail') } }) } })
2022-06-07