<live-pusher url="rtmp://*******/live/{{rtmp_key}}" autopush beauty="7" whiteness="5" mode="SD" device-position="{{cameraStatus}}" class="livePusher" bindstatechange="statechange" />
< cover-image style = "width:60rpx;height:60rpx" src = "/images/livecamera.png" ></ cover-image > </ view > |
camera: function (){ let that = this ; let cameraTo = "" ; if (that.data.cameraStatus == "front" ){ cameraTo = "back" ; } else { cameraTo = "front" ; } that.setData({ cameraStatus: cameraTo }) console.log( "摄像头" , that.data.cameraStatus); }, |
打印的值在变了,但是摄像头没换?求解答
这个示例代码里面有:https://developers.weixin.qq.com/s/KvWD9mmA62Yk
你好,live-pusher不支持动态切换摄像头