File tree 5 files changed +15
-6
lines changed
5 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 23
23
<template>
24
24
<!-- Plyr currently replaces the parent. Wrapping to prevent this
25
25
https://github.com/redxtech/vue-plyr/issues/259 -->
26
- <div v-if="davPath ">
26
+ <div v-if="src ">
27
27
<VuePlyr ref="plyr"
28
28
:options="options">
29
29
<audio ref="audio"
30
30
:autoplay="active"
31
- :src="davPath "
31
+ :src="src "
32
32
preload="metadata"
33
33
@ended="donePlaying"
34
34
@canplay="doneLoading">
Original file line number Diff line number Diff line change 23
23
<template>
24
24
<ImageEditor v-if="editing"
25
25
:mime="mime"
26
- :src="davPath "
26
+ :src="src "
27
27
:filename="filename"
28
28
@close="onClose" />
29
29
@@ -77,6 +77,9 @@ export default {
77
77
},
78
78
79
79
computed: {
80
+ src() {
81
+ return this.source ?? this.davPath
82
+ },
80
83
zoomHeight() {
81
84
return Math.round(this.height * this.zoomRatio)
82
85
},
@@ -87,6 +90,10 @@ export default {
87
90
88
91
asyncComputed: {
89
92
data() {
93
+ if (this.source) {
94
+ return this.source
95
+ }
96
+
90
97
switch (this.mime) {
91
98
case 'image/svg+xml':
92
99
return this.getBase64FromImage()
Original file line number Diff line number Diff line change 23
23
<template>
24
24
<!-- Plyr currently replaces the parent. Wrapping to prevent this
25
25
https://github.com/redxtech/vue-plyr/issues/259 -->
26
- <div v-if="davPath ">
26
+ <div v-if="src ">
27
27
<VuePlyr ref="plyr"
28
28
:options="options"
29
29
:style="{
34
34
:autoplay="active ? true : null"
35
35
:playsinline="true"
36
36
:poster="livePhotoPath"
37
- :src="davPath "
37
+ :src="src "
38
38
preload="metadata"
39
39
@ended="donePlaying"
40
40
@canplay="doneLoading"
Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ export default {
107
107
ext ( ) {
108
108
return parsePath ( this . basename ) . ext
109
109
} ,
110
+ src ( ) {
111
+ return this . source ?? this . davPath
112
+ } ,
110
113
} ,
111
114
112
115
watch : {
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ export default {
52
52
basename : this . basename ,
53
53
} )
54
54
} ,
55
-
56
55
} ,
57
56
methods : {
58
57
/**
You can’t perform that action at this time.
0 commit comments