css animations are not stopped when window is out of focus
This commit is contained in:
parent
35eb7a2112
commit
52edbaabc3
2 changed files with 153 additions and 101 deletions
|
@ -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
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue