Fixed track preview fadeout on non Chromium browsers
This commit is contained in:
parent
2bc73e5f7c
commit
26d68a9e41
File diff suppressed because one or more lines are too long
@ -30,7 +30,10 @@ export default {
|
|||||||
onTimeUpdate() {
|
onTimeUpdate() {
|
||||||
// Prevents first time entering in this function
|
// Prevents first time entering in this function
|
||||||
if (isNaN(this.$refs.preview.duration)) return
|
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)
|
$(this.$refs.preview).animate({ volume: 0 }, 800)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user