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,6 +108,7 @@ public class VideoController { | ||
| 108 | result.put("data", videoChannels); | 108 | result.put("data", videoChannels); |
| 109 | result.put("channelImageURL", wvpConfig.getChannelListOfImgURL()); | 109 | result.put("channelImageURL", wvpConfig.getChannelListOfImgURL()); |
| 110 | result.put("wvpPlayURL", wvpConfig.getWvpPlayURL()); | 110 | result.put("wvpPlayURL", wvpConfig.getWvpPlayURL()); |
| 111 | + result.put("wvpLiveBroadcast", wvpConfig.getWvpLiveBroadcast()); | ||
| 111 | 112 | ||
| 112 | } catch (Exception e) { | 113 | } catch (Exception e) { |
| 113 | log.error("查询车辆通道异常:[{}]", carNo, e); | 114 | log.error("查询车辆通道异常:[{}]", carNo, e); |
src/main/java/com/bsth/service/impl/videoimpl/WvpConfig.java
| @@ -28,4 +28,6 @@ public class WvpConfig { | @@ -28,4 +28,6 @@ public class WvpConfig { | ||
| 28 | 28 | ||
| 29 | @Value("${wvp.channel.history.list.url}") | 29 | @Value("${wvp.channel.history.list.url}") |
| 30 | private String wvpChannelHistoryUrl; | 30 | private String wvpChannelHistoryUrl; |
| 31 | + @Value("${wvp.channel.live.broadcast.url}") | ||
| 32 | + private String wvpLiveBroadcast; | ||
| 31 | } | 33 | } |
src/main/resources/application-test.properties
| @@ -78,8 +78,10 @@ wvp.login.url=http://61.169.120.202:28080/api/user/login | @@ -78,8 +78,10 @@ wvp.login.url=http://61.169.120.202:28080/api/user/login | ||
| 78 | wvp.channel.list.url=http://61.169.120.202:28080/api/device/query/query/channel/carNo/{carNo} | 78 | wvp.channel.list.url=http://61.169.120.202:28080/api/device/query/query/channel/carNo/{carNo} |
| 79 | wvp.channel.list.img.url=http://61.169.120.202:28080/api/device/query/snap/ | 79 | wvp.channel.list.img.url=http://61.169.120.202:28080/api/device/query/snap/ |
| 80 | wvp.channel.play.url =http://61.169.120.202:1091/rtp/ | 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 | wvp.channel.history.list.url=http://61.169.120.202:28080/api/gb_record/query/{device}/{channel}?startTime={startTimeStr}&endTime={endTimeStr} | 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 | passengerFlow.url = http://58.247.254.118:9999/images/ | 86 | passengerFlow.url = http://58.247.254.118:9999/images/ |
| 85 | #DSM图像视频 | 87 | #DSM图像视频 |
src/main/resources/static/pages/video/video.js
| @@ -161,7 +161,7 @@ function queryChannelByCarNo(treeNode, obj) { | @@ -161,7 +161,7 @@ function queryChannelByCarNo(treeNode, obj) { | ||
| 161 | $.each(rep.data, function (index, node) { | 161 | $.each(rep.data, function (index, node) { |
| 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; | 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 | html += "</td><td>" + hasAudioText(node.hasAudio) + "</td><td>" + wvpStatusText(node.status) + "</td><td><button class=\"layui-btn layui-btn-primary layui-border\" onclick=\"playWvpVideo('"; | 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,40 +189,19 @@ function getBigSnap(imageURL, deviceId, channelId) { | ||
| 189 | function playWvpVideo(playURL, deviceId, channelId) { | 189 | function playWvpVideo(playURL, deviceId, channelId) { |
| 190 | var idDiv = "video_" + (Date.now()); | 190 | var idDiv = "video_" + (Date.now()); |
| 191 | var html = "'<div id='" + idDiv + "' style='padding-top: 0;'></div>'"; | 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 | var index = layer.open({ | 195 | var index = layer.open({ |
| 198 | - type: 1, | 196 | + type: 2, |
| 199 | title: "视频播放", | 197 | title: "视频播放", |
| 200 | area: ['1000px', '650px'], | 198 | area: ['1000px', '650px'], |
| 201 | height: '800px', | 199 | height: '800px', |
| 202 | - content: html, | 200 | + content: playURL, |
| 203 | success: function (layero, index, that) { | 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 | function playVideo(url, ID) { | 207 | function playVideo(url, ID) { |