From c173f833011dad1eeaff104ee393d877c9e0f907 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Fri, 22 Aug 2025 17:44:13 +1000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=8A=A5=E5=AE=9E=E9=99=85=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PlayerWebAudio.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/PlayerWebAudio.vue b/src/components/PlayerWebAudio.vue index deffbcb..8b26286 100644 --- a/src/components/PlayerWebAudio.vue +++ b/src/components/PlayerWebAudio.vue @@ -108,6 +108,7 @@ class WebAudioPlayer { playState.reportPlayProgress(0) playState.reportActualPlaying(false) this.currentSource?.stop() + this.nextSource?.stop() } // 将音频 buffer 加载到缓存空间 @@ -149,6 +150,7 @@ class WebAudioPlayer { this.currentSource.buffer = this.audioBuffer[playQueue.currentTrack.song.cid] this.currentSource.connect(this.context.destination) this.currentSource.start(this.context.currentTime, playState.playProgress) + playState.reportActualPlaying(true) this.reportProgress() // 开始预先准备无缝播放下一首 // 获取下一首歌接入的时间点 @@ -190,6 +192,7 @@ class WebAudioPlayer { debugPlayer(this.currentSource) this.currentSource?.stop() this.nextSource?.stop() + playState.reportActualPlaying(false) } stop() {