quasar-ui-danx 0.3.31 → 0.3.33
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -73,7 +73,8 @@ function isVideo(file) {
|
|
73
73
|
}
|
74
74
|
|
75
75
|
function getPreviewUrl(file) {
|
76
|
-
|
76
|
+
const transcodes = file?.transcodes;
|
77
|
+
return transcodes?.mp4?.url || transcodes?.compress?.url || file.blobUrl || file.url;
|
77
78
|
}
|
78
79
|
|
79
80
|
function getThumbUrl(file) {
|
@@ -167,9 +167,15 @@ const mimeType = computed(
|
|
167
167
|
const isImage = computed(() => !!mimeType.value.match(/^image\//));
|
168
168
|
const isVideo = computed(() => !!mimeType.value.match(/^video\//));
|
169
169
|
const isPdf = computed(() => !!mimeType.value.match(/^application\/pdf/));
|
170
|
-
const previewUrl = computed(
|
171
|
-
|
172
|
-
|
170
|
+
const previewUrl = computed(() => {
|
171
|
+
const transcodes = computedImage.value?.transcodes;
|
172
|
+
|
173
|
+
if (isVideo.value && transcodes?.mp4?.url) {
|
174
|
+
return transcodes.mp4.url;
|
175
|
+
}
|
176
|
+
|
177
|
+
return transcodes?.compress?.url || computedImage.value?.blobUrl || computedImage.value?.url;
|
178
|
+
});
|
173
179
|
const thumbUrl = computed(() => {
|
174
180
|
return computedImage.value?.transcodes?.thumb?.url;
|
175
181
|
});
|