live-pusher拒绝授权后,如何重新授权并推流?
步骤1:
进入页面后,使用以下代码启动推流
<live-pusher autopush="{{true}}" enable-camera="{{true}}"></live-pusher> |
步骤2:
这时候会弹出授权摄像头和录音,均拒绝
步骤3:
通过代码,进入授权页面,然后打开摄像头和录音的授权。
wx.openSetting |
步骤4:
从授权页面返回,通过
wx.openSetting({ success(res) { //在这里检查授权 //并调用pusher=wx.createLivePusherContext //然后 pusher.start() }, fail(err) { console.log(err); } }); |
步骤5:
摄像头无法开启
请问如何解决呢?
