quasar-ui-danx 0.3.31 → 0.3.32

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -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
  });