- 直播的时候,摄像头不能动态切换吗?
[代码][代码] <live-pusher url="rtmp://*******/live/{{rtmp_key}}" autopush beauty="7" whiteness="5" mode="SD" device-position="{{cameraStatus}}" class="livePusher" bindstatechange="statechange" /> [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"livecamera"[代码] [代码]bindtap[代码][代码]=[代码][代码]"camera"[代码] [代码]>[代码] [代码] [代码][代码]<[代码][代码]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);[代码][代码] [代码][代码]},[代码]打印的值在变了,但是摄像头没换?求解答
2019-12-11 - 直播推流总是3005,用obs推完全没问题,怎么办?
[图片] 反复到最后就断开了,我用obs推流的话是没问题的,地址是 rtmp://**.***.***.***:1935/live/test 是需要在后台设置什么地址吗? 开发设置里的功能已经开了 [图片] 有人知道怎么回事吗
2019-12-02 - 微信服务端调用内容安全返回null,是怎么回事?
$token = $this->token(); $url = "https://api.weixin.qq.com/wxa/img_sec_check?access_token=".$token; $file_data = array("media"=>new \CURLFile($imgUrl));//$content(需要检测的文本内容,最大520KB) $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url);//地址 curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1);//设置头 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);//取消验证 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch , CURLOPT_POST, 1);//post @curl_setopt($ch, CURLOPT_POSTFIELDS, $file_data);//参数 $output = curl_exec($ch);//发送请求获取结果 curl_close($ch);//关闭会话 $res = json_decode($output,true); if($res["errcode"] != 0){ $dat = ["resultCode"=>$res,"resultMsg"=>"内容含有违法违规内容"]; }else{ $dat = ["resultCode"=>$res,"resultMsg"=>"ok"]; } return $dat;返回的是个空,我的php版本是5.6.8,如果不用new \CURLFile 就返回41005
2019-11-29