| | |
| | | indexCode1 = jsonObject1.getString("indexCode"); |
| | | } |
| | | } |
| | | //根据监控点编号获取监控预览url |
| | | PreviewURLsRequest previewURLsRequest = new PreviewURLsRequest(); |
| | | previewURLsRequest.setCameraIndexCode(indexCode1); |
| | | String s = Artemis.previewURLs(previewURLsRequest); |
| | | jsonObject = JSONObject.parseObject(s); |
| | | code = jsonObject.getString("code"); |
| | | if(!"0".equals(code)){ |
| | | return R.fail("获取海康实时视频预览地址失败"); |
| | | } |
| | | data = jsonObject.getJSONObject("data"); |
| | | String url = data.getString("url"); |
| | | return R.ok(url); |
| | | // //根据监控点编号获取监控预览url |
| | | // PreviewURLsRequest previewURLsRequest = new PreviewURLsRequest(); |
| | | // previewURLsRequest.setCameraIndexCode(indexCode1); |
| | | // String s = Artemis.previewURLs(previewURLsRequest); |
| | | // jsonObject = JSONObject.parseObject(s); |
| | | // code = jsonObject.getString("code"); |
| | | // if(!"0".equals(code)){ |
| | | // return R.fail("获取海康实时视频预览地址失败"); |
| | | // } |
| | | // data = jsonObject.getJSONObject("data"); |
| | | // String url = data.getString("url"); |
| | | return R.ok(indexCode1); |
| | | }catch (Exception e){ |
| | | return R.fail("获取海康实时视频预览地址失败"); |
| | | } |