@layers-app/editor-video 0.1.3 → 0.1.4

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/index.js CHANGED
@@ -168,16 +168,7 @@ function getVideoIframeUrl(platform, id) {
168
168
  url = `https://www.youtube-nocookie.com/embed/${id}`;
169
169
  break;
170
170
  case "download":
171
- if (!id.includes("/")) {
172
- const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
173
- if (uuidRegex.test(id)) {
174
- url = `/v1/attachments/${id}`;
175
- } else {
176
- url = `${id}`;
177
- }
178
- } else {
179
- url = `${id}`;
180
- }
171
+ url = id;
181
172
  break;
182
173
  case "vk":
183
174
  const ids = id.split("-");
@@ -4517,7 +4508,7 @@ function VideoUploadComponent({
4517
4508
  const subtitles = subtitlesOverride ?? (resolvedStatus == null ? void 0 : resolvedStatus.subtitles) ?? void 0;
4518
4509
  const inferredNativeVideoUrl = useMemo(() => {
4519
4510
  if (fallbackNativeVideoUrl) return fallbackNativeVideoUrl;
4520
- if (platform === "download" || platform === "link") {
4511
+ if (platform === "link") {
4521
4512
  const id = videoId ?? initialVideoId;
4522
4513
  if (id) {
4523
4514
  return getVideoIframeUrl(platform, id);
@@ -6728,7 +6719,7 @@ function convertVideoElement(domNode) {
6728
6719
  }
6729
6720
  return { node };
6730
6721
  }
6731
- const platform = platformAttr || ((src == null ? void 0 : src.startsWith("/v1/attachments/")) ? "download" : null);
6722
+ const platform = platformAttr || null;
6732
6723
  const resolvedId = (typeof videoIdAttr === "string" && videoIdAttr.length > 0 ? videoIdAttr : null) || src || null;
6733
6724
  if (platform && resolvedId) {
6734
6725
  const node = $createVideoNode(
@@ -7001,9 +6992,6 @@ function $createVideoNode(url, width, height, alignment, create) {
7001
6992
  alignment,
7002
6993
  create
7003
6994
  );
7004
- if (platform === "download" && url.startsWith("/")) {
7005
- node.setUrl(url);
7006
- }
7007
6995
  return node;
7008
6996
  }
7009
6997
  function $isVideoNode(node) {