diff --git a/src/Confirm/Confirm.php b/src/Confirm/Confirm.php index 649e2cc..6ed415f 100644 --- a/src/Confirm/Confirm.php +++ b/src/Confirm/Confirm.php @@ -14,6 +14,13 @@ class Confirm extends BaseService { + /** + * 自动确权 + * @param array $params + * + * @return mixed + * @author cc + */ public function autoconfirm(array $params) { return $this->getJson('v1/carrier/wing/endpoint/confirm/right/autoconfirm',$params); diff --git a/src/Device/Device.php b/src/Device/Device.php index 9fcc5e7..c07a400 100644 --- a/src/Device/Device.php +++ b/src/Device/Device.php @@ -188,6 +188,14 @@ public function clearPreset(array $params) return $this->post($endpoint,$params); } + /** + * 关闭设备视频加密 + * @param array $params + * + * @return mixed + * @throws \Imactool\Hikcloud\Exceptions\InvalidArgumentException + * @author cc + */ public function offDeviceVoideEncrypt(array $params) { if (!\array_key_exists('deviceId',$params)){ @@ -197,14 +205,30 @@ public function offDeviceVoideEncrypt(array $params) return $this->post($endpoint,$params); } + /** + * 开通标准流预览功能 + * @param $channelIds + * + * @return mixed + * @author cc + */ public function liveVideoOpen($channelIds) { return $this->post('v1/devices/liveVideoOpen',['channelIds'=>$channelIds]); } - public function liveAddress($channelIds) + /** + * 获取标准流预览地址 + * 该接口获取的标准流预览地址适用于公众号、公共标准流预览等场景,特点是视频信息公开。 + * @param $channelId + * + * @return mixed + * @author cc + */ + public function liveAddress($channelId) { - return $this->post('v1/devices/liveAddress',['channelIds'=>$channelIds]); + $endpoint = "/v1/devices/liveAddress?channelId=".trim($channelId); + return $this->get($endpoint ,['channelId'=>$channelId]); } public function liveAddressLimit(array $params) @@ -212,6 +236,11 @@ public function liveAddressLimit(array $params) return $this->post('v1/devices/liveAddressLimit',$params); } + /** + * 获取视频取流时需要的认证信息 + * @return mixed + * @author cc + */ public function getEzvizInfo() { return $this->get('v1/ezviz/account/info');