@dmitryvim/form-builder 0.2.4 → 0.2.5
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/dist/browser/formbuilder.min.js +28 -28
- package/dist/browser/{formbuilder.v0.2.4.min.js → formbuilder.v0.2.5.min.js} +28 -28
- package/dist/cjs/index.cjs +16 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +16 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/form-builder.js +28 -28
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1265,8 +1265,22 @@ async function renderFilePreview(container, resourceId, state, options = {}) {
|
|
|
1265
1265
|
const thumbnailUrl = await state.config.getThumbnail(resourceId);
|
|
1266
1266
|
if (thumbnailUrl) {
|
|
1267
1267
|
clear(container);
|
|
1268
|
-
|
|
1269
|
-
|
|
1268
|
+
if (meta && meta.type && meta.type.startsWith("video/")) {
|
|
1269
|
+
const video = document.createElement("video");
|
|
1270
|
+
video.className = "w-full h-full object-contain";
|
|
1271
|
+
video.controls = true;
|
|
1272
|
+
video.preload = "metadata";
|
|
1273
|
+
video.muted = true;
|
|
1274
|
+
const source = document.createElement("source");
|
|
1275
|
+
source.src = thumbnailUrl;
|
|
1276
|
+
source.type = meta.type;
|
|
1277
|
+
video.appendChild(source);
|
|
1278
|
+
video.appendChild(document.createTextNode("Your browser does not support the video tag."));
|
|
1279
|
+
container.appendChild(video);
|
|
1280
|
+
} else {
|
|
1281
|
+
img.src = thumbnailUrl;
|
|
1282
|
+
container.appendChild(img);
|
|
1283
|
+
}
|
|
1270
1284
|
} else {
|
|
1271
1285
|
setEmptyFileContainer(container, state);
|
|
1272
1286
|
}
|