From 52a1260c980aa4d468dcd19bcf559de0c11de2d3 Mon Sep 17 00:00:00 2001 From: zyronon Date: Wed, 3 Apr 2024 01:41:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=9B=B4=E6=92=AD=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/slide/BVideo.vue | 43 +++++++++++++++--------------- src/pages/home/LivePage.vue | 7 ++--- src/pages/home/slide/Slide0.vue | 1 + src/pages/home/slide/Slide2.vue | 10 ++++++- src/pages/home/slide/SlideList.vue | 19 ++++++++----- 5 files changed, 48 insertions(+), 32 deletions(-) diff --git a/src/components/slide/BVideo.vue b/src/components/slide/BVideo.vue index fd99af9..ed50115 100644 --- a/src/components/slide/BVideo.vue +++ b/src/components/slide/BVideo.vue @@ -299,33 +299,34 @@ export default { }, click({ uniqueId, index, type }) { if (this.position.uniqueId === uniqueId && this.position.index === index) { - if (this.isLive) { - if (type === EVENT_KEY.ITEM_TOGGLE) { - bus.emit(EVENT_KEY.NAV, { - path: '/home/live', - query: { id: this.item.id } - }) - } - } else { - if (type === EVENT_KEY.ITEM_TOGGLE) { + if (type === EVENT_KEY.ITEM_TOGGLE) { + if (this.isLive) { + if (type === EVENT_KEY.ITEM_TOGGLE) { + this.pause() + bus.emit(EVENT_KEY.NAV, { + path: '/home/live', + query: { id: this.item.id } + }) + } + }else { if (this.status === SlideItemPlayStatus.Play) { this.pause() } else { this.play() } } - if (type === EVENT_KEY.ITEM_STOP) { - this.$refs.video.currentTime = 0 - this.ignoreWaiting = true - this.pause() - setTimeout(() => (this.ignoreWaiting = false), 300) - } - if (type === EVENT_KEY.ITEM_PLAY) { - this.$refs.video.currentTime = 0 - this.ignoreWaiting = true - this.play() - setTimeout(() => (this.ignoreWaiting = false), 300) - } + } + if (type === EVENT_KEY.ITEM_STOP) { + this.$refs.video.currentTime = 0 + this.ignoreWaiting = true + this.pause() + setTimeout(() => (this.ignoreWaiting = false), 300) + } + if (type === EVENT_KEY.ITEM_PLAY) { + this.$refs.video.currentTime = 0 + this.ignoreWaiting = true + this.play() + setTimeout(() => (this.ignoreWaiting = false), 300) } } }, diff --git a/src/pages/home/LivePage.vue b/src/pages/home/LivePage.vue index ffba64b..e5ddf3b 100644 --- a/src/pages/home/LivePage.vue +++ b/src/pages/home/LivePage.vue @@ -2,6 +2,7 @@
-