Commit b7aaa70a88feef6f2883c8a45b803c2b67f1105f
1 parent
a968f4e5
修改超时时间
Showing
4 changed files
with
10 additions
and
26 deletions
src/main/java/com/bsth/controller/video/VideoController.java
| ... | ... | @@ -108,6 +108,7 @@ public class VideoController { |
| 108 | 108 | result.put("data", videoChannels); |
| 109 | 109 | result.put("channelImageURL", wvpConfig.getChannelListOfImgURL()); |
| 110 | 110 | result.put("wvpPlayURL", wvpConfig.getWvpPlayURL()); |
| 111 | + result.put("wvpLiveBroadcast", wvpConfig.getWvpLiveBroadcast()); | |
| 111 | 112 | |
| 112 | 113 | } catch (Exception e) { |
| 113 | 114 | log.error("查询车辆通道异常:[{}]", carNo, e); | ... | ... |
src/main/java/com/bsth/service/impl/videoimpl/WvpConfig.java
src/main/resources/application-test.properties
| ... | ... | @@ -78,8 +78,10 @@ wvp.login.url=http://61.169.120.202:28080/api/user/login |
| 78 | 78 | wvp.channel.list.url=http://61.169.120.202:28080/api/device/query/query/channel/carNo/{carNo} |
| 79 | 79 | wvp.channel.list.img.url=http://61.169.120.202:28080/api/device/query/snap/ |
| 80 | 80 | wvp.channel.play.url =http://61.169.120.202:1091/rtp/ |
| 81 | +wvp.channel.live.broadcast.url=http://61.169.120.202:28080/#/play/wasm/ws%3A%2F%2F192.168.169.100%3A1091%2Frtp%2F{device}_{channel}.live.flv | |
| 81 | 82 | wvp.channel.history.list.url=http://61.169.120.202:28080/api/gb_record/query/{device}/{channel}?startTime={startTimeStr}&endTime={endTimeStr} |
| 82 | 83 | |
| 84 | + | |
| 83 | 85 | #客流图像 |
| 84 | 86 | passengerFlow.url = http://58.247.254.118:9999/images/ |
| 85 | 87 | #DSM图像视频 | ... | ... |
src/main/resources/static/pages/video/video.js
| ... | ... | @@ -161,7 +161,7 @@ function queryChannelByCarNo(treeNode, obj) { |
| 161 | 161 | $.each(rep.data, function (index, node) { |
| 162 | 162 | html += "<tr><td>" + node.channelId + "</td><td>" + node.deviceId + "</td><td>" + node.name + "</td><td>" + getBigSnap(rep.channelImageURL, node.deviceId, node.channelId) + "</td><td>" + node.manufacture; |
| 163 | 163 | html += "</td><td>" + hasAudioText(node.hasAudio) + "</td><td>" + wvpStatusText(node.status) + "</td><td><button class=\"layui-btn layui-btn-primary layui-border\" onclick=\"playWvpVideo('"; |
| 164 | - html += rep.wvpPlayURL + "','" + node.deviceId + "','" + node.channelId + "')\">播放</button><button class=\"layui-btn layui-btn-primary layui-border\" onclick=\"deviceVedioPage('" + node.deviceId + "','" + node.channelId + "')\">设备录像</button></td></tr>"; | |
| 164 | + html += rep.wvpLiveBroadcast + "','" + node.deviceId + "','" + node.channelId + "')\">播放</button><button class=\"layui-btn layui-btn-primary layui-border\" onclick=\"deviceVedioPage('" + node.deviceId + "','" + node.channelId + "')\">设备录像</button></td></tr>"; | |
| 165 | 165 | }); |
| 166 | 166 | } |
| 167 | 167 | |
| ... | ... | @@ -189,40 +189,19 @@ function getBigSnap(imageURL, deviceId, channelId) { |
| 189 | 189 | function playWvpVideo(playURL, deviceId, channelId) { |
| 190 | 190 | var idDiv = "video_" + (Date.now()); |
| 191 | 191 | var html = "'<div id='" + idDiv + "' style='padding-top: 0;'></div>'"; |
| 192 | + playURL = playURL.replace("{device}",deviceId).replace("{channel}",channelId); | |
| 192 | 193 | |
| 193 | - let player = null; | |
| 194 | - var myVar = null; | |
| 195 | - var playURL1 = playURL + deviceId + "_" + channelId + ".live.mp4"; | |
| 196 | 194 | |
| 197 | 195 | var index = layer.open({ |
| 198 | - type: 1, | |
| 196 | + type: 2, | |
| 199 | 197 | title: "视频播放", |
| 200 | 198 | area: ['1000px', '650px'], |
| 201 | 199 | height: '800px', |
| 202 | - content: html, | |
| 200 | + content: playURL, | |
| 203 | 201 | success: function (layero, index, that) { |
| 204 | - player = playVideo(playURL1, idDiv); | |
| 205 | - | |
| 206 | - myVar = setInterval(function () { | |
| 207 | - player = playVideo(playURL1, idDiv); | |
| 208 | - | |
| 209 | - }, 300000); | |
| 210 | - | |
| 211 | - | |
| 212 | - }, | |
| 213 | - beforeEnd: function (layero, index, that) { | |
| 214 | - if (player) { | |
| 215 | - player = null; | |
| 216 | - } | |
| 217 | - | |
| 218 | - if (myVar) { | |
| 219 | - window.clearInterval(myVar); | |
| 220 | - myVar = null; | |
| 221 | - } | |
| 222 | - | |
| 223 | - $("#" + idDiv).html(""); | |
| 224 | 202 | } |
| 225 | 203 | }); |
| 204 | + | |
| 226 | 205 | } |
| 227 | 206 | |
| 228 | 207 | function playVideo(url, ID) { | ... | ... |