回报实际播放事件

This commit is contained in:
Astrian Zheng 2025-08-22 17:44:13 +10:00
parent f42ba2662b
commit c173f83301
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -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() {