From a2c27f2b7ed34acd354defe60b81d066cc0b4d0f Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Thu, 28 Dec 2023 15:54:19 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=92=AD=E6=94=BE=E6=96=B9=E5=BC=8F=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=87=AA=E5=8A=A8=E6=92=AD=E6=94=BE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/common/jessibuca.vue | 8 +++----- web_src/src/components/dialog/devicePlayer.vue | 9 --------- web_src/src/components/live.vue | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/web_src/src/components/common/jessibuca.vue b/web_src/src/components/common/jessibuca.vue index c23cd71ec..c3a978916 100755 --- a/web_src/src/components/common/jessibuca.vue +++ b/web_src/src/components/common/jessibuca.vue @@ -44,7 +44,7 @@ export default { vod: true, // 点播 }; }, - props: ['videoUrl', 'error', 'hasAudio', 'height', 'autoPlay'], + props: ['videoUrl', 'error', 'hasAudio', 'height'], mounted() { let paramUrl = decodeURIComponent(this.$route.params.url) this.$nextTick(() => { @@ -56,9 +56,6 @@ export default { this.videoUrl = paramUrl; } this.btnDom = document.getElementById("buttonsBox"); - if (this.autoPlay) { - this.play(this.videoUrl); - } }) }, watch: { @@ -67,7 +64,8 @@ export default { this.$nextTick(() => { this.play(val); }) - } + }, + immediate: true } }, methods: { diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue index 74384d8e8..4ea8b9869 100755 --- a/web_src/src/components/dialog/devicePlayer.vue +++ b/web_src/src/components/dialog/devicePlayer.vue @@ -453,15 +453,6 @@ export default { playFromStreamInfo: function (realHasAudio, streamInfo) { this.showVideoDialog = true; this.hasaudio = realHasAudio && this.hasaudio; - if (this.$refs[this.activePlayer]) { - this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo)) - }else { - this.$nextTick(() => { - this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo)) - }); - } - - }, close: function () { console.log('关闭视频'); diff --git a/web_src/src/components/live.vue b/web_src/src/components/live.vue index d2ac1956e..4a7af491e 100755 --- a/web_src/src/components/live.vue +++ b/web_src/src/components/live.vue @@ -18,7 +18,7 @@ @click="playerIdx = (i-1)">
{{ i }}
+ @destroy="destroy"/>