Fixed track preview fadeout on non Chromium browsers

This commit is contained in:
RemixDev 2020-08-13 23:04:59 +02:00
parent 2bc73e5f7c
commit 26d68a9e41
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,10 @@ export default {
onTimeUpdate() {
// Prevents first time entering in this function
if (isNaN(this.$refs.preview.duration)) return
if (this.$refs.preview.currentTime <= this.$refs.preview.duration - 1) return
let duration = this.$refs.preview.duration
if (!isFinite(duration)) duration = 30
if (duration - this.$refs.preview.currentTime >= 1) return
if (this.previewStopped) return
$(this.$refs.preview).animate({ volume: 0 }, 800)