quasar-ui-danx 0.3.31 → 0.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
|
});
|