@dmitryvim/form-builder 0.2.14 → 0.2.15
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 +49 -53
- package/dist/browser/{formbuilder.v0.2.14.min.js → formbuilder.v0.2.15.min.js} +49 -53
- package/dist/cjs/index.cjs +6 -13
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +6 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/form-builder.js +49 -53
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1589,8 +1589,7 @@ function renderLocalVideoPreview(container, file, videoType, resourceId, state,
|
|
|
1589
1589
|
}
|
|
1590
1590
|
newContainer.innerHTML = `
|
|
1591
1591
|
<div class="relative group h-full">
|
|
1592
|
-
<video class="w-full h-full object-contain" controls preload="auto" muted>
|
|
1593
|
-
<source src="${videoUrl}" type="${videoType}">
|
|
1592
|
+
<video class="w-full h-full object-contain" controls preload="auto" muted src="${videoUrl}">
|
|
1594
1593
|
${escapeHtml(t("videoNotSupported", state))}
|
|
1595
1594
|
</video>
|
|
1596
1595
|
<div class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10 flex gap-1">
|
|
@@ -1652,16 +1651,13 @@ function handleVideoDelete(container, resourceId, state, deps) {
|
|
|
1652
1651
|
</div>
|
|
1653
1652
|
`;
|
|
1654
1653
|
}
|
|
1655
|
-
function renderUploadedVideoPreview(container, thumbnailUrl,
|
|
1654
|
+
function renderUploadedVideoPreview(container, thumbnailUrl, _videoType, state) {
|
|
1656
1655
|
const video = document.createElement("video");
|
|
1657
1656
|
video.className = "w-full h-full object-contain";
|
|
1658
1657
|
video.controls = true;
|
|
1659
1658
|
video.preload = "metadata";
|
|
1660
1659
|
video.muted = true;
|
|
1661
|
-
|
|
1662
|
-
source.src = thumbnailUrl;
|
|
1663
|
-
source.type = videoType;
|
|
1664
|
-
video.appendChild(source);
|
|
1660
|
+
video.src = thumbnailUrl;
|
|
1665
1661
|
video.appendChild(
|
|
1666
1662
|
document.createTextNode(t("videoNotSupported", state))
|
|
1667
1663
|
);
|
|
@@ -1813,8 +1809,7 @@ async function renderFilePreviewReadonly(resourceId, state, fileName) {
|
|
|
1813
1809
|
if (videoUrl) {
|
|
1814
1810
|
previewContainer.innerHTML = `
|
|
1815
1811
|
<div class="relative group">
|
|
1816
|
-
<video class="w-full h-auto" controls preload="auto" muted>
|
|
1817
|
-
<source src="${videoUrl}" type="${(meta == null ? void 0 : meta.type) || "video/mp4"}">
|
|
1812
|
+
<video class="w-full h-auto" controls preload="auto" muted src="${videoUrl}">
|
|
1818
1813
|
${escapeHtml(t("videoNotSupported", state))}
|
|
1819
1814
|
</video>
|
|
1820
1815
|
<div class="absolute inset-0 bg-black bg-opacity-20 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center pointer-events-none">
|
|
@@ -2038,8 +2033,7 @@ async function renderThumbnailForResource(slot, rid, meta, state) {
|
|
|
2038
2033
|
const videoUrl = URL.createObjectURL(meta.file);
|
|
2039
2034
|
slot.innerHTML = `
|
|
2040
2035
|
<div class="relative group h-full w-full">
|
|
2041
|
-
<video class="w-full h-full object-contain" preload="metadata" muted>
|
|
2042
|
-
<source src="${videoUrl}" type="${meta.type}">
|
|
2036
|
+
<video class="w-full h-full object-contain" preload="metadata" muted src="${videoUrl}">
|
|
2043
2037
|
</video>
|
|
2044
2038
|
<div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
|
|
2045
2039
|
<div class="bg-white bg-opacity-90 rounded-full p-1">
|
|
@@ -2056,8 +2050,7 @@ async function renderThumbnailForResource(slot, rid, meta, state) {
|
|
|
2056
2050
|
if (videoUrl) {
|
|
2057
2051
|
slot.innerHTML = `
|
|
2058
2052
|
<div class="relative group h-full w-full">
|
|
2059
|
-
<video class="w-full h-full object-contain" preload="metadata" muted>
|
|
2060
|
-
<source src="${videoUrl}" type="${meta.type}">
|
|
2053
|
+
<video class="w-full h-full object-contain" preload="metadata" muted src="${videoUrl}">
|
|
2061
2054
|
</video>
|
|
2062
2055
|
<div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
|
|
2063
2056
|
<div class="bg-white bg-opacity-90 rounded-full p-1">
|