diff options
Diffstat (limited to 'viewer/src/components/LdVideoViewer.vue')
-rw-r--r-- | viewer/src/components/LdVideoViewer.vue | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/viewer/src/components/LdVideoViewer.vue b/viewer/src/components/LdVideoViewer.vue index 49f687f..b7a7c35 100644 --- a/viewer/src/components/LdVideoViewer.vue +++ b/viewer/src/components/LdVideoViewer.vue | |||
@@ -21,7 +21,13 @@ | |||
21 | <template> | 21 | <template> |
22 | <!-- intermediate container necessary to eliminate the scrollbar --> | 22 | <!-- intermediate container necessary to eliminate the scrollbar --> |
23 | <div class="fill no-scroll"> | 23 | <div class="fill no-scroll"> |
24 | <video class="fill" :src="itemResourceUrl()" :poster="thumbnailResourceUrl()" preload="auto" controls> | 24 | <video |
25 | class="fill" | ||
26 | :src="itemResourceUrl" | ||
27 | :poster="thumbnailResourceUrl" | ||
28 | preload="auto" | ||
29 | controls | ||
30 | > | ||
25 | <ld-download :item="videoItem" /> | 31 | <ld-download :item="videoItem" /> |
26 | </video> | 32 | </video> |
27 | </div> | 33 | </div> |
@@ -30,21 +36,19 @@ | |||
30 | <script lang="ts"> | 36 | <script lang="ts"> |
31 | import { Component, Prop, Vue } from "vue-property-decorator"; | 37 | import { Component, Prop, Vue } from "vue-property-decorator"; |
32 | 38 | ||
33 | @Component export default class LdVideoViewer extends Vue { | 39 | @Component |
40 | export default class LdVideoViewer extends Vue { | ||
34 | @Prop({ required: true }) readonly videoItem!: Gallery.Video; | 41 | @Prop({ required: true }) readonly videoItem!: Gallery.Video; |
35 | 42 | ||
36 | itemResourceUrl(): string { | 43 | get itemResourceUrl(): string { |
37 | return this.$galleryStore.resourceRoot + this.videoItem.properties.resource; | 44 | return this.$galleryStore.resourceRoot + this.videoItem.properties.resource; |
38 | } | 45 | } |
39 | 46 | ||
40 | thumbnailResourceUrl(): string { | 47 | get thumbnailResourceUrl(): string { |
41 | return this.videoItem.thumbnail | 48 | return this.videoItem.thumbnail ? this.$galleryStore.resourceRoot + this.videoItem.thumbnail.resource : ""; |
42 | ? this.$galleryStore.resourceRoot + this.videoItem.thumbnail.resource | ||
43 | : ""; | ||
44 | } | 49 | } |
45 | } | 50 | } |
46 | </script> | 51 | </script> |
47 | 52 | ||
48 | <style lang="scss" module> | 53 | <style lang="scss" module> |
49 | |||
50 | </style> | 54 | </style> |