Lower delay for loading sound

This commit is contained in:
JuniorJPDJ 2021-06-24 18:08:12 +02:00 committed by Georg Krause
parent 13c3b22b02
commit 61d7c8bf14
1 changed files with 2 additions and 3 deletions

View File

@ -743,14 +743,13 @@ export default {
} }
this.nextTrackPreloaded = false this.nextTrackPreloaded = false
clearTimeout(this.playTimeout) clearTimeout(this.playTimeout)
let self = this
if (this.currentSound) { if (this.currentSound) {
this.currentSound.pause() this.currentSound.pause()
} }
this.$store.commit("player/isLoadingAudio", true) this.$store.commit("player/isLoadingAudio", true)
this.playTimeout = setTimeout(async () => { this.playTimeout = setTimeout(async () => {
await self.loadSound(newValue, oldValue) await this.loadSound(newValue, oldValue)
}, 500); }, 100);
this.updateMetadata() this.updateMetadata()
}, },
immediate: false immediate: false