From 89244932c6185cd39e9a9f8aa8bf3acf99329335 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期日, 11 四月 2021 15:00:52 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0 --- web_src/src/components/dialog/devicePlayer.vue | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue index 48d295a..30de142 100644 --- a/web_src/src/components/dialog/devicePlayer.vue +++ b/web_src/src/components/dialog/devicePlayer.vue @@ -136,7 +136,7 @@ </template> <script> -import player from '../dialog/player.vue' +import player from '../dialog/rtcPlayer.vue' export default { name: 'devicePlayer', props: {}, @@ -163,6 +163,7 @@ }, showVideoDialog: false, streamId: '', + app : '', convertKey: '', deviceId: '', channelId: '', @@ -198,7 +199,7 @@ if (tab.name == "codec") { this.$axios({ method: 'get', - url: '/zlm/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app=rtp&stream='+ this.streamId + url: '/zlm/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId }).then(function (res) { that.tracksLoading = false; if (res.data.code == 0 && res.data.online) { @@ -218,6 +219,7 @@ this.channelId = channelId; this.deviceId = deviceId; this.streamId = ""; + this.app = ""; this.videoUrl = "" if (!!this.$refs.videoPlayer) { this.$refs.videoPlayer.pause(); @@ -228,11 +230,11 @@ break; case "record": this.showVideoDialog = true; - this.videoHistory.date = param.date; this.queryRecords() break; case "streamPlay": + this.tabActiveName = "media"; this.showRrecord = false, this.showPtz = false, this.play(param.streamInfo, param.hasAudio) @@ -248,8 +250,9 @@ this.hasaudio = hasAudio; this.isLoging = false; - this.videoUrl = streamInfo.ws_flv; + this.videoUrl = streamInfo.rtc; this.streamId = streamInfo.streamId; + this.app = streamInfo.app; this.playFromStreamInfo(false, streamInfo) }, coverPlay: function () { @@ -258,7 +261,7 @@ this.$refs.videoPlayer.pause() that.$axios({ method: 'post', - url: '/api/play/' + that.streamId + '/convert' + url: '/api/play/convert/' + that.streamId }).then(function (res) { if (res.data.code == 0) { that.convertKey = res.data.key; @@ -295,7 +298,7 @@ that.$refs.videoPlayer.pause() this.$axios({ method: 'post', - url: '/api/play/convert/stop/' + this.convertKey + url: '/api/play/convertStop/' + this.convertKey }).then(function (res) { if (res.data.code == 0) { console.log(res.data.msg) @@ -390,7 +393,7 @@ } else { this.$axios({ method: 'get', - url: '/api/playback/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' + + url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' + row.endTime }).then(function (res) { var streamInfo = res.data; @@ -405,7 +408,7 @@ this.videoUrl = ''; this.$axios({ method: 'get', - url: '/api/playback/' + this.streamId + '/stop' + url: '/api/playback/stop/' + this.streamId }).then(function (res) { if (callback) callback() }); -- Gitblit v1.8.0