|
@@ -10,12 +10,14 @@ import java.util.Timer;
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.persagy.cameractl.conf.CVRConfig;
|
|
|
import com.persagy.cameractl.conf.CameraStream;
|
|
|
import com.persagy.cameractl.cvr.HCNetSDK.NET_DVR_USER_LOGIN_INFO;
|
|
|
import com.persagy.cameractl.cvr.HCNetSDK.NET_DVR_VOD_PARA;
|
|
@@ -41,6 +43,9 @@ import cn.hutool.core.util.StrUtil;
|
|
|
public class PlayBackController {
|
|
|
public static Logger logger = LoggerFactory.getLogger(PlayBackController.class);
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CVRConfig cvrConfig;
|
|
|
+
|
|
|
@RequestMapping(value = "/playback/{operType}", method = RequestMethod.POST)
|
|
|
public Object play(@RequestBody Camera camera, @PathVariable("operType") String operType) throws Exception {
|
|
|
// 验证是否需要走配置
|
|
@@ -97,7 +102,7 @@ public class PlayBackController {
|
|
|
|
|
|
if ("true".equals(result)) {
|
|
|
Map<String, String> data = new HashMap<String, String>(4);
|
|
|
- data.put("videoUrl", file.getName());
|
|
|
+ data.put("videoUrl", cvrConfig.getNginxAddress() + file.getName());
|
|
|
return ResultTools.dataResult(data);
|
|
|
}
|
|
|
|