|
@@ -332,6 +332,39 @@ class HaiKangController extends BaseController
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
+ public function getPlaybackUrl($camera_id,$start_time,$end_time){
|
|
|
+ $query = CameraList::where('id', $camera_id)->first();
|
|
|
+
|
|
|
+// $url = $this->artemis.'/api/video/v2/cameras/playbackURLs';
|
|
|
+// $params['cameraIndexCode'] = $query->index_code;
|
|
|
+// $params['recordLocation'] = 0;
|
|
|
+// $params['protocol'] = 'rtsp';//rtsp
|
|
|
+// $params['beginTime'] = $start_time;
|
|
|
+// $params['endTime'] = $end_time;
|
|
|
+// $params['uuid'] = '';
|
|
|
+// $params['expand'] = 'transcode=0';
|
|
|
+// $params['streamform'] = 'ps';
|
|
|
+// $params['lockType'] = 0;
|
|
|
+
|
|
|
+ $url = $this->artemis.'/api/video/v1/cameras/playbackURLs';
|
|
|
+ $params['cameraIndexCode'] = $query->index_code;
|
|
|
+ $params['recordLocation'] = 0;
|
|
|
+ $params['protocol'] = 'rtsp';//rtsp
|
|
|
+ $params['transmode'] = 0;
|
|
|
+ $params['beginTime'] = $start_time;
|
|
|
+ $params['endTime'] = $end_time;
|
|
|
+ $params['uuid'] = '';
|
|
|
+ $params['expand'] = 'streamform=ps';
|
|
|
+
|
|
|
+ $this->sign = $this->get_sign($url);
|
|
|
+
|
|
|
+ $rtsp = $this->curlPost($this->pre_url . $url, json_encode($params));
|
|
|
+
|
|
|
+ $rtsp = json_decode($rtsp, true);
|
|
|
+
|
|
|
+ dd($rtsp);
|
|
|
+ }
|
|
|
+
|
|
|
public function getHikRtsp(){
|
|
|
$result['status'] = true;
|
|
|
$result['msg'] = ApiEnum::RETURN_SUCCESS;
|