Skip to content

Commit

Permalink
修复获取标准流预览地址请求异常的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
iMactool committed Jul 5, 2022
1 parent da0c809 commit 2bb968f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/Confirm/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
33 changes: 31 additions & 2 deletions src/Device/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)){
Expand All @@ -197,21 +205,42 @@ 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)
{
return $this->post('v1/devices/liveAddressLimit',$params);
}

/**
* 获取视频取流时需要的认证信息
* @return mixed
* @author cc
*/
public function getEzvizInfo()
{
return $this->get('v1/ezviz/account/info');
Expand Down

0 comments on commit 2bb968f

Please sign in to comment.