Skip to content

Commit c6ff0b6

Browse files
Fix opening non-dav audio, gif and video
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent 0a45152 commit c6ff0b6

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

src/components/Audios.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
<template>
2424
<!-- Plyr currently replaces the parent. Wrapping to prevent this
2525
https://github.com/redxtech/vue-plyr/issues/259 -->
26-
<div v-if="davPath">
26+
<div v-if="src">
2727
<VuePlyr ref="plyr"
2828
:options="options">
2929
<audio ref="audio"
3030
:autoplay="active"
31-
:src="davPath"
31+
:src="src"
3232
preload="metadata"
3333
@ended="donePlaying"
3434
@canplay="doneLoading">

src/components/Images.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<template>
2424
<ImageEditor v-if="editing"
2525
:mime="mime"
26-
:src="davPath"
26+
:src="src"
2727
:filename="filename"
2828
@close="onClose" />
2929

@@ -77,6 +77,9 @@ export default {
7777
},
7878

7979
computed: {
80+
src() {
81+
return this.source ?? this.davPath
82+
},
8083
zoomHeight() {
8184
return Math.round(this.height * this.zoomRatio)
8285
},
@@ -87,6 +90,10 @@ export default {
8790

8891
asyncComputed: {
8992
data() {
93+
if (this.source) {
94+
return this.source
95+
}
96+
9097
switch (this.mime) {
9198
case 'image/svg+xml':
9299
return this.getBase64FromImage()

src/components/Videos.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<template>
2424
<!-- Plyr currently replaces the parent. Wrapping to prevent this
2525
https://github.com/redxtech/vue-plyr/issues/259 -->
26-
<div v-if="davPath">
26+
<div v-if="src">
2727
<VuePlyr ref="plyr"
2828
:options="options"
2929
:style="{
@@ -34,7 +34,7 @@
3434
:autoplay="active ? true : null"
3535
:playsinline="true"
3636
:poster="livePhotoPath"
37-
:src="davPath"
37+
:src="src"
3838
preload="metadata"
3939
@ended="donePlaying"
4040
@canplay="doneLoading"

src/mixins/Mime.js

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ export default {
107107
ext() {
108108
return parsePath(this.basename).ext
109109
},
110+
src() {
111+
return this.source ?? this.davPath
112+
},
110113
},
111114

112115
watch: {

src/mixins/PreviewUrl.js

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export default {
5252
basename: this.basename,
5353
})
5454
},
55-
5655
},
5756
methods: {
5857
/**

0 commit comments

Comments
 (0)