@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/esm/index.js CHANGED
@@ -1567,8 +1567,7 @@ function renderLocalVideoPreview(container, file, videoType, resourceId, state,
1567
1567
  }
1568
1568
  newContainer.innerHTML = `
1569
1569
  <div class="relative group h-full">
1570
- <video class="w-full h-full object-contain" controls preload="auto" muted>
1571
- <source src="${videoUrl}" type="${videoType}">
1570
+ <video class="w-full h-full object-contain" controls preload="auto" muted src="${videoUrl}">
1572
1571
  ${escapeHtml(t("videoNotSupported", state))}
1573
1572
  </video>
1574
1573
  <div class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10 flex gap-1">
@@ -1629,16 +1628,13 @@ function handleVideoDelete(container, resourceId, state, deps) {
1629
1628
  </div>
1630
1629
  `;
1631
1630
  }
1632
- function renderUploadedVideoPreview(container, thumbnailUrl, videoType, state) {
1631
+ function renderUploadedVideoPreview(container, thumbnailUrl, _videoType, state) {
1633
1632
  const video = document.createElement("video");
1634
1633
  video.className = "w-full h-full object-contain";
1635
1634
  video.controls = true;
1636
1635
  video.preload = "metadata";
1637
1636
  video.muted = true;
1638
- const source = document.createElement("source");
1639
- source.src = thumbnailUrl;
1640
- source.type = videoType;
1641
- video.appendChild(source);
1637
+ video.src = thumbnailUrl;
1642
1638
  video.appendChild(
1643
1639
  document.createTextNode(t("videoNotSupported", state))
1644
1640
  );
@@ -1788,8 +1784,7 @@ async function renderFilePreviewReadonly(resourceId, state, fileName) {
1788
1784
  if (videoUrl) {
1789
1785
  previewContainer.innerHTML = `
1790
1786
  <div class="relative group">
1791
- <video class="w-full h-auto" controls preload="auto" muted>
1792
- <source src="${videoUrl}" type="${meta?.type || "video/mp4"}">
1787
+ <video class="w-full h-auto" controls preload="auto" muted src="${videoUrl}">
1793
1788
  ${escapeHtml(t("videoNotSupported", state))}
1794
1789
  </video>
1795
1790
  <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">
@@ -2011,8 +2006,7 @@ async function renderThumbnailForResource(slot, rid, meta, state) {
2011
2006
  const videoUrl = URL.createObjectURL(meta.file);
2012
2007
  slot.innerHTML = `
2013
2008
  <div class="relative group h-full w-full">
2014
- <video class="w-full h-full object-contain" preload="metadata" muted>
2015
- <source src="${videoUrl}" type="${meta.type}">
2009
+ <video class="w-full h-full object-contain" preload="metadata" muted src="${videoUrl}">
2016
2010
  </video>
2017
2011
  <div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
2018
2012
  <div class="bg-white bg-opacity-90 rounded-full p-1">
@@ -2029,8 +2023,7 @@ async function renderThumbnailForResource(slot, rid, meta, state) {
2029
2023
  if (videoUrl) {
2030
2024
  slot.innerHTML = `
2031
2025
  <div class="relative group h-full w-full">
2032
- <video class="w-full h-full object-contain" preload="metadata" muted>
2033
- <source src="${videoUrl}" type="${meta.type}">
2026
+ <video class="w-full h-full object-contain" preload="metadata" muted src="${videoUrl}">
2034
2027
  </video>
2035
2028
  <div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
2036
2029
  <div class="bg-white bg-opacity-90 rounded-full p-1">