目前还没有获得live-player的使用权限,手机打开调试模式应该也是能调试的。
===============wxml:
<live-player id="livePlayer" mode="live" autoplay src="{{playUrl}}"></live-player>
<view class="ver-hor disfr" bindtap="verHorSwitch">
<label class="iconfont icon-quanping" wx:if="{{!playFullScreen}}"></label>
<label class="iconfont icon-tuichuquanping" wx:if="{{playFullScreen}}"></label>
</view>
===============js:
verHorSwitch() {
this.livePlayerContext = this.livePlayerContext ? this.livePlayerContext : wx.createLivePlayerContext('livePlayer', this)
const that = this
console.log('livePlayerContext:' + this.livePlayerContext) // 此处打印已获取到实例
this.livePlayerContext.requestFullScreen({
direction: 90,
success(res){
console.log(res)
that.setData({
playFullScreen: true
})
},
fail(err){
console.log(err, 'err')
},
complete(e) {
console.log(e, 'e')
}
})
}
========其他信息
手机:IPHONE13
系统:IOS:15.1.1
微信:8.0.16
基础库:2.15.0
开发者工具:Stable 1.05.2110290
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。