@evercam/ui 0.0.45-beta.4 → 0.0.45-beta.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/index.mjs CHANGED
@@ -5821,24 +5821,22 @@ const Kt = Zt.exports, Jt = {
5821
5821
  },
5822
5822
  computed: {
5823
5823
  videoId() {
5824
- if (this.platform !== "youtube" && this.platform === "vimeo") {
5824
+ if (this.platform === "youtube") {
5825
+ const e = /^.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#\&\?]*).*/, t = this.videoUrl.match(e);
5826
+ return t && t[1].length === 11 ? t[1] : void 0;
5827
+ } else if (this.platform === "vimeo") {
5825
5828
  const e = this.videoUrl.match(/vimeo\.com\/(\d+)/);
5826
5829
  return e ? e[1] : void 0;
5827
5830
  }
5828
5831
  },
5829
5832
  embedUrl() {
5830
5833
  var e;
5831
- if (console.log({
5832
- videoId: this.videoId,
5833
- videoUrl: this.videoUrl,
5834
- platform: this.platform,
5835
- iframeOptions: this.iframeOptions
5836
- }), this.platform === "youtube") {
5834
+ if (this.platform === "youtube") {
5837
5835
  const t = new URLSearchParams({
5838
5836
  quality: "1080p",
5839
5837
  ...this.iframeOptions
5840
5838
  });
5841
- return `https://www.youtube.com/embed/${this.videoUrl}?${t.toString()}`;
5839
+ return `https://www.youtube.com/embed/${this.videoId}?${t.toString()}`;
5842
5840
  } else if (this.platform === "vimeo" && this.videoId) {
5843
5841
  const t = (e = this.videoUrl.split("/").pop()) == null ? void 0 : e.split("?")[0], r = new URLSearchParams({
5844
5842
  h: t || "",
@@ -5853,14 +5851,14 @@ const Kt = Zt.exports, Jt = {
5853
5851
  };
5854
5852
  var Qt = function() {
5855
5853
  var t = this, r = t._self._c;
5856
- return r("div", { staticClass: "video-embed" }, [r("iframe", t._g(t._b({ staticStyle: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%" }, attrs: { src: t.embedUrl, frameborder: "0", allowfullscreen: "", allow: "autoplay; fullscreen; picture-in-picture" } }, "iframe", t.iframeOptions, !1), t.iframeListeners))]);
5854
+ return r("div", { staticClass: "video-embed" }, [r("iframe", t._g(t._b({ attrs: { src: t.embedUrl, frameborder: "0", allowfullscreen: "", width: "100%", height: "100%", allow: "autoplay; fullscreen; picture-in-picture" } }, "iframe", t.iframeOptions, !1), t.iframeListeners))]);
5857
5855
  }, er = [], tr = /* @__PURE__ */ I(
5858
5856
  Jt,
5859
5857
  Qt,
5860
5858
  er,
5861
5859
  !1,
5862
5860
  null,
5863
- "1d88170a",
5861
+ "dbd23a7f",
5864
5862
  null,
5865
5863
  null
5866
5864
  );