| | |
| | | return new CommonResult(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage()); |
| | | } |
| | | |
| | | @GetMapping("/video") |
| | | @GetMapping("/Video/{code}/{subType}") |
| | | @ApiOperation(value = "设备获取监控地址") |
| | | @SneakyThrows |
| | | public CommonResult getMonitorAddress(@RequestParam String code, |
| | | @RequestParam(required = false) Integer subType, |
| | | public CommonResult getMonitorAddress(@PathVariable String code, @PathVariable Integer subType, |
| | | @RequestParam(required = false) String scheme) { |
| | | |
| | | String clientType = "winpc"; |
| | |
| | | if (subType == null) { |
| | | subType = 1; |
| | | } |
| | | if (StringUtils.isNotBlank(scheme)) { |
| | | if (!StringUtils.isNotBlank(scheme)) { |
| | | scheme = "RTSP"; |
| | | } |
| | | String monitorUrl = "/videoService/realmonitor/uri?subType=" + subType + "&scheme" + scheme + "&channelId="; |
| | | String monitorUrl = "/videoService/realmonitor/uri?subType=" + subType + "&scheme=" + scheme + "&channelId="; |
| | | |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | restTemplate.setErrorHandler(new DefaultResponseErrorHandler() { |