Window out of focus will now pause animated artwork

This commit is contained in:
booploops 2021-12-07 18:50:08 -08:00
parent b5ee061205
commit e5a1762650
2 changed files with 316 additions and 241 deletions

View file

@ -1,7 +1,7 @@
<script type="text/x-template" id="animatedartwork-view">
<template v-if="video">
<div class="animated" v-bind:vid="app.hashCode(video).toString()">
<video loop id = "animated-artwork"></video>
<video class="animated-artwork-video" loop id="animated-artwork"></video>
</div>
</template>
</script>
@ -12,9 +12,10 @@
props: ['video'],
mounted() {
if (this.video) {
this.$nextTick(function () {
app.playAnimatedArtwork(this.video);
})}
this.$nextTick(function () {
app.playAnimatedArtwork(this.video);
})
}
}
});
</script>