From a51ddcc023ae91e44133e76a494d45d34451d545 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Sun, 25 May 2025 00:15:01 +1000 Subject: [PATCH] =?UTF-8?q?fix(Player):=20=E5=B0=86=20`@canplaythrough`=20?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=9B=BF=E6=8D=A2=E4=B8=BA=20`@playing`=20?= =?UTF-8?q?=E4=BB=A5=E6=9B=B4=E5=87=86=E7=A1=AE=E5=8F=8D=E6=98=A0=E7=BC=93?= =?UTF-8?q?=E5=86=B2=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `@canplaythrough` 事件在某些情况下可能无法准确反映音频的缓冲状态,导致播放状态显示不准确。将其替换为 `@playing` 事件可以更可靠地更新缓冲状态,提升用户体验。 --- src/components/Player.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Player.vue b/src/components/Player.vue index c9fbe4e..739cd11 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -68,7 +68,7 @@ function playPrevious() { :src="playQueueStore.list[playQueueStore.currentIndex] ? playQueueStore.list[playQueueStore.currentIndex].song.sourceUrl : ''" ref="playerRef" autoplay v-if="playQueueStore.list.length !== 0" @ended="playNext" @pause="playQueueStore.isPlaying = false" @play="playQueueStore.isPlaying = true" - @canplaythrough="playQueueStore.isBuffering = false" @waiting="playQueueStore.isBuffering = true"> + @playing="playQueueStore.isBuffering = false" @waiting="playQueueStore.isBuffering = true">