diff --git a/src/utils/Player.js b/src/utils/Player.js index 12a7e6d..0e48e76 100644 --- a/src/utils/Player.js +++ b/src/utils/Player.js @@ -308,6 +308,9 @@ export default class { src: [source], html5: true, format: ['mp3', 'flac'], + onend: () => { + this._nextTrackCallback(); + }, }); if (autoplay) { this.play(); @@ -317,9 +320,6 @@ export default class { setTrayLikeState(store.state.liked.songs.includes(this.currentTrack.id)); } this.setOutputDevice(); - this._howler.once('end', () => { - this._nextTrackCallback(); - }); } _getAudioSourceFromCache(id) { return getTrackSource(id).then(t => {