From 1ec6c4506a278eeed7b0a663a57d78279d3cdc23 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 21 十二月 2020 11:35:28 +0800
Subject: [PATCH] 修复重复调用open rtp server
---
web_src/src/components/gb28181/devicePlayer.vue | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/web_src/src/components/gb28181/devicePlayer.vue b/web_src/src/components/gb28181/devicePlayer.vue
index ddf90c2..ed8464a 100644
--- a/web_src/src/components/gb28181/devicePlayer.vue
+++ b/web_src/src/components/gb28181/devicePlayer.vue
@@ -158,7 +158,6 @@
searchHistoryResult: [] //濯掍綋娴佸巻鍙茶褰曟悳绱㈢粨鏋�
},
showVideoDialog: false,
- ssrc: '',
streamId: '',
convertKey: '',
deviceId: '',
@@ -210,7 +209,6 @@
this.tabActiveName = tab;
this.channelId = channelId;
this.deviceId = deviceId;
- this.ssrc = "";
this.streamId = "";
this.videoUrl = ""
if (!!this.$refs.videoPlayer) {
@@ -238,7 +236,6 @@
this.hasaudio = hasAudio;
this.isLoging = false;
this.videoUrl = streamInfo.ws_flv;
- this.ssrc = streamInfo.ssrc;
this.streamId = streamInfo.streamId;
this.playFromStreamInfo(false, streamInfo)
},
@@ -248,7 +245,7 @@
this.$refs.videoPlayer.pause()
that.$axios({
method: 'post',
- url: '/api/play/' + that.ssrc + '/convert'
+ url: '/api/play/' + that.streamId + '/convert'
}).then(function (res) {
if (res.data.code == 0) {
that.convertKey = res.data.key;
@@ -296,7 +293,7 @@
}).catch(function (e) {});
that.coverPlaying = false;
that.convertKey = "";
- if (callback )callback();
+ // if (callback )callback();
},
playFromStreamInfo: function (realHasAudio, streamInfo) {
@@ -306,7 +303,7 @@
},
close: function () {
console.log('鍏抽棴瑙嗛');
- if (!this.$refs.videoPlayer){
+ if (!!this.$refs.videoPlayer){
this.$refs.videoPlayer.pause();
}
this.videoUrl = '';
@@ -368,9 +365,9 @@
},
playRecord: function (row) {
let that = this;
- if (that.ssrc != "") {
+ if (that.streamId != "") {
that.stopPlayRecord(function () {
- that.ssrc = "",
+ that.streamId = "",
that.playRecord(row);
})
} else {
@@ -380,7 +377,7 @@
row.endTime
}).then(function (res) {
var streamInfo = res.data;
- that.ssrc = streamInfo.ssrc;
+ that.streamId = streamInfo.streamId;
that.videoUrl = streamInfo.ws_flv;
});
}
@@ -390,7 +387,7 @@
this.videoUrl = '';
this.$axios({
method: 'get',
- url: '/api/playback/' + this.ssrc + '/stop'
+ url: '/api/playback/' + this.streamId + '/stop'
}).then(function (res) {
if (callback) callback()
});
--
Gitblit v1.8.0