播放状态检查

This commit is contained in:
2023-10-04 07:10:49 +08:00
parent 71d47ebbb4
commit 85d4b194bc
1 changed files with 3 additions and 3 deletions

View File

@ -157,9 +157,9 @@ export default class MusicList {
this.event.onplay(item) this.event.onplay(item)
} }
async stop() { async stop() {
//if (!this.audio.paused) { if (this.audio.paused) {
// this.audio.pause() return console.error('暂停播放:音乐播放器不是播放状态!')
//} }
this.audio.pause() this.audio.pause()
this.audio.src = '' this.audio.src = ''
this.event.onstop(this.playing) this.event.onstop(this.playing)