quasar-ui-danx 0.3.30 → 0.3.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -167,9 +167,16 @@ 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
- () => computedImage.value?.transcodes?.compress?.url || computedImage.value?.blobUrl || computedImage.value?.url
172
- );
170
+ const previewUrl = computed(() => {
171
+ const transcodes = computedImage.value?.transcodes;
172
+
173
+ console.log("calc preview", transcodes, computedImage.value);
174
+ if (isVideo.value && transcodes?.mp4?.url) {
175
+ return transcodes.mp4.url;
176
+ }
177
+
178
+ return transcodes?.compress?.url || computedImage.value?.blobUrl || computedImage.value?.url;
179
+ });
173
180
  const thumbUrl = computed(() => {
174
181
  return computedImage.value?.transcodes?.thumb?.url;
175
182
  });