css animations are not stopped when window is out of focus

This commit is contained in:
booploops 2022-02-01 21:05:44 -08:00
parent 35eb7a2112
commit 52edbaabc3
2 changed files with 153 additions and 101 deletions

View file

@ -3270,11 +3270,13 @@ const app = new Vue({
document.querySelectorAll(".animated-artwork-video").forEach(el => {
el.play()
})
document.querySelector("body").classList.remove("stopanimation")
this.animateBackground = true
} else {
document.querySelectorAll(".animated-artwork-video").forEach(el => {
el.pause()
})
document.querySelector("body").classList.add("stopanimation")
this.animateBackground = false
}
},