animated artworks
This commit is contained in:
parent
0190beb5b8
commit
44792c0918
8 changed files with 114 additions and 11 deletions
|
@ -0,0 +1,20 @@
|
|||
<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>
|
||||
</div>
|
||||
</template>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('animatedartwork-view', {
|
||||
template: '#animatedartwork-view',
|
||||
props: ['video'],
|
||||
mounted() {
|
||||
if (this.video) {
|
||||
this.$nextTick(function () {
|
||||
app.playAnimatedArtwork(this.video);
|
||||
})}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -9,6 +9,9 @@
|
|||
<div class="mediaitem-artwork">
|
||||
<img :src="app.getMediaItemArtwork(url, size)"
|
||||
class="mediaitem-artwork--img">
|
||||
<div v-if="video" class="animatedartwork-view-box">
|
||||
<animatedartwork-view :video="video"></animatedartwork-view>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</script>
|
||||
|
@ -16,7 +19,7 @@
|
|||
<script>
|
||||
Vue.component('mediaitem-artwork', {
|
||||
template: '#mediaitem-artwork',
|
||||
props: ['size', 'url', 'type'],
|
||||
props: ['size', 'url', 'type', 'video'],
|
||||
methods: {
|
||||
getArtworkStyle() {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue