|
@@ -1867,6 +1867,36 @@ class CameraServices
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
+ //洗选执法记录仪hls
|
|
|
+ public static function getCameraHlsUrl($parent_id, $camera_id){
|
|
|
+ $result['status'] = true;
|
|
|
+ $result['msg'] = ApiEnum::RETURN_SUCCESS;
|
|
|
+
|
|
|
+ $query = MineListExt::where('mine_id', $parent_id)->first();
|
|
|
+
|
|
|
+ $camera = CameraList::find($camera_id);
|
|
|
+
|
|
|
+ Input::replace(
|
|
|
+ [
|
|
|
+ 'url' => trim($query->ip, '/') . ':' . $query->port,
|
|
|
+ 'key' => $query->key,
|
|
|
+ 'secret' => $query->secret,
|
|
|
+ 'cameraIndexCode' => $camera->index_code,
|
|
|
+ 'streamType' => CameraEnum::CODE_STREAM_HAK[$camera->code_stream],
|
|
|
+ 'protocol' => 'hls',
|
|
|
+ 'parent_id' => $parent_id
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ $haikang = new HaiKangController();
|
|
|
+ $result_hk = $haikang->getCamerasUrl();
|
|
|
+
|
|
|
+ if ($result_hk['data']['url']) {
|
|
|
+ $result['data']['camera_id'] = $camera_id;
|
|
|
+ $result['data']['url'] = $result_hk['data']['url'];
|
|
|
+ }
|
|
|
+
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
|
|
|
//通过rtmp同步m3u8文件并返回url
|
|
|
public static function downloadCameraFiles($parent_id, $camera_id)
|