added toggle for animated artwork background, animated background will stop when window is out of focus

This commit is contained in:
booploops 2022-01-03 20:51:15 -08:00
parent 05f152247d
commit e087129b01
5 changed files with 67 additions and 18 deletions

View file

@ -223,6 +223,7 @@ const app = new Vue({
mxmtoken: "",
mkIsReady: false,
playerReady: false,
animateBackground: false,
lyricon: false,
currentTrackID: '',
currentTrackIDBG: '',
@ -2583,10 +2584,12 @@ const app = new Vue({
document.querySelectorAll(".animated-artwork-video").forEach(el => {
el.play()
})
this.animateBackground = true
} else {
document.querySelectorAll(".animated-artwork-video").forEach(el => {
el.pause()
})
this.animateBackground = false
}
},
async nowPlayingContextMenu(event) {