Commit 0898c63ca3de75669f88354b23eeb2798d1db471
1 parent
242a7667
修复停止点播后,再次调用停止无法识别
Showing
3 changed files
with
10 additions
and
4 deletions
README.md
| ... | ... | @@ -48,10 +48,11 @@ web界面系统设置 |
| 48 | 48 | 使用mysql作为数据库 |
| 49 | 49 | |
| 50 | 50 | # 项目部署 |
| 51 | -参考:[编译运行](https://github.com/648540858/wvp-GB28181/wiki/%E7%BC%96%E8%AF%91%E8%BF%90%E8%A1%8C) | |
| 51 | +参考:[WIKI](https://github.com/648540858/wvp-GB28181-pro/wiki) | |
| 52 | 52 | |
| 53 | 53 | # gitee同步仓库 |
| 54 | -https://gitee.com/18010473990/wvp-GB28181.git | |
| 54 | +https://gitee.com/18010473990/wvp-GB28181.git | |
| 55 | + | |
| 55 | 56 | # 使用帮助 |
| 56 | 57 | QQ群: 901799015 |
| 57 | 58 | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
| ... | ... | @@ -61,7 +61,6 @@ public class PlayController { |
| 61 | 61 | storager.stopPlay(streamInfo); |
| 62 | 62 | streamInfo = cmder.playStreamCmd(device, channelId); |
| 63 | 63 | } |
| 64 | - | |
| 65 | 64 | } |
| 66 | 65 | String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); |
| 67 | 66 | // 等待推流, TODO 默认超时30s |
| ... | ... | @@ -135,7 +134,7 @@ public class PlayController { |
| 135 | 134 | cmder.streamByeCmd(ssrc); |
| 136 | 135 | StreamInfo streamInfo = storager.queryPlayBySSRC(ssrc); |
| 137 | 136 | if (streamInfo == null) |
| 138 | - return new ResponseEntity<String>(HttpStatus.PAYMENT_REQUIRED); | |
| 137 | + return new ResponseEntity<String>("ssrc not found", HttpStatus.OK); | |
| 139 | 138 | storager.stopPlay(streamInfo); |
| 140 | 139 | if (logger.isDebugEnabled()) { |
| 141 | 140 | logger.debug(String.format("设备预览停止API调用,ssrc:%s", ssrc)); | ... | ... |
web_src/src/components/channelList.vue
| ... | ... | @@ -234,6 +234,12 @@ export default { |
| 234 | 234 | }).then(function (res) { |
| 235 | 235 | console.log(JSON.stringify(res)); |
| 236 | 236 | that.initData(); |
| 237 | + }).catch(function (error) { | |
| 238 | + if (error.response.status == 402) { // 已经停止过 | |
| 239 | + that.initData(); | |
| 240 | + }else { | |
| 241 | + console.log(e) | |
| 242 | + } | |
| 237 | 243 | }); |
| 238 | 244 | }, |
| 239 | 245 | ... | ... |