Commit 513b810631e339f765456d95f487139a192c4a9c

Authored by 648540858
Committed by GitHub
2 parents 858093fe 6dc8d52d

Merge pull request #110 from hotleave/playback

解决录像播放相关问题
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
@@ -154,7 +154,7 @@ public class PlayController { @@ -154,7 +154,7 @@ public class PlayController {
154 }) 154 })
155 @PostMapping("/convert/{streamId}") 155 @PostMapping("/convert/{streamId}")
156 public ResponseEntity<String> playConvert(@PathVariable String streamId) { 156 public ResponseEntity<String> playConvert(@PathVariable String streamId) {
157 - StreamInfo streamInfo = redisCatchStorage.queryPlayByStreamId(streamId); 157 + StreamInfo streamInfo = streamId.startsWith("gb_play_") ? redisCatchStorage.queryPlayByStreamId(streamId) : redisCatchStorage.queryPlaybackByStreamId(streamId);
158 if (streamInfo == null) { 158 if (streamInfo == null) {
159 logger.warn("视频转码API调用失败!, 视频流已经停止!"); 159 logger.warn("视频转码API调用失败!, 视频流已经停止!");
160 return new ResponseEntity<String>("未找到视频流信息, 视频流可能已经停止", HttpStatus.OK); 160 return new ResponseEntity<String>("未找到视频流信息, 视频流可能已经停止", HttpStatus.OK);
web_src/src/components/dialog/devicePlayer.vue
@@ -424,8 +424,9 @@ export default { @@ -424,8 +424,9 @@ export default {
424 row.endTime 424 row.endTime
425 }).then(function (res) { 425 }).then(function (res) {
426 var streamInfo = res.data; 426 var streamInfo = res.data;
  427 + that.app = streamInfo.app;
427 that.streamId = streamInfo.streamId; 428 that.streamId = streamInfo.streamId;
428 - that.videoUrl = this.getUrlByStreamInfo(streamInfo); 429 + that.videoUrl = that.getUrlByStreamInfo(streamInfo);
429 that.recordPlay = true; 430 that.recordPlay = true;
430 }); 431 });
431 } 432 }