@vindral/web-sdk 4.7.2-14-gb2729531 → 4.7.2-15-gf5e093ee
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/{GpB1QmiM.js → BK3DBk5v.js} +1095 -1088
- package/{tTac2rJ0.js → BjkoNfwT.js} +1 -1
- package/core.js +1 -1
- package/legacy.es.js +1 -1
- package/legacy.umd.js +1 -1
- package/package.json +1 -1
- package/player.js +2 -2
- package/vindral-player-component.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
-
import { C as n, D as r, E as i, O as a, S as o, T as s, _ as c, b as l, g as u, h as d, k as f, m as ee, p as te, t as ne, v as re, w as ie, x as ae, y as oe } from "./
|
|
2
|
+
import { C as n, D as r, E as i, O as a, S as o, T as s, _ as c, b as l, g as u, h as d, k as f, m as ee, p as te, t as ne, v as re, w as ie, x as ae, y as oe } from "./BjkoNfwT.js";
|
|
3
3
|
import { t as se } from "./CuYn2z5X.js";
|
|
4
4
|
import { i as p, n as m, r as h, t as g } from "./DSw1XhvD.js";
|
|
5
5
|
import { c as ce, n as le, t as ue } from "./D40eQS8l.js";
|
|
@@ -706,33 +706,33 @@ e(Jt, "observedAttributes", [
|
|
|
706
706
|
//#region ../../libs/player-next/src/components/ChannelGrid.ts
|
|
707
707
|
var Yt = document.createElement("template");
|
|
708
708
|
Yt.innerHTML = "\n <style>\n :host {\n cursor: default;\n display: flex;\n flex-direction: column;\n box-sizing: border-box !important;\n border-radius: 4px;\n background-color: var(--bg-subtle);\n padding: var(--padding-2) !important;\n\n position: absolute;\n bottom: 0;\n right: 0;\n\n z-index: 5;\n width: 100%;\n max-height: 75%;\n\n @container (width < 768px) {\n padding: var(--padding-1) !important;\n }\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wrapper {\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n height: 100%;\n }\n\n .wrapper::-webkit-scrollbar {\n display: none;\n }\n\n slot#grid {\n display: grid;\n gap: var(--padding-2);\n grid-template-columns: repeat(4, minmax(0, 1fr));\n\n @container (width < 768px) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--padding-1);\n }\n @container (width < 1024px) and (width >= 768px) {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n @container (width >= 1024px) {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n }\n }\n\n /* Smart TV */\n @media (width < 1024px) and (width >= 768px) and (-webkit-min-device-pixel-ratio: 2) {\n slot#grid {\n grid-template-columns: repeat(4, minmax(0, 1fr)) !important;\n }\n }\n\n :host([mode=\"list\"]) slot#grid {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n </style>\n\n <div class=\"wrapper\">\n <slot name=\"grid\" id=\"grid\"></slot>\n </div>\n";
|
|
709
|
-
var Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakSet(),
|
|
709
|
+
var Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), an = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakSet(), on = class extends HTMLElement {
|
|
710
710
|
constructor() {
|
|
711
|
-
super(), C(this, O), p(this, Xt, null), p(this, Zt, null), p(this, Qt, []), p(this, E, []), p(this, D, void 0), p(this, $t, void 0), p(this, en, void 0), p(this, tn, void 0), p(this, nn, void 0), p(this,
|
|
711
|
+
super(), C(this, O), p(this, Xt, null), p(this, Zt, null), p(this, Qt, []), p(this, E, []), p(this, D, void 0), p(this, $t, void 0), p(this, en, void 0), p(this, tn, void 0), p(this, nn, !1), p(this, rn, void 0), p(this, an, void 0), e(this, "handleEvent", (e) => {
|
|
712
712
|
switch (e.type) {
|
|
713
713
|
case "keydown":
|
|
714
|
-
h(O, this,
|
|
714
|
+
h(O, this, yn).call(this, e);
|
|
715
715
|
break;
|
|
716
716
|
}
|
|
717
717
|
}), this.attachShadow({ mode: "open" }).appendChild(Yt.content.cloneNode(!0));
|
|
718
718
|
}
|
|
719
719
|
connectedCallback() {
|
|
720
720
|
var e, t, n;
|
|
721
|
-
m(Zt, this, this.closest("vindral-controller")), (e = g(Zt, this)) == null || e.connectListener(this), h(O, this,
|
|
722
|
-
h(O, this,
|
|
721
|
+
m(Zt, this, this.closest("vindral-controller")), (e = g(Zt, this)) == null || e.connectListener(this), h(O, this, sn).call(this), (t = g(Xt, this)) == null || t.observe((n = this.shadowRoot) == null ? void 0 : n.querySelector(".wrapper")), h(O, this, pn).call(this), m(en, this, window.setInterval(() => {
|
|
722
|
+
h(O, this, _n).call(this);
|
|
723
723
|
}, 1e4));
|
|
724
724
|
}
|
|
725
725
|
disconnectedCallback() {
|
|
726
726
|
var e, t;
|
|
727
|
-
clearInterval(g(en, this)), h(O, this,
|
|
727
|
+
clearInterval(g(en, this)), h(O, this, Tn).call(this), this.removeEventListener("keydown", this), (e = g(Xt, this)) == null || e.disconnect(), (t = g(Zt, this)) == null || t.disconnectListener(this);
|
|
728
728
|
}
|
|
729
729
|
attributeChangedCallback(e, t, n) {
|
|
730
730
|
if (t !== n) switch (e) {
|
|
731
731
|
case _.CHANNEL_ID:
|
|
732
|
-
h(O, this,
|
|
732
|
+
h(O, this, gn).call(this, n);
|
|
733
733
|
break;
|
|
734
734
|
case _.CHANNELS:
|
|
735
|
-
m(Qt, this, JSON.parse(n)), h(O, this,
|
|
735
|
+
m(Qt, this, JSON.parse(n)), h(O, this, pn).call(this);
|
|
736
736
|
break;
|
|
737
737
|
case "authentication-token":
|
|
738
738
|
m($t, this, n);
|
|
@@ -759,48 +759,48 @@ var Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt =
|
|
|
759
759
|
t && t !== this && !this.contains(t) && m(tn, this, t), (e = g(D, this)) == null || e.focus();
|
|
760
760
|
}
|
|
761
761
|
};
|
|
762
|
-
function
|
|
762
|
+
function sn() {
|
|
763
763
|
m(Xt, this, new IntersectionObserver((e) => {
|
|
764
764
|
e.forEach((e) => {
|
|
765
765
|
let { target: t, isIntersecting: n } = e;
|
|
766
|
-
t instanceof Jt ? h(O, this,
|
|
766
|
+
t instanceof Jt ? h(O, this, fn).call(this, t, n) : h(O, this, cn).call(this, n);
|
|
767
767
|
});
|
|
768
768
|
}, { root: g(Zt, this) }));
|
|
769
769
|
}
|
|
770
|
-
function
|
|
771
|
-
e ? h(O, this,
|
|
770
|
+
function cn(e) {
|
|
771
|
+
e ? h(O, this, ln).call(this) : h(O, this, un).call(this);
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
this.dispatchEvent(new CustomEvent(S.CHANNEL_GRID_OPENED, {
|
|
773
|
+
function ln() {
|
|
774
|
+
m(nn, this, !0), this.dispatchEvent(new CustomEvent(S.CHANNEL_GRID_OPENED, {
|
|
775
775
|
bubbles: !0,
|
|
776
776
|
composed: !0
|
|
777
|
-
})), h(O, this,
|
|
777
|
+
})), h(O, this, dn).call(this), this.addEventListener("keydown", this), g(D, this) && (g(D, this).tabIndex = 0);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
780
|
-
h(O, this,
|
|
779
|
+
function un() {
|
|
780
|
+
h(O, this, Tn).call(this), g(D, this) && (g(D, this).tabIndex = -1), this.dispatchEvent(new CustomEvent(S.CHANNEL_GRID_CLOSED, {
|
|
781
781
|
bubbles: !0,
|
|
782
782
|
composed: !0
|
|
783
|
-
})), h(O, this,
|
|
783
|
+
})), g(nn, this) && h(O, this, Sn).call(this), m(nn, this, !1), this.removeEventListener("keydown", this);
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function dn() {
|
|
786
786
|
var e;
|
|
787
|
-
h(O, this,
|
|
788
|
-
clearTimeout(g(
|
|
789
|
-
h(O, this,
|
|
787
|
+
h(O, this, Tn).call(this), m(an, this, () => {
|
|
788
|
+
clearTimeout(g(rn, this)), m(rn, this, window.setTimeout(() => {
|
|
789
|
+
h(O, this, wn).call(this) && this.focus(), h(O, this, Tn).call(this);
|
|
790
790
|
}, 100));
|
|
791
|
-
}), (e = this.parentElement) == null || e.addEventListener("scroll", g(
|
|
791
|
+
}), (e = this.parentElement) == null || e.addEventListener("scroll", g(an, this));
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function fn(e, t) {
|
|
794
794
|
t ? (e.setAttribute("visible", ""), (!e.lastThumbnailUpdate || Date.now() - e.lastThumbnailUpdate >= 1e4) && (e.updateThumbnail(), e.lastThumbnailUpdate = Date.now())) : e.removeAttribute("visible");
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function pn() {
|
|
797
797
|
var e;
|
|
798
798
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"), n = new Map(g(E, this).map((e) => [e.id, e])), r = this.getAttribute("channel-id");
|
|
799
799
|
m(E, this, g(Qt, this).map((e) => {
|
|
800
800
|
var i;
|
|
801
801
|
let a = n.get(e.channelId);
|
|
802
|
-
if (a) return h(O, this,
|
|
803
|
-
let o = h(O, this,
|
|
802
|
+
if (a) return h(O, this, mn).call(this, a.element, e), a;
|
|
803
|
+
let o = h(O, this, hn).call(this, e, r);
|
|
804
804
|
return (i = g(Xt, this)) == null || i.observe(o.element), t.contains(o.element) || t.appendChild(o.element), o;
|
|
805
805
|
})), n.forEach((e, t) => {
|
|
806
806
|
if (!g(Qt, this).some((e) => e.channelId === t)) {
|
|
@@ -811,55 +811,55 @@ function fn() {
|
|
|
811
811
|
t.contains(e.element) || t.appendChild(e.element);
|
|
812
812
|
});
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function mn(e, t) {
|
|
815
815
|
t.isLive ? e.removeAttribute("offline") : e.setAttribute("offline", ""), e.setAttribute("url", t.thumbnailUrls[0] || ""), e.setAttribute("title", t.name);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function hn(e, t) {
|
|
818
818
|
let n = document.createElement("vindral-channel-grid-item");
|
|
819
|
-
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), g($t, this) && n.setAttribute("authentication-token", g($t, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), m(D, this, n)), n.tabIndex = -1, n.onclick = () => h(O, this,
|
|
819
|
+
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), g($t, this) && n.setAttribute("authentication-token", g($t, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), m(D, this, n)), n.tabIndex = -1, n.onclick = () => h(O, this, vn).call(this, e), {
|
|
820
820
|
element: n,
|
|
821
821
|
thumbnail: e.thumbnailUrls[0] || "",
|
|
822
822
|
id: e.channelId
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function gn(e) {
|
|
826
826
|
g(E, this).forEach((t) => {
|
|
827
827
|
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, m(D, this, t.element)) : (t.element.tabIndex = -1, t.element.setAttribute("aria-selected", "false"));
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function _n() {
|
|
831
831
|
this.hasAttribute("hidden") || g(E, this).forEach((e) => e.element.updateThumbnail());
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function vn(e) {
|
|
834
834
|
var t;
|
|
835
|
-
h(O, this,
|
|
835
|
+
h(O, this, En).call(this), (t = g(Zt, this)) == null || t.setAttribute("channel-id", e.channelId);
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function yn(e) {
|
|
838
838
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
839
|
-
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") h(O, this,
|
|
839
|
+
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") h(O, this, En).call(this);
|
|
840
840
|
else if (t === "Enter" || t === " ") {
|
|
841
841
|
var a;
|
|
842
842
|
(a = g(D, this)) == null || a.click();
|
|
843
|
-
} else h(O, this,
|
|
843
|
+
} else h(O, this, bn).call(this, e);
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function bn(e) {
|
|
846
846
|
if (!g(D, this)) return;
|
|
847
847
|
let { key: t } = e, n = g(E, this).findIndex((e) => e.element === g(D, this)), r = g(D, this).getBoundingClientRect();
|
|
848
848
|
switch (t) {
|
|
849
849
|
case "ArrowUp":
|
|
850
|
-
if (n = h(O, this,
|
|
851
|
-
h(O, this,
|
|
850
|
+
if (n = h(O, this, xn).call(this, r, -1, 0), n < 0) {
|
|
851
|
+
h(O, this, En).call(this);
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
854
|
break;
|
|
855
855
|
case "ArrowDown":
|
|
856
|
-
n = h(O, this,
|
|
856
|
+
n = h(O, this, xn).call(this, r, 1, 0);
|
|
857
857
|
break;
|
|
858
858
|
case "ArrowLeft":
|
|
859
|
-
n = h(O, this,
|
|
859
|
+
n = h(O, this, xn).call(this, r, 0, -1);
|
|
860
860
|
break;
|
|
861
861
|
case "ArrowRight":
|
|
862
|
-
n = h(O, this,
|
|
862
|
+
n = h(O, this, xn).call(this, r, 0, 1);
|
|
863
863
|
break;
|
|
864
864
|
case "Home":
|
|
865
865
|
n = 0;
|
|
@@ -874,7 +874,7 @@ function yn(e) {
|
|
|
874
874
|
g(D, this).setAttribute("aria-selected", "false"), g(D, this).tabIndex = -1, m(D, this, e.element), g(D, this).setAttribute("aria-selected", "true"), g(D, this).tabIndex = 0, g(D, this).focus();
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function xn(e, t, n) {
|
|
878
878
|
let r = -1, i = Infinity;
|
|
879
879
|
return g(E, this).filter((e) => e.element.getBoundingClientRect().width > 0).forEach((a, o) => {
|
|
880
880
|
let s = a.element.getBoundingClientRect(), c = t === 0 || t < 0 && s.top < e.top || t > 0 && s.top > e.top, l = n === 0 || n < 0 && s.left < e.left || n > 0 && s.left > e.left;
|
|
@@ -884,36 +884,38 @@ function bn(e, t, n) {
|
|
|
884
884
|
}
|
|
885
885
|
}), r;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Sn() {
|
|
888
888
|
var e, t;
|
|
889
|
-
if ((
|
|
890
|
-
g(tn, this)
|
|
891
|
-
|
|
889
|
+
if (!(document.activeElement !== document.body && !this.matches(":focus-within"))) {
|
|
890
|
+
if ((e = g(tn, this)) != null && e.isConnected) {
|
|
891
|
+
g(tn, this).focus({ preventScroll: !0 });
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
(t = g(Zt, this)) == null || t.focus({ preventScroll: !0 });
|
|
892
895
|
}
|
|
893
|
-
(t = g(Zt, this)) == null || t.focus({ preventScroll: !0 });
|
|
894
896
|
}
|
|
895
|
-
function
|
|
897
|
+
function Cn(e) {
|
|
896
898
|
return (e == null ? void 0 : e.localName) === "vindral-scroll-overlay";
|
|
897
899
|
}
|
|
898
|
-
function
|
|
900
|
+
function wn() {
|
|
899
901
|
let e = this.parentElement;
|
|
900
|
-
return e ? h(O, this,
|
|
902
|
+
return e ? h(O, this, Cn).call(this, e) ? e.hasAttribute("open") : !this.hasAttribute("hidden") : !1;
|
|
901
903
|
}
|
|
902
|
-
function
|
|
903
|
-
if (g(
|
|
904
|
+
function Tn() {
|
|
905
|
+
if (g(rn, this) && (clearTimeout(g(rn, this)), m(rn, this, void 0)), g(an, this)) {
|
|
904
906
|
var e;
|
|
905
|
-
(e = this.parentElement) == null || e.removeEventListener("scroll", g(
|
|
907
|
+
(e = this.parentElement) == null || e.removeEventListener("scroll", g(an, this)), m(an, this, void 0);
|
|
906
908
|
}
|
|
907
909
|
}
|
|
908
|
-
function
|
|
910
|
+
function En() {
|
|
909
911
|
let e = this.parentElement;
|
|
910
|
-
if (h(O, this,
|
|
912
|
+
if (h(O, this, Cn).call(this, e)) {
|
|
911
913
|
e.open = !1;
|
|
912
914
|
return;
|
|
913
915
|
}
|
|
914
916
|
e == null || e.removeAttribute("open");
|
|
915
917
|
}
|
|
916
|
-
e(
|
|
918
|
+
e(on, "observedAttributes", [
|
|
917
919
|
_.CHANNELS,
|
|
918
920
|
_.CHANNEL_ID,
|
|
919
921
|
_.AUTHENTICATION_TOKEN,
|
|
@@ -922,8 +924,8 @@ e(an, "observedAttributes", [
|
|
|
922
924
|
]);
|
|
923
925
|
//#endregion
|
|
924
926
|
//#region ../../libs/player-next/src/components/ChannelGridButton.ts
|
|
925
|
-
var
|
|
926
|
-
|
|
927
|
+
var Dn, On = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-layout-grid\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\" />\n <path d=\"M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\" />\n <path d=\"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\" />\n <path d=\"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\" />\n</svg>\n", kn = document.createElement("template");
|
|
928
|
+
kn.innerHTML = `
|
|
927
929
|
<style>
|
|
928
930
|
:host {
|
|
929
931
|
display: var(--grid-button-display);
|
|
@@ -936,88 +938,88 @@ On.innerHTML = `
|
|
|
936
938
|
display: none;
|
|
937
939
|
}
|
|
938
940
|
</style>
|
|
939
|
-
<slot name="button">${
|
|
941
|
+
<slot name="button">${On}</slot>
|
|
940
942
|
`;
|
|
941
|
-
var k = /* @__PURE__ */ new WeakMap(),
|
|
943
|
+
var k = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakSet(), Nn = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Fn = class extends y {
|
|
942
944
|
constructor() {
|
|
943
945
|
var e;
|
|
944
|
-
super(), C(this,
|
|
945
|
-
e.composedPath().includes(this) || h(
|
|
946
|
-
}), p(this,
|
|
946
|
+
super(), C(this, Mn), p(this, k, void 0), p(this, An, void 0), p(this, jn, (e) => {
|
|
947
|
+
e.composedPath().includes(this) || h(Mn, this, Rn).call(this);
|
|
948
|
+
}), p(this, Nn, () => h(Mn, this, Bn).call(this, !0)), p(this, Pn, () => h(Mn, this, Bn).call(this, !1)), (e = this.shadowRoot) == null || e.appendChild(kn.content.cloneNode(!0));
|
|
947
949
|
}
|
|
948
950
|
connectedCallback() {
|
|
949
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), h(
|
|
951
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), h(Mn, this, zn).call(this);
|
|
950
952
|
let e = this.getRootNode();
|
|
951
953
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
952
954
|
var t;
|
|
953
|
-
m(k, this, e.querySelector("vindral-channel-grid")), ((t = g(k, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (g(k, this).hidden = !1, g(k, this).style.position = "relative", m(
|
|
955
|
+
m(k, this, e.querySelector("vindral-channel-grid")), ((t = g(k, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (g(k, this).hidden = !1, g(k, this).style.position = "relative", m(An, this, g(k, this).parentElement)), g(k, this).addEventListener(S.CHANNEL_GRID_OPENED, g(Nn, this)), g(k, this).addEventListener(S.CHANNEL_GRID_CLOSED, g(Pn, this));
|
|
954
956
|
}
|
|
955
|
-
h(
|
|
957
|
+
h(Mn, this, Bn).call(this);
|
|
956
958
|
}
|
|
957
959
|
disconnectedCallback() {
|
|
958
960
|
var e, t;
|
|
959
|
-
super.disconnectedCallback(), (e = g(k, this)) == null || e.removeEventListener(S.CHANNEL_GRID_OPENED, g(
|
|
961
|
+
super.disconnectedCallback(), (e = g(k, this)) == null || e.removeEventListener(S.CHANNEL_GRID_OPENED, g(Nn, this)), (t = g(k, this)) == null || t.removeEventListener(S.CHANNEL_GRID_CLOSED, g(Pn, this));
|
|
960
962
|
}
|
|
961
963
|
attributeChangedCallback(e, t, n) {
|
|
962
|
-
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && h(
|
|
964
|
+
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && h(Mn, this, zn).call(this);
|
|
963
965
|
}
|
|
964
966
|
enable() {
|
|
965
|
-
super.enable(), document.addEventListener("click", g(
|
|
967
|
+
super.enable(), document.addEventListener("click", g(jn, this));
|
|
966
968
|
}
|
|
967
969
|
handleClick(e) {
|
|
968
|
-
h(
|
|
970
|
+
h(Mn, this, In).call(this);
|
|
969
971
|
}
|
|
970
972
|
get isOpen() {
|
|
971
973
|
var e;
|
|
972
|
-
return g(
|
|
974
|
+
return g(An, this) ? g(An, this).hasAttribute("open") : !((e = g(k, this)) != null && e.hidden);
|
|
973
975
|
}
|
|
974
976
|
};
|
|
975
|
-
|
|
976
|
-
function
|
|
977
|
-
this.getAttribute("aria-expanded") === "true" ? h(
|
|
977
|
+
Dn = Fn;
|
|
978
|
+
function In() {
|
|
979
|
+
this.getAttribute("aria-expanded") === "true" ? h(Mn, this, Rn).call(this) : h(Mn, this, Ln).call(this), h(Mn, this, Bn).call(this);
|
|
978
980
|
}
|
|
979
|
-
function
|
|
980
|
-
if (g(
|
|
981
|
+
function Ln() {
|
|
982
|
+
if (g(An, this)) g(An, this).setAttribute("open", "");
|
|
981
983
|
else {
|
|
982
984
|
var e;
|
|
983
985
|
if (!((e = g(k, this)) != null && e.hidden)) return;
|
|
984
986
|
g(k, this).hidden = !1, g(k, this).focus();
|
|
985
987
|
}
|
|
986
988
|
}
|
|
987
|
-
function
|
|
988
|
-
if (g(
|
|
989
|
+
function Rn() {
|
|
990
|
+
if (g(An, this)) g(An, this).open = !1;
|
|
989
991
|
else {
|
|
990
992
|
if (!g(k, this) || g(k, this).hidden) return;
|
|
991
993
|
g(k, this).hidden = !0;
|
|
992
994
|
}
|
|
993
995
|
}
|
|
994
|
-
function
|
|
996
|
+
function zn() {
|
|
995
997
|
this.getAttribute(_.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(_.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
996
998
|
}
|
|
997
|
-
function
|
|
999
|
+
function Bn(e = this.isOpen) {
|
|
998
1000
|
this.setAttribute("aria-expanded", String(e)), this.setAttribute("aria-label", e ? "Close channels" : "Channels");
|
|
999
1001
|
}
|
|
1000
|
-
e(
|
|
1001
|
-
...b(
|
|
1002
|
+
e(Fn, "observedAttributes", [
|
|
1003
|
+
...b(Dn, "observedAttributes", Dn),
|
|
1002
1004
|
_.CHANNEL_GROUP_ID,
|
|
1003
1005
|
_.CHANNELS,
|
|
1004
1006
|
"hidden"
|
|
1005
1007
|
]);
|
|
1006
1008
|
//#endregion
|
|
1007
1009
|
//#region ../../libs/player-next/src/components/ControlBar.ts
|
|
1008
|
-
var
|
|
1009
|
-
|
|
1010
|
-
var
|
|
1010
|
+
var Vn = document.createElement("template");
|
|
1011
|
+
Vn.innerHTML = "\n <style>\n :host {\n display: flex;\n width: 100%;\n align-items: center;\n }\n\n slot {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n\n :host([content-center]) slot {\n justify-content: center;\n }\n\n slot[name=\"right\"] {\n justify-content: flex-end;\n }\n </style>\n\n <slot name=\"bar\">\n <slot></slot>\n <slot name=\"right\"></slot>\n </slot>\n";
|
|
1012
|
+
var Hn = class extends HTMLElement {
|
|
1011
1013
|
constructor() {
|
|
1012
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1014
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Vn.content.cloneNode(!0));
|
|
1013
1015
|
}
|
|
1014
1016
|
connectedCallback() {}
|
|
1015
1017
|
disconnectedCallback() {}
|
|
1016
1018
|
};
|
|
1017
|
-
e(
|
|
1019
|
+
e(Hn, "observedAttributes", []);
|
|
1018
1020
|
//#endregion
|
|
1019
1021
|
//#region ../../libs/airplay-sender/src/AirPlaySender.ts
|
|
1020
|
-
var
|
|
1022
|
+
var Un = class extends fe {
|
|
1021
1023
|
constructor(t) {
|
|
1022
1024
|
super(), e(this, "config", void 0), e(this, "hlsUrl", void 0), e(this, "element", void 0), e(this, "connectingTimeout", void 0), e(this, "castingAvailable", !1), e(this, "updateAuthenticationToken", (e) => {
|
|
1023
1025
|
this.config.authenticationToken = e, this.hlsUrl = this.getHlsUrl(), this.castingAvailable && (this.element.src = this.hlsUrl);
|
|
@@ -1064,46 +1066,46 @@ var Vn = class extends fe {
|
|
|
1064
1066
|
}
|
|
1065
1067
|
})();
|
|
1066
1068
|
}
|
|
1067
|
-
},
|
|
1068
|
-
function
|
|
1069
|
+
}, Wn = 28, Gn = ["::cue", "::-webkit-media-text-track-display"];
|
|
1070
|
+
function Kn(e) {
|
|
1069
1071
|
let t = e.styleSheets[0];
|
|
1070
1072
|
if (!t) return [];
|
|
1071
1073
|
try {
|
|
1072
|
-
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule &&
|
|
1074
|
+
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule && Gn.some((t) => e.selectorText.endsWith(t)));
|
|
1073
1075
|
} catch (e) {
|
|
1074
1076
|
return [];
|
|
1075
1077
|
}
|
|
1076
1078
|
}
|
|
1077
|
-
var
|
|
1079
|
+
var qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = class {
|
|
1078
1080
|
constructor(t) {
|
|
1079
|
-
p(this,
|
|
1080
|
-
g(
|
|
1081
|
-
}), p(this,
|
|
1081
|
+
p(this, qn, void 0), p(this, Jn, null), p(this, Yn, null), p(this, Xn, null), p(this, Zn, !0), e(this, "observe", (e) => {
|
|
1082
|
+
g(Xn, this) || (m(Xn, this, e), e.addEventListener("webkitpresentationmodechanged", g(Qn, this), !0), window.ResizeObserver && (m(Jn, this, new ResizeObserver(() => g(er, this).call(this))), g(Jn, this).observe(e)));
|
|
1083
|
+
}), p(this, Qn, (e) => {
|
|
1082
1084
|
var t;
|
|
1083
|
-
e.target instanceof HTMLMediaElement && g(
|
|
1084
|
-
}), p(this,
|
|
1085
|
-
if (g(
|
|
1086
|
-
if (m(
|
|
1087
|
-
g(
|
|
1085
|
+
e.target instanceof HTMLMediaElement && g($n, this).call(this, ((t = re(e.target)) == null ? "inline" : t) === "inline");
|
|
1086
|
+
}), p(this, $n, (e) => {
|
|
1087
|
+
if (g(Zn, this) !== e) {
|
|
1088
|
+
if (m(Zn, this, e), m(Yn, this, null), e) {
|
|
1089
|
+
g(er, this).call(this);
|
|
1088
1090
|
return;
|
|
1089
1091
|
}
|
|
1090
|
-
for (let e of g(
|
|
1092
|
+
for (let e of g(qn, this)) e.style.removeProperty("font-size");
|
|
1091
1093
|
}
|
|
1092
1094
|
}), e(this, "unload", () => {
|
|
1093
1095
|
var e, t;
|
|
1094
|
-
(e = g(
|
|
1095
|
-
}), p(this,
|
|
1096
|
-
if (!g(
|
|
1097
|
-
let { clientWidth: e, clientHeight: t } = g(
|
|
1096
|
+
(e = g(Xn, this)) == null || e.removeEventListener("webkitpresentationmodechanged", g(Qn, this), !0), (t = g(Jn, this)) == null || t.disconnect(), m(Jn, this, null), m(Xn, this, null), m(Zn, this, !0);
|
|
1097
|
+
}), p(this, er, () => {
|
|
1098
|
+
if (!g(Zn, this) || g(qn, this).length === 0 || !g(Xn, this)) return;
|
|
1099
|
+
let { clientWidth: e, clientHeight: t } = g(Xn, this);
|
|
1098
1100
|
if (e <= 0 || t <= 0) return;
|
|
1099
|
-
let n = te(e, t, { max:
|
|
1100
|
-
if (n !== g(
|
|
1101
|
-
m(
|
|
1102
|
-
for (let e of g(
|
|
1101
|
+
let n = te(e, t, { max: Wn });
|
|
1102
|
+
if (n !== g(Yn, this)) {
|
|
1103
|
+
m(Yn, this, n);
|
|
1104
|
+
for (let e of g(qn, this)) e.style.fontSize = n;
|
|
1103
1105
|
}
|
|
1104
|
-
}), m(
|
|
1106
|
+
}), m(qn, this, Kn(t));
|
|
1105
1107
|
}
|
|
1106
|
-
},
|
|
1108
|
+
}, nr = class n extends fe {
|
|
1107
1109
|
constructor(r) {
|
|
1108
1110
|
var i;
|
|
1109
1111
|
super(), i = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
@@ -1134,35 +1136,35 @@ var Gn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn =
|
|
|
1134
1136
|
return () => Promise.resolve();
|
|
1135
1137
|
}
|
|
1136
1138
|
};
|
|
1137
|
-
e(
|
|
1139
|
+
e(nr, "isFullscreenApiSupported", (e) => l(e));
|
|
1138
1140
|
//#endregion
|
|
1139
1141
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1140
|
-
var
|
|
1142
|
+
var rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), fr = class extends fe {
|
|
1141
1143
|
constructor(r) {
|
|
1142
1144
|
var a;
|
|
1143
1145
|
super(), a = this, e(this, "unload", () => {
|
|
1144
1146
|
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), this.element.removeEventListener("webkitpresentationmodechanged", this.onChange), n(this.element, !1);
|
|
1145
1147
|
}), e(this, "request", t(function* () {
|
|
1146
1148
|
try {
|
|
1147
|
-
return yield g(
|
|
1149
|
+
return yield g(rr, a).call(a);
|
|
1148
1150
|
} catch (e) {
|
|
1149
1151
|
throw a.onChange(), e;
|
|
1150
1152
|
}
|
|
1151
1153
|
})), e(this, "exit", t(function* () {
|
|
1152
1154
|
try {
|
|
1153
|
-
return yield g(
|
|
1155
|
+
return yield g(ir, a).call(a);
|
|
1154
1156
|
} catch (e) {
|
|
1155
1157
|
throw a.onChange(), e;
|
|
1156
1158
|
}
|
|
1157
1159
|
})), e(this, "onChange", () => {
|
|
1158
1160
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1159
|
-
}), e(this, "isPictureInPictureActive", () => g(
|
|
1161
|
+
}), e(this, "isPictureInPictureActive", () => g(lr, this).call(this) || g(cr, this).call(this)), e(this, "isSupported", () => g(dr, this).call(this) || g(sr, this).call(this)), p(this, rr, () => g(sr, this).call(this) ? g(ar, this).call(this) : g(dr, this).call(this) ? g(ur, this).call(this, "picture-in-picture") : Promise.resolve()), p(this, ir, () => this.isPictureInPictureActive() ? g(sr, this).call(this) ? g(or, this).call(this) : g(dr, this).call(this) ? g(ur, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), p(this, ar, t(function* () {
|
|
1160
1162
|
let e = c(a.element);
|
|
1161
1163
|
e && (yield e());
|
|
1162
|
-
})), p(this,
|
|
1164
|
+
})), p(this, or, t(function* () {
|
|
1163
1165
|
let e = d();
|
|
1164
1166
|
e && (yield e());
|
|
1165
|
-
})), p(this,
|
|
1167
|
+
})), p(this, sr, () => s(this.element)), p(this, cr, () => ae()), p(this, lr, () => re(this.element) === "picture-in-picture"), p(this, ur, (e) => (i(this.element) && ie(this.element, e), Promise.resolve())), p(this, dr, () => i(this.element)), this.element = r, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.addEventListener("webkitpresentationmodechanged", this.onChange), n(this.element, !0);
|
|
1166
1168
|
}
|
|
1167
1169
|
get videoElement() {
|
|
1168
1170
|
return this.element;
|
|
@@ -1170,7 +1172,7 @@ var tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr =
|
|
|
1170
1172
|
};
|
|
1171
1173
|
//#endregion
|
|
1172
1174
|
//#region ../../libs/player-next/src/timeshift/firstMediaPlaylistUrl.ts
|
|
1173
|
-
function
|
|
1175
|
+
function pr(e, t) {
|
|
1174
1176
|
let n = e.split("\n").map((e) => e.trim());
|
|
1175
1177
|
for (let e = 0; e < n.length; e++) {
|
|
1176
1178
|
var r;
|
|
@@ -1182,7 +1184,7 @@ function dr(e, t) {
|
|
|
1182
1184
|
}
|
|
1183
1185
|
//#endregion
|
|
1184
1186
|
//#region ../../libs/player-next/src/timeshift/parseMediaPlaylistDuration.ts
|
|
1185
|
-
function
|
|
1187
|
+
function mr(e) {
|
|
1186
1188
|
let t = 0;
|
|
1187
1189
|
for (let n of e.split("\n")) {
|
|
1188
1190
|
let e = n.trim().match(/^#EXTINF:([\d.]+)/), r = e != null && e[1] ? Number.parseFloat(e[1]) : NaN;
|
|
@@ -1192,90 +1194,90 @@ function fr(e) {
|
|
|
1192
1194
|
}
|
|
1193
1195
|
//#endregion
|
|
1194
1196
|
//#region ../../libs/player-next/src/timeshift/probeTimeshiftDuration.ts
|
|
1195
|
-
var
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1197
|
+
var hr = 5e3;
|
|
1198
|
+
function gr(e, t) {
|
|
1199
|
+
return _r.apply(this, arguments);
|
|
1198
1200
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1201
|
-
let { signal: r, timeoutMs: i =
|
|
1201
|
+
function _r() {
|
|
1202
|
+
return _r = t(function* (e, t, n = {}) {
|
|
1203
|
+
let { signal: r, timeoutMs: i = hr } = n, a = new AbortController(), o = () => a.abort();
|
|
1202
1204
|
r && (r.aborted ? a.abort() : r.addEventListener("abort", o, { once: !0 }));
|
|
1203
1205
|
let s = setTimeout(o, i);
|
|
1204
1206
|
try {
|
|
1205
1207
|
let n = yield fetch(e, { signal: a.signal });
|
|
1206
1208
|
if (!n.ok) return;
|
|
1207
|
-
let r =
|
|
1209
|
+
let r = pr(yield n.text(), e);
|
|
1208
1210
|
if (!r) return;
|
|
1209
1211
|
let i = new URL(r);
|
|
1210
1212
|
i.searchParams.set("channelId", t.channelId), i.searchParams.set("from", t.from), t.authToken && i.searchParams.set("authToken", t.authToken);
|
|
1211
1213
|
let o = yield fetch(i.toString(), { signal: a.signal });
|
|
1212
|
-
return o.ok ?
|
|
1214
|
+
return o.ok ? mr(yield o.text()) : void 0;
|
|
1213
1215
|
} catch (e) {
|
|
1214
1216
|
return;
|
|
1215
1217
|
} finally {
|
|
1216
1218
|
clearTimeout(s), r == null || r.removeEventListener("abort", o);
|
|
1217
1219
|
}
|
|
1218
|
-
}),
|
|
1220
|
+
}), _r.apply(this, arguments);
|
|
1219
1221
|
}
|
|
1220
1222
|
//#endregion
|
|
1221
1223
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
1222
|
-
var
|
|
1223
|
-
constructor({ onChange: e, probe: t =
|
|
1224
|
-
C(this,
|
|
1224
|
+
var vr = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), Or = class {
|
|
1225
|
+
constructor({ onChange: e, probe: t = gr, now: n = () => performance.now() }) {
|
|
1226
|
+
C(this, A), p(this, vr, void 0), p(this, yr, void 0), p(this, br, void 0), p(this, xr, void 0), p(this, Sr, !0), p(this, Cr, !1), p(this, wr, 0), p(this, Tr, 0), p(this, Er, 0), p(this, Dr, null), m(vr, this, e), m(yr, this, t), m(br, this, n);
|
|
1225
1227
|
}
|
|
1226
1228
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1227
|
-
if (h(
|
|
1228
|
-
g(
|
|
1229
|
+
if (h(A, this, kr).call(this), !(n > 0)) {
|
|
1230
|
+
g(vr, this).call(this, n);
|
|
1229
1231
|
return;
|
|
1230
1232
|
}
|
|
1231
1233
|
let r = new AbortController();
|
|
1232
|
-
m(
|
|
1234
|
+
m(xr, this, r);
|
|
1233
1235
|
let { signal: i } = r;
|
|
1234
|
-
g(
|
|
1236
|
+
g(yr, this).call(this, e, t, { signal: i }).then((e) => {
|
|
1235
1237
|
if (!i.aborted) {
|
|
1236
1238
|
if (e === void 0) {
|
|
1237
|
-
g(
|
|
1239
|
+
g(vr, this).call(this, n);
|
|
1238
1240
|
return;
|
|
1239
1241
|
}
|
|
1240
|
-
m(
|
|
1242
|
+
m(Tr, this, n), m(wr, this, Math.min(Math.max(e, 0), n)), m(Er, this, g(br, this).call(this)), m(Cr, this, !0), h(A, this, Ar).call(this), g(Sr, this) && h(A, this, jr).call(this);
|
|
1241
1243
|
}
|
|
1242
1244
|
});
|
|
1243
1245
|
}
|
|
1244
1246
|
setLive(e) {
|
|
1245
|
-
m(
|
|
1247
|
+
m(Sr, this, e), !(!g(xr, this) || e) && (h(A, this, Mr).call(this), h(A, this, Ar).call(this));
|
|
1246
1248
|
}
|
|
1247
1249
|
applyLoadedDuration(e) {
|
|
1248
|
-
h(
|
|
1250
|
+
h(A, this, kr).call(this), g(vr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1249
1251
|
}
|
|
1250
1252
|
stop() {
|
|
1251
|
-
h(
|
|
1253
|
+
h(A, this, kr).call(this);
|
|
1252
1254
|
}
|
|
1253
1255
|
};
|
|
1254
|
-
function
|
|
1256
|
+
function kr() {
|
|
1255
1257
|
var e;
|
|
1256
|
-
(e = g(
|
|
1258
|
+
(e = g(xr, this)) == null || e.abort(), m(xr, this, void 0), h(A, this, Mr).call(this), m(Cr, this, !1);
|
|
1257
1259
|
}
|
|
1258
|
-
function
|
|
1259
|
-
if (!g(
|
|
1260
|
-
let e = g(
|
|
1261
|
-
g(
|
|
1260
|
+
function Ar() {
|
|
1261
|
+
if (!g(Cr, this)) return;
|
|
1262
|
+
let e = g(wr, this) + Math.max(0, (g(br, this).call(this) - g(Er, this)) / 1e3), t = Math.min(g(Tr, this), e);
|
|
1263
|
+
g(vr, this).call(this, t), t >= g(Tr, this) && h(A, this, Mr).call(this);
|
|
1262
1264
|
}
|
|
1263
|
-
function
|
|
1264
|
-
g(
|
|
1265
|
+
function jr() {
|
|
1266
|
+
g(Dr, this) === null && m(Dr, this, window.setInterval(() => h(A, this, Ar).call(this), 1e3));
|
|
1265
1267
|
}
|
|
1266
|
-
function
|
|
1267
|
-
g(
|
|
1268
|
+
function Mr() {
|
|
1269
|
+
g(Dr, this) !== null && (clearInterval(g(Dr, this)), m(Dr, this, null));
|
|
1268
1270
|
}
|
|
1269
1271
|
//#endregion
|
|
1270
1272
|
//#region ../../libs/player-next/src/utils/getVindralAttributes.ts
|
|
1271
|
-
var
|
|
1273
|
+
var Nr = (e) => {
|
|
1272
1274
|
var t;
|
|
1273
1275
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1274
1276
|
return !n && (t = e.nodeName) != null && t.includes("-") && (globalThis.customElements.upgrade(e), n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0), Array.isArray(n) ? n.filter((e) => ke.includes(e)) : [];
|
|
1275
1277
|
};
|
|
1276
1278
|
//#endregion
|
|
1277
1279
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1278
|
-
function
|
|
1280
|
+
function Pr(e) {
|
|
1279
1281
|
if (typeof e != "string") return NaN;
|
|
1280
1282
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1281
1283
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1291,37 +1293,37 @@ function Mr(e) {
|
|
|
1291
1293
|
}
|
|
1292
1294
|
//#endregion
|
|
1293
1295
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1294
|
-
var
|
|
1295
|
-
|
|
1296
|
-
},
|
|
1296
|
+
var Fr = de.get().createContext("TimelineMarkers"), Ir = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, Lr = (e) => {
|
|
1297
|
+
Fr.warn(`Timeline marker time "${e}" has no timezone and is interpreted in the viewer's local timezone, so it can land at a different position for viewers in other timezones. Provide an ISO 8601 time with an offset (e.g. "${e}Z") or epoch milliseconds.`);
|
|
1298
|
+
}, Rr = (e) => {
|
|
1297
1299
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1298
1300
|
if (typeof e == "string") {
|
|
1299
1301
|
let t = Date.parse(e);
|
|
1300
|
-
return Number.isNaN(t) ? null : (
|
|
1302
|
+
return Number.isNaN(t) ? null : (Ir.test(e) && Lr(e), t);
|
|
1301
1303
|
}
|
|
1302
1304
|
if (e instanceof Date) {
|
|
1303
1305
|
let t = e.getTime();
|
|
1304
1306
|
return Number.isNaN(t) ? null : t;
|
|
1305
1307
|
}
|
|
1306
1308
|
return null;
|
|
1307
|
-
},
|
|
1309
|
+
}, zr = (e) => {
|
|
1308
1310
|
if (typeof e != "object" || !e) return null;
|
|
1309
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1311
|
+
let { time: t, label: n, type: r } = e, i = Rr(t);
|
|
1310
1312
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1311
1313
|
let a = {
|
|
1312
1314
|
time: i,
|
|
1313
1315
|
label: n
|
|
1314
1316
|
};
|
|
1315
1317
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1316
|
-
},
|
|
1318
|
+
}, Br = (e) => {
|
|
1317
1319
|
if (!Array.isArray(e)) return [];
|
|
1318
|
-
let t = e.map(
|
|
1319
|
-
return n > 0 &&
|
|
1320
|
-
},
|
|
1320
|
+
let t = e.map(zr).filter((e) => e !== null), n = e.length - t.length;
|
|
1321
|
+
return n > 0 && Fr.warn(`Dropped ${n} invalid timeline marker(s). Each marker needs a non-empty "label" and a valid "time" (epoch milliseconds, a Date, or an ISO 8601 string).`), t;
|
|
1322
|
+
}, Vr = (e) => e ? Br(ce(e)) : [], Hr = (e, t, n) => {
|
|
1321
1323
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1322
1324
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1323
1325
|
return r < 0 || r > 1 ? null : r;
|
|
1324
|
-
},
|
|
1326
|
+
}, Ur = class extends fe {
|
|
1325
1327
|
constructor(t) {
|
|
1326
1328
|
if (super(), e(this, "audioContext", void 0), e(this, "audioNode", void 0), e(this, "bufferLength", void 0), e(this, "animationFrameId", null), e(this, "canUseFloatTimeDomainData", void 0), e(this, "byteSampleBuffer", null), e(this, "floatSampleBuffer", null), e(this, "leftAnalyser", void 0), e(this, "rightAnalyser", void 0), e(this, "mediaElementSource", null), e(this, "update", () => {
|
|
1327
1329
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1373,121 +1375,121 @@ var Nr = de.get().createContext("TimelineMarkers"), Pr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1373
1375
|
get isMediaElementSource() {
|
|
1374
1376
|
return this.source instanceof HTMLMediaElement;
|
|
1375
1377
|
}
|
|
1376
|
-
},
|
|
1378
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), ei = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap(), ni = /* @__PURE__ */ new WeakMap(), ri = /* @__PURE__ */ new WeakMap(), ii = class {
|
|
1377
1379
|
constructor(t, n) {
|
|
1378
|
-
C(this,
|
|
1379
|
-
g(
|
|
1380
|
-
}), p(this,
|
|
1381
|
-
g(
|
|
1382
|
-
}), m(
|
|
1380
|
+
C(this, F), p(this, j, void 0), p(this, M, void 0), p(this, N, void 0), p(this, Wr, void 0), p(this, Gr, void 0), e(this, "userPaused", !0), p(this, Kr, void 0), p(this, qr, void 0), p(this, Jr, !1), p(this, Yr, !1), p(this, Xr, null), p(this, Zr, 0), p(this, Qr, null), p(this, $r, !1), p(this, P, de.get().createContext("HlsPlayer")), p(this, ei, () => h(F, this, vi).call(this, !0)), p(this, ti, () => h(F, this, vi).call(this, !1)), p(this, ni, () => {
|
|
1381
|
+
g(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !g(j, this).paused && h(F, this, vi).call(this, !1);
|
|
1382
|
+
}), p(this, ri, () => {
|
|
1383
|
+
g(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && h(F, this, vi).call(this, !1);
|
|
1384
|
+
}), m(M, this, t), m(qr, this, n == null ? void 0 : n.maxVideoBitRate), g(M, this).style.position = "absolute", g(M, this).style.top = "0", g(M, this).style.left = "0", g(M, this).style.width = "100%", g(M, this).style.height = "100%", g(M, this).style.opacity = "0", g(M, this).style.pointerEvents = "none", g(M, this).style.transition = "opacity 0.12s linear";
|
|
1383
1385
|
let r = document.createElement("video");
|
|
1384
|
-
m(
|
|
1386
|
+
m(j, this, r), t.appendChild(g(j, this)), g(j, this).style.width = "100%", g(j, this).style.height = "100%", g(j, this).setAttribute("playsinline", ""), g(j, this).setAttribute("webkit-playsinline", ""), g(j, this).setAttribute("preload", "metadata"), h(F, this, gi).call(this), m($r, this, g(j, this).muted), (n == null ? void 0 : n.volume) !== void 0 && (this.volume = n.volume), (n == null ? void 0 : n.muted) !== void 0 && (this.muted = n.muted);
|
|
1385
1387
|
}
|
|
1386
1388
|
hide() {
|
|
1387
|
-
m(
|
|
1389
|
+
m(Jr, this, !0), m(Yr, this, !1), g(M, this).classList.remove("active"), g(M, this).style.opacity = "0", g(M, this).style.pointerEvents = "none", m(Xr, this, null);
|
|
1388
1390
|
}
|
|
1389
1391
|
play() {
|
|
1390
1392
|
var e = this;
|
|
1391
1393
|
return t(function* () {
|
|
1392
|
-
if (g(
|
|
1393
|
-
e.userPaused = !1, m(
|
|
1394
|
+
if (g(Qr, e) !== null) {
|
|
1395
|
+
e.userPaused = !1, m(Qr, e, !0);
|
|
1394
1396
|
return;
|
|
1395
1397
|
}
|
|
1396
|
-
return h(
|
|
1398
|
+
return h(F, e, li).call(e);
|
|
1397
1399
|
})();
|
|
1398
1400
|
}
|
|
1399
1401
|
seek(e) {
|
|
1400
1402
|
var n = this;
|
|
1401
1403
|
return t(function* () {
|
|
1402
|
-
if (g(
|
|
1403
|
-
m(
|
|
1404
|
+
if (g(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1405
|
+
m(Xr, n, null);
|
|
1404
1406
|
return;
|
|
1405
1407
|
}
|
|
1406
|
-
if (m(
|
|
1407
|
-
else return h(
|
|
1408
|
+
if (m(Xr, n, e.time > .1 ? e.time : null), n.isActive() && g(N, n)) h(F, n, ui).call(n, e.time);
|
|
1409
|
+
else return h(F, n, di).call(n, e);
|
|
1408
1410
|
})();
|
|
1409
1411
|
}
|
|
1410
1412
|
shouldIgnoreTimeupdate() {
|
|
1411
|
-
if (g(
|
|
1412
|
-
let e = g(
|
|
1413
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (m(
|
|
1413
|
+
if (g(Xr, this) == null) return !1;
|
|
1414
|
+
let e = g(j, this).currentTime;
|
|
1415
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (m(Xr, this, null), !1);
|
|
1414
1416
|
}
|
|
1415
1417
|
isPipSupported() {
|
|
1416
|
-
return "pictureInPictureEnabled" in document && !g(
|
|
1418
|
+
return "pictureInPictureEnabled" in document && !g(j, this).disablePictureInPicture;
|
|
1417
1419
|
}
|
|
1418
1420
|
requestPictureInPicture() {
|
|
1419
|
-
return g(
|
|
1421
|
+
return g(j, this).requestPictureInPicture();
|
|
1420
1422
|
}
|
|
1421
1423
|
exitPictureInPicture() {
|
|
1422
|
-
return document.pictureInPictureElement === g(
|
|
1424
|
+
return document.pictureInPictureElement === g(j, this) ? document.exitPictureInPicture() : Promise.resolve();
|
|
1423
1425
|
}
|
|
1424
1426
|
isActive() {
|
|
1425
|
-
return g(
|
|
1427
|
+
return g(M, this).style.opacity === "1" || g(M, this).classList.contains("active");
|
|
1426
1428
|
}
|
|
1427
1429
|
cleanup() {
|
|
1428
|
-
h(
|
|
1430
|
+
h(F, this, _i).call(this), h(F, this, ci).call(this), g(Kr, this) && (cancelAnimationFrame(g(Kr, this)), m(Kr, this, void 0)), m(Xr, this, null), g(j, this).remove();
|
|
1429
1431
|
}
|
|
1430
1432
|
addEventListener(e, t) {
|
|
1431
|
-
g(
|
|
1433
|
+
g(j, this).addEventListener(e, t);
|
|
1432
1434
|
}
|
|
1433
1435
|
removeEventListener(e, t) {
|
|
1434
|
-
g(
|
|
1436
|
+
g(j, this).removeEventListener(e, t);
|
|
1435
1437
|
}
|
|
1436
1438
|
dispatchEvent(e) {
|
|
1437
|
-
return g(
|
|
1439
|
+
return g(j, this).dispatchEvent(e);
|
|
1438
1440
|
}
|
|
1439
1441
|
setTimeshiftUrl(e) {
|
|
1440
|
-
g(
|
|
1442
|
+
g(Gr, this) !== e && (g(P, this).debug("HLSPlayer Setting timeshift URL to", e), m(Gr, this, e));
|
|
1441
1443
|
}
|
|
1442
1444
|
get videoElement() {
|
|
1443
|
-
return g(
|
|
1445
|
+
return g(j, this);
|
|
1444
1446
|
}
|
|
1445
1447
|
pause() {
|
|
1446
|
-
this.userPaused = !0, g(
|
|
1448
|
+
this.userPaused = !0, g(Qr, this) !== null && m(Qr, this, !1), g(j, this).pause();
|
|
1447
1449
|
}
|
|
1448
1450
|
get paused() {
|
|
1449
|
-
return g(
|
|
1451
|
+
return g(j, this).paused;
|
|
1450
1452
|
}
|
|
1451
1453
|
set volume(e) {
|
|
1452
|
-
g(
|
|
1454
|
+
g(j, this).volume = e;
|
|
1453
1455
|
}
|
|
1454
1456
|
get volume() {
|
|
1455
|
-
return g(
|
|
1457
|
+
return g(j, this).volume;
|
|
1456
1458
|
}
|
|
1457
1459
|
set muted(e) {
|
|
1458
|
-
m(
|
|
1460
|
+
m($r, this, e), g(j, this).muted = e;
|
|
1459
1461
|
}
|
|
1460
1462
|
get muted() {
|
|
1461
|
-
return g(
|
|
1463
|
+
return g($r, this);
|
|
1462
1464
|
}
|
|
1463
1465
|
set currentTime(e) {
|
|
1464
|
-
g(
|
|
1466
|
+
g(j, this).currentTime = e;
|
|
1465
1467
|
}
|
|
1466
1468
|
get currentTime() {
|
|
1467
|
-
return g(
|
|
1469
|
+
return g(j, this).currentTime;
|
|
1468
1470
|
}
|
|
1469
1471
|
get seeking() {
|
|
1470
|
-
return g(
|
|
1472
|
+
return g(j, this).seeking;
|
|
1471
1473
|
}
|
|
1472
1474
|
get duration() {
|
|
1473
|
-
return g(
|
|
1475
|
+
return g(j, this).duration;
|
|
1474
1476
|
}
|
|
1475
1477
|
get maxVideoBitRate() {
|
|
1476
|
-
return g(
|
|
1478
|
+
return g(qr, this);
|
|
1477
1479
|
}
|
|
1478
1480
|
set maxVideoBitRate(e) {
|
|
1479
|
-
m(
|
|
1481
|
+
m(qr, this, e), e !== void 0 && g(N, this) && h(F, this, oi).call(this, e);
|
|
1480
1482
|
}
|
|
1481
1483
|
};
|
|
1482
|
-
function
|
|
1484
|
+
function ai() {
|
|
1483
1485
|
var e = this;
|
|
1484
1486
|
return t(function* () {
|
|
1485
1487
|
let { default: t } = yield import("./Ct8GqCxq.js");
|
|
1486
|
-
if (m(
|
|
1487
|
-
g(
|
|
1488
|
+
if (m(Wr, e, t), !t.isSupported()) {
|
|
1489
|
+
g(P, e).warn("HLS not supported");
|
|
1488
1490
|
return;
|
|
1489
1491
|
}
|
|
1490
|
-
m(
|
|
1492
|
+
m(N, e, new t({
|
|
1491
1493
|
capLevelToPlayerSize: !0,
|
|
1492
1494
|
enableWorker: !0,
|
|
1493
1495
|
backBufferLength: 30,
|
|
@@ -1506,127 +1508,127 @@ function ri() {
|
|
|
1506
1508
|
startFragPrefetch: !0,
|
|
1507
1509
|
testBandwidth: !1,
|
|
1508
1510
|
debug: !1
|
|
1509
|
-
})), g(
|
|
1510
|
-
g(
|
|
1511
|
-
}), g(
|
|
1511
|
+
})), g(N, e).attachMedia(g(j, e)), g(N, e).on(t.Events.MEDIA_ATTACHED, () => g(P, e).debug("[HLS] media attached")), g(N, e).on(t.Events.MANIFEST_PARSED, () => g(P, e).debug("[HLS] manifest parsed")), g(N, e).on(t.Events.ERROR, (t, n) => {
|
|
1512
|
+
g(P, e).error("[HLS] error:", n), n.fatal && h(F, e, si).call(e, n);
|
|
1513
|
+
}), g(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1512
1514
|
var t;
|
|
1513
|
-
!g(
|
|
1514
|
-
}), g(
|
|
1515
|
+
!g(qr, e) || ((t = g(N, e)) == null ? void 0 : t.levels.length) === 0 || h(F, e, oi).call(e, g(qr, e));
|
|
1516
|
+
}), g(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1515
1517
|
var t, n;
|
|
1516
|
-
g(
|
|
1518
|
+
g(P, e).debug("Level switched:", (t = g(N, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = g(N, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1517
1519
|
});
|
|
1518
1520
|
})();
|
|
1519
1521
|
}
|
|
1520
|
-
function
|
|
1521
|
-
if (!g(
|
|
1522
|
-
g(
|
|
1522
|
+
function oi(e) {
|
|
1523
|
+
if (!g(N, this)) {
|
|
1524
|
+
g(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1523
1525
|
return;
|
|
1524
1526
|
}
|
|
1525
|
-
let t = g(
|
|
1527
|
+
let t = g(N, this).levels.map((e, t) => ({
|
|
1526
1528
|
i: t,
|
|
1527
1529
|
bitrate: e.bitrate
|
|
1528
1530
|
})).filter((t) => e >= t.bitrate * .8).map((e) => e.i).pop();
|
|
1529
1531
|
if (t === void 0) {
|
|
1530
1532
|
var n;
|
|
1531
|
-
t = 0, g(
|
|
1533
|
+
t = 0, g(P, this).debug("No level fits under bitrate cap: " + e + ", defaulting to lowest level: " + ((n = g(N, this).levels[0]) == null ? void 0 : n.bitrate));
|
|
1532
1534
|
}
|
|
1533
|
-
let r = g(
|
|
1534
|
-
g(
|
|
1535
|
+
let r = g(N, this).currentLevel;
|
|
1536
|
+
g(N, this).autoLevelCapping = t, r !== t && (g(P, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), g(N, this).currentLevel = t);
|
|
1535
1537
|
}
|
|
1536
|
-
function
|
|
1537
|
-
if (!g(
|
|
1538
|
-
g(
|
|
1538
|
+
function si(e) {
|
|
1539
|
+
if (!g(Wr, this)) {
|
|
1540
|
+
g(P, this).error("Hls class not available for error handling");
|
|
1539
1541
|
return;
|
|
1540
1542
|
}
|
|
1541
|
-
let t = g(
|
|
1543
|
+
let t = g(Wr, this);
|
|
1542
1544
|
switch (e.type) {
|
|
1543
1545
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1544
1546
|
var n;
|
|
1545
|
-
g(
|
|
1547
|
+
g(P, this).warn("[HLS] network error -> startLoad"), (n = g(N, this)) == null || n.startLoad();
|
|
1546
1548
|
break;
|
|
1547
1549
|
case t.ErrorTypes.MEDIA_ERROR:
|
|
1548
1550
|
var r;
|
|
1549
|
-
g(
|
|
1551
|
+
g(P, this).warn("[HLS] media error -> recoverMediaError"), (r = g(N, this)) == null || r.recoverMediaError();
|
|
1550
1552
|
break;
|
|
1551
1553
|
default:
|
|
1552
|
-
g(
|
|
1554
|
+
g(P, this).error("[HLS] fatal -> destroy"), h(F, this, ci).call(this);
|
|
1553
1555
|
break;
|
|
1554
1556
|
}
|
|
1555
1557
|
}
|
|
1556
|
-
function
|
|
1557
|
-
g(
|
|
1558
|
+
function ci() {
|
|
1559
|
+
g(N, this) && (g(N, this).destroy(), m(N, this, void 0));
|
|
1558
1560
|
}
|
|
1559
|
-
function
|
|
1561
|
+
function li() {
|
|
1560
1562
|
var e = this;
|
|
1561
1563
|
return t(function* () {
|
|
1562
1564
|
try {
|
|
1563
|
-
return g(
|
|
1565
|
+
return g(N, e) ? (e.userPaused = !1, yield g(j, e).play()) : Promise.reject("HLS not initialized");
|
|
1564
1566
|
} catch (t) {
|
|
1565
|
-
g(
|
|
1567
|
+
g(P, e).error("Failed to play timeshift video:", t);
|
|
1566
1568
|
}
|
|
1567
1569
|
})();
|
|
1568
1570
|
}
|
|
1569
|
-
function
|
|
1571
|
+
function ui(e) {
|
|
1570
1572
|
if (!Number.isFinite(e)) {
|
|
1571
|
-
m(
|
|
1573
|
+
m(Xr, this, null);
|
|
1572
1574
|
return;
|
|
1573
1575
|
}
|
|
1574
|
-
let t = h(
|
|
1575
|
-
m(
|
|
1576
|
-
g(
|
|
1576
|
+
let t = h(F, this, hi).call(this, g(j, this), e);
|
|
1577
|
+
m(Xr, this, t > .1 ? t : null), g(Kr, this) && cancelAnimationFrame(g(Kr, this)), m(Kr, this, requestAnimationFrame(() => {
|
|
1578
|
+
g(j, this).currentTime = t;
|
|
1577
1579
|
}));
|
|
1578
1580
|
}
|
|
1579
|
-
function
|
|
1581
|
+
function di(e) {
|
|
1580
1582
|
var n = this;
|
|
1581
1583
|
return t(function* () {
|
|
1582
1584
|
var t;
|
|
1583
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = m(
|
|
1584
|
-
if (m(
|
|
1585
|
-
g(
|
|
1585
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = m(Zr, n, (t = g(Zr, n), ++t));
|
|
1586
|
+
if (m(Qr, n, i), !g(Gr, n)) {
|
|
1587
|
+
g(P, n).warn("No timeshift URL"), m(Qr, n, null);
|
|
1586
1588
|
return;
|
|
1587
1589
|
}
|
|
1588
|
-
if (!g(
|
|
1589
|
-
m(
|
|
1590
|
+
if (!g(N, n) && (yield h(F, n, ai).call(n), !h(F, n, yi).call(n, a))) return;
|
|
1591
|
+
m(Jr, n, !1), m(Yr, n, !1), g(N, n) && (!g(N, n).url || g(N, n).url !== g(Gr, n)) && (g(P, n).debug("Loading timeshift URL", g(Gr, n)), g(N, n).loadSource(g(Gr, n)));
|
|
1590
1592
|
let o = n.muted;
|
|
1591
|
-
if (g(
|
|
1592
|
-
h(
|
|
1593
|
-
let s = g(
|
|
1594
|
-
m(
|
|
1593
|
+
if (g(j, n).muted = !0, yield h(F, n, fi).call(n), !h(F, n, yi).call(n, a)) return;
|
|
1594
|
+
h(F, n, ui).call(n, r);
|
|
1595
|
+
let s = g(Qr, n);
|
|
1596
|
+
m(Qr, n, null), !(s && (yield h(F, n, li).call(n), !h(F, n, yi).call(n, a))) && h(F, n, pi).call(n, o, a);
|
|
1595
1597
|
})();
|
|
1596
1598
|
}
|
|
1597
|
-
function
|
|
1598
|
-
return g(
|
|
1599
|
-
g(
|
|
1599
|
+
function fi() {
|
|
1600
|
+
return g(j, this).duration && !Number.isNaN(g(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1601
|
+
g(P, this).debug("Waiting for duration...");
|
|
1600
1602
|
let t = () => {
|
|
1601
|
-
g(
|
|
1603
|
+
g(P, this).debug("Duration loaded:", g(j, this).duration), g(j, this).removeEventListener("loadedmetadata", t), clearTimeout(n), e();
|
|
1602
1604
|
}, n = setTimeout(() => {
|
|
1603
|
-
g(
|
|
1605
|
+
g(P, this).debug("Duration timeout, proceeding anyway"), g(j, this).removeEventListener("loadedmetadata", t), e();
|
|
1604
1606
|
}, 2e4);
|
|
1605
|
-
g(
|
|
1607
|
+
g(j, this).addEventListener("loadedmetadata", t);
|
|
1606
1608
|
});
|
|
1607
1609
|
}
|
|
1608
|
-
function
|
|
1609
|
-
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => g(
|
|
1610
|
-
g(
|
|
1610
|
+
function pi(e, t) {
|
|
1611
|
+
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => g(j, this).readyState >= n && g(j, this).videoWidth > 0 && g(j, this).videoHeight > 0, i = () => {
|
|
1612
|
+
g(Jr, this) || g(Yr, this) || !h(F, this, yi).call(this, t) || (m(Yr, this, !0), g(P, this).debug("Revealing timeshift video"), g(M, this).classList.add("active"), g(M, this).style.opacity = "1", g(M, this).style.pointerEvents = "auto", g(j, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || h(F, this, mi).call(this, t));
|
|
1611
1613
|
}, a = () => {
|
|
1612
|
-
g(
|
|
1614
|
+
g(Jr, this) || g(Yr, this) || !h(F, this, yi).call(this, t) || r() && (s(), i());
|
|
1613
1615
|
}, o = !1, s = () => {
|
|
1614
|
-
o || (o = !0, g(
|
|
1616
|
+
o || (o = !0, g(j, this).removeEventListener("canplay", a), g(j, this).removeEventListener("canplaythrough", a), g(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1615
1617
|
};
|
|
1616
1618
|
if (r()) {
|
|
1617
1619
|
i();
|
|
1618
1620
|
return;
|
|
1619
1621
|
}
|
|
1620
|
-
g(
|
|
1622
|
+
g(j, this).addEventListener("canplay", a), g(j, this).addEventListener("canplaythrough", a), g(j, this).addEventListener("loadeddata", a);
|
|
1621
1623
|
let c = setTimeout(() => {
|
|
1622
|
-
g(
|
|
1624
|
+
g(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1623
1625
|
}, 2e3);
|
|
1624
1626
|
}
|
|
1625
|
-
function
|
|
1627
|
+
function mi(e) {
|
|
1626
1628
|
let t = () => {
|
|
1627
|
-
h(
|
|
1629
|
+
h(F, this, yi).call(this, e) && (g(j, this).muted = !1);
|
|
1628
1630
|
};
|
|
1629
|
-
"requestVideoFrameCallback" in g(
|
|
1631
|
+
"requestVideoFrameCallback" in g(j, this) ? g(j, this).requestVideoFrameCallback(() => {
|
|
1630
1632
|
setTimeout(() => {
|
|
1631
1633
|
t();
|
|
1632
1634
|
}, 100);
|
|
@@ -1634,43 +1636,43 @@ function fi(e) {
|
|
|
1634
1636
|
t();
|
|
1635
1637
|
}, 120);
|
|
1636
1638
|
}
|
|
1637
|
-
function
|
|
1639
|
+
function hi(e, t) {
|
|
1638
1640
|
let n = e.seekable;
|
|
1639
1641
|
if (!n || n.length === 0) return t;
|
|
1640
1642
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1641
|
-
return g(
|
|
1643
|
+
return g(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1642
1644
|
}
|
|
1643
|
-
function
|
|
1644
|
-
for (let e of
|
|
1645
|
-
for (let e of
|
|
1646
|
-
g(
|
|
1645
|
+
function gi() {
|
|
1646
|
+
for (let e of bi._) g(j, this).addEventListener(e, g(ei, this));
|
|
1647
|
+
for (let e of xi._) g(j, this).addEventListener(e, g(ti, this));
|
|
1648
|
+
g(j, this).addEventListener("timeupdate", g(ni, this)), g(j, this).addEventListener("progress", g(ri, this));
|
|
1647
1649
|
}
|
|
1648
|
-
function
|
|
1649
|
-
for (let e of
|
|
1650
|
-
for (let e of
|
|
1651
|
-
g(
|
|
1650
|
+
function _i() {
|
|
1651
|
+
for (let e of bi._) g(j, this).removeEventListener(e, g(ei, this));
|
|
1652
|
+
for (let e of xi._) g(j, this).removeEventListener(e, g(ti, this));
|
|
1653
|
+
g(j, this).removeEventListener("timeupdate", g(ni, this)), g(j, this).removeEventListener("progress", g(ri, this));
|
|
1652
1654
|
}
|
|
1653
|
-
function
|
|
1654
|
-
let t = e && (g(
|
|
1655
|
-
g(
|
|
1655
|
+
function vi(e) {
|
|
1656
|
+
let t = e && (g(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || g(j, this).seeking || g(j, this).paused && !this.userPaused);
|
|
1657
|
+
g(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1656
1658
|
bubbles: !0,
|
|
1657
1659
|
composed: !0
|
|
1658
1660
|
}));
|
|
1659
1661
|
}
|
|
1660
|
-
function
|
|
1661
|
-
return g(
|
|
1662
|
+
function yi(e) {
|
|
1663
|
+
return g(Zr, this) === e;
|
|
1662
1664
|
}
|
|
1663
|
-
var
|
|
1665
|
+
var bi = { _: [
|
|
1664
1666
|
"waiting",
|
|
1665
1667
|
"seeking",
|
|
1666
1668
|
"stalled",
|
|
1667
1669
|
"loadstart"
|
|
1668
|
-
] },
|
|
1670
|
+
] }, xi = { _: [
|
|
1669
1671
|
"canplay",
|
|
1670
1672
|
"canplaythrough",
|
|
1671
1673
|
"seeked",
|
|
1672
1674
|
"loadeddata"
|
|
1673
|
-
] },
|
|
1675
|
+
] }, Si = class {
|
|
1674
1676
|
constructor(e) {
|
|
1675
1677
|
this.vindral = e;
|
|
1676
1678
|
}
|
|
@@ -1690,19 +1692,19 @@ var vi = { _: [
|
|
|
1690
1692
|
pause() {
|
|
1691
1693
|
this.vindral.pause();
|
|
1692
1694
|
}
|
|
1693
|
-
},
|
|
1694
|
-
|
|
1695
|
-
var
|
|
1695
|
+
}, Ci = document.createElement("template");
|
|
1696
|
+
Ci.innerHTML = "\n <style>\n :host {\n --value: 0;\n --range-thickness: var(--vindral-range-thickness, 4px);\n --range-hover-thickness: var(--vindral-range-hover-thickness, var(--range-thickness));\n --range-thumb-size: var(--vindral-range-thumb-size, 12px);\n --range-thumb-hover-size: var(--vindral-range-thumb-hover-size, var(--range-thumb-size));\n --range-fill-color: var(--vindral-range-fill-color, var(--fg-strong));\n --range-thumb-color: var(--vindral-range-thumb-color, var(--fg-strong));\n --_focus-box-shadow: none;\n height: calc(var(--button-icon-size) + 2 * var(--button-padding));\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 !important;\n margin: 0;\n position: relative;\n cursor: pointer;\n touch-action: none;\n box-shadow: var(--_focus-visible-box-shadow, none);\n outline: 0;\n background: transparent;\n }\n\n :host > * {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n #range {\n -webkit-appearance: none;\n appearance: none;\n\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n\n background-color: #00000000;\n outline: none;\n z-index: 1;\n cursor: pointer;\n }\n\n #range-track {\n position: absolute;\n top: calc(50% - calc(var(--range-thickness) / 2));\n left: 1px;\n width: calc(100% - 2px);\n height: var(--range-thickness);\n background-color: rgb(255 255 255 / 0.2);\n overflow: hidden;\n cursor: pointer;\n transition-property: height, top;\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) #range-track {\n height: var(--range-hover-thickness);\n top: calc(50% - calc(var(--range-hover-thickness) / 2));\n }\n }\n\n #range-track::before {\n position: absolute;\n content: \"\";\n left: calc(-100%);\n top: 0;\n width: calc(100%);\n height: 100%;\n background: var(--range-fill-color);\n transition: background-color 300ms ease-out;\n transform-origin: 100% 0%;\n transform: translateX(calc(var(--value) * 100%)) scaleX(1.2);\n }\n\n #range::-webkit-slider-runnable-track {\n background: transparent;\n }\n\n #range::-moz-range-track {\n background: transparent;\n }\n\n #range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: var(--range-thumb-size);\n height: var(--range-thumb-size);\n border-radius: 50%;\n background: var(--range-thumb-color);\n cursor: pointer;\n z-index: 1;\n transition-property: width, height;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n #range::-moz-range-thumb {\n -moz-appearance: none;\n appearance: none;\n width: var(--range-thumb-size);\n height: var(--range-thumb-size);\n border-radius: 50%;\n background: var(--range-thumb-color);\n cursor: pointer;\n z-index: 1;\n border: none;\n transition-property: width, height;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n :host:has(#range:focus-visible) {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) #range::-webkit-slider-thumb {\n width: var(--range-thumb-hover-size);\n height: var(--range-thumb-hover-size);\n }\n\n :host(:hover) #range::-moz-range-thumb {\n width: var(--range-thumb-hover-size);\n height: var(--range-thumb-hover-size);\n }\n }\n </style>\n\n <input type=\"range\" id=\"range\" min=\"0\" max=\"1\" step=\"any\" value=\"0\" />\n <div id=\"range-track\"></div>\n";
|
|
1697
|
+
var wi = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei = class extends HTMLElement {
|
|
1696
1698
|
constructor() {
|
|
1697
|
-
super(), p(this,
|
|
1699
|
+
super(), p(this, wi, null), p(this, Ti, void 0), e(this, "range", void 0), m(Ti, this, this.attachShadow({ mode: "open" })), g(Ti, this).appendChild(Ci.content.cloneNode(!0)), this.range = g(Ti, this).getElementById("range");
|
|
1698
1700
|
}
|
|
1699
1701
|
connectedCallback() {
|
|
1700
1702
|
var e;
|
|
1701
|
-
m(
|
|
1703
|
+
m(wi, this, this.closest("vindral-controller")), (e = g(wi, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1702
1704
|
}
|
|
1703
1705
|
disconnectedCallback() {
|
|
1704
1706
|
var e;
|
|
1705
|
-
(e = g(
|
|
1707
|
+
(e = g(wi, this)) == null || e.disconnectListener(this);
|
|
1706
1708
|
}
|
|
1707
1709
|
attributeChangedCallback(e, t, n) {
|
|
1708
1710
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1728,11 +1730,11 @@ var Si = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), wi =
|
|
|
1728
1730
|
];
|
|
1729
1731
|
}
|
|
1730
1732
|
};
|
|
1731
|
-
e(
|
|
1733
|
+
e(Ei, "observedAttributes", ["disabled"]);
|
|
1732
1734
|
//#endregion
|
|
1733
1735
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1734
|
-
var
|
|
1735
|
-
|
|
1736
|
+
var Di = document.createElement("template");
|
|
1737
|
+
Di.innerHTML = `
|
|
1736
1738
|
<style>
|
|
1737
1739
|
:host {
|
|
1738
1740
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1945,7 +1947,7 @@ Ti.innerHTML = `
|
|
|
1945
1947
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1946
1948
|
</div>
|
|
1947
1949
|
`;
|
|
1948
|
-
var
|
|
1950
|
+
var Oi = [
|
|
1949
1951
|
"ArrowDown",
|
|
1950
1952
|
"ArrowLeft",
|
|
1951
1953
|
"ArrowRight",
|
|
@@ -1954,27 +1956,27 @@ var Ei = [
|
|
|
1954
1956
|
" ",
|
|
1955
1957
|
"f",
|
|
1956
1958
|
"m"
|
|
1957
|
-
],
|
|
1959
|
+
], ki, Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), Gi = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), Ji = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), Qi = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), _a = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap(), ya = /* @__PURE__ */ new WeakMap(), ba = /* @__PURE__ */ new WeakMap(), xa = /* @__PURE__ */ new WeakMap(), Sa = /* @__PURE__ */ new WeakMap(), Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta = /* @__PURE__ */ new WeakMap(), Ea = /* @__PURE__ */ new WeakMap(), Da = /* @__PURE__ */ new WeakMap(), Oa = /* @__PURE__ */ new WeakMap(), ka = /* @__PURE__ */ new WeakMap(), Aa = /* @__PURE__ */ new WeakMap(), ja = /* @__PURE__ */ new WeakMap(), Ma = /* @__PURE__ */ new WeakMap(), Na = /* @__PURE__ */ new WeakMap(), Pa = /* @__PURE__ */ new WeakMap(), Fa = class extends HTMLElement {
|
|
1958
1960
|
constructor() {
|
|
1959
1961
|
var t;
|
|
1960
|
-
super(), C(this, H), p(this,
|
|
1962
|
+
super(), C(this, H), p(this, Ai, /* @__PURE__ */ new Map()), p(this, ji, 2e3), p(this, Mi, null), p(this, Ni, new Or({ onChange: (e) => h(H, this, U).call(this, _.DURATION, e.toString()) })), p(this, Pi, null), p(this, Fi, void 0), p(this, I, void 0), p(this, L, void 0), p(this, Ii, void 0), p(this, R, void 0), p(this, Li, void 0), p(this, Ri, Ce), p(this, zi, void 0), p(this, Bi, void 0), p(this, Vi, void 0), p(this, Hi, void 0), p(this, z, void 0), p(this, Ui, void 0), p(this, Wi, void 0), p(this, Gi, void 0), p(this, B, void 0), p(this, Ki, void 0), p(this, qi, void 0), p(this, Ji, void 0), p(this, V, void 0), p(this, Yi, null), p(this, Xi, !1), p(this, Zi, null), p(this, Qi, void 0), p(this, $i, void 0), p(this, ea, void 0), p(this, ta, (e) => {
|
|
1961
1963
|
let t = e.filter((e) => {
|
|
1962
1964
|
var t;
|
|
1963
1965
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1964
1966
|
});
|
|
1965
1967
|
h(H, this, U).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1966
|
-
}), p(this,
|
|
1968
|
+
}), p(this, na, (e) => {
|
|
1967
1969
|
h(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1968
|
-
}), p(this,
|
|
1969
|
-
let t = g(
|
|
1970
|
-
m(
|
|
1970
|
+
}), p(this, ra, !1), p(this, ia, (e) => {
|
|
1971
|
+
let t = g(ra, this);
|
|
1972
|
+
m(ra, this, !0);
|
|
1971
1973
|
try {
|
|
1972
1974
|
e();
|
|
1973
1975
|
} finally {
|
|
1974
|
-
m(
|
|
1976
|
+
m(ra, this, t);
|
|
1975
1977
|
}
|
|
1976
|
-
}), p(this,
|
|
1977
|
-
g(
|
|
1978
|
+
}), p(this, aa, (e) => {
|
|
1979
|
+
g(ia, this).call(this, () => {
|
|
1978
1980
|
switch (e) {
|
|
1979
1981
|
case "playing":
|
|
1980
1982
|
h(H, this, W).call(this, _.PAUSED), h(H, this, W).call(this, _.BUFFERING);
|
|
@@ -1988,40 +1990,40 @@ var Ei = [
|
|
|
1988
1990
|
default: break;
|
|
1989
1991
|
}
|
|
1990
1992
|
});
|
|
1991
|
-
}), p(this,
|
|
1992
|
-
g(
|
|
1993
|
+
}), p(this, oa, (e) => {
|
|
1994
|
+
g(ia, this).call(this, () => {
|
|
1993
1995
|
h(H, this, U).call(this, _.VOLUME, e.volume.toString()), e.isMuted ? h(H, this, U).call(this, _.MUTED, "") : h(H, this, W).call(this, _.MUTED);
|
|
1994
1996
|
});
|
|
1995
|
-
}), p(this,
|
|
1997
|
+
}), p(this, sa, ({ channelId: e }) => {
|
|
1996
1998
|
var t;
|
|
1997
|
-
this.setAttribute(_.CHANNEL_ID, e), ((t = g(
|
|
1998
|
-
}), p(this,
|
|
1999
|
+
this.setAttribute(_.CHANNEL_ID, e), ((t = g(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && h(H, this, W).call(this, _.BUFFERING);
|
|
2000
|
+
}), p(this, ca, ({ channelId: e }) => {
|
|
1999
2001
|
var t;
|
|
2000
|
-
g(
|
|
2001
|
-
}), p(this,
|
|
2002
|
-
m(
|
|
2003
|
-
}), p(this,
|
|
2002
|
+
g(zi, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = g(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && h(H, this, W).call(this, _.BUFFERING);
|
|
2003
|
+
}), p(this, la, (e) => {
|
|
2004
|
+
m(ja, this, Date.now()), h(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
2005
|
+
}), p(this, ua, (e) => {
|
|
2004
2006
|
var t;
|
|
2005
|
-
h(H, this, U).call(this, _.LANGUAGES, JSON.stringify(e)), (t = g(
|
|
2006
|
-
}), p(this,
|
|
2007
|
+
h(H, this, U).call(this, _.LANGUAGES, JSON.stringify(e)), (t = g(I, this)) != null && t.language && h(H, this, U).call(this, _.LANGUAGE, g(I, this).language);
|
|
2008
|
+
}), p(this, da, (e) => {
|
|
2007
2009
|
var t;
|
|
2008
|
-
if (h(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = g(
|
|
2010
|
+
if (h(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = g(I, this)) != null && t.textTrack) {
|
|
2009
2011
|
var n, r;
|
|
2010
|
-
h(H, this, U).call(this, _.TEXT_TRACK, (n = (r = g(
|
|
2012
|
+
h(H, this, U).call(this, _.TEXT_TRACK, (n = (r = g(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
2011
2013
|
}
|
|
2012
|
-
}), p(this,
|
|
2014
|
+
}), p(this, fa, (e) => {
|
|
2013
2015
|
e != null && e.forVideo ? (h(H, this, U).call(this, _.NEEDS_USER_INPUT_VIDEO, ""), h(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (h(H, this, U).call(this, _.NEEDS_USER_INPUT_AUDIO, ""), h(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO));
|
|
2014
|
-
}), p(this,
|
|
2015
|
-
e || h(H, this, W).call(this, _.BUFFERING), g(
|
|
2016
|
-
}), p(this,
|
|
2016
|
+
}), p(this, pa, (e) => {
|
|
2017
|
+
e || h(H, this, W).call(this, _.BUFFERING), g(Ni, this).setLive(e);
|
|
2018
|
+
}), p(this, ma, (e) => {
|
|
2017
2019
|
var t, n;
|
|
2018
2020
|
let { urls: r, duration: i } = e;
|
|
2019
|
-
if (!r[0] || !g(
|
|
2021
|
+
if (!r[0] || !g(R, this)) return;
|
|
2020
2022
|
let a = new URL(r[0]);
|
|
2021
|
-
a.searchParams.set("channelId", (t = g(
|
|
2023
|
+
a.searchParams.set("channelId", (t = g(zi, this)) == null ? "" : t);
|
|
2022
2024
|
let o = this.getAttribute("authentication-token");
|
|
2023
2025
|
o && a.searchParams.set("authToken", o);
|
|
2024
|
-
let s =
|
|
2026
|
+
let s = Pr(i);
|
|
2025
2027
|
if (Number.isNaN(s)) {
|
|
2026
2028
|
g(V, this).error(`Invalid duration format: ${i}`);
|
|
2027
2029
|
return;
|
|
@@ -2029,73 +2031,73 @@ var Ei = [
|
|
|
2029
2031
|
let c = Math.floor(Date.now() / 1e3), l = (/* @__PURE__ */ new Date((c - s) * 1e3)).toISOString();
|
|
2030
2032
|
a.searchParams.set("from", l);
|
|
2031
2033
|
let u = a.toString();
|
|
2032
|
-
g(
|
|
2034
|
+
g(R, this).setTimeshiftUrl(u);
|
|
2033
2035
|
let d = new URL(a);
|
|
2034
|
-
d.pathname = d.pathname.replace(/[^/]*$/, "thumbs/playlist.m3u8"), m(
|
|
2036
|
+
d.pathname = d.pathname.replace(/[^/]*$/, "thumbs/playlist.m3u8"), m(Li, this, d.toString()), h(H, this, U).call(this, _.TIMESHIFT_THUMBNAIL_URL, g(Li, this)), g(Ni, this).start({
|
|
2035
2037
|
multivariantUrl: u,
|
|
2036
2038
|
params: {
|
|
2037
|
-
channelId: (n = g(
|
|
2039
|
+
channelId: (n = g(zi, this)) == null ? "" : n,
|
|
2038
2040
|
authToken: o == null ? void 0 : o,
|
|
2039
2041
|
from: l
|
|
2040
2042
|
},
|
|
2041
2043
|
windowCapSeconds: s
|
|
2042
2044
|
});
|
|
2043
|
-
}), p(this, fa, () => {
|
|
2044
|
-
h(H, this, W).call(this, _.PAUSED), h(H, this, W).call(this, _.BUFFERING);
|
|
2045
|
-
}), p(this, pa, () => {
|
|
2046
|
-
h(H, this, U).call(this, _.PAUSED, ""), h(H, this, W).call(this, _.BUFFERING);
|
|
2047
|
-
}), p(this, ma, () => {
|
|
2048
|
-
g(Ta, this).call(this), h(H, this, W).call(this, _.BUFFERING);
|
|
2049
2045
|
}), p(this, ha, () => {
|
|
2050
|
-
|
|
2046
|
+
h(H, this, W).call(this, _.PAUSED), h(H, this, W).call(this, _.BUFFERING);
|
|
2051
2047
|
}), p(this, ga, () => {
|
|
2052
|
-
|
|
2053
|
-
if (!g(z, this) || g(z, this).seeking || (e = (t = g(z, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2054
|
-
let n = g(z, this).currentTime;
|
|
2055
|
-
n !== void 0 && h(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2048
|
+
h(H, this, U).call(this, _.PAUSED, ""), h(H, this, W).call(this, _.BUFFERING);
|
|
2056
2049
|
}), p(this, _a, () => {
|
|
2057
|
-
g(
|
|
2050
|
+
g(Oa, this).call(this), h(H, this, W).call(this, _.BUFFERING);
|
|
2058
2051
|
}), p(this, va, () => {
|
|
2059
|
-
|
|
2052
|
+
g(R, this) && g(Ni, this).applyLoadedDuration(g(R, this).duration);
|
|
2060
2053
|
}), p(this, ya, () => {
|
|
2061
|
-
|
|
2054
|
+
var e, t;
|
|
2055
|
+
if (!g(R, this) || g(R, this).seeking || (e = (t = g(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2056
|
+
let n = g(R, this).currentTime;
|
|
2057
|
+
n !== void 0 && h(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2062
2058
|
}), p(this, ba, () => {
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2059
|
+
g(R, this) && (h(H, this, U).call(this, _.VOLUME, g(R, this).volume.toString()), g(R, this).muted ? h(H, this, U).call(this, _.MUTED, "") : h(H, this, W).call(this, _.MUTED));
|
|
2060
|
+
}), p(this, xa, () => {
|
|
2061
|
+
h(H, this, U).call(this, _.BUFFERING, "");
|
|
2062
|
+
}), p(this, Sa, () => {
|
|
2063
|
+
h(H, this, W).call(this, _.BUFFERING);
|
|
2064
|
+
}), p(this, Ca, () => {
|
|
2065
|
+
if (g(Xi, this)) {
|
|
2066
|
+
if (g(L, this) !== g(R, this)) {
|
|
2067
|
+
m(Xi, this, !1);
|
|
2066
2068
|
return;
|
|
2067
2069
|
}
|
|
2068
|
-
m(
|
|
2070
|
+
m(Xi, this, !1), h(H, this, go).call(this);
|
|
2069
2071
|
}
|
|
2070
|
-
}), p(this,
|
|
2072
|
+
}), p(this, wa, 0), e(this, "handleEvent", (e) => {
|
|
2071
2073
|
switch (e.type) {
|
|
2072
2074
|
case "pointerdown":
|
|
2073
|
-
m(
|
|
2075
|
+
m(wa, this, e.timeStamp);
|
|
2074
2076
|
break;
|
|
2075
2077
|
case "pointermove":
|
|
2076
|
-
h(H, this,
|
|
2078
|
+
h(H, this, io).call(this, e);
|
|
2077
2079
|
break;
|
|
2078
2080
|
case "pointerup":
|
|
2079
|
-
h(H, this,
|
|
2081
|
+
h(H, this, ao).call(this, e);
|
|
2080
2082
|
break;
|
|
2081
2083
|
case "mouseleave":
|
|
2082
|
-
h(H, this,
|
|
2084
|
+
h(H, this, mo).call(this);
|
|
2083
2085
|
break;
|
|
2084
2086
|
case "dblclick":
|
|
2085
|
-
h(H, this,
|
|
2087
|
+
h(H, this, so).call(this, e);
|
|
2086
2088
|
break;
|
|
2087
2089
|
case "mousemove":
|
|
2088
|
-
h(H, this,
|
|
2090
|
+
h(H, this, co).call(this, e);
|
|
2089
2091
|
break;
|
|
2090
2092
|
case "keydown":
|
|
2091
|
-
g(
|
|
2093
|
+
g(Da, this).call(this, e);
|
|
2092
2094
|
break;
|
|
2093
2095
|
case "keyup":
|
|
2094
|
-
h(H, this,
|
|
2096
|
+
h(H, this, mo).call(this), g(Ea, this).call(this, e);
|
|
2095
2097
|
break;
|
|
2096
2098
|
}
|
|
2097
|
-
}), p(this,
|
|
2098
|
-
if (g(
|
|
2099
|
+
}), p(this, Ta, (e) => {
|
|
2100
|
+
if (g(I, this) && (g(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2099
2101
|
case S.PLAY:
|
|
2100
2102
|
this.removeAttribute(_.PAUSED);
|
|
2101
2103
|
break;
|
|
@@ -2123,13 +2125,13 @@ var Ei = [
|
|
|
2123
2125
|
case S.SET_RENDITION:
|
|
2124
2126
|
{
|
|
2125
2127
|
let t = e.detail;
|
|
2126
|
-
t.audio && (g(
|
|
2128
|
+
t.audio && (g(I, this).maxAudioBitRate = t.audio.bitRate), t.video && (g(I, this).maxVideoBitRate = t.video.bitRate, g(I, this).maxSize = t.video, this.setAttribute(_.MAX_VIDEO_BITRATE, String(t.video.bitRate)));
|
|
2127
2129
|
}
|
|
2128
2130
|
break;
|
|
2129
2131
|
case S.SET_ABR_MODE:
|
|
2130
2132
|
{
|
|
2131
2133
|
let t = e.detail;
|
|
2132
|
-
t ? (g(
|
|
2134
|
+
t ? (g(I, this).abrEnabled = !0, this.setAttribute(_.ABR_ENABLED, "")) : (g(I, this).abrEnabled = !1, this.removeAttribute(_.ABR_ENABLED)), h(H, this, U).call(this, _.ABR_ENABLED, String(t));
|
|
2133
2135
|
}
|
|
2134
2136
|
break;
|
|
2135
2137
|
case S.SET_SIZE_BASED_RESOLUTION_CAP_MODE:
|
|
@@ -2139,10 +2141,10 @@ var Ei = [
|
|
|
2139
2141
|
}
|
|
2140
2142
|
break;
|
|
2141
2143
|
case S.CHANNEL_GRID_OPENED:
|
|
2142
|
-
g(
|
|
2144
|
+
g(Yi, this) === null && h(H, this, uo).call(this);
|
|
2143
2145
|
break;
|
|
2144
2146
|
case S.CHANNEL_GRID_CLOSED:
|
|
2145
|
-
g(
|
|
2147
|
+
g(Yi, this) !== null && (clearTimeout(g(Yi, this)), m(Yi, this, null));
|
|
2146
2148
|
break;
|
|
2147
2149
|
case S.ENTER_PIP:
|
|
2148
2150
|
this.setAttribute(_.IS_PIP, "");
|
|
@@ -2152,7 +2154,7 @@ var Ei = [
|
|
|
2152
2154
|
break;
|
|
2153
2155
|
case S.REQUEST_AIRPLAY:
|
|
2154
2156
|
var t;
|
|
2155
|
-
(t = g(
|
|
2157
|
+
(t = g(Gi, this)) == null || t.showPlaybackTargetPicker();
|
|
2156
2158
|
break;
|
|
2157
2159
|
case S.SET_LANGUAGE:
|
|
2158
2160
|
v(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
@@ -2161,12 +2163,12 @@ var Ei = [
|
|
|
2161
2163
|
v(e.detail) ? this.setAttribute(_.TEXT_TRACK, e.detail) : this.removeAttribute(_.TEXT_TRACK);
|
|
2162
2164
|
break;
|
|
2163
2165
|
case S.REQUEST_USER_INPUT:
|
|
2164
|
-
g(
|
|
2166
|
+
g(I, this).play(), g(I, this).muted = !1;
|
|
2165
2167
|
break;
|
|
2166
2168
|
case S.SET_VOLUME:
|
|
2167
2169
|
{
|
|
2168
2170
|
let t = e.detail;
|
|
2169
|
-
g(
|
|
2171
|
+
g(I, this).muted && t > 0 ? (g(I, this).muted = !1, g(R, this) && (g(R, this).muted = !1)) : t === 0 && (g(I, this).muted = !0, g(R, this) && (g(R, this).muted = !0)), this.setAttribute(_.VOLUME, t.toString());
|
|
2170
2172
|
}
|
|
2171
2173
|
break;
|
|
2172
2174
|
case S.SEEK:
|
|
@@ -2178,7 +2180,7 @@ var Ei = [
|
|
|
2178
2180
|
break;
|
|
2179
2181
|
}
|
|
2180
2182
|
case S.GO_LIVE:
|
|
2181
|
-
g(
|
|
2183
|
+
g(Oa, this).call(this);
|
|
2182
2184
|
break;
|
|
2183
2185
|
case S.TOGGLE_DEBUG_PANEL:
|
|
2184
2186
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
@@ -2190,66 +2192,71 @@ var Ei = [
|
|
|
2190
2192
|
}
|
|
2191
2193
|
break;
|
|
2192
2194
|
}
|
|
2193
|
-
}), p(this,
|
|
2195
|
+
}), p(this, Ea, (e) => {
|
|
2194
2196
|
let { key: t } = e;
|
|
2195
|
-
if (!
|
|
2197
|
+
if (!Oi.includes(t)) {
|
|
2196
2198
|
this.removeEventListener("keyup", this);
|
|
2197
2199
|
return;
|
|
2198
2200
|
}
|
|
2199
|
-
h(H, this,
|
|
2200
|
-
}), p(this,
|
|
2201
|
+
h(H, this, lo).call(this, e);
|
|
2202
|
+
}), p(this, Da, (e) => {
|
|
2201
2203
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2202
|
-
t || n || !
|
|
2203
|
-
}), p(this,
|
|
2204
|
+
t || n || !Oi.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2205
|
+
}), p(this, Oa, () => {
|
|
2204
2206
|
this.removeAttribute(_.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2205
|
-
}), p(this,
|
|
2207
|
+
}), p(this, ka, (e) => {
|
|
2206
2208
|
var t;
|
|
2207
|
-
g(
|
|
2208
|
-
}), p(this,
|
|
2209
|
+
g(R, this) || h(H, this, Va).call(this), g(L, this) !== g(R, this) && (e && h(H, this, _o).call(this), m(L, this, g(R, this)), h(H, this, za).call(this), h(H, this, Ba).call(this), h(H, this, Ga).call(this), (t = g(I, this)) == null || t.pause(), m(Xi, this, e));
|
|
2210
|
+
}), p(this, Aa, (e) => {
|
|
2209
2211
|
var t, n, r, i;
|
|
2210
|
-
e && h(H, this,
|
|
2211
|
-
h(H, this,
|
|
2212
|
+
e && h(H, this, _o).call(this), (t = g(R, this)) == null || t.hide(), m(L, this, g(Ii, this)), h(H, this, Ga).call(this), this.hasAttribute(_.PAUSED) ? (n = g(L, this)) == null || n.pause() : (r = g(L, this)) == null || r.play(), h(H, this, Ua).call(this), h(H, this, Ra).call(this), (i = g(R, this)) == null || i.pause(), e && (m(Xi, this, !1), setTimeout(() => {
|
|
2213
|
+
h(H, this, go).call(this);
|
|
2212
2214
|
}, 100));
|
|
2213
2215
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2214
2216
|
let t = this.hasAttribute(_.IS_PIP);
|
|
2215
2217
|
if (e !== !1) {
|
|
2216
2218
|
var n;
|
|
2217
|
-
g(
|
|
2219
|
+
g(ka, this).call(this, t), (n = g(R, this)) == null || n.seek({
|
|
2218
2220
|
time: parseFloat(e),
|
|
2219
2221
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2220
2222
|
});
|
|
2221
2223
|
return;
|
|
2222
2224
|
}
|
|
2223
|
-
g(
|
|
2224
|
-
}), p(this,
|
|
2225
|
+
g(L, this) !== g(Ii, this) && g(Aa, this).call(this, t);
|
|
2226
|
+
}), p(this, ja, null), p(this, Ma, () => {
|
|
2225
2227
|
var e;
|
|
2226
|
-
let t = (e = g(
|
|
2228
|
+
let t = (e = g(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2227
2229
|
if (!(t != null && t.video)) return;
|
|
2228
2230
|
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2229
2231
|
n && n.catch(() => {});
|
|
2230
|
-
}), p(this,
|
|
2232
|
+
}), p(this, Na, () => {
|
|
2231
2233
|
r();
|
|
2232
|
-
}), p(this,
|
|
2234
|
+
}), p(this, Pa, null);
|
|
2233
2235
|
let n = this.attachShadow({ mode: "open" });
|
|
2234
|
-
n.appendChild(
|
|
2236
|
+
n.appendChild(Di.content.cloneNode(!0));
|
|
2235
2237
|
let i = ve(this.getAttribute("log-level"));
|
|
2236
|
-
m(V, this, de.get().createContext("VindralController")), g(V, this).setLevel(i), m(
|
|
2238
|
+
m(V, this, de.get().createContext("VindralController")), g(V, this).setLevel(i), m(Fi, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), m(Qi, this, new tr(n)), this.addEventListener("focusin", (e) => {
|
|
2239
|
+
ki = this, m(ea, this, e.composedPath()[0]);
|
|
2240
|
+
});
|
|
2237
2241
|
}
|
|
2238
2242
|
connectedCallback() {
|
|
2239
2243
|
var e = this;
|
|
2240
2244
|
return t(function* () {
|
|
2241
|
-
if (g(
|
|
2242
|
-
clearTimeout(g(
|
|
2245
|
+
if (g($i, e) !== void 0) {
|
|
2246
|
+
if (clearTimeout(g($i, e)), m($i, e, void 0), document.activeElement === document.body && ki === e) {
|
|
2247
|
+
var t;
|
|
2248
|
+
((t = g(ea, e)) != null && t.isConnected ? g(ea, e) : e).focus({ preventScroll: !0 });
|
|
2249
|
+
}
|
|
2243
2250
|
return;
|
|
2244
2251
|
}
|
|
2245
|
-
x(e.getAttribute("auto-instance-enabled"), !0) && (yield h(H, e,
|
|
2246
|
-
for (let t of Object.values(S)) e.addEventListener(t, g(
|
|
2247
|
-
window.PointerEvent ? (e.addEventListener("pointerdown", e), e.addEventListener("pointermove", e), e.addEventListener("pointerup", e)) : e.addEventListener("mousemove", e), e.addEventListener("mouseleave", e), e.addEventListener("keydown", e), e.addEventListener("resize", e), e.addEventListener("dblclick", e), g(
|
|
2252
|
+
x(e.getAttribute("auto-instance-enabled"), !0) && (yield h(H, e, La).call(e));
|
|
2253
|
+
for (let t of Object.values(S)) e.addEventListener(t, g(Ta, e));
|
|
2254
|
+
window.PointerEvent ? (e.addEventListener("pointerdown", e), e.addEventListener("pointermove", e), e.addEventListener("pointerup", e)) : e.addEventListener("mousemove", e), e.addEventListener("mouseleave", e), e.addEventListener("keydown", e), e.addEventListener("resize", e), e.addEventListener("dblclick", e), g(ia, e).call(e, () => e.connectListener(e)), h(H, e, no).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2248
2255
|
})();
|
|
2249
2256
|
}
|
|
2250
2257
|
disconnectedCallback() {
|
|
2251
|
-
m(
|
|
2252
|
-
m(
|
|
2258
|
+
m($i, this, setTimeout(() => {
|
|
2259
|
+
m($i, this, void 0), h(H, this, to).call(this);
|
|
2253
2260
|
}));
|
|
2254
2261
|
}
|
|
2255
2262
|
attributeChangedCallback(e, t, n) {
|
|
@@ -2260,121 +2267,121 @@ var Ei = [
|
|
|
2260
2267
|
newValue: n
|
|
2261
2268
|
}), e) {
|
|
2262
2269
|
case "channel-id":
|
|
2263
|
-
m(
|
|
2270
|
+
m(zi, this, n), h(H, this, Ia).call(this), g(I, this) && n && (g(I, this).channelId = n, g(I, this).play(), h(H, this, U).call(this, _.BUFFERING, ""), h(H, this, U).call(this, _.CHANNEL_ID, n), h(H, this, U).call(this, _.POSTER_SRC, g(I, this).getThumbnailUrl()));
|
|
2264
2271
|
break;
|
|
2265
2272
|
case "channel-group-id":
|
|
2266
|
-
m(
|
|
2273
|
+
m(Bi, this, n);
|
|
2267
2274
|
break;
|
|
2268
2275
|
case "url":
|
|
2269
|
-
n && m(
|
|
2276
|
+
n && m(Ri, this, n);
|
|
2270
2277
|
break;
|
|
2271
2278
|
case "paused":
|
|
2272
2279
|
if (v(n)) {
|
|
2273
|
-
if (!g(
|
|
2280
|
+
if (!g(ra, this)) {
|
|
2274
2281
|
var r;
|
|
2275
|
-
(r = g(
|
|
2282
|
+
(r = g(L, this)) == null || r.pause();
|
|
2276
2283
|
}
|
|
2277
2284
|
h(H, this, U).call(this, _.PAUSED, "");
|
|
2278
|
-
} else if (h(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO), h(H, this, W).call(this, _.PAUSED), !g(
|
|
2285
|
+
} else if (h(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO), h(H, this, W).call(this, _.PAUSED), !g(ra, this)) {
|
|
2279
2286
|
var i;
|
|
2280
|
-
(i = g(
|
|
2287
|
+
(i = g(L, this)) == null || i.play();
|
|
2281
2288
|
}
|
|
2282
2289
|
break;
|
|
2283
2290
|
case "target-buffer-time":
|
|
2284
2291
|
if (n) {
|
|
2285
2292
|
let e = parseInt(n, 10);
|
|
2286
|
-
Number.isNaN(e) || (g(
|
|
2293
|
+
Number.isNaN(e) || (g(I, this) && (g(I, this).targetBufferTime = e), h(H, this, U).call(this, _.TARGET_BUFFER_TIME, String(e)));
|
|
2287
2294
|
}
|
|
2288
2295
|
break;
|
|
2289
2296
|
case "min-buffer-time":
|
|
2290
|
-
if (g(
|
|
2297
|
+
if (g(I, this) && v(n)) {
|
|
2291
2298
|
let e = ye(n);
|
|
2292
|
-
e !== void 0 && g(
|
|
2299
|
+
e !== void 0 && g(I, this).updateBufferTimeConfig({ minBufferTime: e });
|
|
2293
2300
|
}
|
|
2294
2301
|
break;
|
|
2295
2302
|
case "max-buffer-time":
|
|
2296
|
-
if (g(
|
|
2303
|
+
if (g(I, this) && v(n)) {
|
|
2297
2304
|
let e = ye(n);
|
|
2298
|
-
e !== void 0 && g(
|
|
2305
|
+
e !== void 0 && g(I, this).updateBufferTimeConfig({ maxBufferTime: e });
|
|
2299
2306
|
}
|
|
2300
2307
|
break;
|
|
2301
2308
|
case _.DEBUG_PANEL_OPEN:
|
|
2302
|
-
v(n) ? h(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : h(H, this, W).call(this, _.DEBUG_PANEL_OPEN), h(H, this,
|
|
2309
|
+
v(n) ? h(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : h(H, this, W).call(this, _.DEBUG_PANEL_OPEN), h(H, this, So).call(this);
|
|
2303
2310
|
break;
|
|
2304
2311
|
case "user-interacting":
|
|
2305
2312
|
v(n) ? h(H, this, U).call(this, _.USER_INTERACTING, "") : h(H, this, W).call(this, _.USER_INTERACTING);
|
|
2306
2313
|
break;
|
|
2307
2314
|
case "muted":
|
|
2308
|
-
if (g(
|
|
2315
|
+
if (g(I, this)) if (v(n)) {
|
|
2309
2316
|
var a;
|
|
2310
|
-
if (g(
|
|
2317
|
+
if (g(ra, this) || (g(I, this).muted = !0, g(R, this) && (g(R, this).muted = !0)), h(H, this, U).call(this, _.MUTED, ""), (a = g(B, this)) != null && a.isMediaElementSource) {
|
|
2311
2318
|
var o;
|
|
2312
|
-
(o = g(
|
|
2319
|
+
(o = g(B, this)) == null || o.stop(), h(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2313
2320
|
left: null,
|
|
2314
2321
|
right: null
|
|
2315
2322
|
}));
|
|
2316
2323
|
}
|
|
2317
2324
|
} else {
|
|
2318
2325
|
var s;
|
|
2319
|
-
g(
|
|
2326
|
+
g(ra, this) || (g(I, this).muted = !1, g(R, this) && (g(R, this).muted = !1), g(I, this).volume === 0 && (g(I, this).volume = .3)), h(H, this, W).call(this, _.MUTED), h(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO), (s = g(B, this)) == null || s.start();
|
|
2320
2327
|
}
|
|
2321
2328
|
break;
|
|
2322
2329
|
case "ui-locked":
|
|
2323
|
-
v(n) ? h(H, this,
|
|
2330
|
+
v(n) ? h(H, this, po).call(this) : h(H, this, mo).call(this);
|
|
2324
2331
|
break;
|
|
2325
2332
|
case "is-fullscreen":
|
|
2326
|
-
v(n) ? h(H, this,
|
|
2333
|
+
v(n) ? h(H, this, vo).call(this) : h(H, this, yo).call(this);
|
|
2327
2334
|
break;
|
|
2328
2335
|
case "abr-enabled":
|
|
2329
2336
|
{
|
|
2330
2337
|
let e = x(n == null ? null : n, !1);
|
|
2331
|
-
g(
|
|
2338
|
+
g(I, this) && (g(I, this).abrEnabled = e, e && (g(I, this).sizeBasedResolutionCapEnabled = x(this.getAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0))), e ? h(H, this, U).call(this, _.ABR_ENABLED, "") : h(H, this, W).call(this, _.ABR_ENABLED);
|
|
2332
2339
|
}
|
|
2333
2340
|
break;
|
|
2334
2341
|
case "size-based-resolution-cap-enabled":
|
|
2335
2342
|
{
|
|
2336
2343
|
let e = x(n == null ? null : n, !0);
|
|
2337
|
-
g(
|
|
2344
|
+
g(I, this) && (g(I, this).sizeBasedResolutionCapEnabled = e), h(H, this, U).call(this, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, e ? "true" : "false");
|
|
2338
2345
|
}
|
|
2339
2346
|
break;
|
|
2340
2347
|
case "max-video-bit-rate":
|
|
2341
|
-
m(
|
|
2348
|
+
m(Vi, this, n), v(n) ? h(H, this, U).call(this, _.MAX_VIDEO_BITRATE, n) : h(H, this, W).call(this, _.MAX_VIDEO_BITRATE), g(R, this) && (g(R, this).maxVideoBitRate = n ? ye(n) : void 0);
|
|
2342
2349
|
break;
|
|
2343
2350
|
case "max-initial-bit-rate":
|
|
2344
|
-
m(
|
|
2351
|
+
m(Hi, this, n), v(n) ? h(H, this, U).call(this, _.MAX_INITIAL_BITRATE, n) : h(H, this, W).call(this, _.MAX_INITIAL_BITRATE);
|
|
2345
2352
|
break;
|
|
2346
2353
|
case "is-pip":
|
|
2347
|
-
v(n) ? h(H, this,
|
|
2354
|
+
v(n) ? h(H, this, go).call(this) : h(H, this, _o).call(this);
|
|
2348
2355
|
break;
|
|
2349
2356
|
case "is-airplaying":
|
|
2350
2357
|
if (v(n)) {
|
|
2351
2358
|
var c, l;
|
|
2352
|
-
(c = g(
|
|
2359
|
+
(c = g(I, this)) != null && c.mediaElement && (g(I, this).mediaElement.style.display = "hidden"), (l = g(I, this)) == null || l.pause();
|
|
2353
2360
|
} else {
|
|
2354
2361
|
var u;
|
|
2355
|
-
(u = g(
|
|
2362
|
+
(u = g(I, this)) != null && u.mediaElement && (g(I, this).mediaElement.style.display = "block");
|
|
2356
2363
|
}
|
|
2357
2364
|
break;
|
|
2358
2365
|
case "is-casting":
|
|
2359
2366
|
if (v(n)) {
|
|
2360
2367
|
var d, f;
|
|
2361
|
-
(d = g(
|
|
2368
|
+
(d = g(Ui, this)) != null && d.isFullscreen() && h(H, this, yo).call(this), (f = g(I, this)) == null || f.pause();
|
|
2362
2369
|
} else if (!document.hidden) {
|
|
2363
2370
|
var ee;
|
|
2364
|
-
(ee = g(
|
|
2371
|
+
(ee = g(I, this)) == null || ee.play();
|
|
2365
2372
|
}
|
|
2366
2373
|
break;
|
|
2367
2374
|
case "cast-receiver-id":
|
|
2368
|
-
m(
|
|
2375
|
+
m(qi, this, n);
|
|
2369
2376
|
break;
|
|
2370
2377
|
case "cast-background":
|
|
2371
|
-
m(
|
|
2378
|
+
m(Ji, this, n);
|
|
2372
2379
|
break;
|
|
2373
2380
|
case "language":
|
|
2374
|
-
g(
|
|
2381
|
+
g(I, this) && (g(I, this).language = n, v(n) ? h(H, this, U).call(this, _.LANGUAGE, n) : h(H, this, W).call(this, _.LANGUAGE));
|
|
2375
2382
|
break;
|
|
2376
2383
|
case "text-track":
|
|
2377
|
-
g(
|
|
2384
|
+
g(I, this) && (g(I, this).textTrack = n, v(n) ? h(H, this, U).call(this, _.TEXT_TRACK, n) : h(H, this, W).call(this, _.TEXT_TRACK));
|
|
2378
2385
|
break;
|
|
2379
2386
|
case "log-level":
|
|
2380
2387
|
v(n) && g(V, this).setLevel(ve(n));
|
|
@@ -2382,13 +2389,13 @@ var Ei = [
|
|
|
2382
2389
|
case "authentication-token":
|
|
2383
2390
|
if (v(n)) {
|
|
2384
2391
|
var te, ne;
|
|
2385
|
-
(te = g(
|
|
2392
|
+
(te = g(I, this)) == null || te.updateAuthenticationToken(n), (ne = g(Gi, this)) == null || ne.updateAuthenticationToken(n), h(H, this, U).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2386
2393
|
} else h(H, this, W).call(this, _.AUTHENTICATION_TOKEN);
|
|
2387
2394
|
break;
|
|
2388
2395
|
case "volume":
|
|
2389
2396
|
if (v(n)) {
|
|
2390
2397
|
let e = parseFloat(n);
|
|
2391
|
-
g(
|
|
2398
|
+
g(R, this) && (g(R, this).volume = e), g(I, this) && (g(I, this).volume = e);
|
|
2392
2399
|
}
|
|
2393
2400
|
break;
|
|
2394
2401
|
case "timeshift-position":
|
|
@@ -2402,7 +2409,7 @@ var Ei = [
|
|
|
2402
2409
|
let e = Te(n);
|
|
2403
2410
|
if (e) {
|
|
2404
2411
|
var re;
|
|
2405
|
-
(re = g(
|
|
2412
|
+
(re = g(I, this)) == null || re.drm.setHeaders(e);
|
|
2406
2413
|
} else g(V, this).warn("Invalid DRM headers format:", n);
|
|
2407
2414
|
}
|
|
2408
2415
|
break;
|
|
@@ -2411,7 +2418,7 @@ var Ei = [
|
|
|
2411
2418
|
let e = Te(n);
|
|
2412
2419
|
if (e) {
|
|
2413
2420
|
var ie;
|
|
2414
|
-
(ie = g(
|
|
2421
|
+
(ie = g(I, this)) == null || ie.drm.setQueryParams(e);
|
|
2415
2422
|
} else g(V, this).warn("Invalid DRM query parameters format:", n);
|
|
2416
2423
|
}
|
|
2417
2424
|
break;
|
|
@@ -2420,36 +2427,36 @@ var Ei = [
|
|
|
2420
2427
|
_.USER_INTERACTING,
|
|
2421
2428
|
_.PAUSED,
|
|
2422
2429
|
_.HIDE_UI_ON_PAUSE
|
|
2423
|
-
].includes(e) && h(H, this,
|
|
2430
|
+
].includes(e) && h(H, this, ho).call(this);
|
|
2424
2431
|
}
|
|
2425
2432
|
}
|
|
2426
2433
|
connectListener(e) {
|
|
2427
|
-
|
|
2428
|
-
let n = g(
|
|
2429
|
-
switch (n ? n.push(e) : g(
|
|
2434
|
+
Nr(e).forEach((t) => {
|
|
2435
|
+
let n = g(Ai, this).get(t);
|
|
2436
|
+
switch (n ? n.push(e) : g(Ai, this).set(t, [e]), t) {
|
|
2430
2437
|
case _.PAUSED:
|
|
2431
2438
|
var r;
|
|
2432
|
-
(((r = g(
|
|
2439
|
+
(((r = g(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
2433
2440
|
break;
|
|
2434
2441
|
case _.MUTED:
|
|
2435
2442
|
var i;
|
|
2436
|
-
((i = g(
|
|
2443
|
+
((i = g(I, this)) != null && i.muted || this.hasAttribute(_.MUTED)) && e.setAttribute(_.MUTED, "");
|
|
2437
2444
|
break;
|
|
2438
2445
|
case _.MAX_VIDEO_BITRATE:
|
|
2439
|
-
g(
|
|
2446
|
+
g(Vi, this) && e.setAttribute(_.MAX_VIDEO_BITRATE, g(Vi, this));
|
|
2440
2447
|
break;
|
|
2441
2448
|
case _.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2442
2449
|
{
|
|
2443
2450
|
var a, o;
|
|
2444
|
-
let t = (a = (o = g(
|
|
2451
|
+
let t = (a = (o = g(I, this)) == null ? void 0 : o.sizeBasedResolutionCapEnabled) == null ? x(this.getAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0) : a;
|
|
2445
2452
|
e.setAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED, t ? "true" : "false");
|
|
2446
2453
|
}
|
|
2447
2454
|
break;
|
|
2448
2455
|
case _.CHANNEL_ID:
|
|
2449
|
-
g(
|
|
2456
|
+
g(zi, this) && e.setAttribute(_.CHANNEL_ID, g(zi, this));
|
|
2450
2457
|
break;
|
|
2451
2458
|
case _.CHANNEL_GROUP_ID:
|
|
2452
|
-
g(
|
|
2459
|
+
g(Bi, this) && e.setAttribute(_.CHANNEL_GROUP_ID, g(Bi, this));
|
|
2453
2460
|
break;
|
|
2454
2461
|
case _.AUTHENTICATION_TOKEN: {
|
|
2455
2462
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2462,7 +2469,7 @@ var Ei = [
|
|
|
2462
2469
|
break;
|
|
2463
2470
|
}
|
|
2464
2471
|
case _.TIMESHIFT_THUMBNAIL_URL:
|
|
2465
|
-
g(
|
|
2472
|
+
g(Li, this) && e.setAttribute(_.TIMESHIFT_THUMBNAIL_URL, g(Li, this));
|
|
2466
2473
|
break;
|
|
2467
2474
|
case _.DEBUG_PANEL_OPEN:
|
|
2468
2475
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) && e.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
@@ -2474,56 +2481,56 @@ var Ei = [
|
|
|
2474
2481
|
}
|
|
2475
2482
|
case _.PLAYBACK_LATENCY: {
|
|
2476
2483
|
var s;
|
|
2477
|
-
let t = (s = g(
|
|
2484
|
+
let t = (s = g(I, this)) == null ? void 0 : s.playbackLatency;
|
|
2478
2485
|
typeof t == "number" && e.setAttribute(_.PLAYBACK_LATENCY, String(t));
|
|
2479
2486
|
break;
|
|
2480
2487
|
}
|
|
2481
2488
|
case _.CONNECTION_STATE:
|
|
2482
|
-
g(
|
|
2489
|
+
g(I, this) && e.setAttribute(_.CONNECTION_STATE, g(I, this).connectionState);
|
|
2483
2490
|
break;
|
|
2484
2491
|
case _.ABR_ENABLED:
|
|
2485
|
-
g(
|
|
2492
|
+
g(I, this) ? e.setAttribute(_.ABR_ENABLED, String(g(I, this).abrEnabled)) : v(this.getAttribute(_.ABR_ENABLED)) ? e.setAttribute(_.ABR_ENABLED, this.getAttribute(_.ABR_ENABLED) || "") : e.removeAttribute(_.ABR_ENABLED);
|
|
2486
2493
|
break;
|
|
2487
2494
|
}
|
|
2488
2495
|
});
|
|
2489
2496
|
}
|
|
2490
2497
|
disconnectListener(e) {
|
|
2491
|
-
|
|
2492
|
-
let n = g(
|
|
2493
|
-
n && g(
|
|
2498
|
+
Nr(e).forEach((t) => {
|
|
2499
|
+
let n = g(Ai, this).get(t);
|
|
2500
|
+
n && g(Ai, this).set(t, n.filter((t) => t !== e));
|
|
2494
2501
|
});
|
|
2495
2502
|
}
|
|
2496
2503
|
get instance() {
|
|
2497
|
-
return g(
|
|
2504
|
+
return g(I, this);
|
|
2498
2505
|
}
|
|
2499
2506
|
get fullscreen() {
|
|
2500
|
-
return h(H, this,
|
|
2507
|
+
return h(H, this, Ja).call(this);
|
|
2501
2508
|
}
|
|
2502
2509
|
get airPlay() {
|
|
2503
|
-
return g(
|
|
2510
|
+
return g(Gi, this);
|
|
2504
2511
|
}
|
|
2505
2512
|
get timelineMarkers() {
|
|
2506
|
-
return
|
|
2513
|
+
return Vr(this.getAttribute(_.TIMELINE_MARKERS));
|
|
2507
2514
|
}
|
|
2508
2515
|
set timelineMarkers(e) {
|
|
2509
|
-
let t =
|
|
2516
|
+
let t = Br(e);
|
|
2510
2517
|
t.length === 0 ? this.removeAttribute(_.TIMELINE_MARKERS) : this.setAttribute(_.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2511
2518
|
}
|
|
2512
2519
|
connect() {
|
|
2513
|
-
h(H, this,
|
|
2520
|
+
h(H, this, La).call(this);
|
|
2514
2521
|
}
|
|
2515
2522
|
};
|
|
2516
|
-
function
|
|
2517
|
-
g(
|
|
2523
|
+
function Ia() {
|
|
2524
|
+
g(Li, this) && (m(Li, this, void 0), h(H, this, W).call(this, _.TIMESHIFT_THUMBNAIL_URL), h(H, this, W).call(this, _.SEEK_PREVIEW));
|
|
2518
2525
|
}
|
|
2519
|
-
function
|
|
2526
|
+
function La() {
|
|
2520
2527
|
var e = this;
|
|
2521
2528
|
return t(function* () {
|
|
2522
2529
|
var t, n;
|
|
2523
|
-
if (!g(
|
|
2524
|
-
h(H, e,
|
|
2525
|
-
let r = g(
|
|
2526
|
-
g(
|
|
2530
|
+
if (!g(zi, e)) return;
|
|
2531
|
+
h(H, e, Ia).call(e);
|
|
2532
|
+
let r = g(L, e) === g(Ii, e);
|
|
2533
|
+
g(Ni, e).stop(), yield (t = g(I, e)) == null ? void 0 : t.unload(), r && m(L, e, void 0);
|
|
2527
2534
|
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = ye(e.getAttribute(_.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = be(e.getAttribute(_.MEDIA)), l = e.getAttribute(_.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, d = e.getAttribute("authentication-token") || void 0, f = ye(e.getAttribute("max-video-bit-rate")), ee = ye(e.getAttribute("max-initial-bit-rate")), te = Se(e.getAttribute("max-size")), re = ye(e.getAttribute("min-buffer-time")), ie = ye(e.getAttribute("max-buffer-time")), ae = x(e.getAttribute("burst-enabled")), oe = x(e.getAttribute("mse-enabled")), se = x(e.getAttribute("mse-opus-enabled")), p = x(e.getAttribute("background-play-enabled")), ce = x(e.getAttribute("ios-background-play-enabled")), le = x(e.getAttribute("media-session-enabled")), ue = x(e.getAttribute("ios-wake-lock-enabled")), de = x(e.getAttribute("stream-to-media-element-enabled")), fe = x(e.getAttribute("ios-media-element-enabled")), pe = x(e.getAttribute("abr-enabled"), !0), me = x(e.getAttribute("size-based-resolution-cap-enabled")), ge = x(e.getAttribute("telemetry-enabled")), y = Oe(e.getAttribute("video-codecs")), Ce = _e(e.getAttribute("poster")), we = xe(e.getAttribute("advanced")), b = ve(e.getAttribute("log-level")), Ee = {
|
|
2528
2535
|
headers: Te(e.getAttribute("drm-headers")),
|
|
2529
2536
|
queryParams: Te(e.getAttribute("drm-queryparams")),
|
|
@@ -2536,10 +2543,10 @@ function Pa() {
|
|
|
2536
2543
|
audioRobustness: he(e.getAttribute("drm-playready-audio-robustness"))
|
|
2537
2544
|
}
|
|
2538
2545
|
}, De = Pe(e.getAttribute("webcodecs-hardware-acceleration")), ke = Ne(e.getAttribute("decoders")), S = x(e.getAttribute("offscreen-canvas-enabled")), C = x(e.getAttribute("webtransport-enabled")), Ae = x(e.getAttribute("unstable-webtransport-enabled")), je = ye(e.getAttribute("reconnect-retries")), Me = je === void 0 ? void 0 : (e) => e.reconnectRetries < je, Fe = e.getAttribute("language") || void 0;
|
|
2539
|
-
m(
|
|
2540
|
-
url: g(
|
|
2541
|
-
channelId: g(
|
|
2542
|
-
channelGroupId: g(
|
|
2546
|
+
m(I, e, new ne({
|
|
2547
|
+
url: g(Ri, e),
|
|
2548
|
+
channelId: g(zi, e),
|
|
2549
|
+
channelGroupId: g(Bi, e),
|
|
2543
2550
|
edgeUrl: u,
|
|
2544
2551
|
authenticationToken: d,
|
|
2545
2552
|
muted: a,
|
|
@@ -2575,160 +2582,160 @@ function Pa() {
|
|
|
2575
2582
|
decoders: ke,
|
|
2576
2583
|
offscreenCanvasEnabled: S,
|
|
2577
2584
|
reconnectHandler: Me
|
|
2578
|
-
})), m(
|
|
2579
|
-
let Ie = g(
|
|
2580
|
-
g(
|
|
2585
|
+
})), m(Ii, e, new Si(g(I, e))), g(L, e) || m(L, e, g(Ii, e)), h(H, e, Ra).call(e), m(Pi, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), g(Pi, e) && (g(I, e).attach(g(Pi, e)), g(Qi, e).observe(g(Pi, e))), e.setAttribute(_.MEDIA, g(I, e).media);
|
|
2586
|
+
let Ie = g(I, e);
|
|
2587
|
+
g(ia, e).call(e, () => {
|
|
2581
2588
|
Ie.muted && h(H, e, U).call(e, _.MUTED, ""), Ie.abrEnabled ? h(H, e, U).call(e, _.ABR_ENABLED, "") : h(H, e, W).call(e, _.ABR_ENABLED), h(H, e, U).call(e, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, Ie.sizeBasedResolutionCapEnabled ? "true" : "false"), h(H, e, U).call(e, _.VOLUME, Ie.volume.toString());
|
|
2582
|
-
}), v(Ce) || h(H, e, U).call(e, _.POSTER_SRC, g(
|
|
2589
|
+
}), v(Ce) || h(H, e, U).call(e, _.POSTER_SRC, g(I, e).getThumbnailUrl());
|
|
2583
2590
|
let w = x(e.getAttribute(_.AIRPLAY_ENABLED), !1), Le = x(e.getAttribute(_.CAST_ENABLED), !0), Re = x(e.getAttribute(_.FULLSCREEN_ENABLED), !0), ze = x(e.getAttribute(_.PIP_ENABLED), !0), Be = x(e.getAttribute(_.VU_METER_ENABLED), !1), Ve = x(e.getAttribute(_.TIMESHIFT_ENABLED), !1);
|
|
2584
|
-
w && h(H, e,
|
|
2591
|
+
w && h(H, e, $a).call(e, g(I, e)), Le && h(H, e, Ya).call(e, g(I, e)), Re && h(H, e, Ka).call(e, g(I, e)), ze && h(H, e, Wa).call(e, g(I, e)), i || g(I, e).play(), Be && h(H, e, eo).call(e, g(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2585
2592
|
bubbles: !0,
|
|
2586
2593
|
composed: !0,
|
|
2587
|
-
detail: g(
|
|
2588
|
-
})), Ve && (h(H, e,
|
|
2594
|
+
detail: g(I, e)
|
|
2595
|
+
})), Ve && (h(H, e, Va).call(e), Re && h(H, e, qa).call(e));
|
|
2589
2596
|
})();
|
|
2590
2597
|
}
|
|
2591
|
-
function
|
|
2592
|
-
g(
|
|
2598
|
+
function Ra() {
|
|
2599
|
+
g(I, this) && (g(I, this).on("rendition levels", g(ta, this)), g(I, this).on("rendition level", g(na, this)), g(I, this).on("playback state", g(aa, this)), g(I, this).on("volume state", g(oa, this)), g(I, this).on("channel switch failed", g(sa, this)), g(I, this).on("channel switch", g(ca, this)), g(I, this).on("channels", g(la, this)), g(I, this).on("languages", g(ua, this)), g(I, this).on("text tracks", g(da, this)), g(I, this).on("needs user input", g(fa, this)), g(I, this).on("is live", g(pa, this)), g(I, this).on("timeshift info", g(ma, this)));
|
|
2593
2600
|
}
|
|
2594
|
-
function
|
|
2595
|
-
g(
|
|
2601
|
+
function za() {
|
|
2602
|
+
g(I, this) && (g(I, this).off("playback state", g(aa, this)), g(I, this).off("volume state", g(oa, this)), g(I, this).off("channel switch failed", g(sa, this)), g(I, this).off("channel switch", g(ca, this)), g(I, this).off("channels", g(la, this)), g(I, this).off("languages", g(ua, this)), g(I, this).off("text tracks", g(da, this)), g(I, this).off("needs user input", g(fa, this)), g(I, this).off("is live", g(pa, this)), g(I, this).off("timeshift info", g(ma, this)));
|
|
2596
2603
|
}
|
|
2597
|
-
function
|
|
2598
|
-
g(
|
|
2604
|
+
function Ba() {
|
|
2605
|
+
g(R, this) && (g(R, this).addEventListener("playing", g(ha, this)), g(R, this).addEventListener("pause", g(ga, this)), g(R, this).addEventListener("ended", g(_a, this)), g(R, this).addEventListener("timeupdate", g(ya, this)), g(R, this).addEventListener("volumechange", g(ba, this)), g(R, this).addEventListener("hlsbuffering", g(xa, this)), g(R, this).addEventListener("hlsnotbuffering", g(Sa, this)), g(R, this).addEventListener("timeshiftready", g(Ca, this)));
|
|
2599
2606
|
}
|
|
2600
|
-
function
|
|
2607
|
+
function Va() {
|
|
2601
2608
|
var e, t, n, r;
|
|
2602
|
-
let i = ye(this.getAttribute(_.VOLUME)), a = i === void 0 ? (e = (t = g(
|
|
2603
|
-
h(H, this,
|
|
2609
|
+
let i = ye(this.getAttribute(_.VOLUME)), a = i === void 0 ? (e = (t = g(L, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = x(this.getAttribute(_.MUTED), (n = (r = g(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2610
|
+
h(H, this, Ha).call(this), m(R, this, new ii(g(Fi, this), {
|
|
2604
2611
|
volume: a,
|
|
2605
2612
|
muted: o,
|
|
2606
|
-
maxVideoBitRate: g(
|
|
2607
|
-
})), g(
|
|
2613
|
+
maxVideoBitRate: g(Vi, this) ? parseInt(g(Vi, this), 10) : void 0
|
|
2614
|
+
})), g(R, this).addEventListener("durationchange", g(va, this));
|
|
2608
2615
|
}
|
|
2609
|
-
function
|
|
2610
|
-
g(
|
|
2616
|
+
function Ha() {
|
|
2617
|
+
g(R, this) && (h(H, this, Ua).call(this), g(R, this).removeEventListener("durationchange", g(va, this)), g(R, this).cleanup(), g(L, this) === g(R, this) && m(L, this, void 0), m(R, this, void 0));
|
|
2611
2618
|
}
|
|
2612
|
-
function
|
|
2613
|
-
g(
|
|
2619
|
+
function Ua() {
|
|
2620
|
+
g(R, this) && (g(R, this).removeEventListener("playing", g(ha, this)), g(R, this).removeEventListener("pause", g(ga, this)), g(R, this).removeEventListener("ended", g(_a, this)), g(R, this).removeEventListener("timeupdate", g(ya, this)), g(R, this).removeEventListener("volumechange", g(ba, this)), g(R, this).removeEventListener("hlsbuffering", g(xa, this)), g(R, this).removeEventListener("hlsnotbuffering", g(Sa, this)), g(R, this).removeEventListener("timeshiftready", g(Ca, this)));
|
|
2614
2621
|
}
|
|
2615
|
-
function
|
|
2616
|
-
e.mediaElement instanceof HTMLVideoElement && (m(
|
|
2622
|
+
function Wa(e) {
|
|
2623
|
+
e.mediaElement instanceof HTMLVideoElement && (m(z, this, new fr(e.mediaElement)), g(z, this).isSupported() && (g(V, this).debug("PIP is supported"), h(H, this, U).call(this, _.PIP_AVAILABLE, "")), g(z, this).on("on picture in picture change", (e) => {
|
|
2617
2624
|
e ? h(H, this, U).call(this, _.IS_PIP, "") : h(H, this, W).call(this, _.IS_PIP);
|
|
2618
2625
|
}));
|
|
2619
2626
|
}
|
|
2620
|
-
function
|
|
2627
|
+
function Ga() {
|
|
2621
2628
|
var e;
|
|
2622
|
-
if (!g(
|
|
2629
|
+
if (!g(z, this)) return;
|
|
2623
2630
|
let t = null;
|
|
2624
|
-
g(
|
|
2631
|
+
g(L, this) === g(R, this) && g(R, this) ? t = g(R, this).videoElement : ((e = g(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = g(I, this).mediaElement), t && t !== g(z, this).videoElement && (g(V, this).debug("Updating PIP target to", g(L, this) === g(R, this) ? "HLS" : "Vindral"), g(z, this).unload(), m(z, this, new fr(t)), g(z, this).on("on picture in picture change", (e) => {
|
|
2625
2632
|
e ? h(H, this, U).call(this, _.IS_PIP, "") : h(H, this, W).call(this, _.IS_PIP);
|
|
2626
2633
|
}));
|
|
2627
2634
|
}
|
|
2628
|
-
function
|
|
2629
|
-
let t = !
|
|
2630
|
-
m(
|
|
2635
|
+
function Ka(e) {
|
|
2636
|
+
let t = !nr.isFullscreenApiSupported(this) && nr.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2637
|
+
m(Ui, this, new nr(t)), g(Ui, this).on("on fullscreen change", (e) => {
|
|
2631
2638
|
e ? h(H, this, U).call(this, _.FULLSCREEN, "") : h(H, this, W).call(this, _.FULLSCREEN);
|
|
2632
2639
|
});
|
|
2633
2640
|
}
|
|
2634
|
-
function
|
|
2641
|
+
function qa() {
|
|
2635
2642
|
var e;
|
|
2636
|
-
g(
|
|
2643
|
+
g(R, this) && (m(Wi, this, !nr.isFullscreenApiSupported(this) && nr.isFullscreenApiSupported((e = g(R, this)) == null ? void 0 : e.videoElement) ? new nr(g(R, this).videoElement) : new nr(this)), g(Wi, this).on("on fullscreen change", (e) => {
|
|
2637
2644
|
e ? h(H, this, U).call(this, _.FULLSCREEN, "") : h(H, this, W).call(this, _.FULLSCREEN);
|
|
2638
2645
|
}));
|
|
2639
2646
|
}
|
|
2640
|
-
function
|
|
2641
|
-
return this.hasAttribute(_.TIMESHIFT_POSITION) ? g(
|
|
2647
|
+
function Ja() {
|
|
2648
|
+
return this.hasAttribute(_.TIMESHIFT_POSITION) ? g(Wi, this) : g(Ui, this);
|
|
2642
2649
|
}
|
|
2643
|
-
function
|
|
2644
|
-
m(
|
|
2645
|
-
background: g(
|
|
2646
|
-
receiverApplicationId: g(
|
|
2650
|
+
function Ya(e) {
|
|
2651
|
+
m(Ki, this, new Ae({
|
|
2652
|
+
background: g(Ji, this),
|
|
2653
|
+
receiverApplicationId: g(qi, this),
|
|
2647
2654
|
options: e.getCastOptions()
|
|
2648
|
-
})), g(
|
|
2655
|
+
})), g(Ki, this).on("devices available", h(H, this, Xa).bind(this)), g(Ki, this).on("connected", h(H, this, Za).bind(this)), g(Ki, this).on("resumed", h(H, this, Za).bind(this)), g(Ki, this).on("disconnected", h(H, this, Qa).bind(this)), g(Ki, this).init().catch((e) => {
|
|
2649
2656
|
g(V, this).warn("Failed to initialize CastSender", e);
|
|
2650
2657
|
});
|
|
2651
2658
|
}
|
|
2652
|
-
function
|
|
2659
|
+
function Xa(e) {
|
|
2653
2660
|
e ? h(H, this, U).call(this, _.CAST_AVAILABLE, "") : h(H, this, W).call(this, _.CAST_AVAILABLE);
|
|
2654
2661
|
}
|
|
2655
|
-
function
|
|
2662
|
+
function Za() {
|
|
2656
2663
|
var e, t;
|
|
2657
2664
|
h(H, this, U).call(this, _.IS_CASTING, "");
|
|
2658
|
-
let n = (e = (t = g(
|
|
2665
|
+
let n = (e = (t = g(Ki, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2659
2666
|
h(H, this, U).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2660
2667
|
}
|
|
2661
|
-
function
|
|
2668
|
+
function Qa() {
|
|
2662
2669
|
h(H, this, W).call(this, _.IS_CASTING), h(H, this, W).call(this, _.CAST_RECEIVER_NAME);
|
|
2663
2670
|
}
|
|
2664
|
-
function
|
|
2671
|
+
function $a(e) {
|
|
2665
2672
|
var t;
|
|
2666
|
-
(t = g(
|
|
2673
|
+
(t = g(Gi, this)) == null || t.unload();
|
|
2667
2674
|
let n = e.getCastOptions();
|
|
2668
|
-
m(
|
|
2675
|
+
m(Gi, this, new Un({
|
|
2669
2676
|
url: n.url,
|
|
2670
2677
|
channelId: n.channelId,
|
|
2671
2678
|
authenticationToken: n.authenticationToken,
|
|
2672
2679
|
container: this
|
|
2673
|
-
})), g(
|
|
2680
|
+
})), g(Gi, this).once("available", () => {
|
|
2674
2681
|
h(H, this, U).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2675
|
-
}), g(
|
|
2682
|
+
}), g(Gi, this).on("connected", () => {
|
|
2676
2683
|
h(H, this, U).call(this, _.IS_AIRPLAYING, "");
|
|
2677
|
-
}), g(
|
|
2684
|
+
}), g(Gi, this).on("disconnected", () => {
|
|
2678
2685
|
h(H, this, W).call(this, _.IS_AIRPLAYING);
|
|
2679
2686
|
});
|
|
2680
2687
|
}
|
|
2681
|
-
function
|
|
2688
|
+
function eo(e) {
|
|
2682
2689
|
var t;
|
|
2683
|
-
if ((t = g(
|
|
2684
|
-
if (e.audioNode) m(
|
|
2685
|
-
else if (e.mediaElement instanceof HTMLMediaElement) m(
|
|
2690
|
+
if ((t = g(B, this)) == null || t.unload(), !a()) {
|
|
2691
|
+
if (e.audioNode) m(B, this, new Ur(e.audioNode));
|
|
2692
|
+
else if (e.mediaElement instanceof HTMLMediaElement) m(B, this, new Ur(e.mediaElement));
|
|
2686
2693
|
else return;
|
|
2687
|
-
g(
|
|
2694
|
+
g(B, this).on("on decibel change", (e) => {
|
|
2688
2695
|
h(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
2689
2696
|
}), h(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2690
2697
|
left: null,
|
|
2691
2698
|
right: null
|
|
2692
|
-
})), (!g(
|
|
2699
|
+
})), (!g(B, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && g(B, this).start();
|
|
2693
2700
|
}
|
|
2694
2701
|
}
|
|
2695
|
-
function
|
|
2702
|
+
function to() {
|
|
2696
2703
|
var e, t, n, r, i;
|
|
2697
|
-
h(H, this,
|
|
2698
|
-
for (let e of Object.values(S)) this.removeEventListener(e, g(
|
|
2699
|
-
h(H, this,
|
|
2704
|
+
ki === this && (ki = void 0), h(H, this, ro).call(this), h(H, this, wo).call(this), g(Qi, this).unload(), (e = g(I, this)) == null || e.unload(), (t = g(z, this)) == null || t.unload(), (n = g(Ui, this)) == null || n.unload(), (r = g(Wi, this)) == null || r.unload(), (i = g(B, this)) == null || i.unload(), h(H, this, Ha).call(this);
|
|
2705
|
+
for (let e of Object.values(S)) this.removeEventListener(e, g(Ta, this));
|
|
2706
|
+
h(H, this, za).call(this), g(Mi, this) && (clearTimeout(g(Mi, this)), m(Mi, this, null)), g(Ni, this).stop(), this.disconnectListener(this);
|
|
2700
2707
|
}
|
|
2701
|
-
function
|
|
2702
|
-
let e = () => (customElements.get("vindral-debug-panel") || import("./ZUbKTiOB.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), g(
|
|
2703
|
-
window._vindralDebug = e, m(
|
|
2708
|
+
function no() {
|
|
2709
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./ZUbKTiOB.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), g(I, this));
|
|
2710
|
+
window._vindralDebug = e, m(Zi, this, e);
|
|
2704
2711
|
}
|
|
2705
|
-
function
|
|
2712
|
+
function ro() {
|
|
2706
2713
|
let e = window;
|
|
2707
|
-
g(
|
|
2714
|
+
g(Zi, this) && e._vindralDebug === g(Zi, this) && delete e._vindralDebug, m(Zi, this, null);
|
|
2708
2715
|
}
|
|
2709
|
-
function
|
|
2710
|
-
e.pointerType !== "mouse" && e.timeStamp - g(
|
|
2716
|
+
function io(e) {
|
|
2717
|
+
e.pointerType !== "mouse" && e.timeStamp - g(wa, this) < 250 || (h(H, this, po).call(this), g(Mi, this) && clearTimeout(g(Mi, this)), e.target instanceof HTMLElement && ([this, g(Pi, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && h(H, this, mo).call(this));
|
|
2711
2718
|
}
|
|
2712
|
-
function
|
|
2719
|
+
function ao(e) {
|
|
2713
2720
|
let t = this.hasAttribute(_.USER_INTERACTING);
|
|
2714
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, g(
|
|
2721
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, g(Pi, this)].includes(e.target) && t ? h(H, this, fo).call(this) : h(H, this, mo).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && h(H, this, mo).call(this);
|
|
2715
2722
|
}
|
|
2716
|
-
function
|
|
2723
|
+
function oo(e) {
|
|
2717
2724
|
switch (e) {
|
|
2718
2725
|
case "dblclick-fullscreen": return x(this.getAttribute(_.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2719
2726
|
default: return !0;
|
|
2720
2727
|
}
|
|
2721
2728
|
}
|
|
2722
|
-
function
|
|
2723
|
-
h(H, this,
|
|
2729
|
+
function so(e) {
|
|
2730
|
+
h(H, this, oo).call(this, "dblclick-fullscreen") && (!g(Ui, this) || e.target instanceof y || e.target instanceof Ve || e.target instanceof Ei || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2724
2731
|
}
|
|
2725
|
-
function
|
|
2726
|
-
this.hasAttribute(_.USER_INTERACTING) || h(H, this,
|
|
2732
|
+
function co(e) {
|
|
2733
|
+
this.hasAttribute(_.USER_INTERACTING) || h(H, this, mo).call(this);
|
|
2727
2734
|
}
|
|
2728
|
-
function
|
|
2735
|
+
function lo(e) {
|
|
2729
2736
|
var t;
|
|
2730
2737
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2731
|
-
if (n || r || !
|
|
2738
|
+
if (n || r || !Oi.includes(i)) return;
|
|
2732
2739
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2733
2740
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2734
2741
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2746,28 +2753,28 @@ function oo(e) {
|
|
|
2746
2753
|
break;
|
|
2747
2754
|
}
|
|
2748
2755
|
}
|
|
2749
|
-
function
|
|
2756
|
+
function uo() {
|
|
2750
2757
|
var e = this;
|
|
2751
2758
|
return t(function* () {
|
|
2752
|
-
if (!g(
|
|
2759
|
+
if (!g(I, e) || !g(Bi, e)) return;
|
|
2753
2760
|
let t = Date.now();
|
|
2754
|
-
if (g(
|
|
2761
|
+
if (g(ja, e) && t - g(ja, e) < 1e4) g(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2755
2762
|
else {
|
|
2756
|
-
m(
|
|
2757
|
-
let n = yield g(
|
|
2763
|
+
m(ja, e, t);
|
|
2764
|
+
let n = yield g(I, e).getApiClient().getChannels(g(Bi, e));
|
|
2758
2765
|
h(H, e, U).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2759
2766
|
}
|
|
2760
|
-
m(
|
|
2767
|
+
m(Yi, e, window.setTimeout(() => void h(H, e, uo).call(e), 1e4));
|
|
2761
2768
|
})();
|
|
2762
2769
|
}
|
|
2763
|
-
function
|
|
2770
|
+
function fo() {
|
|
2764
2771
|
!this.hasAttribute(_.USER_INTERACTING) || this.hasAttribute(_.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2765
2772
|
bubbles: !0,
|
|
2766
2773
|
composed: !0,
|
|
2767
2774
|
detail: { active: !1 }
|
|
2768
2775
|
})), this.removeAttribute(_.USER_INTERACTING));
|
|
2769
2776
|
}
|
|
2770
|
-
function
|
|
2777
|
+
function po() {
|
|
2771
2778
|
this.hasAttribute(_.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2772
2779
|
this.setAttribute(_.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2773
2780
|
bubbles: !0,
|
|
@@ -2776,86 +2783,86 @@ function lo() {
|
|
|
2776
2783
|
}));
|
|
2777
2784
|
});
|
|
2778
2785
|
}
|
|
2779
|
-
function
|
|
2780
|
-
h(H, this,
|
|
2781
|
-
h(H, this,
|
|
2782
|
-
}, g(
|
|
2786
|
+
function mo() {
|
|
2787
|
+
h(H, this, po).call(this), g(Mi, this) && clearTimeout(g(Mi, this)), g(ji, this) && m(Mi, this, self.setTimeout(() => {
|
|
2788
|
+
h(H, this, fo).call(this);
|
|
2789
|
+
}, g(ji, this)));
|
|
2783
2790
|
}
|
|
2784
|
-
function
|
|
2791
|
+
function ho() {
|
|
2785
2792
|
var e;
|
|
2786
2793
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2787
|
-
(e = g(
|
|
2794
|
+
(e = g(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2788
2795
|
}
|
|
2789
|
-
function
|
|
2796
|
+
function go() {
|
|
2790
2797
|
var e;
|
|
2791
|
-
h(H, this,
|
|
2798
|
+
h(H, this, Ga).call(this), h(H, this, bo).call(this), (e = g(z, this)) == null || e.request().catch((e) => {
|
|
2792
2799
|
g(V, this).warn("Failed to enter picture in picture:", e);
|
|
2793
2800
|
});
|
|
2794
2801
|
}
|
|
2795
|
-
function
|
|
2802
|
+
function _o() {
|
|
2796
2803
|
var e;
|
|
2797
|
-
(e = g(
|
|
2804
|
+
(e = g(z, this)) == null || e.exit().catch((e) => {
|
|
2798
2805
|
g(V, this).warn("Failed to exit picture in picture:", e);
|
|
2799
2806
|
});
|
|
2800
2807
|
}
|
|
2801
|
-
function
|
|
2802
|
-
let e = h(H, this,
|
|
2808
|
+
function vo() {
|
|
2809
|
+
let e = h(H, this, Ja).call(this);
|
|
2803
2810
|
if (!e) {
|
|
2804
2811
|
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), h(H, this, U).call(this, _.FULLSCREEN, "");
|
|
2805
2812
|
return;
|
|
2806
2813
|
}
|
|
2807
|
-
e != null && e.isFullscreenApiSupported() ? (h(H, this,
|
|
2808
|
-
g(
|
|
2814
|
+
e != null && e.isFullscreenApiSupported() ? (h(H, this, bo).call(this), e == null || e.request().then(() => {
|
|
2815
|
+
g(Ma, this).call(this);
|
|
2809
2816
|
}).catch((e) => {
|
|
2810
2817
|
g(V, this).warn("Failed to enter fullscreen:", e);
|
|
2811
2818
|
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), h(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2812
2819
|
}
|
|
2813
|
-
function
|
|
2814
|
-
let e = h(H, this,
|
|
2820
|
+
function yo() {
|
|
2821
|
+
let e = h(H, this, Ja).call(this);
|
|
2815
2822
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2816
|
-
g(
|
|
2823
|
+
g(Na, this).call(this);
|
|
2817
2824
|
}).catch((e) => {
|
|
2818
2825
|
g(V, this).warn("Failed to exit fullscreen:", e);
|
|
2819
2826
|
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), h(H, this, W).call(this, _.FULLSCREEN));
|
|
2820
2827
|
}
|
|
2821
|
-
function
|
|
2822
|
-
g(
|
|
2828
|
+
function bo() {
|
|
2829
|
+
g(I, this) && g(I, this).emitter.emit("ios-hack: reset size");
|
|
2823
2830
|
}
|
|
2824
|
-
function
|
|
2831
|
+
function xo() {
|
|
2825
2832
|
return this.hasAttribute(_.DEBUG_PANEL_OPEN);
|
|
2826
2833
|
}
|
|
2827
|
-
function
|
|
2828
|
-
h(H, this,
|
|
2834
|
+
function So() {
|
|
2835
|
+
h(H, this, xo).call(this) ? h(H, this, Co).call(this) : h(H, this, wo).call(this);
|
|
2829
2836
|
}
|
|
2830
|
-
function
|
|
2831
|
-
g(
|
|
2837
|
+
function Co() {
|
|
2838
|
+
g(Pa, this) === null && (h(H, this, To).call(this), m(Pa, this, window.setInterval(() => h(H, this, To).call(this), 1e3)));
|
|
2832
2839
|
}
|
|
2833
|
-
function
|
|
2834
|
-
g(
|
|
2840
|
+
function wo() {
|
|
2841
|
+
g(Pa, this) && (clearInterval(g(Pa, this)), m(Pa, this, null)), this.removeAttribute(_.DRIFT), h(H, this, W).call(this, _.DRIFT), h(H, this, W).call(this, _.PLAYBACK_LATENCY), h(H, this, W).call(this, _.CONNECTION_STATE);
|
|
2835
2842
|
}
|
|
2836
|
-
function
|
|
2837
|
-
if (!g(
|
|
2843
|
+
function To() {
|
|
2844
|
+
if (!g(I, this)) return;
|
|
2838
2845
|
try {
|
|
2839
|
-
let e = g(
|
|
2846
|
+
let e = g(I, this).getStatistics().drift;
|
|
2840
2847
|
if (typeof e == "number") {
|
|
2841
2848
|
let t = Math.round(e * 10) / 10;
|
|
2842
2849
|
h(H, this, U).call(this, _.DRIFT, String(t));
|
|
2843
2850
|
}
|
|
2844
2851
|
} catch (e) {}
|
|
2845
|
-
let e = g(
|
|
2852
|
+
let e = g(I, this).targetBufferTime;
|
|
2846
2853
|
typeof e == "number" && h(H, this, U).call(this, _.TARGET_BUFFER_TIME, String(e));
|
|
2847
|
-
let t = g(
|
|
2848
|
-
typeof t == "number" ? h(H, this, U).call(this, _.PLAYBACK_LATENCY, String(t)) : h(H, this, W).call(this, _.PLAYBACK_LATENCY), h(H, this, U).call(this, _.CONNECTION_STATE, g(
|
|
2854
|
+
let t = g(I, this).playbackLatency;
|
|
2855
|
+
typeof t == "number" ? h(H, this, U).call(this, _.PLAYBACK_LATENCY, String(t)) : h(H, this, W).call(this, _.PLAYBACK_LATENCY), h(H, this, U).call(this, _.CONNECTION_STATE, g(I, this).connectionState);
|
|
2849
2856
|
}
|
|
2850
2857
|
function U(e, t) {
|
|
2851
2858
|
var n;
|
|
2852
|
-
(n = g(
|
|
2859
|
+
(n = g(Ai, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2853
2860
|
}
|
|
2854
2861
|
function W(e) {
|
|
2855
2862
|
var t;
|
|
2856
|
-
(t = g(
|
|
2863
|
+
(t = g(Ai, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2857
2864
|
}
|
|
2858
|
-
e(
|
|
2865
|
+
e(Fa, "observedAttributes", [
|
|
2859
2866
|
...ke,
|
|
2860
2867
|
"url",
|
|
2861
2868
|
"edge-url",
|
|
@@ -2900,8 +2907,8 @@ e(Ma, "observedAttributes", [
|
|
|
2900
2907
|
]);
|
|
2901
2908
|
//#endregion
|
|
2902
2909
|
//#region ../../libs/player-next/src/components/FullscreenButton.ts
|
|
2903
|
-
var
|
|
2904
|
-
|
|
2910
|
+
var Eo, Do = document.createElement("template");
|
|
2911
|
+
Do.innerHTML = `
|
|
2905
2912
|
<style>
|
|
2906
2913
|
:host {
|
|
2907
2914
|
display: var(--fullscreen-button-display);
|
|
@@ -2925,10 +2932,10 @@ wo.innerHTML = `
|
|
|
2925
2932
|
</slot>
|
|
2926
2933
|
</slot>
|
|
2927
2934
|
`;
|
|
2928
|
-
var
|
|
2935
|
+
var Oo = class extends y {
|
|
2929
2936
|
constructor() {
|
|
2930
2937
|
var e;
|
|
2931
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2938
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Do.content.cloneNode(!0));
|
|
2932
2939
|
}
|
|
2933
2940
|
connectedCallback() {
|
|
2934
2941
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Fullscreen");
|
|
@@ -2953,48 +2960,48 @@ var To = class extends y {
|
|
|
2953
2960
|
}));
|
|
2954
2961
|
}
|
|
2955
2962
|
};
|
|
2956
|
-
|
|
2963
|
+
Eo = Oo, e(Oo, "observedAttributes", [...b(Eo, "observedAttributes", Eo), _.FULLSCREEN]);
|
|
2957
2964
|
//#endregion
|
|
2958
2965
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2959
|
-
var
|
|
2960
|
-
|
|
2966
|
+
var ko, Ao = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M4 5h7\" /><path d=\"M9 3v2c0 4.418 -2.239 8 -5 8\" /><path d=\"M5 9c0 2.144 2.952 3.908 6.7 4\" /><path d=\"M12 20l4 -9l4 9\" /><path d=\"M19.1 18h-6.2\" /></svg>\n", jo = document.createElement("template");
|
|
2967
|
+
jo.innerHTML = `
|
|
2961
2968
|
<style>
|
|
2962
2969
|
:host(:not([hidden])) {
|
|
2963
2970
|
display: var(--language-menu-display);
|
|
2964
2971
|
}
|
|
2965
2972
|
</style>
|
|
2966
2973
|
|
|
2967
|
-
<slot name="button">${
|
|
2974
|
+
<slot name="button">${Ao}</slot>
|
|
2968
2975
|
<slot name="listbox" hidden>
|
|
2969
2976
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2970
2977
|
</slot>
|
|
2971
2978
|
`;
|
|
2972
|
-
var
|
|
2979
|
+
var Mo = /* @__PURE__ */ new WeakSet(), No = class extends Ve {
|
|
2973
2980
|
constructor() {
|
|
2974
2981
|
var e, t, n;
|
|
2975
|
-
super(), C(this,
|
|
2982
|
+
super(), C(this, Mo), (e = this.shadowRoot) == null || e.appendChild(jo.content.cloneNode(!0)), this.listbox = (t = this.shadowRoot) == null ? void 0 : t.querySelector("[part=listbox]"), this.listboxSlot = (n = this.shadowRoot) == null ? void 0 : n.querySelector("slot[name=listbox]");
|
|
2976
2983
|
}
|
|
2977
2984
|
connectedCallback() {
|
|
2978
|
-
super.connectedCallback(), h(
|
|
2985
|
+
super.connectedCallback(), h(Mo, this, Po).call(this), this.setAttribute("aria-label", "Audio & Subtitles");
|
|
2979
2986
|
}
|
|
2980
2987
|
attributeChangedCallback(e, t, n) {
|
|
2981
|
-
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && h(
|
|
2988
|
+
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && h(Mo, this, Po).call(this);
|
|
2982
2989
|
}
|
|
2983
2990
|
};
|
|
2984
|
-
|
|
2985
|
-
function
|
|
2991
|
+
ko = No;
|
|
2992
|
+
function Po() {
|
|
2986
2993
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(_.LANGUAGES)), n = e(this.getAttribute(_.TEXT_TRACKS));
|
|
2987
2994
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2988
2995
|
}
|
|
2989
|
-
e(
|
|
2990
|
-
...b(
|
|
2996
|
+
e(No, "observedAttributes", [
|
|
2997
|
+
...b(ko, "observedAttributes", ko),
|
|
2991
2998
|
_.LANGUAGES,
|
|
2992
2999
|
_.TEXT_TRACKS
|
|
2993
3000
|
]);
|
|
2994
3001
|
//#endregion
|
|
2995
3002
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2996
|
-
var
|
|
2997
|
-
|
|
3003
|
+
var Fo = document.createElement("template");
|
|
3004
|
+
Fo.innerHTML = `
|
|
2998
3005
|
<style>
|
|
2999
3006
|
:host {
|
|
3000
3007
|
font: inherit;
|
|
@@ -3108,21 +3115,21 @@ Mo.innerHTML = `
|
|
|
3108
3115
|
<div class="menu"></div>
|
|
3109
3116
|
</div>
|
|
3110
3117
|
`;
|
|
3111
|
-
var
|
|
3118
|
+
var Io = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakMap(), Vo = /* @__PURE__ */ new WeakMap(), Ho = /* @__PURE__ */ new WeakMap(), Uo = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), Go = /* @__PURE__ */ new WeakMap(), Ko = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), Jo = class extends HTMLElement {
|
|
3112
3119
|
constructor() {
|
|
3113
|
-
super(), C(this, G), p(this,
|
|
3120
|
+
super(), C(this, G), p(this, Io, []), p(this, Lo, []), p(this, Ro, void 0), p(this, zo, void 0), p(this, Bo, []), p(this, Vo, []), p(this, Ho, null), p(this, Uo, null), p(this, Wo, null), p(this, Go, null), p(this, Ko, null), p(this, qo, null), e(this, "handleEvent", (e) => {
|
|
3114
3121
|
switch (e.type) {
|
|
3115
3122
|
case "keydown":
|
|
3116
|
-
h(G, this,
|
|
3123
|
+
h(G, this, rs).call(this, e);
|
|
3117
3124
|
break;
|
|
3118
3125
|
}
|
|
3119
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3126
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Fo.content.cloneNode(!0));
|
|
3120
3127
|
}
|
|
3121
3128
|
connectedCallback() {
|
|
3122
3129
|
let e = this.getRootNode();
|
|
3123
3130
|
if (e instanceof ShadowRoot) {
|
|
3124
3131
|
var t, n, r;
|
|
3125
|
-
m(
|
|
3132
|
+
m(Wo, this, e.host.closest("vindral-controller")), (t = g(Wo, this)) == null || t.connectListener(this), m(Ho, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), m(Uo, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), h(G, this, Yo).call(this), h(G, this, Xo).call(this), m(Go, this, e.host), this.addEventListener("keydown", this);
|
|
3126
3133
|
}
|
|
3127
3134
|
}
|
|
3128
3135
|
disconnectedCallback() {
|
|
@@ -3132,16 +3139,16 @@ var No = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), Fo =
|
|
|
3132
3139
|
t !== n && (e === _.LANGUAGES && n && (this.languages = JSON.parse(n)), e === _.TEXT_TRACKS && n && (this.textTracks = JSON.parse(n)), e === _.LANGUAGE && (this.language = n), e === _.TEXT_TRACK && (this.textTrack = n));
|
|
3133
3140
|
}
|
|
3134
3141
|
set languages(e) {
|
|
3135
|
-
m(
|
|
3142
|
+
m(Io, this, e), h(G, this, Qo).call(this), h(G, this, es).call(this);
|
|
3136
3143
|
}
|
|
3137
3144
|
set textTracks(e) {
|
|
3138
|
-
m(
|
|
3145
|
+
m(Lo, this, e), h(G, this, Zo).call(this), h(G, this, ts).call(this);
|
|
3139
3146
|
}
|
|
3140
3147
|
set language(e) {
|
|
3141
|
-
m(
|
|
3148
|
+
m(Ro, this, e), h(G, this, es).call(this);
|
|
3142
3149
|
}
|
|
3143
3150
|
set textTrack(e) {
|
|
3144
|
-
m(
|
|
3151
|
+
m(zo, this, e), h(G, this, ts).call(this);
|
|
3145
3152
|
}
|
|
3146
3153
|
get keysUsed() {
|
|
3147
3154
|
return [
|
|
@@ -3158,10 +3165,10 @@ var No = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), Fo =
|
|
|
3158
3165
|
];
|
|
3159
3166
|
}
|
|
3160
3167
|
focus() {
|
|
3161
|
-
g(
|
|
3168
|
+
g(Ko, this) ? g(Ko, this).focus() : g(qo, this) && g(qo, this).focus();
|
|
3162
3169
|
}
|
|
3163
3170
|
};
|
|
3164
|
-
function
|
|
3171
|
+
function Yo() {
|
|
3165
3172
|
new IntersectionObserver((e) => {
|
|
3166
3173
|
e.forEach((e) => {
|
|
3167
3174
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3170,55 +3177,55 @@ function Ko() {
|
|
|
3170
3177
|
} else this.style.height = "auto";
|
|
3171
3178
|
});
|
|
3172
3179
|
}, {
|
|
3173
|
-
root: g(
|
|
3180
|
+
root: g(Wo, this),
|
|
3174
3181
|
threshold: 0
|
|
3175
3182
|
}).observe(this);
|
|
3176
3183
|
}
|
|
3177
|
-
function
|
|
3178
|
-
g(
|
|
3184
|
+
function Xo() {
|
|
3185
|
+
g(Ho, this) && (h(G, this, Qo).call(this), h(G, this, es).call(this)), g(Uo, this) && (h(G, this, Zo).call(this), h(G, this, ts).call(this));
|
|
3179
3186
|
}
|
|
3180
|
-
function
|
|
3181
|
-
g(
|
|
3182
|
-
let e = h(G, this,
|
|
3183
|
-
g(
|
|
3187
|
+
function Zo() {
|
|
3188
|
+
g(Uo, this).innerHTML = "", m(Vo, this, []);
|
|
3189
|
+
let e = h(G, this, $o).call(this, "Off", "textTrack", void 0);
|
|
3190
|
+
g(Uo, this).appendChild(e), g(Vo, this).push({
|
|
3184
3191
|
element: e,
|
|
3185
3192
|
value: void 0
|
|
3186
|
-
}), g(
|
|
3187
|
-
let t = h(G, this,
|
|
3188
|
-
g(
|
|
3193
|
+
}), g(Lo, this).forEach((e) => {
|
|
3194
|
+
let t = h(G, this, $o).call(this, e, "textTrack", e);
|
|
3195
|
+
g(Uo, this).appendChild(t), g(Vo, this).push({
|
|
3189
3196
|
element: t,
|
|
3190
3197
|
value: e
|
|
3191
3198
|
});
|
|
3192
|
-
}), h(G, this,
|
|
3199
|
+
}), h(G, this, ts).call(this);
|
|
3193
3200
|
}
|
|
3194
|
-
function
|
|
3195
|
-
g(
|
|
3196
|
-
let t = h(G, this,
|
|
3197
|
-
g(
|
|
3201
|
+
function Qo() {
|
|
3202
|
+
g(Ho, this).innerHTML = "", m(Bo, this, []), g(Io, this).forEach((e) => {
|
|
3203
|
+
let t = h(G, this, $o).call(this, e, "language", e);
|
|
3204
|
+
g(Ho, this).appendChild(t), g(Bo, this).push({
|
|
3198
3205
|
element: t,
|
|
3199
3206
|
value: e
|
|
3200
3207
|
});
|
|
3201
|
-
}), h(G, this,
|
|
3208
|
+
}), h(G, this, es).call(this);
|
|
3202
3209
|
}
|
|
3203
|
-
function
|
|
3210
|
+
function $o(e, t, n) {
|
|
3204
3211
|
let r = document.createElement("div");
|
|
3205
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => h(G, this,
|
|
3212
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => h(G, this, ns).call(this, n, t)), r;
|
|
3206
3213
|
}
|
|
3207
|
-
function
|
|
3208
|
-
g(
|
|
3209
|
-
let e = g(
|
|
3210
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3214
|
+
function es() {
|
|
3215
|
+
g(Ko, this) && (g(Ko, this).removeAttribute("aria-selected"), g(Ko, this).tabIndex = -1);
|
|
3216
|
+
let e = g(Bo, this).find((e) => e.value === g(Ro, this));
|
|
3217
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(Ko, this, e.element));
|
|
3211
3218
|
}
|
|
3212
|
-
function
|
|
3213
|
-
g(
|
|
3214
|
-
let e = g(
|
|
3215
|
-
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3219
|
+
function ts() {
|
|
3220
|
+
g(qo, this) && (g(qo, this).removeAttribute("aria-selected"), g(qo, this).tabIndex = -1);
|
|
3221
|
+
let e = g(Vo, this).find((e) => e.value === g(zo, this));
|
|
3222
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(qo, this, e.element);
|
|
3216
3223
|
else {
|
|
3217
|
-
let e = g(
|
|
3218
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3224
|
+
let e = g(Vo, this).find((e) => e.value === void 0);
|
|
3225
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(qo, this, e.element));
|
|
3219
3226
|
}
|
|
3220
3227
|
}
|
|
3221
|
-
function
|
|
3228
|
+
function ns(e, t) {
|
|
3222
3229
|
this.dispatchEvent(new Event("change", {
|
|
3223
3230
|
bubbles: !0,
|
|
3224
3231
|
composed: !0
|
|
@@ -3230,36 +3237,36 @@ function $o(e, t) {
|
|
|
3230
3237
|
detail: e
|
|
3231
3238
|
}));
|
|
3232
3239
|
}
|
|
3233
|
-
function
|
|
3240
|
+
function rs(e) {
|
|
3234
3241
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3235
3242
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3236
3243
|
var a;
|
|
3237
|
-
(a = g(
|
|
3244
|
+
(a = g(Go, this)) == null || a.hide();
|
|
3238
3245
|
} else if (t === "Enter" || t === " ") {
|
|
3239
3246
|
var o;
|
|
3240
|
-
(o = h(G, this,
|
|
3241
|
-
} else h(G, this,
|
|
3247
|
+
(o = h(G, this, os).call(this)) == null || (o = o.element) == null || o.click();
|
|
3248
|
+
} else h(G, this, is).call(this, e);
|
|
3242
3249
|
}
|
|
3243
|
-
function
|
|
3250
|
+
function is(e) {
|
|
3244
3251
|
var t;
|
|
3245
|
-
let { key: n } = e, r = [...g(
|
|
3252
|
+
let { key: n } = e, r = [...g(Bo, this), ...g(Vo, this)], i = (t = h(G, this, os).call(this)) == null ? r[0] : t;
|
|
3246
3253
|
if (!i) return;
|
|
3247
3254
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3248
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = h(G, this,
|
|
3255
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = h(G, this, as).call(this, a, "left") : n === "ArrowRight" ? o = h(G, this, as).call(this, a, "right") : e.key === "Home" ? o = 0 : e.key === "End" && (o = r.length - 1), o < 0 && (o = r.length - 1), o > r.length - 1 && (o = 0);
|
|
3249
3256
|
let s = r[o];
|
|
3250
|
-
s && (h(G, this,
|
|
3257
|
+
s && (h(G, this, ss).call(this, s.value), s.element.focus());
|
|
3251
3258
|
}
|
|
3252
|
-
function
|
|
3253
|
-
let n = g(
|
|
3259
|
+
function as(e, t) {
|
|
3260
|
+
let n = g(Bo, this).length, r = g(Vo, this).length;
|
|
3254
3261
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3255
3262
|
}
|
|
3256
|
-
function
|
|
3257
|
-
return [...g(
|
|
3263
|
+
function os() {
|
|
3264
|
+
return [...g(Bo, this), ...g(Vo, this)].find((e) => e.element.tabIndex === 0);
|
|
3258
3265
|
}
|
|
3259
|
-
function
|
|
3260
|
-
for (let t of [...g(
|
|
3266
|
+
function ss(e) {
|
|
3267
|
+
for (let t of [...g(Bo, this), ...g(Vo, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3261
3268
|
}
|
|
3262
|
-
e(
|
|
3269
|
+
e(Jo, "observedAttributes", [
|
|
3263
3270
|
_.LANGUAGES,
|
|
3264
3271
|
_.TEXT_TRACKS,
|
|
3265
3272
|
_.LANGUAGE,
|
|
@@ -3267,12 +3274,12 @@ e(Go, "observedAttributes", [
|
|
|
3267
3274
|
]);
|
|
3268
3275
|
//#endregion
|
|
3269
3276
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3270
|
-
var
|
|
3271
|
-
|
|
3272
|
-
var
|
|
3277
|
+
var cs, ls = document.createElement("template");
|
|
3278
|
+
ls.innerHTML = "\n <style>\n :host {\n display: var(--live-button-display, flex);\n color: var(--vindral-fg-strong, #eee);\n border: 1px solid transparent !important;\n font-size: 12px;\n font-weight: bold;\n cursor: pointer;\n transition: all 0.2s;\n min-width: 50px !important;\n text-align: center;\n align-items: center;\n justify-content: center;\n }\n\n .live-text {\n display: inline-block;\n vertical-align: middle;\n margin-left: 4px;\n }\n\n slot[name=\"icon\"] svg {\n width: 5px;\n height: 5px;\n flex-shrink: 0;\n }\n\n .live-dot {\n fill: var(--vindral-fg-subtle, #b4b4b4);\n transition: fill 0.2s;\n transform-origin: center;\n }\n\n /* Red pulsing dot when live */\n :host(:not([timeshift-position])) .live-dot {\n fill: #ff0000;\n animation: pulse-dot 2s ease-in-out infinite alternate;\n }\n\n @keyframes pulse-dot {\n 0% {\n opacity: 0.8;\n transform: scale(0.9);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n :host([disabled]) {\n cursor: default;\n opacity: 1;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n </style>\n\n <slot name=\"icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"5\" height=\"5\" viewBox=\"0 0 5 5\" fill=\"currentColor\">\n <circle cx=\"2.5\" cy=\"2.5\" r=\"2.5\" class=\"live-dot\"/>\n </svg>\n</slot>\n <span class=\"live-text\">LIVE</span>\n";
|
|
3279
|
+
var us = class extends y {
|
|
3273
3280
|
constructor() {
|
|
3274
3281
|
var e;
|
|
3275
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3282
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(ls.content.cloneNode(!0));
|
|
3276
3283
|
}
|
|
3277
3284
|
connectedCallback() {
|
|
3278
3285
|
super.connectedCallback(), this.updateState();
|
|
@@ -3303,15 +3310,15 @@ var ss = class extends y {
|
|
|
3303
3310
|
}));
|
|
3304
3311
|
}
|
|
3305
3312
|
};
|
|
3306
|
-
|
|
3307
|
-
...b(
|
|
3313
|
+
cs = us, e(us, "observedAttributes", [
|
|
3314
|
+
...b(cs, "observedAttributes", cs),
|
|
3308
3315
|
_.TIMESHIFT_POSITION,
|
|
3309
3316
|
_.DURATION
|
|
3310
3317
|
]);
|
|
3311
3318
|
//#endregion
|
|
3312
3319
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3313
|
-
var
|
|
3314
|
-
|
|
3320
|
+
var ds, fs = document.createElement("template");
|
|
3321
|
+
fs.innerHTML = `
|
|
3315
3322
|
<style>
|
|
3316
3323
|
:host {
|
|
3317
3324
|
display: var(--mute-button-display);
|
|
@@ -3339,10 +3346,10 @@ ls.innerHTML = `
|
|
|
3339
3346
|
</slot>
|
|
3340
3347
|
</slot>
|
|
3341
3348
|
`;
|
|
3342
|
-
var
|
|
3349
|
+
var ps = class extends y {
|
|
3343
3350
|
constructor() {
|
|
3344
3351
|
var e;
|
|
3345
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3352
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(fs.content.cloneNode(!0));
|
|
3346
3353
|
}
|
|
3347
3354
|
connectedCallback() {
|
|
3348
3355
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "Unmute" : "Mute");
|
|
@@ -3367,11 +3374,11 @@ var us = class extends y {
|
|
|
3367
3374
|
}));
|
|
3368
3375
|
}
|
|
3369
3376
|
};
|
|
3370
|
-
|
|
3377
|
+
ds = ps, e(ps, "observedAttributes", [...b(ds, "observedAttributes", ds), _.MUTED]);
|
|
3371
3378
|
//#endregion
|
|
3372
3379
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3373
|
-
var
|
|
3374
|
-
|
|
3380
|
+
var ms, hs = document.createElement("template");
|
|
3381
|
+
hs.innerHTML = `
|
|
3375
3382
|
<style>
|
|
3376
3383
|
:host {
|
|
3377
3384
|
display: var(--pip-button-display);
|
|
@@ -3385,10 +3392,10 @@ fs.innerHTML = `
|
|
|
3385
3392
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19 4a3 3 0 0 1 3 3v4a1 1 0 0 1 -2 0v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1v10a1 1 0 0 0 1 1h6a1 1 0 0 1 0 2h-6a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3z" /><path d="M20 13a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-5a2 2 0 0 1 -2 -2v-3a2 2 0 0 1 2 -2z" /></svg>
|
|
3386
3393
|
</slot>
|
|
3387
3394
|
`;
|
|
3388
|
-
var
|
|
3395
|
+
var gs = class extends y {
|
|
3389
3396
|
constructor() {
|
|
3390
3397
|
var e;
|
|
3391
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3398
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(hs.content.cloneNode(!0));
|
|
3392
3399
|
}
|
|
3393
3400
|
connectedCallback() {
|
|
3394
3401
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture-in-picture" : "Picture-in-picture");
|
|
@@ -3413,15 +3420,15 @@ var ps = class extends y {
|
|
|
3413
3420
|
}));
|
|
3414
3421
|
}
|
|
3415
3422
|
};
|
|
3416
|
-
|
|
3417
|
-
...b(
|
|
3423
|
+
ms = gs, e(gs, "observedAttributes", [
|
|
3424
|
+
...b(ms, "observedAttributes", ms),
|
|
3418
3425
|
_.IS_PIP,
|
|
3419
3426
|
_.PIP_AVAILABLE
|
|
3420
3427
|
]);
|
|
3421
3428
|
//#endregion
|
|
3422
3429
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3423
|
-
var
|
|
3424
|
-
|
|
3430
|
+
var _s, vs = document.createElement("template");
|
|
3431
|
+
vs.innerHTML = `
|
|
3425
3432
|
<style>
|
|
3426
3433
|
:host {
|
|
3427
3434
|
display: var(--play-button-display);
|
|
@@ -3445,10 +3452,10 @@ hs.innerHTML = `
|
|
|
3445
3452
|
</slot>
|
|
3446
3453
|
</slot>
|
|
3447
3454
|
`;
|
|
3448
|
-
var
|
|
3455
|
+
var ys = class extends y {
|
|
3449
3456
|
constructor() {
|
|
3450
3457
|
var e;
|
|
3451
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3458
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(vs.content.cloneNode(!0));
|
|
3452
3459
|
}
|
|
3453
3460
|
connectedCallback() {
|
|
3454
3461
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3473,7 +3480,7 @@ var gs = class extends y {
|
|
|
3473
3480
|
}));
|
|
3474
3481
|
}
|
|
3475
3482
|
};
|
|
3476
|
-
|
|
3483
|
+
_s = ys, e(ys, "observedAttributes", [...b(_s, "observedAttributes", _s), _.PAUSED]);
|
|
3477
3484
|
//#endregion
|
|
3478
3485
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3479
3486
|
var K = {
|
|
@@ -3482,55 +3489,55 @@ var K = {
|
|
|
3482
3489
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3483
3490
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3484
3491
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3485
|
-
},
|
|
3492
|
+
}, bs = Object.values(K), xs = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), Ts = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakSet(), ks = class extends fe {
|
|
3486
3493
|
constructor(e) {
|
|
3487
|
-
super(), C(this,
|
|
3494
|
+
super(), C(this, Os), p(this, xs, void 0), p(this, Ss, void 0), p(this, Cs, !1), p(this, ws, !1), p(this, Ts, !0), p(this, Es, null), p(this, Ds, null), m(Ss, this, e), m(xs, this, new ue({
|
|
3488
3495
|
publicEndpoint: e.url,
|
|
3489
3496
|
tokenFactory: () => e.authenticationToken
|
|
3490
3497
|
}));
|
|
3491
3498
|
}
|
|
3492
3499
|
start(e = 5e3) {
|
|
3493
|
-
g(
|
|
3494
|
-
!g(
|
|
3500
|
+
g(Ds, this) && clearInterval(g(Ds, this)), m(Cs, this, !1), m(ws, this, !1), h(Os, this, Ns).call(this), h(Os, this, As).call(this), m(Ds, this, window.setInterval(() => {
|
|
3501
|
+
!g(ws, this) && !g(Ss, this).infiniteReconnect && !g(Es, this) && g(Ts, this) && m(Es, this, window.setTimeout(() => h(Os, this, js).call(this), 300 * 1e3)), !g(ws, this) && g(Ts, this) && h(Os, this, As).call(this);
|
|
3495
3502
|
}, e));
|
|
3496
3503
|
}
|
|
3497
3504
|
stop() {
|
|
3498
|
-
h(
|
|
3505
|
+
h(Os, this, Ms).call(this), g(Ds, this) && (window.clearInterval(g(Ds, this)), m(Ds, this, null));
|
|
3499
3506
|
}
|
|
3500
3507
|
};
|
|
3501
|
-
function
|
|
3508
|
+
function As() {
|
|
3502
3509
|
var e = this;
|
|
3503
3510
|
return t(function* () {
|
|
3504
|
-
if (g(
|
|
3505
|
-
m(
|
|
3511
|
+
if (g(Cs, e)) return;
|
|
3512
|
+
m(Cs, e, !0);
|
|
3506
3513
|
let t = "Stream is offline", n = "Please stand by";
|
|
3507
3514
|
try {
|
|
3508
|
-
let t = yield g(
|
|
3515
|
+
let t = yield g(xs, e).getChannel(g(Ss, e).channelId);
|
|
3509
3516
|
if (t.isLive) {
|
|
3510
|
-
m(
|
|
3517
|
+
m(ws, e, !0), h(Os, e, Ns).call(e), e.emit("live", t), m(Cs, e, !1);
|
|
3511
3518
|
return;
|
|
3512
3519
|
}
|
|
3513
3520
|
} catch (e) {
|
|
3514
3521
|
le(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3515
3522
|
}
|
|
3516
|
-
g(
|
|
3523
|
+
g(Ts, e) && e.emit("error", {
|
|
3517
3524
|
title: t,
|
|
3518
3525
|
message: n
|
|
3519
|
-
}), m(
|
|
3526
|
+
}), m(Cs, e, !1);
|
|
3520
3527
|
})();
|
|
3521
3528
|
}
|
|
3522
|
-
function
|
|
3523
|
-
this.stop(), m(
|
|
3529
|
+
function js() {
|
|
3530
|
+
this.stop(), m(Ts, this, !1), this.emit("timeout");
|
|
3524
3531
|
}
|
|
3525
|
-
function
|
|
3526
|
-
g(
|
|
3532
|
+
function Ms() {
|
|
3533
|
+
g(Es, this) && (window.clearTimeout(g(Es, this)), m(Es, this, null));
|
|
3527
3534
|
}
|
|
3528
|
-
function
|
|
3529
|
-
h(
|
|
3535
|
+
function Ns() {
|
|
3536
|
+
h(Os, this, Ms).call(this), m(Ts, this, !0);
|
|
3530
3537
|
}
|
|
3531
3538
|
//#endregion
|
|
3532
3539
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3533
|
-
var
|
|
3540
|
+
var Ps = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, Fs = navigator.userAgent.toLowerCase(), Is = Ps.test(Fs), Ls = (e) => Fa.observedAttributes.includes(e), Rs = `
|
|
3534
3541
|
<style>
|
|
3535
3542
|
:host {
|
|
3536
3543
|
container-type: inline-size;
|
|
@@ -3540,7 +3547,7 @@ var js = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3540
3547
|
display: flex;
|
|
3541
3548
|
justify-content: center;
|
|
3542
3549
|
|
|
3543
|
-
--vindral-volume-range-display: ${
|
|
3550
|
+
--vindral-volume-range-display: ${Is ? "none" : "flex"};
|
|
3544
3551
|
--vindral-airplay-button-display: none;
|
|
3545
3552
|
--vindral-play-overlay-display: none;
|
|
3546
3553
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3621,10 +3628,10 @@ var js = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3621
3628
|
--vindral-subtitle-offset: -48px;
|
|
3622
3629
|
}
|
|
3623
3630
|
</style>
|
|
3624
|
-
`,
|
|
3631
|
+
`, zs = (e) => {
|
|
3625
3632
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3626
3633
|
return `
|
|
3627
|
-
${
|
|
3634
|
+
${Rs}
|
|
3628
3635
|
|
|
3629
3636
|
<vindral-controller>
|
|
3630
3637
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3663,8 +3670,8 @@ var js = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3663
3670
|
</vindral-center-overlay>
|
|
3664
3671
|
</vindral-controller>
|
|
3665
3672
|
`;
|
|
3666
|
-
},
|
|
3667
|
-
${
|
|
3673
|
+
}, Bs = `
|
|
3674
|
+
${Rs}
|
|
3668
3675
|
|
|
3669
3676
|
<style>
|
|
3670
3677
|
#control-bar {
|
|
@@ -3688,58 +3695,58 @@ var js = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3688
3695
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3689
3696
|
</vindral-center-overlay>
|
|
3690
3697
|
</vindral-controller>
|
|
3691
|
-
`,
|
|
3698
|
+
`, Vs = document.createElement("template"), Hs = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Us = /* @__PURE__ */ new WeakMap(), Ws = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakMap(), qs = /* @__PURE__ */ new WeakMap(), Js = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakSet(), Zs = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakMap(), $s = /* @__PURE__ */ new WeakMap(), ec = class extends HTMLElement {
|
|
3692
3699
|
constructor() {
|
|
3693
|
-
super(), C(this, J), p(this,
|
|
3700
|
+
super(), C(this, J), p(this, Hs, void 0), p(this, q, void 0), p(this, Us, void 0), p(this, Ws, void 0), p(this, Gs, void 0), p(this, Ks, void 0), p(this, qs, /* @__PURE__ */ new Set()), p(this, Js, void 0), p(this, Ys, () => {
|
|
3694
3701
|
Array.from(this.attributes).forEach((e) => {
|
|
3695
|
-
g(
|
|
3702
|
+
g(Xs, this).call(this, e.name, e.value);
|
|
3696
3703
|
});
|
|
3697
|
-
}), p(this,
|
|
3698
|
-
|
|
3699
|
-
}), p(this,
|
|
3704
|
+
}), p(this, Xs, (e, t) => {
|
|
3705
|
+
Ls(e) && (v(t) ? g(q, this).setAttribute(e, t) : g(q, this).removeAttribute(e));
|
|
3706
|
+
}), p(this, Zs, () => {
|
|
3700
3707
|
Array.from(this.children).forEach((e) => {
|
|
3701
|
-
g(
|
|
3708
|
+
g(qs, this).add(e);
|
|
3702
3709
|
});
|
|
3703
|
-
}), p(this,
|
|
3710
|
+
}), p(this, Qs, () => {
|
|
3704
3711
|
let e = g(q, this).instance;
|
|
3705
3712
|
e && (e.on("is live", (e) => {
|
|
3706
|
-
e ? (this.removeAttribute(K.OFFLINE), h(J, this,
|
|
3713
|
+
e ? (this.removeAttribute(K.OFFLINE), h(J, this, cc).call(this)) : (this.setAttribute(K.OFFLINE, ""), h(J, this, sc).call(this, "Stream is offline", "Please stand by"));
|
|
3707
3714
|
}), e.on("channels", (e) => {
|
|
3708
3715
|
let t = g(q, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3709
|
-
n && h(J, this,
|
|
3716
|
+
n && h(J, this, ac).call(this, n);
|
|
3710
3717
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3711
3718
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3712
|
-
n && h(J, this,
|
|
3719
|
+
n && h(J, this, ac).call(this, n);
|
|
3713
3720
|
}), e.on("error", (e) => {
|
|
3714
3721
|
if (e.code() === "connection_failed") {
|
|
3715
|
-
h(J, this,
|
|
3722
|
+
h(J, this, sc).call(this, "Stream is offline", "Please stand by");
|
|
3716
3723
|
return;
|
|
3717
3724
|
}
|
|
3718
|
-
e.isFatal() && (e.code() === "access_forbidden" ? h(J, this,
|
|
3725
|
+
e.isFatal() && (e.code() === "access_forbidden" ? h(J, this, sc).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? h(J, this, sc).call(this, "Stream is offline", "Please stand by") : h(J, this, sc).call(this, "An error occurred", e.message), g(Ws, this).removeAttribute("hidden"), this.setAttribute(K.OFFLINE, ""), g(q, this).dispatchEvent(new CustomEvent(S.EXIT_FULLSCREEN)), g(q, this).dispatchEvent(new CustomEvent(S.EXIT_PIP)));
|
|
3719
3726
|
}));
|
|
3720
|
-
}), p(this,
|
|
3721
|
-
g(q, this).connect(), g(
|
|
3722
|
-
}), m(
|
|
3727
|
+
}), p(this, $s, () => {
|
|
3728
|
+
g(q, this).connect(), g(Ws, this).setAttribute("hidden", ""), h(J, this, cc).call(this), g(q, this).focus();
|
|
3729
|
+
}), m(Hs, this, this.attachShadow({ mode: "open" })), h(J, this, rc).call(this), m(q, this, g(Hs, this).querySelector("vindral-controller")), m(Us, this, g(Hs, this).querySelector("#vindral-message")), m(Ws, this, g(Hs, this).querySelector("#play-overlay")), m(Gs, this, g(Hs, this).querySelector("#center-overlay"));
|
|
3723
3730
|
}
|
|
3724
3731
|
connectedCallback() {
|
|
3725
|
-
if (g(
|
|
3726
|
-
clearTimeout(g(
|
|
3732
|
+
if (g(Js, this) !== void 0) {
|
|
3733
|
+
clearTimeout(g(Js, this)), m(Js, this, void 0);
|
|
3727
3734
|
return;
|
|
3728
3735
|
}
|
|
3729
|
-
this.setAttribute(K.OFFLINE, ""), g(q, this).addEventListener("vindral-instance-ready", g(
|
|
3736
|
+
this.setAttribute(K.OFFLINE, ""), g(q, this).addEventListener("vindral-instance-ready", g(Qs, this)), h(J, this, ic).call(this);
|
|
3730
3737
|
}
|
|
3731
3738
|
disconnectedCallback() {
|
|
3732
|
-
m(
|
|
3739
|
+
m(Js, this, setTimeout(() => {
|
|
3733
3740
|
var e;
|
|
3734
|
-
m(
|
|
3741
|
+
m(Js, this, void 0), g(q, this).removeEventListener("vindral-instance-ready", g(Qs, this)), g(Ws, this).removeEventListener("click", g($s, this)), (e = g(Ks, this)) == null || e.stop();
|
|
3735
3742
|
}));
|
|
3736
3743
|
}
|
|
3737
3744
|
attributeChangedCallback(e, t, n) {
|
|
3738
|
-
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) h(J, this,
|
|
3745
|
+
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) h(J, this, rc).call(this);
|
|
3739
3746
|
else if (e === K.REFRESH_POSTER_ENABLED) {
|
|
3740
|
-
let e = g(
|
|
3747
|
+
let e = g(Hs, this).querySelector("vindral-poster-overlay");
|
|
3741
3748
|
e && (e.disabled = x(this.getAttribute(K.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3742
|
-
} else g(
|
|
3749
|
+
} else g(Xs, this).call(this, e, n);
|
|
3743
3750
|
}
|
|
3744
3751
|
get instance() {
|
|
3745
3752
|
return g(q, this).instance;
|
|
@@ -3754,67 +3761,67 @@ var js = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3754
3761
|
g(q, this).timelineMarkers = e;
|
|
3755
3762
|
}
|
|
3756
3763
|
};
|
|
3757
|
-
function
|
|
3764
|
+
function tc() {
|
|
3758
3765
|
let e = be(this.getAttribute(_.MEDIA)), t = x(this.getAttribute(K.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3759
|
-
return e === "audio" ?
|
|
3766
|
+
return e === "audio" ? Bs : zs(t);
|
|
3760
3767
|
}
|
|
3761
|
-
function
|
|
3762
|
-
return this.isConnected || g(
|
|
3768
|
+
function nc() {
|
|
3769
|
+
return this.isConnected || g(Js, this) !== void 0;
|
|
3763
3770
|
}
|
|
3764
|
-
function
|
|
3765
|
-
let e = g(
|
|
3766
|
-
|
|
3767
|
-
let r =
|
|
3768
|
-
m(q, this, r.querySelector("vindral-controller")), m(
|
|
3771
|
+
function rc() {
|
|
3772
|
+
let e = g(Hs, this).hasChildNodes(), t = e ? g(q, this) : void 0, n = e ? g(Ws, this) : void 0;
|
|
3773
|
+
nc.call(h(J, this)) && t && t.removeEventListener("vindral-instance-ready", g(Qs, this)), nc.call(h(J, this)) && n && g(Ks, this) && n.removeEventListener("click", g($s, this)), Vs.innerHTML = h(J, this, tc).call(this);
|
|
3774
|
+
let r = Vs.content.cloneNode(!0);
|
|
3775
|
+
m(q, this, r.querySelector("vindral-controller")), m(Us, this, r.querySelector("#vindral-message")), m(Ws, this, r.querySelector("#play-overlay")), m(Gs, this, r.querySelector("#center-overlay")), g(Zs, this).call(this), g(qs, this).forEach((e) => {
|
|
3769
3776
|
g(q, this).appendChild(e);
|
|
3770
|
-
}), g(
|
|
3777
|
+
}), g(Ys, this).call(this), g(Hs, this).innerHTML = "", g(Hs, this).appendChild(r), nc.call(h(J, this)) && (g(q, this).addEventListener("vindral-instance-ready", g(Qs, this)), g(Ks, this) && g(Ws, this).addEventListener("click", g($s, this)));
|
|
3771
3778
|
}
|
|
3772
|
-
function
|
|
3779
|
+
function ic() {
|
|
3773
3780
|
var e;
|
|
3774
3781
|
if (x(this.getAttribute(K.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3775
3782
|
let t = this.getAttribute("url") || "https://lb.cdn.vindral.com", n = this.getAttribute("channel-id"), r = (e = this.getAttribute("authentication-token")) == null ? void 0 : e, i = this.hasAttribute("infinite-reconnect");
|
|
3776
3783
|
if (!n) {
|
|
3777
|
-
this.setAttribute(K.OFFLINE, ""), h(J, this,
|
|
3784
|
+
this.setAttribute(K.OFFLINE, ""), h(J, this, sc).call(this, "Invalid options", "Please enter a channel id to start the stream");
|
|
3778
3785
|
return;
|
|
3779
3786
|
}
|
|
3780
|
-
m(
|
|
3787
|
+
m(Ks, this, new ks({
|
|
3781
3788
|
url: t,
|
|
3782
3789
|
channelId: n,
|
|
3783
3790
|
authenticationToken: r,
|
|
3784
3791
|
infiniteReconnect: i
|
|
3785
|
-
})), g(
|
|
3786
|
-
g(q, this).connect(), this.removeAttribute("offline"), h(J, this,
|
|
3787
|
-
}), g(
|
|
3788
|
-
h(J, this,
|
|
3789
|
-
}), g(
|
|
3790
|
-
this.setAttribute(K.OFFLINE, ""), h(J, this,
|
|
3791
|
-
}), g(
|
|
3792
|
-
}
|
|
3793
|
-
function
|
|
3792
|
+
})), g(Ks, this).on("live", (e) => {
|
|
3793
|
+
g(q, this).connect(), this.removeAttribute("offline"), h(J, this, cc).call(this), h(J, this, ac).call(this, e);
|
|
3794
|
+
}), g(Ks, this).on("timeout", () => {
|
|
3795
|
+
h(J, this, cc).call(this), g(Ws, this).removeAttribute("hidden");
|
|
3796
|
+
}), g(Ks, this).on("error", (e) => {
|
|
3797
|
+
this.setAttribute(K.OFFLINE, ""), h(J, this, sc).call(this, e.title, e.message);
|
|
3798
|
+
}), g(Ws, this).addEventListener("click", g($s, this)), this.hasAttribute("paused") && g(Ks, this).start();
|
|
3799
|
+
}
|
|
3800
|
+
function ac(e) {
|
|
3794
3801
|
var t, n, r;
|
|
3795
3802
|
let i = _e(this.getAttribute("title"), !1);
|
|
3796
3803
|
i && je({
|
|
3797
3804
|
title: typeof i == "string" ? i : e.name,
|
|
3798
|
-
poster: (t = (n = h(J, this,
|
|
3805
|
+
poster: (t = (n = h(J, this, oc).call(this)) == null ? (r = this.instance) == null ? void 0 : r.getThumbnailUrl() : n) == null ? e.thumbnailUrls[0] : t
|
|
3799
3806
|
});
|
|
3800
3807
|
}
|
|
3801
|
-
function
|
|
3808
|
+
function oc() {
|
|
3802
3809
|
let e = _e(this.getAttribute("poster"));
|
|
3803
3810
|
return v(e) ? e : void 0;
|
|
3804
3811
|
}
|
|
3805
|
-
function
|
|
3806
|
-
g(
|
|
3807
|
-
let n = h(J, this,
|
|
3808
|
-
n ? g(
|
|
3812
|
+
function sc(e, t) {
|
|
3813
|
+
g(Us, this).setAttribute("title", e), g(Us, this).setAttribute("description", t), g(Us, this).removeAttribute("hidden");
|
|
3814
|
+
let n = h(J, this, oc).call(this);
|
|
3815
|
+
n ? g(Gs, this).setAttribute("poster", n) : g(Gs, this).removeAttribute("poster"), g(Gs, this).setAttribute("backdrop", "");
|
|
3809
3816
|
}
|
|
3810
|
-
function
|
|
3811
|
-
g(
|
|
3817
|
+
function cc() {
|
|
3818
|
+
g(Us, this).setAttribute("hidden", ""), g(Gs, this).removeAttribute("backdrop");
|
|
3812
3819
|
}
|
|
3813
|
-
e(
|
|
3820
|
+
e(ec, "observedAttributes", [...Fa.observedAttributes, ...bs]);
|
|
3814
3821
|
//#endregion
|
|
3815
3822
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3816
|
-
var
|
|
3817
|
-
|
|
3823
|
+
var lc = document.createElement("template");
|
|
3824
|
+
lc.innerHTML = `
|
|
3818
3825
|
<style>
|
|
3819
3826
|
:host {
|
|
3820
3827
|
display: var(--poster-overlay-display);
|
|
@@ -3849,26 +3856,26 @@ oc.innerHTML = `
|
|
|
3849
3856
|
}
|
|
3850
3857
|
</style>
|
|
3851
3858
|
`;
|
|
3852
|
-
var
|
|
3859
|
+
var uc = 6e3, dc = /* @__PURE__ */ new WeakMap(), fc = /* @__PURE__ */ new WeakMap(), pc = /* @__PURE__ */ new WeakMap(), mc = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakSet(), gc = /* @__PURE__ */ new WeakMap(), _c = class extends HTMLElement {
|
|
3853
3860
|
constructor() {
|
|
3854
|
-
super(), C(this,
|
|
3855
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? h(
|
|
3856
|
-
}), p(this,
|
|
3861
|
+
super(), C(this, hc), p(this, dc, null), p(this, fc, null), p(this, pc, null), p(this, mc, () => {
|
|
3862
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? h(hc, this, vc).call(this) : h(hc, this, yc).call(this);
|
|
3863
|
+
}), p(this, gc, (e) => {
|
|
3857
3864
|
e.forEach((e) => {
|
|
3858
3865
|
e.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3859
3866
|
});
|
|
3860
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3867
|
+
}), this.attachShadow({ mode: "open" }).appendChild(lc.content.cloneNode(!0));
|
|
3861
3868
|
}
|
|
3862
3869
|
connectedCallback() {
|
|
3863
3870
|
var e;
|
|
3864
|
-
m(
|
|
3871
|
+
m(dc, this, this.closest("vindral-controller")), (e = g(dc, this)) == null || e.connectListener(this), document.addEventListener("visibilitychange", g(mc, this)), m(pc, this, new IntersectionObserver(g(gc, this))), g(pc, this).observe(this);
|
|
3865
3872
|
}
|
|
3866
3873
|
disconnectedCallback() {
|
|
3867
3874
|
var e, t;
|
|
3868
|
-
(e = g(
|
|
3875
|
+
(e = g(dc, this)) == null || e.disconnectListener(this), document.removeEventListener("visibilitychange", g(mc, this)), (t = g(pc, this)) == null || t.disconnect(), m(pc, this, null), h(hc, this, yc).call(this);
|
|
3869
3876
|
}
|
|
3870
3877
|
attributeChangedCallback(e, t, n) {
|
|
3871
|
-
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && h(
|
|
3878
|
+
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && h(hc, this, bc).call(this), (e === _.PAUSED || e === "disabled" || e === "intersecting") && g(mc, this).call(this));
|
|
3872
3879
|
}
|
|
3873
3880
|
get disabled() {
|
|
3874
3881
|
return this.hasAttribute("disabled");
|
|
@@ -3883,18 +3890,18 @@ var sc = 6e3, cc = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakM
|
|
|
3883
3890
|
return this.hasAttribute(_.PAUSED);
|
|
3884
3891
|
}
|
|
3885
3892
|
};
|
|
3886
|
-
function
|
|
3887
|
-
g(
|
|
3893
|
+
function vc() {
|
|
3894
|
+
g(fc, this) === null && (h(hc, this, yc).call(this), m(fc, this, window.setInterval(() => h(hc, this, bc).call(this), uc)));
|
|
3888
3895
|
}
|
|
3889
|
-
function
|
|
3890
|
-
g(
|
|
3896
|
+
function yc() {
|
|
3897
|
+
g(fc, this) !== null && (clearInterval(g(fc, this)), m(fc, this, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3891
3898
|
}
|
|
3892
|
-
function
|
|
3899
|
+
function bc() {
|
|
3893
3900
|
if (!this.posterSrc) return;
|
|
3894
3901
|
let e = new URL(this.posterSrc), t = new Image();
|
|
3895
3902
|
e.searchParams.set("t", Date.now().toString()), t.src = e.toString(), t.onload = () => this.style.backgroundImage = `url(${e.toString()})`;
|
|
3896
3903
|
}
|
|
3897
|
-
e(
|
|
3904
|
+
e(_c, "observedAttributes", [
|
|
3898
3905
|
_.POSTER_SRC,
|
|
3899
3906
|
_.PAUSED,
|
|
3900
3907
|
"disabled",
|
|
@@ -3902,70 +3909,70 @@ e(mc, "observedAttributes", [
|
|
|
3902
3909
|
]);
|
|
3903
3910
|
//#endregion
|
|
3904
3911
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenu.ts
|
|
3905
|
-
var
|
|
3906
|
-
|
|
3912
|
+
var xc, Sc = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-settings-filled\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#2c3e50\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z\" stroke-width=\"0\" fill=\"currentColor\" />\n</svg>\n", Cc = document.createElement("template");
|
|
3913
|
+
Cc.innerHTML = `
|
|
3907
3914
|
<style>
|
|
3908
3915
|
:host {
|
|
3909
3916
|
display: var(--rendition-menu-display);
|
|
3910
3917
|
}
|
|
3911
3918
|
</style>
|
|
3912
3919
|
|
|
3913
|
-
<slot name="button">${
|
|
3920
|
+
<slot name="button">${Sc}</slot>
|
|
3914
3921
|
<slot name="listbox" hidden>
|
|
3915
3922
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3916
3923
|
</slot>
|
|
3917
3924
|
`;
|
|
3918
|
-
var
|
|
3925
|
+
var wc = /* @__PURE__ */ new WeakSet(), Tc = class extends Ve {
|
|
3919
3926
|
constructor() {
|
|
3920
3927
|
var e, t, n;
|
|
3921
|
-
super(), C(this,
|
|
3928
|
+
super(), C(this, wc), (e = this.shadowRoot) == null || e.appendChild(Cc.content.cloneNode(!0)), this.listbox = (t = this.shadowRoot) == null ? void 0 : t.querySelector("[part=listbox]"), this.listboxSlot = (n = this.shadowRoot) == null ? void 0 : n.querySelector("slot[name=listbox]");
|
|
3922
3929
|
}
|
|
3923
3930
|
connectedCallback() {
|
|
3924
|
-
super.connectedCallback(), h(
|
|
3931
|
+
super.connectedCallback(), h(wc, this, Ec).call(this), this.setAttribute("aria-label", "Quality");
|
|
3925
3932
|
}
|
|
3926
3933
|
attributeChangedCallback(e, t, n) {
|
|
3927
|
-
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && h(
|
|
3934
|
+
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && h(wc, this, Ec).call(this);
|
|
3928
3935
|
}
|
|
3929
3936
|
};
|
|
3930
|
-
|
|
3931
|
-
function
|
|
3937
|
+
xc = Tc;
|
|
3938
|
+
function Ec() {
|
|
3932
3939
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
3933
3940
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3934
3941
|
}
|
|
3935
|
-
e(
|
|
3942
|
+
e(Tc, "observedAttributes", [...b(xc, "observedAttributes", xc), _.RENDITION_LEVELS]);
|
|
3936
3943
|
//#endregion
|
|
3937
3944
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3938
|
-
var
|
|
3939
|
-
|
|
3940
|
-
var
|
|
3945
|
+
var Dc = document.createElement("template");
|
|
3946
|
+
Dc.innerHTML = "\n <style>\n :host {\n font: inherit;\n cursor: default;\n padding: var(--padding-2) !important;\n padding-top: var(--padding-3) !important;\n border-radius: 0.25em;\n position: absolute;\n min-width: 140px !important;\n background: var(--bg-subtle);\n z-index: 1;\n overflow: auto;\n }\n\n :host([list-position=\"top\"]) {\n bottom: calc(100% + 0.5em);\n transform: translate(-50%);\n }\n\n :host([list-position=\"bottom\"]) {\n top: calc(100% + 0.5em);\n }\n\n :host::-webkit-scrollbar {\n width: 5px;\n padding-right: 5px;\n }\n\n :host::-webkit-scrollbar-thumb {\n background-color: var(--fg-extra-subtle);\n border-radius: 10px;\n border: 0;\n }\n\n :host::-webkit-scrollbar-track {\n border-radius: 10px;\n background-color: transparent;\n }\n\n .menu {\n display: grid;\n gap: var(--padding-1);\n }\n\n [role=\"menuitem\"] {\n flex: 1;\n position: relative;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 44px;\n padding: 0 var(--padding-5);\n border-radius: 4px;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n white-space: nowrap;\n text-align: left;\n }\n\n [role=\"menuitem\"]:hover {\n background: var(--bg-component-hover);\n }\n\n [role=\"menuitem\"][aria-selected=\"true\"] {\n background: var(--bg-component-active);\n }\n\n [role=\"menuitem\"][aria-selected=\"true\"]::before {\n content: url(\"data:image/svg+xml,%0A%20%20%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2078.369%2078.369%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20d%3D%22M78.049%2019.015%2029.458%2067.606a1.094%201.094%200%200%201-1.548%200L.32%2040.015a1.094%201.094%200%200%201%200-1.547l6.704-6.704a1.095%201.095%200%200%201%201.548%200l20.113%2020.112%2041.113-41.113a1.095%201.095%200%200%201%201.548%200l6.703%206.704a1.094%201.094%200%200%201%200%201.548z%22%2F%3E%3C%2Fsvg%3E%0A\");\n position: absolute;\n left: calc(var(--padding-3) - var(--padding-1));\n top: calc(50% - 8px);\n }\n\n [role=\"menuitem\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n outline: 0;\n }\n\n .menu-item-subtitle {\n font-size: 11px;\n opacity: 0.6;\n }\n\n .heading {\n text-transform: uppercase;\n margin-bottom: var(--padding-2);\n padding: 0 var(--padding-3);\n font-size: 11px;\n font-weight: bold;\n }\n </style>\n\n <slot>\n <div class=\"heading\">Max quality</div>\n <div class=\"menu\"></div>\n </slot>\n";
|
|
3947
|
+
var Oc = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Ac = /* @__PURE__ */ new WeakMap(), jc = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), Nc = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), Pc = class extends HTMLElement {
|
|
3941
3948
|
constructor() {
|
|
3942
|
-
super(), C(this, Y), p(this,
|
|
3949
|
+
super(), C(this, Y), p(this, Oc, []), p(this, kc, 2 ** 53 - 1), p(this, Ac, null), p(this, jc, []), p(this, Mc, null), p(this, Nc, null), e(this, "handleEvent", (e) => {
|
|
3943
3950
|
switch (e.type) {
|
|
3944
3951
|
case "keydown":
|
|
3945
|
-
h(Y, this,
|
|
3952
|
+
h(Y, this, Bc).call(this, e);
|
|
3946
3953
|
break;
|
|
3947
3954
|
}
|
|
3948
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3955
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Dc.content.cloneNode(!0));
|
|
3949
3956
|
}
|
|
3950
3957
|
connectedCallback() {
|
|
3951
3958
|
let e = this.getRootNode();
|
|
3952
3959
|
if (e instanceof ShadowRoot) {
|
|
3953
3960
|
var t;
|
|
3954
|
-
m(
|
|
3961
|
+
m(Mc, this, e.host.closest("vindral-controller")), (t = g(Mc, this)) == null || t.connectListener(this), h(Y, this, Fc).call(this), h(Y, this, Ic).call(this), m(Nc, this, e.host), this.addEventListener("keydown", this);
|
|
3955
3962
|
}
|
|
3956
3963
|
}
|
|
3957
3964
|
disconnectedCallback() {
|
|
3958
3965
|
var e;
|
|
3959
|
-
(e = g(
|
|
3966
|
+
(e = g(Mc, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3960
3967
|
}
|
|
3961
3968
|
attributeChangedCallback(e, t, n) {
|
|
3962
3969
|
t !== n && (e === _.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === _.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1));
|
|
3963
3970
|
}
|
|
3964
3971
|
set list(e) {
|
|
3965
|
-
m(
|
|
3972
|
+
m(Oc, this, e), h(Y, this, Ic).call(this);
|
|
3966
3973
|
}
|
|
3967
3974
|
set maxVideoBitrate(e) {
|
|
3968
|
-
m(
|
|
3975
|
+
m(kc, this, e), h(Y, this, Rc).call(this);
|
|
3969
3976
|
}
|
|
3970
3977
|
get keysUsed() {
|
|
3971
3978
|
return [
|
|
@@ -3981,10 +3988,10 @@ var Tc = /* @__PURE__ */ new WeakMap(), Ec = /* @__PURE__ */ new WeakMap(), Dc =
|
|
|
3981
3988
|
}
|
|
3982
3989
|
focus() {
|
|
3983
3990
|
var e;
|
|
3984
|
-
(e = g(
|
|
3991
|
+
(e = g(Ac, this)) == null || e.focus();
|
|
3985
3992
|
}
|
|
3986
3993
|
};
|
|
3987
|
-
function
|
|
3994
|
+
function Fc() {
|
|
3988
3995
|
new IntersectionObserver((e) => {
|
|
3989
3996
|
e.forEach((e) => {
|
|
3990
3997
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3993,50 +4000,50 @@ function Mc() {
|
|
|
3993
4000
|
} else this.style.height = "auto";
|
|
3994
4001
|
});
|
|
3995
4002
|
}, {
|
|
3996
|
-
root: g(
|
|
4003
|
+
root: g(Mc, this),
|
|
3997
4004
|
threshold: 0
|
|
3998
4005
|
}).observe(this);
|
|
3999
4006
|
}
|
|
4000
|
-
function
|
|
4007
|
+
function Ic() {
|
|
4001
4008
|
var e;
|
|
4002
4009
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
4003
|
-
t && (m(
|
|
4010
|
+
t && (m(jc, this, []), t.innerHTML = "", g(Oc, this).sort((e, t) => {
|
|
4004
4011
|
var n, r;
|
|
4005
4012
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
4006
4013
|
}).forEach((e) => {
|
|
4007
4014
|
var n, r, i, a, o, s, c, l;
|
|
4008
4015
|
let u = document.createElement("div");
|
|
4009
4016
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
4010
|
-
let d = h(Y, this,
|
|
4017
|
+
let d = h(Y, this, Lc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
4011
4018
|
u.textContent = e.video ? pe(e.video) : "";
|
|
4012
4019
|
let f = document.createElement("span");
|
|
4013
|
-
f.classList.add("menu-item-subtitle"), f.textContent = `${me(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${d}p`, u.appendChild(f), u.addEventListener("click", () => h(Y, this,
|
|
4020
|
+
f.classList.add("menu-item-subtitle"), f.textContent = `${me(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${d}p`, u.appendChild(f), u.addEventListener("click", () => h(Y, this, zc).call(this, e)), g(jc, this).push({
|
|
4014
4021
|
el: u,
|
|
4015
4022
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
4016
4023
|
}), t.appendChild(u);
|
|
4017
|
-
}), h(Y, this,
|
|
4024
|
+
}), h(Y, this, Rc).call(this));
|
|
4018
4025
|
}
|
|
4019
|
-
function
|
|
4026
|
+
function Lc(e) {
|
|
4020
4027
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
4021
4028
|
}
|
|
4022
|
-
function
|
|
4023
|
-
g(
|
|
4024
|
-
let e = g(
|
|
4029
|
+
function Rc() {
|
|
4030
|
+
g(Ac, this) && (g(Ac, this).removeAttribute("aria-selected"), g(Ac, this).tabIndex = -1);
|
|
4031
|
+
let e = g(Oc, this).sort((e, t) => {
|
|
4025
4032
|
var n, r;
|
|
4026
4033
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
4027
|
-
}), t = g(
|
|
4034
|
+
}), t = g(Oc, this).filter((e) => {
|
|
4028
4035
|
var t;
|
|
4029
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= g(
|
|
4036
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= g(kc, this);
|
|
4030
4037
|
})[0] || e[e.length - 1];
|
|
4031
4038
|
if (t) {
|
|
4032
|
-
let e = g(
|
|
4039
|
+
let e = g(jc, this).find((e) => {
|
|
4033
4040
|
var n;
|
|
4034
4041
|
return e.id === ((n = t.video) == null ? void 0 : n.id);
|
|
4035
4042
|
});
|
|
4036
|
-
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), m(
|
|
4043
|
+
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), m(Ac, this, e.el));
|
|
4037
4044
|
}
|
|
4038
4045
|
}
|
|
4039
|
-
function
|
|
4046
|
+
function zc(e) {
|
|
4040
4047
|
this.dispatchEvent(new Event("change", {
|
|
4041
4048
|
bubbles: !0,
|
|
4042
4049
|
composed: !0
|
|
@@ -4046,36 +4053,36 @@ function Ic(e) {
|
|
|
4046
4053
|
detail: e
|
|
4047
4054
|
}));
|
|
4048
4055
|
}
|
|
4049
|
-
function
|
|
4056
|
+
function Bc(e) {
|
|
4050
4057
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
4051
4058
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
4052
4059
|
var a;
|
|
4053
|
-
(a = g(
|
|
4060
|
+
(a = g(Nc, this)) == null || a.hide();
|
|
4054
4061
|
} else if (t === "Enter" || t === " ") {
|
|
4055
4062
|
var o;
|
|
4056
|
-
(o = h(Y, this,
|
|
4057
|
-
} else h(Y, this,
|
|
4063
|
+
(o = h(Y, this, Hc).call(this)) == null || (o = o.el) == null || o.click();
|
|
4064
|
+
} else h(Y, this, Vc).call(this, e);
|
|
4058
4065
|
}
|
|
4059
|
-
function
|
|
4066
|
+
function Vc(e) {
|
|
4060
4067
|
var t;
|
|
4061
|
-
let { key: n } = e, r = g(
|
|
4068
|
+
let { key: n } = e, r = g(jc, this), i = (t = h(Y, this, Hc).call(this)) == null ? r[0] : t;
|
|
4062
4069
|
if (!i) return;
|
|
4063
4070
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
4064
4071
|
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : e.key === "Home" ? o = 0 : e.key === "End" && (o = r.length - 1), o < 0 && (o = r.length - 1), o > r.length - 1 && (o = 0);
|
|
4065
4072
|
let s = r[o];
|
|
4066
|
-
s && (h(Y, this,
|
|
4073
|
+
s && (h(Y, this, Uc).call(this, s.id), s.el.focus());
|
|
4067
4074
|
}
|
|
4068
|
-
function
|
|
4069
|
-
return g(
|
|
4075
|
+
function Hc() {
|
|
4076
|
+
return g(jc, this).find((e) => e.el.tabIndex === 0);
|
|
4070
4077
|
}
|
|
4071
|
-
function
|
|
4072
|
-
for (let t of g(
|
|
4078
|
+
function Uc(e) {
|
|
4079
|
+
for (let t of g(jc, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
4073
4080
|
}
|
|
4074
|
-
e(
|
|
4081
|
+
e(Pc, "observedAttributes", [_.RENDITION_LEVELS, _.MAX_VIDEO_BITRATE]);
|
|
4075
4082
|
//#endregion
|
|
4076
4083
|
//#region ../../libs/player-next/src/components/ScrollOverlay.ts
|
|
4077
|
-
var
|
|
4078
|
-
|
|
4084
|
+
var Wc = document.createElement("template");
|
|
4085
|
+
Wc.innerHTML = `
|
|
4079
4086
|
<style>
|
|
4080
4087
|
:host {
|
|
4081
4088
|
--scroll-overlay-offset: var(--vindral-scroll-overlay-offset, 0px);
|
|
@@ -4143,71 +4150,71 @@ Vc.innerHTML = `
|
|
|
4143
4150
|
<div id="scroll-area"></div>
|
|
4144
4151
|
<slot id="content"></slot>
|
|
4145
4152
|
`;
|
|
4146
|
-
var
|
|
4153
|
+
var Gc = /* @__PURE__ */ new WeakMap(), Kc = /* @__PURE__ */ new WeakMap(), qc = /* @__PURE__ */ new WeakMap(), Jc = /* @__PURE__ */ new WeakMap(), Yc = /* @__PURE__ */ new WeakMap(), Xc = /* @__PURE__ */ new WeakMap(), Zc = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), Qc = /* @__PURE__ */ new WeakMap(), $c = class extends HTMLElement {
|
|
4147
4154
|
constructor() {
|
|
4148
|
-
super(), C(this, X), p(this,
|
|
4155
|
+
super(), C(this, X), p(this, Gc, null), p(this, Kc, null), p(this, qc, !1), p(this, Jc, !1), p(this, Yc, !1), p(this, Xc, () => {
|
|
4149
4156
|
this.open && (this.open = !1);
|
|
4150
|
-
}), p(this,
|
|
4157
|
+
}), p(this, Zc, null), e(this, "handleEvent", (e) => {
|
|
4151
4158
|
switch (e.type) {
|
|
4152
4159
|
case "touchstart":
|
|
4153
|
-
h(X, this,
|
|
4160
|
+
h(X, this, tl).call(this, e);
|
|
4154
4161
|
break;
|
|
4155
4162
|
case "touchmove":
|
|
4156
|
-
h(X, this,
|
|
4163
|
+
h(X, this, nl).call(this, e);
|
|
4157
4164
|
break;
|
|
4158
4165
|
case "touchend":
|
|
4159
|
-
h(X, this,
|
|
4166
|
+
h(X, this, rl).call(this, e);
|
|
4160
4167
|
break;
|
|
4161
4168
|
}
|
|
4162
|
-
}), p(this,
|
|
4163
|
-
let e = g(
|
|
4169
|
+
}), p(this, Qc, () => {
|
|
4170
|
+
let e = g(Yc, this);
|
|
4164
4171
|
if (this.scrollTop === 0) {
|
|
4165
|
-
h(X, this,
|
|
4172
|
+
h(X, this, dl).call(this, e);
|
|
4166
4173
|
return;
|
|
4167
4174
|
}
|
|
4168
|
-
if (!e && !h(X, this,
|
|
4169
|
-
h(X, this,
|
|
4175
|
+
if (!e && !h(X, this, il).call(this)) {
|
|
4176
|
+
h(X, this, ll).call(this), h(X, this, dl).call(this);
|
|
4170
4177
|
return;
|
|
4171
4178
|
}
|
|
4172
|
-
!this.visible && this.scrollTop > 0 && !g(
|
|
4173
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4179
|
+
!this.visible && this.scrollTop > 0 && !g(qc, this) ? h(X, this, fl).call(this) : !g(qc, this) && h(X, this, ol).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4180
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Wc.content.cloneNode(!0));
|
|
4174
4181
|
}
|
|
4175
4182
|
connectedCallback() {
|
|
4176
4183
|
let e = this.getRootNode();
|
|
4177
4184
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4178
4185
|
var t, n, r;
|
|
4179
|
-
m(
|
|
4186
|
+
m(Gc, this, e.querySelector("vindral-controller")), (t = g(Gc, this)) == null || t.connectListener(this), m(Kc, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area")), (r = g(Kc, this)) == null || r.addEventListener("click", g(Xc, this));
|
|
4180
4187
|
let s = this.hasAttribute("touch-enabled");
|
|
4181
|
-
if (m(
|
|
4188
|
+
if (m(Yc, this, f() && s), !g(Yc, this)) this.setAttribute("snap", "");
|
|
4182
4189
|
else {
|
|
4183
4190
|
var i, a, o;
|
|
4184
|
-
(i = g(
|
|
4191
|
+
(i = g(Gc, this)) == null || i.addEventListener("touchstart", this, { passive: !0 }), (a = g(Gc, this)) == null || a.addEventListener("touchmove", this, { passive: !1 }), (o = g(Gc, this)) == null || o.addEventListener("touchend", this, { passive: !0 });
|
|
4185
4192
|
}
|
|
4186
|
-
this.addEventListener("scroll", g(
|
|
4193
|
+
this.addEventListener("scroll", g(Qc, this));
|
|
4187
4194
|
}
|
|
4188
4195
|
}
|
|
4189
4196
|
disconnectedCallback() {
|
|
4190
4197
|
var e, t, n, r, i;
|
|
4191
|
-
(e = g(
|
|
4198
|
+
(e = g(Kc, this)) == null || e.removeEventListener("click", g(Xc, this)), this.removeEventListener("scroll", g(Qc, this)), (t = g(Gc, this)) == null || t.removeEventListener("touchstart", this), (n = g(Gc, this)) == null || n.removeEventListener("touchmove", this), (r = g(Gc, this)) == null || r.removeEventListener("touchend", this), (i = g(Gc, this)) == null || i.disconnectListener(this);
|
|
4192
4199
|
}
|
|
4193
4200
|
attributeChangedCallback(e, t, n) {
|
|
4194
|
-
if (t !== n && (e === _.USER_INTERACTING && n === null && h(X, this,
|
|
4201
|
+
if (t !== n && (e === _.USER_INTERACTING && n === null && h(X, this, al).call(this) && setTimeout(() => {
|
|
4195
4202
|
this.open = !1;
|
|
4196
4203
|
}, 300), e === "open")) if (n !== null) {
|
|
4197
4204
|
var r;
|
|
4198
|
-
m(
|
|
4199
|
-
top: (r = g(
|
|
4205
|
+
m(qc, this, !1), this.scrollTop > 0 && h(X, this, fl).call(this), this.scrollTo({
|
|
4206
|
+
top: (r = g(Kc, this)) == null ? void 0 : r.clientHeight,
|
|
4200
4207
|
behavior: "smooth"
|
|
4201
4208
|
});
|
|
4202
|
-
} else h(X, this,
|
|
4209
|
+
} else h(X, this, ul).call(this);
|
|
4203
4210
|
}
|
|
4204
4211
|
set open(e) {
|
|
4205
4212
|
if (e) {
|
|
4206
4213
|
this.setAttribute("open", "");
|
|
4207
4214
|
return;
|
|
4208
4215
|
}
|
|
4209
|
-
let t = this.hasAttribute("open"), n = this.visible || h(X, this,
|
|
4210
|
-
t ? this.removeAttribute("open") : n ? h(X, this,
|
|
4216
|
+
let t = this.hasAttribute("open"), n = this.visible || h(X, this, al).call(this);
|
|
4217
|
+
t ? this.removeAttribute("open") : n ? h(X, this, ul).call(this) : (m(qc, this, !1), this.removeAttribute("snap-touch"));
|
|
4211
4218
|
}
|
|
4212
4219
|
get open() {
|
|
4213
4220
|
return this.hasAttribute("open");
|
|
@@ -4219,86 +4226,86 @@ var Hc = /* @__PURE__ */ new WeakMap(), Uc = /* @__PURE__ */ new WeakMap(), Wc =
|
|
|
4219
4226
|
return this.hasAttribute("visible");
|
|
4220
4227
|
}
|
|
4221
4228
|
};
|
|
4222
|
-
function
|
|
4223
|
-
return h(X, this,
|
|
4229
|
+
function el() {
|
|
4230
|
+
return h(X, this, il).call(this) || h(X, this, cl).call(this) || h(X, this, al).call(this);
|
|
4224
4231
|
}
|
|
4225
|
-
function
|
|
4232
|
+
function tl(e) {
|
|
4226
4233
|
let t = e.touches[0];
|
|
4227
|
-
t && (m(
|
|
4234
|
+
t && (m(Jc, this, h(X, this, el).call(this)), g(Jc, this) && (m(qc, this, !1), m(Zc, this, t.clientY)));
|
|
4228
4235
|
}
|
|
4229
|
-
function
|
|
4230
|
-
if (!(!g(
|
|
4231
|
-
let t = e.touches[0].clientY, n = g(
|
|
4236
|
+
function nl(e) {
|
|
4237
|
+
if (!(!g(Jc, this) || g(Zc, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4238
|
+
let t = e.touches[0].clientY, n = g(Zc, this) - t;
|
|
4232
4239
|
this.scrollTop = Math.max(0, n);
|
|
4233
4240
|
}
|
|
4234
4241
|
}
|
|
4235
|
-
function
|
|
4236
|
-
g(
|
|
4242
|
+
function rl(e) {
|
|
4243
|
+
g(Jc, this) && !g(qc, this) && h(X, this, al).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), m(Zc, this, null), m(Jc, this, !1);
|
|
4237
4244
|
}
|
|
4238
|
-
function
|
|
4245
|
+
function il() {
|
|
4239
4246
|
return this.hasAttribute(_.USER_INTERACTING);
|
|
4240
4247
|
}
|
|
4241
|
-
function
|
|
4248
|
+
function al() {
|
|
4242
4249
|
return this.scrollTop > 0;
|
|
4243
4250
|
}
|
|
4244
|
-
function
|
|
4251
|
+
function ol() {
|
|
4245
4252
|
var e;
|
|
4246
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = g(
|
|
4253
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = g(Kc, this)) == null ? void 0 : e.clientHeight);
|
|
4247
4254
|
}
|
|
4248
|
-
function
|
|
4255
|
+
function sl() {
|
|
4249
4256
|
var e;
|
|
4250
|
-
let t = (e = g(
|
|
4257
|
+
let t = (e = g(Kc, this)) == null ? void 0 : e.clientHeight;
|
|
4251
4258
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4252
4259
|
}
|
|
4253
|
-
function
|
|
4260
|
+
function cl() {
|
|
4254
4261
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4255
|
-
return Number.isNaN(t) ? h(X, this,
|
|
4262
|
+
return Number.isNaN(t) ? h(X, this, sl).call(this) > 0 : t > 0;
|
|
4256
4263
|
}
|
|
4257
|
-
function
|
|
4264
|
+
function ll() {
|
|
4258
4265
|
let e = this.style.scrollBehavior;
|
|
4259
4266
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4260
4267
|
top: 0,
|
|
4261
4268
|
behavior: "auto"
|
|
4262
4269
|
}), this.style.scrollBehavior = e;
|
|
4263
4270
|
}
|
|
4264
|
-
function
|
|
4265
|
-
m(
|
|
4271
|
+
function ul() {
|
|
4272
|
+
m(qc, this, !0), this.removeAttribute("snap-touch"), h(X, this, pl).call(this), this.scrollTo({
|
|
4266
4273
|
top: 0,
|
|
4267
4274
|
behavior: "smooth"
|
|
4268
4275
|
});
|
|
4269
4276
|
}
|
|
4270
|
-
function
|
|
4271
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), m(
|
|
4277
|
+
function dl(e = !1) {
|
|
4278
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), m(qc, this, !1), h(X, this, pl).call(this);
|
|
4272
4279
|
}
|
|
4273
|
-
function
|
|
4280
|
+
function fl() {
|
|
4274
4281
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(S.LOCK_UI, {
|
|
4275
4282
|
bubbles: !0,
|
|
4276
4283
|
composed: !0
|
|
4277
4284
|
})));
|
|
4278
4285
|
}
|
|
4279
|
-
function
|
|
4286
|
+
function pl() {
|
|
4280
4287
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(S.UNLOCK_UI, {
|
|
4281
4288
|
bubbles: !0,
|
|
4282
4289
|
composed: !0
|
|
4283
4290
|
})));
|
|
4284
4291
|
}
|
|
4285
|
-
e(
|
|
4292
|
+
e($c, "observedAttributes", [
|
|
4286
4293
|
_.USER_INTERACTING,
|
|
4287
4294
|
"open",
|
|
4288
4295
|
"touch-enabled"
|
|
4289
4296
|
]);
|
|
4290
4297
|
//#endregion
|
|
4291
4298
|
//#region ../../libs/player-next/src/utils/thumbnailTrack.ts
|
|
4292
|
-
var
|
|
4299
|
+
var ml = "#EXT-X-TILES:", hl = "#EXT-X-PROGRAM-DATE-TIME:", gl = "#EXTINF:", _l = (e) => {
|
|
4293
4300
|
let t = /* @__PURE__ */ new Map();
|
|
4294
4301
|
for (let n of e.split(",")) {
|
|
4295
4302
|
let e = n.indexOf("=");
|
|
4296
4303
|
e > 0 && t.set(n.slice(0, e).trim(), n.slice(e + 1).trim());
|
|
4297
4304
|
}
|
|
4298
4305
|
return t;
|
|
4299
|
-
},
|
|
4306
|
+
}, vl = (e) => {
|
|
4300
4307
|
var t, n;
|
|
4301
|
-
let r =
|
|
4308
|
+
let r = _l(e), i = (t = r.get("RESOLUTION")) == null ? void 0 : t.match(/^(\d+)x(\d+)$/), a = (n = r.get("LAYOUT")) == null ? void 0 : n.match(/^(\d+)x(\d+)$/), o = Number(r.get("DURATION"));
|
|
4302
4309
|
return !i || !a || !Number.isFinite(o) || o <= 0 ? null : {
|
|
4303
4310
|
width: Number(i[1]),
|
|
4304
4311
|
height: Number(i[2]),
|
|
@@ -4306,15 +4313,15 @@ var dl = "#EXT-X-TILES:", fl = "#EXT-X-PROGRAM-DATE-TIME:", pl = "#EXTINF:", ml
|
|
|
4306
4313
|
rows: Number(a[2]),
|
|
4307
4314
|
tileSeconds: o
|
|
4308
4315
|
};
|
|
4309
|
-
},
|
|
4316
|
+
}, yl = (e, t) => {
|
|
4310
4317
|
let n = null, r = [], i = null, a = null;
|
|
4311
4318
|
for (let o of e.split(/\r?\n/)) {
|
|
4312
4319
|
let e = o.trim();
|
|
4313
|
-
if (e.startsWith(
|
|
4314
|
-
else if (e.startsWith(
|
|
4320
|
+
if (e.startsWith(ml)) n = vl(e.slice(13));
|
|
4321
|
+
else if (e.startsWith(hl)) {
|
|
4315
4322
|
let t = Date.parse(e.slice(25));
|
|
4316
4323
|
i = Number.isNaN(t) ? null : t;
|
|
4317
|
-
} else if (e.startsWith(
|
|
4324
|
+
} else if (e.startsWith(gl)) {
|
|
4318
4325
|
let t = Number.parseFloat(e.slice(8));
|
|
4319
4326
|
a = Number.isFinite(t) ? Math.round(t * 1e3) : null;
|
|
4320
4327
|
} else if (e.length > 0 && !e.startsWith("#")) {
|
|
@@ -4331,7 +4338,7 @@ var dl = "#EXT-X-TILES:", fl = "#EXT-X-PROGRAM-DATE-TIME:", pl = "#EXTINF:", ml
|
|
|
4331
4338
|
}
|
|
4332
4339
|
}
|
|
4333
4340
|
return n ? { sheets: r } : null;
|
|
4334
|
-
},
|
|
4341
|
+
}, bl = (e, t) => {
|
|
4335
4342
|
let n = e.sheets.find((e) => t >= e.startMs && t < e.startMs + e.durationMs);
|
|
4336
4343
|
if (!n) return null;
|
|
4337
4344
|
let { layout: r } = n, i = Math.floor((t - n.startMs) / (r.tileSeconds * 1e3));
|
|
@@ -4341,47 +4348,47 @@ var dl = "#EXT-X-TILES:", fl = "#EXT-X-PROGRAM-DATE-TIME:", pl = "#EXTINF:", ml
|
|
|
4341
4348
|
y: Math.floor(i / r.columns) * r.height,
|
|
4342
4349
|
layout: r
|
|
4343
4350
|
};
|
|
4344
|
-
},
|
|
4351
|
+
}, xl = /* @__PURE__ */ new WeakMap(), Sl = /* @__PURE__ */ new WeakMap(), Cl = /* @__PURE__ */ new WeakMap(), wl = /* @__PURE__ */ new WeakMap(), Tl = /* @__PURE__ */ new WeakMap(), El = /* @__PURE__ */ new WeakSet(), Dl = class {
|
|
4345
4352
|
constructor(e, t = () => {}) {
|
|
4346
|
-
C(this,
|
|
4353
|
+
C(this, El), p(this, xl, void 0), p(this, Sl, void 0), p(this, Cl, null), p(this, wl, null), p(this, Tl, null), m(xl, this, e), m(Sl, this, t);
|
|
4347
4354
|
}
|
|
4348
4355
|
get hasFrame() {
|
|
4349
|
-
return g(
|
|
4356
|
+
return g(Cl, this) !== null;
|
|
4350
4357
|
}
|
|
4351
4358
|
paint(e) {
|
|
4352
4359
|
var t;
|
|
4353
|
-
if (m(
|
|
4354
|
-
h(
|
|
4360
|
+
if (m(wl, this, e), ((t = g(Cl, this)) == null ? void 0 : t.url) === e.url) {
|
|
4361
|
+
h(El, this, kl).call(this, e);
|
|
4355
4362
|
return;
|
|
4356
4363
|
}
|
|
4357
|
-
h(
|
|
4364
|
+
h(El, this, Ol).call(this, e.url);
|
|
4358
4365
|
}
|
|
4359
4366
|
reset() {
|
|
4360
|
-
m(
|
|
4367
|
+
m(Cl, this, null), m(wl, this, null), m(Tl, this, null), g(xl, this).style.backgroundImage = "";
|
|
4361
4368
|
}
|
|
4362
4369
|
};
|
|
4363
|
-
function
|
|
4364
|
-
if (g(
|
|
4365
|
-
m(
|
|
4370
|
+
function Ol(e) {
|
|
4371
|
+
if (g(Tl, this) === e) return;
|
|
4372
|
+
m(Tl, this, e);
|
|
4366
4373
|
let t = new Image();
|
|
4367
4374
|
t.src = e, (typeof t.decode == "function" ? t.decode() : Promise.resolve()).catch(() => {}).then(() => {
|
|
4368
4375
|
var n;
|
|
4369
|
-
g(
|
|
4370
|
-
let r = g(
|
|
4371
|
-
r && (r.url === e ? (m(
|
|
4376
|
+
g(Tl, this) === e && m(Tl, this, null);
|
|
4377
|
+
let r = g(wl, this);
|
|
4378
|
+
r && (r.url === e ? (m(Cl, this, {
|
|
4372
4379
|
url: e,
|
|
4373
4380
|
image: t
|
|
4374
|
-
}), h(
|
|
4381
|
+
}), h(El, this, kl).call(this, r)) : ((n = g(Cl, this)) == null ? void 0 : n.url) !== r.url && h(El, this, Ol).call(this, r.url));
|
|
4375
4382
|
});
|
|
4376
4383
|
}
|
|
4377
|
-
function
|
|
4378
|
-
let t = g(
|
|
4379
|
-
t.backgroundImage !== `url("${e.url}")` && (t.backgroundImage = `url("${e.url}")`), t.backgroundSize = e.size, t.backgroundPosition = e.position, g(
|
|
4384
|
+
function kl(e) {
|
|
4385
|
+
let t = g(xl, this).style;
|
|
4386
|
+
t.backgroundImage !== `url("${e.url}")` && (t.backgroundImage = `url("${e.url}")`), t.backgroundSize = e.size, t.backgroundPosition = e.position, g(Sl, this).call(this);
|
|
4380
4387
|
}
|
|
4381
4388
|
//#endregion
|
|
4382
4389
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4383
|
-
var
|
|
4384
|
-
|
|
4390
|
+
var Al = 1e3, jl = 8, Ml = 3e4, Nl = 1e4, Pl = 2, Fl = 1, Il = document.createElement("template");
|
|
4391
|
+
Il.innerHTML = `
|
|
4385
4392
|
<style>
|
|
4386
4393
|
:host {
|
|
4387
4394
|
--buffered: 0;
|
|
@@ -4474,56 +4481,56 @@ Nl.innerHTML = `
|
|
|
4474
4481
|
<div id="thumbnail"></div>
|
|
4475
4482
|
<div id="time-tooltip"></div>
|
|
4476
4483
|
`;
|
|
4477
|
-
var Z = /* @__PURE__ */ new WeakMap(),
|
|
4484
|
+
var Z = /* @__PURE__ */ new WeakMap(), Ll = /* @__PURE__ */ new WeakMap(), Rl = /* @__PURE__ */ new WeakMap(), zl = /* @__PURE__ */ new WeakMap(), Bl = /* @__PURE__ */ new WeakMap(), Vl = /* @__PURE__ */ new WeakMap(), Hl = /* @__PURE__ */ new WeakMap(), Ul = /* @__PURE__ */ new WeakMap(), Wl = /* @__PURE__ */ new WeakMap(), Gl = /* @__PURE__ */ new WeakMap(), Kl = /* @__PURE__ */ new WeakMap(), ql = /* @__PURE__ */ new WeakMap(), Jl = /* @__PURE__ */ new WeakMap(), Yl = /* @__PURE__ */ new WeakMap(), Xl = /* @__PURE__ */ new WeakMap(), Zl = /* @__PURE__ */ new WeakMap(), Ql = /* @__PURE__ */ new WeakMap(), $l = /* @__PURE__ */ new WeakMap(), eu = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), tu = /* @__PURE__ */ new WeakMap(), nu = /* @__PURE__ */ new WeakMap(), ru = /* @__PURE__ */ new WeakMap(), iu = /* @__PURE__ */ new WeakMap(), au = /* @__PURE__ */ new WeakMap(), ou = /* @__PURE__ */ new WeakMap(), su = /* @__PURE__ */ new WeakMap(), cu = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), lu = /* @__PURE__ */ new WeakMap(), uu = /* @__PURE__ */ new WeakMap(), du = /* @__PURE__ */ new WeakMap(), fu = /* @__PURE__ */ new WeakMap(), pu = /* @__PURE__ */ new WeakMap(), mu = /* @__PURE__ */ new WeakMap(), hu = /* @__PURE__ */ new WeakMap(), gu = class extends Ei {
|
|
4478
4485
|
constructor() {
|
|
4479
4486
|
var e, t, n, r, i;
|
|
4480
|
-
super(), C(this, $), p(this, Z, void 0), p(this,
|
|
4481
|
-
if (!h($, this,
|
|
4487
|
+
super(), C(this, $), p(this, Z, void 0), p(this, Ll, void 0), p(this, Rl, null), p(this, zl, null), p(this, Bl, 0), p(this, Vl, null), p(this, Hl, void 0), p(this, Ul, !1), p(this, Wl, !1), p(this, Gl, /* @__PURE__ */ new Set()), p(this, Kl, /* @__PURE__ */ new Set()), p(this, ql, /* @__PURE__ */ new Set()), p(this, Jl, null), p(this, Yl, !1), p(this, Xl, void 0), p(this, Zl, void 0), p(this, Ql, void 0), p(this, $l, []), p(this, eu, null), p(this, Q, !1), p(this, tu, null), p(this, nu, null), p(this, ru, null), p(this, iu, !1), p(this, au, null), p(this, ou, null), p(this, su, !1), p(this, cu, !1), p(this, lu, (e) => {
|
|
4488
|
+
if (!h($, this, yu).call(this) || h($, this, bu).call(this)) {
|
|
4482
4489
|
e.preventDefault();
|
|
4483
4490
|
return;
|
|
4484
4491
|
}
|
|
4485
|
-
m(Q, this, !0), m(
|
|
4492
|
+
m(Q, this, !0), m(ou, this, e.pointerId), m(tu, this, e.pointerType), m(nu, this, this.range.value), m(iu, this, !this.hasAttribute(_.PAUSED)), g(iu, this) && h($, this, Pu).call(this, S.PAUSE);
|
|
4486
4493
|
try {
|
|
4487
4494
|
this.setPointerCapture(e.pointerId);
|
|
4488
4495
|
} catch (e) {}
|
|
4489
|
-
h($, this,
|
|
4490
|
-
}), p(this,
|
|
4491
|
-
if (!(!h($, this,
|
|
4492
|
-
if (g(
|
|
4493
|
-
e.preventDefault(), h($, this,
|
|
4496
|
+
h($, this, Du).call(this), h($, this, Nu).call(this, e);
|
|
4497
|
+
}), p(this, uu, (e) => {
|
|
4498
|
+
if (!(!h($, this, yu).call(this) || h($, this, bu).call(this))) {
|
|
4499
|
+
if (g(au, this) && (cancelAnimationFrame(g(au, this)), m(au, this, null)), g(Q, this) && e.pointerId === g(ou, this)) {
|
|
4500
|
+
e.preventDefault(), h($, this, Nu).call(this, e);
|
|
4494
4501
|
return;
|
|
4495
4502
|
}
|
|
4496
|
-
m(
|
|
4503
|
+
m(au, this, requestAnimationFrame(() => {
|
|
4497
4504
|
var t;
|
|
4498
4505
|
if (e.pointerType !== "mouse" || g(Q, this) || !this.duration) {
|
|
4499
|
-
g(
|
|
4506
|
+
g(Zl, this).style.opacity = "0", m(au, this, null);
|
|
4500
4507
|
return;
|
|
4501
4508
|
}
|
|
4502
|
-
let n = h($, this,
|
|
4503
|
-
if (h($, this,
|
|
4509
|
+
let n = h($, this, Mu).call(this, e.clientX), r = h($, this, Tu).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4510
|
+
if (h($, this, Lu).call(this, i, r), h($, this, Au).call(this, i), i > this.range.valueAsNumber) {
|
|
4504
4511
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4505
|
-
g(
|
|
4506
|
-
} else g(
|
|
4507
|
-
m(
|
|
4512
|
+
g(Zl, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, g(Zl, this).style.opacity = "1";
|
|
4513
|
+
} else g(Zl, this).style.opacity = "0";
|
|
4514
|
+
m(au, this, null);
|
|
4508
4515
|
}));
|
|
4509
4516
|
}
|
|
4510
|
-
}), p(this,
|
|
4511
|
-
if (e.pointerId !== g(
|
|
4517
|
+
}), p(this, du, (e) => {
|
|
4518
|
+
if (e.pointerId !== g(ou, this)) return;
|
|
4512
4519
|
try {
|
|
4513
4520
|
this.releasePointerCapture(e.pointerId);
|
|
4514
4521
|
} catch (e) {}
|
|
4515
|
-
m(Q, this, !1), m(
|
|
4516
|
-
let t = g(
|
|
4517
|
-
m(
|
|
4518
|
-
}), p(this,
|
|
4519
|
-
this.duration && !h($, this,
|
|
4520
|
-
}), p(this,
|
|
4521
|
-
g(
|
|
4522
|
-
}), p(this,
|
|
4523
|
-
m(
|
|
4524
|
-
}), p(this,
|
|
4525
|
-
if (h($, this,
|
|
4526
|
-
let t = h($, this,
|
|
4522
|
+
m(Q, this, !1), m(ou, this, null), m(tu, this, null), h($, this, Fu).call(this, null);
|
|
4523
|
+
let t = g(ru, this), n = g(nu, this);
|
|
4524
|
+
m(ru, this, null), m(nu, this, null), e.type === "pointerup" && t !== null ? h($, this, Iu).call(this, t) : n !== null && (this.range.value = n, this.updateBar()), g(iu, this) && h($, this, Pu).call(this, S.PLAY), m(iu, this, !1), e.pointerType !== "mouse" && (g(Xl, this).style.opacity = "0", g(mu, this).call(this)), g(cu, this) && h($, this, Bu).call(this) && (m(su, this, !1), m(cu, this, !1));
|
|
4525
|
+
}), p(this, fu, () => {
|
|
4526
|
+
this.duration && !h($, this, bu).call(this) && (g(Xl, this).style.opacity = "1"), m(Wl, this, !0), h($, this, Du).call(this);
|
|
4527
|
+
}), p(this, pu, () => {
|
|
4528
|
+
g(Xl, this).style.opacity = "0", g(Zl, this).style.opacity = "0", m(Wl, this, !1), g(mu, this).call(this);
|
|
4529
|
+
}), p(this, mu, () => {
|
|
4530
|
+
m(Ul, this, !1), g(Ll, this).style.opacity = "0";
|
|
4531
|
+
}), p(this, hu, (e) => {
|
|
4532
|
+
if (h($, this, bu).call(this) || !g(Z, this) || g(Z, this) <= 0 || !Number.isFinite(g(Z, this))) return;
|
|
4533
|
+
let t = h($, this, _u).call(this);
|
|
4527
4534
|
if (t <= 0) return;
|
|
4528
4535
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4529
4536
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4531,55 +4538,55 @@ var Z = /* @__PURE__ */ new WeakMap(), Pl = /* @__PURE__ */ new WeakMap(), Fl =
|
|
|
4531
4538
|
r = Math.max(0, n - 5);
|
|
4532
4539
|
break;
|
|
4533
4540
|
case "ArrowRight":
|
|
4534
|
-
if (h($, this,
|
|
4541
|
+
if (h($, this, Bu).call(this)) return;
|
|
4535
4542
|
r = Math.min(t, n + 5);
|
|
4536
4543
|
break;
|
|
4537
4544
|
case "Home":
|
|
4538
4545
|
r = 0;
|
|
4539
4546
|
break;
|
|
4540
4547
|
case "End":
|
|
4541
|
-
if (h($, this,
|
|
4548
|
+
if (h($, this, Bu).call(this)) return;
|
|
4542
4549
|
r = t;
|
|
4543
4550
|
break;
|
|
4544
4551
|
default: return;
|
|
4545
4552
|
}
|
|
4546
4553
|
let i = Math.min(r / t, 1);
|
|
4547
|
-
h($, this,
|
|
4548
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4549
|
-
g(
|
|
4550
|
-
})), this.addEventListener("pointerdown", g(
|
|
4554
|
+
h($, this, Iu).call(this, i);
|
|
4555
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Il.content.cloneNode(!0)), m(Xl, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), m(Zl, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), m(Ql, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), m(Ll, this, (i = this.shadowRoot) == null ? void 0 : i.getElementById("thumbnail")), m(Hl, this, new Dl(g(Ll, this), () => {
|
|
4556
|
+
g(Ul, this) && (g(Wl, this) || g(Q, this)) && (g(Ll, this).style.opacity = "1");
|
|
4557
|
+
})), this.addEventListener("pointerdown", g(lu, this)), this.addEventListener("pointermove", g(uu, this)), this.addEventListener("pointerup", g(du, this)), this.addEventListener("pointercancel", g(du, this)), this.addEventListener("mouseenter", g(fu, this)), this.addEventListener("mouseleave", g(pu, this));
|
|
4551
4558
|
}
|
|
4552
4559
|
connectedCallback() {
|
|
4553
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), h($, this,
|
|
4560
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), h($, this, Eu).call(this), this.addEventListener("keydown", g(hu, this)), h($, this, Bu).call(this) && (this.range.value = "1", h($, this, Eu).call(this)), h($, this, xu).call(this), h($, this, Cu).call(this);
|
|
4554
4561
|
}
|
|
4555
4562
|
disconnectedCallback() {
|
|
4556
|
-
super.disconnectedCallback(), h($, this,
|
|
4563
|
+
super.disconnectedCallback(), h($, this, wu).call(this), this.removeEventListener("pointerdown", g(lu, this)), this.removeEventListener("pointermove", g(uu, this)), this.removeEventListener("pointerup", g(du, this)), this.removeEventListener("pointercancel", g(du, this)), this.removeEventListener("mouseenter", g(fu, this)), this.removeEventListener("mouseleave", g(pu, this)), this.removeEventListener("keydown", g(hu, this)), m(ou, this, null);
|
|
4557
4564
|
}
|
|
4558
4565
|
attributeChangedCallback(e, t, n) {
|
|
4559
4566
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4560
4567
|
case _.TIMESHIFT_POSITION:
|
|
4561
|
-
if (h($, this,
|
|
4568
|
+
if (h($, this, Bu).call(this)) {
|
|
4562
4569
|
if (g(Q, this)) {
|
|
4563
|
-
m(
|
|
4570
|
+
m(cu, this, !0);
|
|
4564
4571
|
return;
|
|
4565
4572
|
}
|
|
4566
|
-
m(
|
|
4573
|
+
m(su, this, !1), m(cu, this, !1), this.range.value = "1", h($, this, Eu).call(this);
|
|
4567
4574
|
return;
|
|
4568
4575
|
}
|
|
4569
4576
|
if (g(Z, this)) {
|
|
4570
|
-
if (m(
|
|
4577
|
+
if (m(cu, this, !1), g(Q, this)) return;
|
|
4571
4578
|
let e = Math.max(parseFloat(n) / g(Z, this), 0);
|
|
4572
|
-
this.range.value = e.toString(), h($, this,
|
|
4579
|
+
this.range.value = e.toString(), h($, this, Eu).call(this);
|
|
4573
4580
|
}
|
|
4574
4581
|
break;
|
|
4575
4582
|
case _.DURATION:
|
|
4576
|
-
m(Z, this, parseFloat(n) || 0), h($, this,
|
|
4583
|
+
m(Z, this, parseFloat(n) || 0), h($, this, Eu).call(this), h($, this, xu).call(this), h($, this, Cu).call(this);
|
|
4577
4584
|
break;
|
|
4578
4585
|
case _.TIMELINE_MARKERS:
|
|
4579
|
-
m(
|
|
4586
|
+
m($l, this, Vr(n)), h($, this, xu).call(this), h($, this, Cu).call(this);
|
|
4580
4587
|
break;
|
|
4581
4588
|
case _.TIMESHIFT_THUMBNAIL_URL:
|
|
4582
|
-
m(
|
|
4589
|
+
m(Rl, this, n || null), m(zl, this, null), m(Bl, this, 0), g(Hl, this).reset(), g(Gl, this).clear(), g(Kl, this).clear(), g(ql, this).clear(), g(mu, this).call(this), g(Vl, this) ? m(Yl, this, !0) : (g(Wl, this) || g(Q, this)) && h($, this, Du).call(this);
|
|
4583
4590
|
break;
|
|
4584
4591
|
}
|
|
4585
4592
|
}
|
|
@@ -4597,54 +4604,54 @@ var Z = /* @__PURE__ */ new WeakMap(), Pl = /* @__PURE__ */ new WeakMap(), Fl =
|
|
|
4597
4604
|
this.setAttribute(_.DURATION, e.toString());
|
|
4598
4605
|
}
|
|
4599
4606
|
};
|
|
4600
|
-
function
|
|
4607
|
+
function _u() {
|
|
4601
4608
|
return g(Z, this) ? g(Z, this) : 1;
|
|
4602
4609
|
}
|
|
4603
|
-
function
|
|
4610
|
+
function vu() {
|
|
4604
4611
|
let e = g(Z, this);
|
|
4605
4612
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4606
4613
|
}
|
|
4607
|
-
function
|
|
4608
|
-
return h($, this,
|
|
4614
|
+
function yu() {
|
|
4615
|
+
return h($, this, vu).call(this) !== void 0;
|
|
4609
4616
|
}
|
|
4610
|
-
function
|
|
4611
|
-
return g(
|
|
4617
|
+
function bu() {
|
|
4618
|
+
return g(su, this);
|
|
4612
4619
|
}
|
|
4613
|
-
function
|
|
4620
|
+
function xu() {
|
|
4614
4621
|
var e;
|
|
4615
|
-
let t = Date.now(), n = (e = g(Z, this)) == null ? 0 : e, r = g(
|
|
4616
|
-
for (let e of g(
|
|
4617
|
-
let a =
|
|
4622
|
+
let t = Date.now(), n = (e = g(Z, this)) == null ? 0 : e, r = g(Ql, this).children, i = 0;
|
|
4623
|
+
for (let e of g($l, this)) {
|
|
4624
|
+
let a = Hr(e.time, t, n);
|
|
4618
4625
|
if (a === null) continue;
|
|
4619
4626
|
let o = r[i];
|
|
4620
|
-
o || (o = document.createElement("div"), o.className = "marker", g(
|
|
4627
|
+
o || (o = document.createElement("div"), o.className = "marker", g(Ql, this).appendChild(o)), o.style.left = `${a * 100}%`, o.dataset.label = e.label, e.type ? o.dataset.type = e.type : delete o.dataset.type, i++;
|
|
4621
4628
|
}
|
|
4622
|
-
for (; g(
|
|
4629
|
+
for (; g(Ql, this).children.length > i;) {
|
|
4623
4630
|
var a;
|
|
4624
|
-
(a = g(
|
|
4631
|
+
(a = g(Ql, this).lastElementChild) == null || a.remove();
|
|
4625
4632
|
}
|
|
4626
4633
|
}
|
|
4627
|
-
function
|
|
4628
|
-
let e = h($, this,
|
|
4634
|
+
function Su() {
|
|
4635
|
+
let e = h($, this, vu).call(this);
|
|
4629
4636
|
if (e === void 0) return !1;
|
|
4630
4637
|
let t = Date.now() - e * 1e3;
|
|
4631
|
-
return g(
|
|
4638
|
+
return g($l, this).some((e) => e.time >= t);
|
|
4632
4639
|
}
|
|
4633
|
-
function
|
|
4634
|
-
this.isConnected && h($, this,
|
|
4635
|
-
h($, this,
|
|
4636
|
-
},
|
|
4640
|
+
function Cu() {
|
|
4641
|
+
this.isConnected && h($, this, Su).call(this) ? g(eu, this) === null && m(eu, this, window.setInterval(() => {
|
|
4642
|
+
h($, this, xu).call(this), h($, this, Cu).call(this);
|
|
4643
|
+
}, Al)) : h($, this, wu).call(this);
|
|
4637
4644
|
}
|
|
4638
|
-
function
|
|
4639
|
-
g(
|
|
4645
|
+
function wu() {
|
|
4646
|
+
g(eu, this) !== null && (window.clearInterval(g(eu, this)), m(eu, this, null));
|
|
4640
4647
|
}
|
|
4641
|
-
function
|
|
4642
|
-
if (g(
|
|
4648
|
+
function Tu(e) {
|
|
4649
|
+
if (g($l, this).length === 0 || !g(Z, this)) return null;
|
|
4643
4650
|
let t = this.getBoundingClientRect().width;
|
|
4644
4651
|
if (!t) return null;
|
|
4645
|
-
let n =
|
|
4646
|
-
for (let t of g(
|
|
4647
|
-
let a =
|
|
4652
|
+
let n = jl / t, r = Date.now(), i = null;
|
|
4653
|
+
for (let t of g($l, this)) {
|
|
4654
|
+
let a = Hr(t.time, r, g(Z, this));
|
|
4648
4655
|
if (a === null) continue;
|
|
4649
4656
|
let o = Math.abs(a - e);
|
|
4650
4657
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4654,125 +4661,125 @@ function Su(e) {
|
|
|
4654
4661
|
}
|
|
4655
4662
|
return i;
|
|
4656
4663
|
}
|
|
4657
|
-
function
|
|
4658
|
-
let e = h($, this,
|
|
4659
|
-
!g(Z, this) || g(Z, this) <= 0 || !Number.isFinite(g(Z, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), g(Q, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${h($, this,
|
|
4664
|
+
function Eu() {
|
|
4665
|
+
let e = h($, this, _u).call(this);
|
|
4666
|
+
!g(Z, this) || g(Z, this) <= 0 || !Number.isFinite(g(Z, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), g(Q, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${h($, this, Vu).call(this, this.range.valueAsNumber * e)} of ${h($, this, Vu).call(this, e)}`), !g(Q, this) && !h($, this, bu).call(this) && h($, this, zu).call(this, this.range.valueAsNumber));
|
|
4660
4667
|
}
|
|
4661
|
-
function
|
|
4668
|
+
function Du() {
|
|
4662
4669
|
var e = this;
|
|
4663
4670
|
return t(function* () {
|
|
4664
|
-
let n = g(
|
|
4665
|
-
if (!(!n || g(
|
|
4666
|
-
let t = new AbortController(), r = setTimeout(() => t.abort(),
|
|
4671
|
+
let n = g(Rl, e);
|
|
4672
|
+
if (!(!n || g(Vl, e)) && !(Date.now() - g(Bl, e) < Ml)) return m(Vl, e, t(function* () {
|
|
4673
|
+
let t = new AbortController(), r = setTimeout(() => t.abort(), Nl);
|
|
4667
4674
|
try {
|
|
4668
4675
|
let r = yield fetch(n, { signal: t.signal });
|
|
4669
|
-
if (g(
|
|
4670
|
-
let i =
|
|
4671
|
-
if (!i || g(
|
|
4672
|
-
m(
|
|
4673
|
-
for (let t of i.sheets.slice(-
|
|
4674
|
-
h($, e,
|
|
4676
|
+
if (g(Rl, e) !== n || (m(Bl, e, Date.now()), !r.ok)) return;
|
|
4677
|
+
let i = yl(yield r.text(), n);
|
|
4678
|
+
if (!i || g(Rl, e) !== n) return;
|
|
4679
|
+
m(zl, e, i);
|
|
4680
|
+
for (let t of i.sheets.slice(-Pl)) h($, e, ku).call(e, t.url);
|
|
4681
|
+
h($, e, ju).call(e);
|
|
4675
4682
|
} catch (t) {
|
|
4676
|
-
m(
|
|
4683
|
+
m(Bl, e, Date.now());
|
|
4677
4684
|
} finally {
|
|
4678
|
-
clearTimeout(r), m(
|
|
4685
|
+
clearTimeout(r), m(Vl, e, null), g(Yl, e) && (m(Yl, e, !1), h($, e, Du).call(e));
|
|
4679
4686
|
}
|
|
4680
|
-
})()), g(
|
|
4687
|
+
})()), g(Vl, e);
|
|
4681
4688
|
})();
|
|
4682
4689
|
}
|
|
4683
|
-
function
|
|
4690
|
+
function Ou(e, t) {
|
|
4684
4691
|
let n = e.sheets.findIndex((e) => e.url === t);
|
|
4685
4692
|
if (n < 0) return;
|
|
4686
|
-
let r = Math.max(0, n -
|
|
4687
|
-
for (let t of e.sheets.slice(r, n +
|
|
4693
|
+
let r = Math.max(0, n - Fl);
|
|
4694
|
+
for (let t of e.sheets.slice(r, n + Fl + 1)) h($, this, ku).call(this, t.url);
|
|
4688
4695
|
}
|
|
4689
|
-
function
|
|
4690
|
-
if (g(
|
|
4691
|
-
g(
|
|
4696
|
+
function ku(e) {
|
|
4697
|
+
if (g(Gl, this).has(e)) return;
|
|
4698
|
+
g(Gl, this).add(e);
|
|
4692
4699
|
let t = new Image();
|
|
4693
4700
|
t.onload = () => {
|
|
4694
|
-
g(
|
|
4701
|
+
g(Kl, this).add(e), h($, this, ju).call(this);
|
|
4695
4702
|
}, t.onerror = () => {
|
|
4696
|
-
g(
|
|
4703
|
+
g(ql, this).add(e);
|
|
4697
4704
|
}, t.src = e;
|
|
4698
4705
|
}
|
|
4699
|
-
function
|
|
4700
|
-
m(
|
|
4701
|
-
let n = g(
|
|
4702
|
-
if (h($, this,
|
|
4703
|
-
let i =
|
|
4704
|
-
if (!i || g(
|
|
4705
|
-
if (h($, this,
|
|
4706
|
+
function Au(e, t = !0) {
|
|
4707
|
+
m(Jl, this, e);
|
|
4708
|
+
let n = g(zl, this), r = h($, this, vu).call(this);
|
|
4709
|
+
if (h($, this, Du).call(this), !n || r === void 0) return null;
|
|
4710
|
+
let i = bl(n, Date.now() - (1 - Math.max(0, Math.min(1, e))) * r * 1e3);
|
|
4711
|
+
if (!i || g(ql, this).has(i.url)) return g(mu, this).call(this), null;
|
|
4712
|
+
if (h($, this, Ou).call(this, n, i.url), !g(Kl, this).has(i.url)) return h($, this, ku).call(this, i.url), g(mu, this).call(this), null;
|
|
4706
4713
|
if (!t) return i;
|
|
4707
4714
|
let { width: a, height: o, columns: s, rows: c } = i.layout;
|
|
4708
|
-
g(
|
|
4709
|
-
let l = g(
|
|
4710
|
-
return g(
|
|
4715
|
+
g(Ll, this).style.aspectRatio = `${a} / ${o}`;
|
|
4716
|
+
let l = g(Ll, this).clientWidth > 0 ? g(Ll, this).clientWidth / a : 1, u = this.clientWidth, d = g(Ll, this).clientWidth / 2, f = u > 0 ? Math.min(Math.max(e * u, d), u - d) : e * 100;
|
|
4717
|
+
return g(Ll, this).style.left = u > 0 ? `${f}px` : `${f}%`, m(Ul, this, !0), g(Hl, this).paint({
|
|
4711
4718
|
url: i.url,
|
|
4712
4719
|
size: `${a * s * l}px ${o * c * l}px`,
|
|
4713
4720
|
position: `-${i.x * l}px -${i.y * l}px`
|
|
4714
4721
|
}), i;
|
|
4715
4722
|
}
|
|
4716
|
-
function
|
|
4717
|
-
let e = g(
|
|
4718
|
-
e !== null && (g(Q, this) ? h($, this,
|
|
4723
|
+
function ju() {
|
|
4724
|
+
let e = g(Jl, this);
|
|
4725
|
+
e !== null && (g(Q, this) ? h($, this, Fu).call(this, h($, this, Au).call(this, e, g(tu, this) === "mouse")) : g(Wl, this) && h($, this, Au).call(this, e));
|
|
4719
4726
|
}
|
|
4720
|
-
function
|
|
4727
|
+
function Mu(e) {
|
|
4721
4728
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4722
4729
|
return Math.max(0, Math.min(1, n));
|
|
4723
4730
|
}
|
|
4724
|
-
function
|
|
4731
|
+
function Nu(e) {
|
|
4725
4732
|
var t;
|
|
4726
|
-
let n = h($, this,
|
|
4727
|
-
h($, this,
|
|
4728
|
-
let a = h($, this,
|
|
4729
|
-
h($, this,
|
|
4733
|
+
let n = h($, this, Mu).call(this, e.clientX), r = h($, this, Tu).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4734
|
+
h($, this, Lu).call(this, i, r), g(Q, this) || (g(Xl, this).style.opacity = "1");
|
|
4735
|
+
let a = h($, this, Au).call(this, i, e.pointerType === "mouse");
|
|
4736
|
+
h($, this, Fu).call(this, a), m(ru, this, i), h($, this, bu).call(this) || (this.range.value = i.toString(), this.updateBar());
|
|
4730
4737
|
}
|
|
4731
|
-
function
|
|
4738
|
+
function Pu(e) {
|
|
4732
4739
|
this.dispatchEvent(new CustomEvent(e, {
|
|
4733
4740
|
bubbles: !0,
|
|
4734
4741
|
composed: !0
|
|
4735
4742
|
}));
|
|
4736
4743
|
}
|
|
4737
|
-
function
|
|
4744
|
+
function Fu(e) {
|
|
4738
4745
|
this.dispatchEvent(new CustomEvent(S.SEEK_PREVIEW, {
|
|
4739
4746
|
bubbles: !0,
|
|
4740
4747
|
composed: !0,
|
|
4741
4748
|
detail: e
|
|
4742
4749
|
}));
|
|
4743
4750
|
}
|
|
4744
|
-
function
|
|
4745
|
-
if (h($, this,
|
|
4746
|
-
let t = e * h($, this,
|
|
4747
|
-
this.range.value = e.toString(), this.updateBar(), h($, this,
|
|
4751
|
+
function Iu(e) {
|
|
4752
|
+
if (h($, this, bu).call(this) || h($, this, zu).call(this, e)) return;
|
|
4753
|
+
let t = e * h($, this, _u).call(this);
|
|
4754
|
+
this.range.value = e.toString(), this.updateBar(), h($, this, Ru).call(this, t);
|
|
4748
4755
|
}
|
|
4749
|
-
function
|
|
4756
|
+
function Lu(e, t) {
|
|
4750
4757
|
if (!g(Z, this) || !Number.isFinite(g(Z, this))) return;
|
|
4751
|
-
let n = e * g(Z, this), r = g(Z, this) - n, i = `-${h($, this,
|
|
4752
|
-
g(
|
|
4758
|
+
let n = e * g(Z, this), r = g(Z, this) - n, i = `-${h($, this, Vu).call(this, r)}`;
|
|
4759
|
+
g(Xl, this).textContent = t ? `${t.marker.label}: ${i}` : i, g(Xl, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4753
4760
|
}
|
|
4754
|
-
function
|
|
4761
|
+
function Ru(e) {
|
|
4755
4762
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4756
4763
|
bubbles: !0,
|
|
4757
4764
|
composed: !0,
|
|
4758
4765
|
detail: e
|
|
4759
4766
|
}));
|
|
4760
4767
|
}
|
|
4761
|
-
function
|
|
4762
|
-
return g(
|
|
4768
|
+
function zu(e) {
|
|
4769
|
+
return g(su, this) || h($, this, Bu).call(this) || e < .999 ? !1 : (m(su, this, !0), m(cu, this, !1), this.dispatchEvent(new CustomEvent(S.GO_LIVE, {
|
|
4763
4770
|
bubbles: !0,
|
|
4764
4771
|
composed: !0
|
|
4765
4772
|
})), !0);
|
|
4766
4773
|
}
|
|
4767
|
-
function
|
|
4774
|
+
function Bu() {
|
|
4768
4775
|
return !this.hasAttribute(_.TIMESHIFT_POSITION);
|
|
4769
4776
|
}
|
|
4770
|
-
function
|
|
4777
|
+
function Vu(e) {
|
|
4771
4778
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4772
4779
|
return g(Z, this) && g(Z, this) >= 3600 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
|
|
4773
4780
|
}
|
|
4774
|
-
e(
|
|
4775
|
-
...
|
|
4781
|
+
e(gu, "observedAttributes", [
|
|
4782
|
+
...Ei.observedAttributes,
|
|
4776
4783
|
_.TIMESHIFT_POSITION,
|
|
4777
4784
|
_.DURATION,
|
|
4778
4785
|
_.TIMELINE_MARKERS,
|
|
@@ -4781,9 +4788,9 @@ e(pu, "observedAttributes", [
|
|
|
4781
4788
|
]);
|
|
4782
4789
|
//#endregion
|
|
4783
4790
|
//#region ../../libs/player-next/src/components/SeekPreviewOverlay.ts
|
|
4784
|
-
var
|
|
4785
|
-
|
|
4786
|
-
var
|
|
4791
|
+
var Hu = document.createElement("template");
|
|
4792
|
+
Hu.innerHTML = "\n <style>\n :host {\n position: absolute;\n inset: 0;\n display: none;\n align-items: center;\n justify-content: center;\n background: #000;\n pointer-events: none;\n /* Over the video and the other overlays, under the controls */\n z-index: 5;\n }\n\n :host([data-active]) {\n display: flex;\n }\n\n #frame {\n background-repeat: no-repeat;\n }\n </style>\n\n <div id=\"frame\"></div>\n";
|
|
4793
|
+
var Uu = (e) => {
|
|
4787
4794
|
if (!e) return null;
|
|
4788
4795
|
try {
|
|
4789
4796
|
let t = JSON.parse(e);
|
|
@@ -4791,42 +4798,42 @@ var Bu = (e) => {
|
|
|
4791
4798
|
} catch (e) {
|
|
4792
4799
|
return null;
|
|
4793
4800
|
}
|
|
4794
|
-
},
|
|
4801
|
+
}, Wu = /* @__PURE__ */ new WeakMap(), Gu = /* @__PURE__ */ new WeakMap(), Ku = /* @__PURE__ */ new WeakMap(), qu = /* @__PURE__ */ new WeakMap(), Ju = class extends HTMLElement {
|
|
4795
4802
|
constructor() {
|
|
4796
|
-
super(), p(this,
|
|
4803
|
+
super(), p(this, Wu, null), p(this, Gu, void 0), p(this, Ku, void 0), p(this, qu, !1);
|
|
4797
4804
|
let e = this.attachShadow({ mode: "open" });
|
|
4798
|
-
e.appendChild(
|
|
4799
|
-
g(
|
|
4805
|
+
e.appendChild(Hu.content.cloneNode(!0)), m(Gu, this, e.getElementById("frame")), m(Ku, this, new Dl(g(Gu, this), () => {
|
|
4806
|
+
g(qu, this) && this.setAttribute("data-active", "");
|
|
4800
4807
|
}));
|
|
4801
4808
|
}
|
|
4802
4809
|
connectedCallback() {
|
|
4803
4810
|
var e;
|
|
4804
|
-
m(
|
|
4811
|
+
m(Wu, this, this.closest("vindral-controller")), (e = g(Wu, this)) == null || e.connectListener(this);
|
|
4805
4812
|
}
|
|
4806
4813
|
disconnectedCallback() {
|
|
4807
4814
|
var e;
|
|
4808
|
-
(e = g(
|
|
4815
|
+
(e = g(Wu, this)) == null || e.disconnectListener(this);
|
|
4809
4816
|
}
|
|
4810
4817
|
attributeChangedCallback(e, t, n) {
|
|
4811
4818
|
if (e !== _.SEEK_PREVIEW) return;
|
|
4812
|
-
let r =
|
|
4813
|
-
if (m(
|
|
4819
|
+
let r = Uu(n);
|
|
4820
|
+
if (m(qu, this, r !== null), !r) {
|
|
4814
4821
|
this.removeAttribute("data-active");
|
|
4815
4822
|
return;
|
|
4816
4823
|
}
|
|
4817
4824
|
let { width: i, height: a, columns: o, rows: s } = r.layout, c = Math.min(this.clientWidth / i, this.clientHeight / a) || 1;
|
|
4818
|
-
g(
|
|
4825
|
+
g(Gu, this).style.width = `${i * c}px`, g(Gu, this).style.height = `${a * c}px`, g(Ku, this).paint({
|
|
4819
4826
|
url: r.url,
|
|
4820
4827
|
size: `${i * o * c}px ${a * s * c}px`,
|
|
4821
4828
|
position: `-${r.x * c}px -${r.y * c}px`
|
|
4822
4829
|
});
|
|
4823
4830
|
}
|
|
4824
4831
|
};
|
|
4825
|
-
e(
|
|
4832
|
+
e(Ju, "observedAttributes", [_.SEEK_PREVIEW]);
|
|
4826
4833
|
//#endregion
|
|
4827
4834
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4828
|
-
var
|
|
4829
|
-
|
|
4835
|
+
var Yu = document.createElement("template");
|
|
4836
|
+
Yu.innerHTML = `
|
|
4830
4837
|
<style>
|
|
4831
4838
|
:host {
|
|
4832
4839
|
display: var(--play-overlay-display);
|
|
@@ -4886,51 +4893,51 @@ Ku.innerHTML = `
|
|
|
4886
4893
|
</slot>
|
|
4887
4894
|
</slot>
|
|
4888
4895
|
`;
|
|
4889
|
-
var
|
|
4896
|
+
var Xu = /* @__PURE__ */ new WeakMap(), Zu = /* @__PURE__ */ new WeakMap(), Qu = /* @__PURE__ */ new WeakMap(), $u = /* @__PURE__ */ new WeakMap(), ed = class extends HTMLElement {
|
|
4890
4897
|
constructor() {
|
|
4891
|
-
super(), p(this,
|
|
4898
|
+
super(), p(this, Xu, null), p(this, Zu, () => {
|
|
4892
4899
|
this.dispatchEvent(new CustomEvent(S.REQUEST_USER_INPUT, {
|
|
4893
4900
|
bubbles: !0,
|
|
4894
4901
|
composed: !0
|
|
4895
4902
|
}));
|
|
4896
|
-
}), p(this,
|
|
4903
|
+
}), p(this, Qu, (e) => {
|
|
4897
4904
|
let { key: t } = e;
|
|
4898
4905
|
if (!this.keysUsed.includes(t)) {
|
|
4899
|
-
this.removeEventListener("keyup", g(
|
|
4906
|
+
this.removeEventListener("keyup", g(Qu, this));
|
|
4900
4907
|
return;
|
|
4901
4908
|
}
|
|
4902
4909
|
this.dispatchEvent(new CustomEvent(S.REQUEST_USER_INPUT, {
|
|
4903
4910
|
bubbles: !0,
|
|
4904
4911
|
composed: !0
|
|
4905
4912
|
}));
|
|
4906
|
-
}), p(this,
|
|
4913
|
+
}), p(this, $u, (e) => {
|
|
4907
4914
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4908
4915
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4909
|
-
this.removeEventListener("keyup", g(
|
|
4916
|
+
this.removeEventListener("keyup", g(Qu, this));
|
|
4910
4917
|
return;
|
|
4911
4918
|
}
|
|
4912
|
-
this.addEventListener("keyup", g(
|
|
4913
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4919
|
+
this.addEventListener("keyup", g(Qu, this), { once: !0 });
|
|
4920
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Yu.content.cloneNode(!0));
|
|
4914
4921
|
}
|
|
4915
4922
|
get keysUsed() {
|
|
4916
4923
|
return ["Enter", " "];
|
|
4917
4924
|
}
|
|
4918
4925
|
connectedCallback() {
|
|
4919
4926
|
var e;
|
|
4920
|
-
m(
|
|
4927
|
+
m(Xu, this, this.closest("vindral-controller")), (e = g(Xu, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4921
4928
|
}
|
|
4922
4929
|
enable() {
|
|
4923
|
-
this.addEventListener("click", g(
|
|
4930
|
+
this.addEventListener("click", g(Zu, this)), this.addEventListener("keydown", g($u, this)), this.tabIndex = 0;
|
|
4924
4931
|
}
|
|
4925
4932
|
disable() {
|
|
4926
|
-
this.removeEventListener("click", g(
|
|
4933
|
+
this.removeEventListener("click", g(Zu, this)), this.removeEventListener("keydown", g($u, this)), this.removeEventListener("keyup", g(Qu, this)), this.tabIndex = -1;
|
|
4927
4934
|
}
|
|
4928
4935
|
disconnectedCallback() {
|
|
4929
4936
|
var e;
|
|
4930
|
-
(e = g(
|
|
4937
|
+
(e = g(Xu, this)) == null || e.disconnectListener(this), this.disable();
|
|
4931
4938
|
}
|
|
4932
4939
|
};
|
|
4933
|
-
e(
|
|
4940
|
+
e(ed, "observedAttributes", [
|
|
4934
4941
|
"hidden",
|
|
4935
4942
|
_.NEEDS_USER_INPUT_VIDEO,
|
|
4936
4943
|
_.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4938,68 +4945,68 @@ e(Zu, "observedAttributes", [
|
|
|
4938
4945
|
]);
|
|
4939
4946
|
//#endregion
|
|
4940
4947
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4941
|
-
var
|
|
4942
|
-
|
|
4943
|
-
var
|
|
4948
|
+
var td = document.createElement("template");
|
|
4949
|
+
td.innerHTML = "\n <style>\n :host {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n pointer-events: none;\n z-index: 1;\n }\n\n :host::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: -1;\n background-color: rgba(0, 0, 0, 0.3);\n background-image: var(--_backdrop-image, none);\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: contain;\n pointer-events: none;\n opacity: 0;\n transition: opacity 100ms;\n }\n\n :host([backdrop]:not([disable-backdrop]))::before {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host::before {\n transition: none;\n }\n }\n </style>\n\n <slot></slot>\n";
|
|
4950
|
+
var nd = class extends HTMLElement {
|
|
4944
4951
|
constructor() {
|
|
4945
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4952
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(td.content.cloneNode(!0));
|
|
4946
4953
|
}
|
|
4947
4954
|
attributeChangedCallback(e, t, n) {
|
|
4948
4955
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4949
4956
|
}
|
|
4950
4957
|
};
|
|
4951
|
-
e(
|
|
4958
|
+
e(nd, "observedAttributes", [
|
|
4952
4959
|
"backdrop",
|
|
4953
4960
|
"poster",
|
|
4954
4961
|
"disable-backdrop"
|
|
4955
4962
|
]);
|
|
4956
4963
|
//#endregion
|
|
4957
4964
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4958
|
-
var
|
|
4959
|
-
|
|
4960
|
-
var
|
|
4965
|
+
var rd = document.createElement("template");
|
|
4966
|
+
rd.innerHTML = "\n <style>\n :host {\n display: flex;\n flex-direction: column;\n align-items: center;\n max-width: 90%;\n color: var(--fg-strong);\n font-size: 20px;\n pointer-events: none;\n opacity: 1;\n transition:\n opacity 100ms,\n display 100ms allow-discrete;\n }\n\n :host([hidden]) {\n display: none;\n opacity: 0;\n }\n\n @starting-style {\n :host(:not([hidden])) {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n }\n\n #title,\n #description {\n text-align: center;\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);\n margin: 0;\n }\n\n #title {\n margin-bottom: var(--padding-2);\n }\n\n @container (max-width: 600px) {\n :host {\n font-size: 15px;\n }\n }\n\n @container (max-width: 400px) {\n :host {\n font-size: 12px;\n }\n #title {\n margin-bottom: 0;\n }\n }\n\n @container (max-width: 150px) {\n :host {\n font-size: 10px;\n }\n #title,\n #description {\n font-size: 1.2em;\n margin: 0;\n }\n }\n </style>\n\n <h1 id=\"title\"></h1>\n <p id=\"description\"></p>\n";
|
|
4967
|
+
var id = /* @__PURE__ */ new WeakMap(), ad = /* @__PURE__ */ new WeakMap(), od = class extends HTMLElement {
|
|
4961
4968
|
constructor() {
|
|
4962
|
-
super(), p(this,
|
|
4969
|
+
super(), p(this, id, void 0), p(this, ad, void 0);
|
|
4963
4970
|
let e = this.attachShadow({ mode: "open" });
|
|
4964
|
-
e.appendChild(
|
|
4971
|
+
e.appendChild(rd.content.cloneNode(!0)), m(id, this, e.querySelector("#title")), m(ad, this, e.querySelector("#description"));
|
|
4965
4972
|
}
|
|
4966
4973
|
connectedCallback() {
|
|
4967
4974
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4968
4975
|
}
|
|
4969
4976
|
attributeChangedCallback(e, t, n) {
|
|
4970
|
-
t !== n && (e === "title" ? g(
|
|
4977
|
+
t !== n && (e === "title" ? g(id, this).textContent = n : e === "description" && (g(ad, this).textContent = n));
|
|
4971
4978
|
}
|
|
4972
4979
|
};
|
|
4973
|
-
e(
|
|
4980
|
+
e(od, "observedAttributes", [
|
|
4974
4981
|
"title",
|
|
4975
4982
|
"description",
|
|
4976
4983
|
"hidden"
|
|
4977
4984
|
]);
|
|
4978
4985
|
//#endregion
|
|
4979
4986
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4980
|
-
var
|
|
4981
|
-
|
|
4982
|
-
var
|
|
4987
|
+
var sd = document.createElement("template");
|
|
4988
|
+
sd.innerHTML = "\n <style>\n :host {\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n opacity: 1;\n transition:\n opacity 100ms,\n display 100ms allow-discrete;\n }\n\n :host([hidden]) {\n display: none;\n opacity: 0;\n }\n\n @starting-style {\n :host(:not([hidden])) {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n }\n\n :host(:focus-visible) {\n outline: none;\n outline: 0;\n }\n\n :host(:focus-visible) svg {\n outline: 0;\n }\n\n :host(:where(:focus)) svg {\n box-shadow: none;\n outline: 0;\n }\n\n :host(:active) svg {\n scale: 0.9;\n }\n\n slot#play {\n color: var(--fg-strong);\n pointer-events: auto;\n cursor: pointer;\n }\n\n slot#play > svg {\n width: var(--play-overlay-icon-size);\n height: var(--play-overlay-icon-size);\n }\n </style>\n\n <slot id=\"play\" name=\"icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z\" /></svg>\n</slot>\n";
|
|
4989
|
+
var cd = /* @__PURE__ */ new WeakMap(), ld = class extends HTMLElement {
|
|
4983
4990
|
constructor() {
|
|
4984
|
-
super(), p(this,
|
|
4991
|
+
super(), p(this, cd, null), this.attachShadow({ mode: "open" }).appendChild(sd.content.cloneNode(!0));
|
|
4985
4992
|
}
|
|
4986
4993
|
connectedCallback() {
|
|
4987
4994
|
var e;
|
|
4988
|
-
m(
|
|
4995
|
+
m(cd, this, this.closest("vindral-controller")), (e = g(cd, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
4989
4996
|
}
|
|
4990
4997
|
disconnectedCallback() {
|
|
4991
4998
|
var e;
|
|
4992
|
-
(e = g(
|
|
4999
|
+
(e = g(cd, this)) == null || e.disconnectListener(this);
|
|
4993
5000
|
}
|
|
4994
5001
|
attributeChangedCallback(e, t, n) {
|
|
4995
5002
|
t !== n && e === "hidden" && !v(n) && this.focus();
|
|
4996
5003
|
}
|
|
4997
5004
|
};
|
|
4998
|
-
e(
|
|
5005
|
+
e(ld, "observedAttributes", ["hidden"]);
|
|
4999
5006
|
//#endregion
|
|
5000
5007
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
5001
|
-
var
|
|
5002
|
-
|
|
5008
|
+
var ud, dd = "Volume", fd = document.createElement("template");
|
|
5009
|
+
fd.innerHTML = `
|
|
5003
5010
|
<style>
|
|
5004
5011
|
:host {
|
|
5005
5012
|
display: var(--volume-range-display);
|
|
@@ -5024,29 +5031,29 @@ ld.innerHTML = `
|
|
|
5024
5031
|
transition-delay: 0s;
|
|
5025
5032
|
}
|
|
5026
5033
|
</style>
|
|
5027
|
-
<span class="tooltip" aria-hidden="true">${
|
|
5034
|
+
<span class="tooltip" aria-hidden="true">${dd}</span>
|
|
5028
5035
|
`;
|
|
5029
|
-
var
|
|
5036
|
+
var pd = (e) => `${Math.round(e * 100)}%`, md = /* @__PURE__ */ new WeakMap(), hd = /* @__PURE__ */ new WeakMap(), gd = /* @__PURE__ */ new WeakMap(), _d = class extends Ei {
|
|
5030
5037
|
constructor() {
|
|
5031
5038
|
var e, t;
|
|
5032
|
-
super(), p(this,
|
|
5039
|
+
super(), p(this, md, void 0), p(this, hd, void 0), p(this, gd, () => {
|
|
5033
5040
|
let e = this.range.valueAsNumber;
|
|
5034
5041
|
this.dispatchEvent(new CustomEvent(S.SET_VOLUME, {
|
|
5035
5042
|
bubbles: !0,
|
|
5036
5043
|
composed: !0,
|
|
5037
5044
|
detail: e
|
|
5038
5045
|
}));
|
|
5039
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
5046
|
+
}), (e = this.shadowRoot) == null || e.appendChild(fd.content.cloneNode(!0)), m(md, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector(".tooltip"));
|
|
5040
5047
|
}
|
|
5041
5048
|
connectedCallback() {
|
|
5042
|
-
super.connectedCallback(), this.range.addEventListener("input", g(
|
|
5049
|
+
super.connectedCallback(), this.range.addEventListener("input", g(gd, this)), this.range.setAttribute("aria-label", dd), m(hd, this, Ee(this, g(md, this)));
|
|
5043
5050
|
}
|
|
5044
5051
|
disconnectedCallback() {
|
|
5045
5052
|
var e;
|
|
5046
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", g(
|
|
5053
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", g(gd, this)), (e = g(hd, this)) == null || e.call(this);
|
|
5047
5054
|
}
|
|
5048
5055
|
attributeChangedCallback(e, t, n) {
|
|
5049
|
-
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
5056
|
+
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", pd(this.range.valueAsNumber)), this.updateBar());
|
|
5050
5057
|
}
|
|
5051
5058
|
get volume() {
|
|
5052
5059
|
var e;
|
|
@@ -5056,15 +5063,15 @@ var ud = (e) => `${Math.round(e * 100)}%`, dd = /* @__PURE__ */ new WeakMap(), f
|
|
|
5056
5063
|
return this.hasAttribute(_.MUTED);
|
|
5057
5064
|
}
|
|
5058
5065
|
};
|
|
5059
|
-
|
|
5060
|
-
...b(
|
|
5066
|
+
ud = _d, e(_d, "observedAttributes", [
|
|
5067
|
+
...b(ud, "observedAttributes", ud),
|
|
5061
5068
|
_.MUTED,
|
|
5062
5069
|
_.VOLUME
|
|
5063
5070
|
]);
|
|
5064
5071
|
//#endregion
|
|
5065
5072
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
5066
|
-
function
|
|
5067
|
-
customElements.define("vindral-controller",
|
|
5073
|
+
function vd() {
|
|
5074
|
+
customElements.define("vindral-controller", Fa), customElements.define("vindral-control-bar", Hn), customElements.define("vindral-advanced-rendition-menu", Je), customElements.define("vindral-advanced-rendition-menu-list", st), customElements.define("vindral-play-button", ys), customElements.define("vindral-mute-button", ps), customElements.define("vindral-buffering-overlay", Pt), customElements.define("vindral-seek-preview-overlay", Ju), customElements.define("vindral-scroll-overlay", $c), customElements.define("vindral-play-overlay", ld), customElements.define("vindral-user-input-play-overlay", ed), customElements.define("vindral-fullscreen-button", Oo), customElements.define("vindral-rendition-levels-menu", Tc), customElements.define("vindral-rendition-levels-menu-list", Pc), customElements.define("vindral-channel-grid-button", Fn), customElements.define("vindral-channel-grid", on), customElements.define("vindral-channel-grid-item", Jt), customElements.define("vindral-pip-button", gs), customElements.define("vindral-airplay-button", Dt), customElements.define("vindral-cast-button", Rt), customElements.define("vindral-cast-overlay", Wt), customElements.define("vindral-buffering-icon", jt), customElements.define("vindral-language-menu", No), customElements.define("vindral-language-menu-list", Jo), customElements.define("vindral-center-overlay", nd), customElements.define("vindral-message", od), customElements.define("vindral-volume-range", _d), customElements.define("vindral-poster-overlay", _c), customElements.define("vindral-player", ec), customElements.define("vindral-seek-bar", gu), customElements.define("vindral-live-button", us);
|
|
5068
5075
|
}
|
|
5069
5076
|
//#endregion
|
|
5070
|
-
export {
|
|
5077
|
+
export { vd as t };
|