直播的时候,摄像头不能动态切换吗?
<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); }, |
打印的值在变了,但是摄像头没换?求解答