@vindral/web-sdk 4.8.1 → 4.8.2-1-gaf59eb9e
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/{BaDhuUsA.js → Bg5VLlmK.js} +13 -4
- package/{ClhqVgMJ.js → Bo90C4i_.js} +1073 -1033
- package/{DQ5kuB8C.js → CLvW8aae.js} +1 -1
- package/{ZUbKTiOB.js → DyoeX7Rz.js} +211 -212
- package/{DlCbtbuA.js → UL5Z8kzc.js} +2689 -2642
- package/cast-sender.d.ts +8 -2
- package/cast-sender.js +1 -1
- package/core.d.ts +9 -2
- package/core.js +1 -1
- package/legacy.d.ts +9 -2
- package/legacy.es.js +2813 -2757
- package/legacy.umd.js +16 -16
- package/package.json +1 -1
- package/player.d.ts +9 -2
- package/player.js +3 -3
- package/react.d.ts +9 -2
- package/vindral-player-component.js +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
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 "./UL5Z8kzc.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";
|
|
6
|
-
import { n as de, r as fe } from "./
|
|
6
|
+
import { n as de, r as fe } from "./Bg5VLlmK.js";
|
|
7
7
|
import { C as pe, S as me, _ as he, a as ge, b as _, c as v, d as _e, f as ve, g as ye, h as be, i as y, l as xe, m as Se, n as Ce, o as we, p as Te, r as b, s as Ee, t as De, u as x, v as Oe, x as ke, y as S } from "./CoLAnqGB.js";
|
|
8
8
|
import { t as C } from "./Tj9xPXja.js";
|
|
9
|
-
import { t as Ae } from "./
|
|
9
|
+
import { t as Ae } from "./CLvW8aae.js";
|
|
10
10
|
//#region ../../libs/utils/src/mediaMetadata.ts
|
|
11
11
|
var je = ({ title: e, subTitle: t = "Live stream", poster: n }) => {
|
|
12
12
|
if (document.title = e, "mediaSession" in navigator) try {
|
|
@@ -714,38 +714,41 @@ e(Jt, "observedAttributes", [
|
|
|
714
714
|
]);
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region ../../libs/player-next/src/components/ChannelGrid.ts
|
|
717
|
-
var Yt = document.createElement("template");
|
|
718
|
-
|
|
719
|
-
var
|
|
717
|
+
var Yt, Xt = document.createElement("template");
|
|
718
|
+
Xt.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";
|
|
719
|
+
var Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), an = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), cn = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), ln = class extends HTMLElement {
|
|
720
720
|
constructor() {
|
|
721
|
-
super(), C(this,
|
|
721
|
+
super(), C(this, D), p(this, Zt, null), p(this, Qt, null), p(this, $t, []), p(this, en, []), p(this, E, void 0), p(this, tn, void 0), p(this, nn, void 0), p(this, rn, void 0), p(this, an, !1), p(this, on, !1), p(this, sn, void 0), p(this, cn, void 0), e(this, "handleEvent", (e) => {
|
|
722
722
|
switch (e.type) {
|
|
723
723
|
case "keydown":
|
|
724
|
-
h(
|
|
724
|
+
h(D, this, Sn).call(this, e);
|
|
725
725
|
break;
|
|
726
726
|
}
|
|
727
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
727
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Xt.content.cloneNode(!0));
|
|
728
728
|
}
|
|
729
729
|
connectedCallback() {
|
|
730
730
|
var e, t, n;
|
|
731
|
-
m(
|
|
732
|
-
h(
|
|
731
|
+
this.tabIndex = -1, m(Qt, this, this.closest("vindral-controller")), (e = g(Qt, this)) == null || e.connectListener(this), h(D, this, un).call(this), (t = g(Zt, this)) == null || t.observe((n = this.shadowRoot) == null ? void 0 : n.querySelector(".wrapper")), h(D, this, gn).call(this), m(nn, this, window.setInterval(() => {
|
|
732
|
+
h(D, this, bn).call(this);
|
|
733
733
|
}, 1e4));
|
|
734
734
|
}
|
|
735
735
|
disconnectedCallback() {
|
|
736
736
|
var e, t;
|
|
737
|
-
clearInterval(g(
|
|
737
|
+
clearInterval(g(nn, this)), h(D, this, An).call(this), this.removeEventListener("keydown", this), (e = g(Zt, this)) == null || e.disconnect(), (t = g(Qt, this)) == null || t.disconnectListener(this);
|
|
738
738
|
}
|
|
739
739
|
attributeChangedCallback(e, t, n) {
|
|
740
740
|
if (t !== n) switch (e) {
|
|
741
741
|
case _.CHANNEL_ID:
|
|
742
|
-
h(
|
|
742
|
+
h(D, this, yn).call(this, n);
|
|
743
743
|
break;
|
|
744
744
|
case _.CHANNELS:
|
|
745
|
-
m(
|
|
745
|
+
m($t, this, JSON.parse(n)), h(D, this, gn).call(this);
|
|
746
746
|
break;
|
|
747
747
|
case "authentication-token":
|
|
748
|
-
m(
|
|
748
|
+
m(tn, this, n);
|
|
749
|
+
break;
|
|
750
|
+
case "hidden":
|
|
751
|
+
n === null && m(on, this, !0);
|
|
749
752
|
break;
|
|
750
753
|
}
|
|
751
754
|
}
|
|
@@ -764,168 +767,195 @@ var Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt =
|
|
|
764
767
|
];
|
|
765
768
|
}
|
|
766
769
|
focus() {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
t && t !== this && !this.contains(t) && m(tn, this, t), (e = g(D, this)) == null || e.focus();
|
|
770
|
+
let e = Gt();
|
|
771
|
+
e && e !== document.body && !this.matches(":focus-within") && m(rn, this, e), h(D, this, En).call(this);
|
|
770
772
|
}
|
|
771
773
|
};
|
|
772
|
-
|
|
773
|
-
|
|
774
|
+
Yt = ln;
|
|
775
|
+
function un() {
|
|
776
|
+
m(Zt, this, new IntersectionObserver((e) => {
|
|
774
777
|
e.forEach((e) => {
|
|
775
778
|
let { target: t, isIntersecting: n } = e;
|
|
776
|
-
t instanceof Jt ? h(
|
|
779
|
+
t instanceof Jt ? h(D, this, hn).call(this, t, n) : h(D, this, dn).call(this, n);
|
|
777
780
|
});
|
|
778
|
-
}, { root: g(
|
|
781
|
+
}, { root: g(Qt, this) }));
|
|
779
782
|
}
|
|
780
|
-
function
|
|
781
|
-
e ? h(
|
|
783
|
+
function dn(e) {
|
|
784
|
+
e ? h(D, this, fn).call(this) : h(D, this, pn).call(this), m(on, this, !1);
|
|
782
785
|
}
|
|
783
|
-
function
|
|
784
|
-
m(
|
|
786
|
+
function fn() {
|
|
787
|
+
m(an, this, !0), this.dispatchEvent(new CustomEvent(S.CHANNEL_GRID_OPENED, {
|
|
785
788
|
bubbles: !0,
|
|
786
789
|
composed: !0
|
|
787
|
-
})), h(
|
|
790
|
+
})), h(D, this, mn).call(this, h(D, this, On).call(this, this.parentElement) || g(on, this)), this.addEventListener("keydown", this), g(E, this) && (g(E, this).tabIndex = 0);
|
|
788
791
|
}
|
|
789
|
-
function
|
|
790
|
-
h(
|
|
792
|
+
function pn() {
|
|
793
|
+
h(D, this, An).call(this), g(E, this) && (g(E, this).tabIndex = -1), this.dispatchEvent(new CustomEvent(S.CHANNEL_GRID_CLOSED, {
|
|
791
794
|
bubbles: !0,
|
|
792
795
|
composed: !0
|
|
793
|
-
})), g(
|
|
796
|
+
})), g(an, this) && h(D, this, Dn).call(this), m(an, this, !1), this.removeEventListener("keydown", this);
|
|
794
797
|
}
|
|
795
|
-
function
|
|
796
|
-
var
|
|
797
|
-
h(
|
|
798
|
-
clearTimeout(g(
|
|
799
|
-
h(
|
|
798
|
+
function mn(e) {
|
|
799
|
+
var t;
|
|
800
|
+
h(D, this, An).call(this), m(cn, this, () => {
|
|
801
|
+
clearTimeout(g(sn, this)), m(sn, this, window.setTimeout(() => {
|
|
802
|
+
h(D, this, kn).call(this) && this.focus(), h(D, this, An).call(this);
|
|
800
803
|
}, 100));
|
|
801
|
-
}), (
|
|
804
|
+
}), (t = this.parentElement) == null || t.addEventListener("scroll", g(cn, this)), e && g(cn, this).call(this);
|
|
802
805
|
}
|
|
803
|
-
function
|
|
806
|
+
function hn(e, t) {
|
|
804
807
|
t ? (e.setAttribute("visible", ""), (!e.lastThumbnailUpdate || Date.now() - e.lastThumbnailUpdate >= 1e4) && (e.updateThumbnail(), e.lastThumbnailUpdate = Date.now())) : e.removeAttribute("visible");
|
|
805
808
|
}
|
|
806
|
-
function
|
|
809
|
+
function gn() {
|
|
807
810
|
var e;
|
|
808
|
-
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"),
|
|
809
|
-
m(
|
|
810
|
-
var
|
|
811
|
-
let a =
|
|
812
|
-
if (a) return h(
|
|
813
|
-
let o = h(
|
|
814
|
-
return (
|
|
815
|
-
})),
|
|
816
|
-
if (!g(
|
|
811
|
+
let t = this.matches(":focus-within") ? Gt() : null, n = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"), r = new Map(g(en, this).map((e) => [e.id, e])), i = this.getAttribute("channel-id");
|
|
812
|
+
m(en, this, g($t, this).map((e) => {
|
|
813
|
+
var t;
|
|
814
|
+
let a = r.get(e.channelId);
|
|
815
|
+
if (a) return h(D, this, _n).call(this, a.element, e), a;
|
|
816
|
+
let o = h(D, this, vn).call(this, e, i);
|
|
817
|
+
return (t = g(Zt, this)) == null || t.observe(o.element), n.contains(o.element) || n.appendChild(o.element), o;
|
|
818
|
+
})), r.forEach((e, t) => {
|
|
819
|
+
if (!g($t, this).some((e) => e.channelId === t)) {
|
|
817
820
|
var n;
|
|
818
|
-
(n = g(
|
|
821
|
+
(n = g(Zt, this)) == null || n.unobserve(e.element), e.element.remove();
|
|
819
822
|
}
|
|
820
|
-
}), g(
|
|
821
|
-
|
|
822
|
-
});
|
|
823
|
+
}), g(en, this).sort((e, t) => e.element.hasAttribute("offline") && !t.element.hasAttribute("offline") ? 1 : -1).forEach((e) => {
|
|
824
|
+
n.contains(e.element) || n.appendChild(e.element);
|
|
825
|
+
}), t && h(D, this, kn).call(this) && (m(E, this, t instanceof Jt ? t : void 0), h(D, this, En).call(this));
|
|
823
826
|
}
|
|
824
|
-
function
|
|
827
|
+
function _n(e, t) {
|
|
825
828
|
t.isLive ? e.removeAttribute("offline") : e.setAttribute("offline", ""), e.setAttribute("url", t.thumbnailUrls[0] || ""), e.setAttribute("title", t.name);
|
|
826
829
|
}
|
|
827
|
-
function
|
|
830
|
+
function vn(e, t) {
|
|
828
831
|
let n = document.createElement("vindral-channel-grid-item");
|
|
829
|
-
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), g(
|
|
832
|
+
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), g(tn, this) && n.setAttribute("authentication-token", g(tn, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), m(E, this, n)), n.tabIndex = -1, n.onclick = () => h(D, this, xn).call(this, e), {
|
|
830
833
|
element: n,
|
|
831
834
|
thumbnail: e.thumbnailUrls[0] || "",
|
|
832
835
|
id: e.channelId
|
|
833
836
|
};
|
|
834
837
|
}
|
|
835
|
-
function
|
|
836
|
-
g(
|
|
837
|
-
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, m(
|
|
838
|
+
function yn(e) {
|
|
839
|
+
g(en, this).forEach((t) => {
|
|
840
|
+
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, m(E, this, t.element)) : (t.element.tabIndex = -1, t.element.setAttribute("aria-selected", "false"));
|
|
838
841
|
});
|
|
839
842
|
}
|
|
840
|
-
function
|
|
841
|
-
this.hasAttribute("hidden") || g(
|
|
843
|
+
function bn() {
|
|
844
|
+
this.hasAttribute("hidden") || g(en, this).forEach((e) => e.element.updateThumbnail());
|
|
842
845
|
}
|
|
843
|
-
function
|
|
846
|
+
function xn(e) {
|
|
844
847
|
var t;
|
|
845
|
-
h(
|
|
848
|
+
h(D, this, Mn).call(this), (t = g(Qt, this)) == null || t.setAttribute("channel-id", e.channelId);
|
|
846
849
|
}
|
|
847
|
-
function
|
|
850
|
+
function Sn(e) {
|
|
848
851
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
849
|
-
if (!(n || r || i) && this.keysUsed.includes(t))
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
852
|
+
if (!(n || r || i) && this.keysUsed.includes(t)) {
|
|
853
|
+
if ((t === "Tab" || t === "Escape") && !h(D, this, jn).call(this)) {
|
|
854
|
+
h(D, this, An).call(this);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") h(D, this, Mn).call(this);
|
|
858
|
+
else if (t === "Enter" || t === " ") {
|
|
859
|
+
var a;
|
|
860
|
+
(a = g(E, this)) == null || a.click();
|
|
861
|
+
} else h(D, this, wn).call(this, e);
|
|
862
|
+
}
|
|
854
863
|
}
|
|
855
|
-
function
|
|
856
|
-
|
|
857
|
-
let
|
|
864
|
+
function Cn() {
|
|
865
|
+
var e, t;
|
|
866
|
+
let n = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]");
|
|
867
|
+
return Array.from((t = n == null ? void 0 : n.children) == null ? [] : t).flatMap((e) => {
|
|
868
|
+
let t = g(en, this).find((t) => t.element === e);
|
|
869
|
+
return !t || e.hasAttribute("offline") || e.getBoundingClientRect().width <= 0 ? [] : [t];
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
function wn(e) {
|
|
873
|
+
let { key: t } = e;
|
|
874
|
+
if (!g(E, this)) {
|
|
875
|
+
t === "ArrowUp" && h(D, this, Mn).call(this);
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
let n = h(D, this, Cn).call(this), r = n.findIndex((e) => e.element === g(E, this)), i = g(E, this).getBoundingClientRect();
|
|
858
879
|
switch (t) {
|
|
859
880
|
case "ArrowUp":
|
|
860
|
-
if (
|
|
861
|
-
h(
|
|
881
|
+
if (r = h(D, this, Tn).call(this, n, i, -1, 0), r < 0) {
|
|
882
|
+
h(D, this, Mn).call(this);
|
|
862
883
|
return;
|
|
863
884
|
}
|
|
864
885
|
break;
|
|
865
886
|
case "ArrowDown":
|
|
866
|
-
|
|
887
|
+
r = h(D, this, Tn).call(this, n, i, 1, 0);
|
|
867
888
|
break;
|
|
868
889
|
case "ArrowLeft":
|
|
869
|
-
|
|
890
|
+
r = h(D, this, Tn).call(this, n, i, 0, -1);
|
|
870
891
|
break;
|
|
871
892
|
case "ArrowRight":
|
|
872
|
-
|
|
893
|
+
r = h(D, this, Tn).call(this, n, i, 0, 1);
|
|
873
894
|
break;
|
|
874
895
|
case "Home":
|
|
875
|
-
|
|
896
|
+
r = 0;
|
|
876
897
|
break;
|
|
877
898
|
case "End":
|
|
878
|
-
|
|
899
|
+
r = n.length - 1;
|
|
879
900
|
break;
|
|
880
901
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
if (!e) return;
|
|
884
|
-
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();
|
|
885
|
-
}
|
|
902
|
+
let a = n[r];
|
|
903
|
+
a && (m(E, this, a.element), h(D, this, En).call(this));
|
|
886
904
|
}
|
|
887
|
-
function
|
|
888
|
-
let
|
|
889
|
-
return
|
|
890
|
-
let s =
|
|
905
|
+
function Tn(e, t, n, r) {
|
|
906
|
+
let i = -1, a = Infinity;
|
|
907
|
+
return e.forEach((e, o) => {
|
|
908
|
+
let s = e.element.getBoundingClientRect(), c = n === 0 || n < 0 && s.top < t.top || n > 0 && s.top > t.top, l = r === 0 || r < 0 && s.left < t.left || r > 0 && s.left > t.left;
|
|
891
909
|
if (c && l) {
|
|
892
|
-
let
|
|
893
|
-
|
|
910
|
+
let e = Math.sqrt((s.top - t.top) ** 2 + (s.left - t.left) ** 2);
|
|
911
|
+
e < a && (a = e, i = o);
|
|
894
912
|
}
|
|
895
|
-
}),
|
|
913
|
+
}), i;
|
|
896
914
|
}
|
|
897
|
-
function
|
|
915
|
+
function En() {
|
|
916
|
+
var e, t, n;
|
|
917
|
+
let r = h(D, this, Cn).call(this);
|
|
918
|
+
m(E, this, (e = (t = (n = r.find((e) => e.element === g(E, this))) == null ? r.find((e) => e.id === this.getAttribute("channel-id")) : n) == null ? r[0] : t) == null ? void 0 : e.element), g(en, this).forEach(({ element: e }) => {
|
|
919
|
+
let t = e === g(E, this);
|
|
920
|
+
e.setAttribute("aria-selected", String(t)), e.tabIndex = g(an, this) && t ? 0 : -1;
|
|
921
|
+
}), g(E, this) ? g(E, this).focus() : b(Yt.prototype, "focus", this, 2)([{ preventScroll: !0 }]);
|
|
922
|
+
}
|
|
923
|
+
function Dn() {
|
|
898
924
|
var e, t;
|
|
899
925
|
if (!(document.activeElement !== document.body && !this.matches(":focus-within"))) {
|
|
900
|
-
if ((e = g(
|
|
901
|
-
g(
|
|
926
|
+
if ((e = g(rn, this)) != null && e.isConnected) {
|
|
927
|
+
g(rn, this).focus({ preventScroll: !0 });
|
|
902
928
|
return;
|
|
903
929
|
}
|
|
904
|
-
(t = g(
|
|
930
|
+
(t = g(Qt, this)) == null || t.focus({ preventScroll: !0 });
|
|
905
931
|
}
|
|
906
932
|
}
|
|
907
|
-
function
|
|
933
|
+
function On(e) {
|
|
908
934
|
return (e == null ? void 0 : e.localName) === "vindral-scroll-overlay";
|
|
909
935
|
}
|
|
910
|
-
function
|
|
936
|
+
function kn() {
|
|
911
937
|
let e = this.parentElement;
|
|
912
|
-
return e ? h(
|
|
938
|
+
return e ? h(D, this, On).call(this, e) ? e.hasAttribute("open") : !this.hasAttribute("hidden") : !1;
|
|
913
939
|
}
|
|
914
|
-
function
|
|
915
|
-
if (g(
|
|
940
|
+
function An() {
|
|
941
|
+
if (g(sn, this) && (clearTimeout(g(sn, this)), m(sn, this, void 0)), g(cn, this)) {
|
|
916
942
|
var e;
|
|
917
|
-
(e = this.parentElement) == null || e.removeEventListener("scroll", g(
|
|
943
|
+
(e = this.parentElement) == null || e.removeEventListener("scroll", g(cn, this)), m(cn, this, void 0);
|
|
918
944
|
}
|
|
919
945
|
}
|
|
920
|
-
function
|
|
946
|
+
function jn() {
|
|
921
947
|
let e = this.parentElement;
|
|
922
|
-
|
|
948
|
+
return h(D, this, On).call(this, e) || (e == null ? void 0 : e.hasAttribute("open")) === !0;
|
|
949
|
+
}
|
|
950
|
+
function Mn() {
|
|
951
|
+
let e = this.parentElement;
|
|
952
|
+
if (h(D, this, On).call(this, e)) {
|
|
923
953
|
e.open = !1;
|
|
924
954
|
return;
|
|
925
955
|
}
|
|
926
956
|
e == null || e.removeAttribute("open");
|
|
927
957
|
}
|
|
928
|
-
e(
|
|
958
|
+
e(ln, "observedAttributes", [
|
|
929
959
|
_.CHANNELS,
|
|
930
960
|
_.CHANNEL_ID,
|
|
931
961
|
_.AUTHENTICATION_TOKEN,
|
|
@@ -934,8 +964,8 @@ e(on, "observedAttributes", [
|
|
|
934
964
|
]);
|
|
935
965
|
//#endregion
|
|
936
966
|
//#region ../../libs/player-next/src/components/ChannelGridButton.ts
|
|
937
|
-
var
|
|
938
|
-
|
|
967
|
+
var Nn, Pn = "\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", Fn = document.createElement("template");
|
|
968
|
+
Fn.innerHTML = `
|
|
939
969
|
<style>
|
|
940
970
|
:host {
|
|
941
971
|
display: var(--grid-button-display);
|
|
@@ -948,88 +978,88 @@ kn.innerHTML = `
|
|
|
948
978
|
display: none;
|
|
949
979
|
}
|
|
950
980
|
</style>
|
|
951
|
-
<slot name="button">${
|
|
981
|
+
<slot name="button">${Pn}</slot>
|
|
952
982
|
`;
|
|
953
|
-
var
|
|
983
|
+
var O = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), Ln = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), Rn = /* @__PURE__ */ new WeakMap(), zn = /* @__PURE__ */ new WeakMap(), Bn = class extends y {
|
|
954
984
|
constructor() {
|
|
955
985
|
var e;
|
|
956
|
-
super(), C(this,
|
|
957
|
-
e.composedPath().includes(this) || h(
|
|
958
|
-
}), p(this,
|
|
986
|
+
super(), C(this, k), p(this, O, void 0), p(this, In, void 0), p(this, Ln, (e) => {
|
|
987
|
+
e.composedPath().includes(this) || h(k, this, Un).call(this);
|
|
988
|
+
}), p(this, Rn, () => h(k, this, Gn).call(this, !0)), p(this, zn, () => h(k, this, Gn).call(this, !1)), (e = this.shadowRoot) == null || e.appendChild(Fn.content.cloneNode(!0));
|
|
959
989
|
}
|
|
960
990
|
connectedCallback() {
|
|
961
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), h(
|
|
991
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), h(k, this, Wn).call(this);
|
|
962
992
|
let e = this.getRootNode();
|
|
963
993
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
964
994
|
var t;
|
|
965
|
-
m(
|
|
995
|
+
m(O, this, e.querySelector("vindral-channel-grid")), ((t = g(O, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (g(O, this).hidden = !1, g(O, this).style.position = "relative", m(In, this, g(O, this).parentElement)), g(O, this).addEventListener(S.CHANNEL_GRID_OPENED, g(Rn, this)), g(O, this).addEventListener(S.CHANNEL_GRID_CLOSED, g(zn, this));
|
|
966
996
|
}
|
|
967
|
-
h(
|
|
997
|
+
h(k, this, Gn).call(this);
|
|
968
998
|
}
|
|
969
999
|
disconnectedCallback() {
|
|
970
1000
|
var e, t;
|
|
971
|
-
super.disconnectedCallback(), (e = g(
|
|
1001
|
+
super.disconnectedCallback(), (e = g(O, this)) == null || e.removeEventListener(S.CHANNEL_GRID_OPENED, g(Rn, this)), (t = g(O, this)) == null || t.removeEventListener(S.CHANNEL_GRID_CLOSED, g(zn, this));
|
|
972
1002
|
}
|
|
973
1003
|
attributeChangedCallback(e, t, n) {
|
|
974
|
-
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && h(
|
|
1004
|
+
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && h(k, this, Wn).call(this);
|
|
975
1005
|
}
|
|
976
1006
|
enable() {
|
|
977
|
-
super.enable(), document.addEventListener("click", g(
|
|
1007
|
+
super.enable(), document.addEventListener("click", g(Ln, this));
|
|
978
1008
|
}
|
|
979
1009
|
handleClick(e) {
|
|
980
|
-
h(
|
|
1010
|
+
h(k, this, Vn).call(this);
|
|
981
1011
|
}
|
|
982
1012
|
get isOpen() {
|
|
983
1013
|
var e;
|
|
984
|
-
return g(
|
|
1014
|
+
return g(In, this) ? g(In, this).hasAttribute("open") : !((e = g(O, this)) != null && e.hidden);
|
|
985
1015
|
}
|
|
986
1016
|
};
|
|
987
|
-
|
|
988
|
-
function
|
|
989
|
-
this.getAttribute("aria-expanded") === "true" ? h(
|
|
1017
|
+
Nn = Bn;
|
|
1018
|
+
function Vn() {
|
|
1019
|
+
this.getAttribute("aria-expanded") === "true" ? h(k, this, Un).call(this) : h(k, this, Hn).call(this), h(k, this, Gn).call(this);
|
|
990
1020
|
}
|
|
991
|
-
function
|
|
992
|
-
if (g(
|
|
1021
|
+
function Hn() {
|
|
1022
|
+
if (g(In, this)) g(In, this).setAttribute("open", "");
|
|
993
1023
|
else {
|
|
994
1024
|
var e;
|
|
995
|
-
if (!((e = g(
|
|
996
|
-
g(
|
|
1025
|
+
if (!((e = g(O, this)) != null && e.hidden)) return;
|
|
1026
|
+
g(O, this).hidden = !1, g(O, this).focus();
|
|
997
1027
|
}
|
|
998
1028
|
}
|
|
999
|
-
function
|
|
1000
|
-
if (g(
|
|
1029
|
+
function Un() {
|
|
1030
|
+
if (g(In, this)) g(In, this).open = !1;
|
|
1001
1031
|
else {
|
|
1002
|
-
if (!g(
|
|
1003
|
-
g(
|
|
1032
|
+
if (!g(O, this) || g(O, this).hidden) return;
|
|
1033
|
+
g(O, this).hidden = !0;
|
|
1004
1034
|
}
|
|
1005
1035
|
}
|
|
1006
|
-
function
|
|
1036
|
+
function Wn() {
|
|
1007
1037
|
this.getAttribute(_.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(_.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1008
1038
|
}
|
|
1009
|
-
function
|
|
1039
|
+
function Gn(e = this.isOpen) {
|
|
1010
1040
|
this.setAttribute("aria-expanded", String(e)), this.setAttribute("aria-label", e ? "Close channels" : "Channels");
|
|
1011
1041
|
}
|
|
1012
|
-
e(
|
|
1013
|
-
...b(
|
|
1042
|
+
e(Bn, "observedAttributes", [
|
|
1043
|
+
...b(Nn, "observedAttributes", Nn),
|
|
1014
1044
|
_.CHANNEL_GROUP_ID,
|
|
1015
1045
|
_.CHANNELS,
|
|
1016
1046
|
"hidden"
|
|
1017
1047
|
]);
|
|
1018
1048
|
//#endregion
|
|
1019
1049
|
//#region ../../libs/player-next/src/components/ControlBar.ts
|
|
1020
|
-
var
|
|
1021
|
-
|
|
1022
|
-
var
|
|
1050
|
+
var Kn = document.createElement("template");
|
|
1051
|
+
Kn.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";
|
|
1052
|
+
var qn = class extends HTMLElement {
|
|
1023
1053
|
constructor() {
|
|
1024
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1054
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Kn.content.cloneNode(!0));
|
|
1025
1055
|
}
|
|
1026
1056
|
connectedCallback() {}
|
|
1027
1057
|
disconnectedCallback() {}
|
|
1028
1058
|
};
|
|
1029
|
-
e(
|
|
1059
|
+
e(qn, "observedAttributes", []);
|
|
1030
1060
|
//#endregion
|
|
1031
1061
|
//#region ../../libs/airplay-sender/src/AirPlaySender.ts
|
|
1032
|
-
var
|
|
1062
|
+
var Jn = class extends fe {
|
|
1033
1063
|
constructor(t) {
|
|
1034
1064
|
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) => {
|
|
1035
1065
|
this.config.authenticationToken = e, this.hlsUrl = this.getHlsUrl(), this.castingAvailable && (this.element.src = this.hlsUrl);
|
|
@@ -1076,46 +1106,46 @@ var Un = class extends fe {
|
|
|
1076
1106
|
}
|
|
1077
1107
|
})();
|
|
1078
1108
|
}
|
|
1079
|
-
},
|
|
1080
|
-
function
|
|
1109
|
+
}, Yn = 28, Xn = ["::cue", "::-webkit-media-text-track-display"];
|
|
1110
|
+
function Zn(e) {
|
|
1081
1111
|
let t = e.styleSheets[0];
|
|
1082
1112
|
if (!t) return [];
|
|
1083
1113
|
try {
|
|
1084
|
-
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule &&
|
|
1114
|
+
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule && Xn.some((t) => e.selectorText.endsWith(t)));
|
|
1085
1115
|
} catch (e) {
|
|
1086
1116
|
return [];
|
|
1087
1117
|
}
|
|
1088
1118
|
}
|
|
1089
|
-
var
|
|
1119
|
+
var Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), or = class {
|
|
1090
1120
|
constructor(t) {
|
|
1091
|
-
p(this,
|
|
1092
|
-
g(
|
|
1093
|
-
}), p(this,
|
|
1121
|
+
p(this, Qn, void 0), p(this, $n, null), p(this, er, null), p(this, tr, null), p(this, nr, !0), e(this, "observe", (e) => {
|
|
1122
|
+
g(tr, this) || (m(tr, this, e), e.addEventListener("webkitpresentationmodechanged", g(rr, this), !0), window.ResizeObserver && (m($n, this, new ResizeObserver(() => g(ar, this).call(this))), g($n, this).observe(e)));
|
|
1123
|
+
}), p(this, rr, (e) => {
|
|
1094
1124
|
var t;
|
|
1095
|
-
e.target instanceof HTMLMediaElement && g(
|
|
1096
|
-
}), p(this,
|
|
1097
|
-
if (g(
|
|
1098
|
-
if (m(
|
|
1099
|
-
g(
|
|
1125
|
+
e.target instanceof HTMLMediaElement && g(ir, this).call(this, ((t = re(e.target)) == null ? "inline" : t) === "inline");
|
|
1126
|
+
}), p(this, ir, (e) => {
|
|
1127
|
+
if (g(nr, this) !== e) {
|
|
1128
|
+
if (m(nr, this, e), m(er, this, null), e) {
|
|
1129
|
+
g(ar, this).call(this);
|
|
1100
1130
|
return;
|
|
1101
1131
|
}
|
|
1102
|
-
for (let e of g(
|
|
1132
|
+
for (let e of g(Qn, this)) e.style.removeProperty("font-size");
|
|
1103
1133
|
}
|
|
1104
1134
|
}), e(this, "unload", () => {
|
|
1105
1135
|
var e, t;
|
|
1106
|
-
(e = g(
|
|
1107
|
-
}), p(this,
|
|
1108
|
-
if (!g(
|
|
1109
|
-
let { clientWidth: e, clientHeight: t } = g(
|
|
1136
|
+
(e = g(tr, this)) == null || e.removeEventListener("webkitpresentationmodechanged", g(rr, this), !0), (t = g($n, this)) == null || t.disconnect(), m($n, this, null), m(tr, this, null), m(nr, this, !0);
|
|
1137
|
+
}), p(this, ar, () => {
|
|
1138
|
+
if (!g(nr, this) || g(Qn, this).length === 0 || !g(tr, this)) return;
|
|
1139
|
+
let { clientWidth: e, clientHeight: t } = g(tr, this);
|
|
1110
1140
|
if (e <= 0 || t <= 0) return;
|
|
1111
|
-
let n = te(e, t, { max:
|
|
1112
|
-
if (n !== g(
|
|
1113
|
-
m(
|
|
1114
|
-
for (let e of g(
|
|
1141
|
+
let n = te(e, t, { max: Yn });
|
|
1142
|
+
if (n !== g(er, this)) {
|
|
1143
|
+
m(er, this, n);
|
|
1144
|
+
for (let e of g(Qn, this)) e.style.fontSize = n;
|
|
1115
1145
|
}
|
|
1116
|
-
}), m(
|
|
1146
|
+
}), m(Qn, this, Zn(t));
|
|
1117
1147
|
}
|
|
1118
|
-
},
|
|
1148
|
+
}, sr = class n extends fe {
|
|
1119
1149
|
constructor(r) {
|
|
1120
1150
|
var i;
|
|
1121
1151
|
super(), i = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
@@ -1146,35 +1176,35 @@ var qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn =
|
|
|
1146
1176
|
return () => Promise.resolve();
|
|
1147
1177
|
}
|
|
1148
1178
|
};
|
|
1149
|
-
e(
|
|
1179
|
+
e(sr, "isFullscreenApiSupported", (e) => l(e));
|
|
1150
1180
|
//#endregion
|
|
1151
1181
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1152
|
-
var
|
|
1182
|
+
var cr = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), pr = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), _r = class extends fe {
|
|
1153
1183
|
constructor(r) {
|
|
1154
1184
|
var a;
|
|
1155
1185
|
super(), a = this, e(this, "unload", () => {
|
|
1156
1186
|
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), this.element.removeEventListener("webkitpresentationmodechanged", this.onChange), n(this.element, !1);
|
|
1157
1187
|
}), e(this, "request", t(function* () {
|
|
1158
1188
|
try {
|
|
1159
|
-
return yield g(
|
|
1189
|
+
return yield g(cr, a).call(a);
|
|
1160
1190
|
} catch (e) {
|
|
1161
1191
|
throw a.onChange(), e;
|
|
1162
1192
|
}
|
|
1163
1193
|
})), e(this, "exit", t(function* () {
|
|
1164
1194
|
try {
|
|
1165
|
-
return yield g(
|
|
1195
|
+
return yield g(lr, a).call(a);
|
|
1166
1196
|
} catch (e) {
|
|
1167
1197
|
throw a.onChange(), e;
|
|
1168
1198
|
}
|
|
1169
1199
|
})), e(this, "onChange", () => {
|
|
1170
1200
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1171
|
-
}), e(this, "isPictureInPictureActive", () => g(
|
|
1201
|
+
}), e(this, "isPictureInPictureActive", () => g(mr, this).call(this) || g(pr, this).call(this)), e(this, "isSupported", () => g(gr, this).call(this) || g(fr, this).call(this)), p(this, cr, () => g(fr, this).call(this) ? g(ur, this).call(this) : g(gr, this).call(this) ? g(hr, this).call(this, "picture-in-picture") : Promise.resolve()), p(this, lr, () => this.isPictureInPictureActive() ? g(fr, this).call(this) ? g(dr, this).call(this) : g(gr, this).call(this) ? g(hr, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), p(this, ur, t(function* () {
|
|
1172
1202
|
let e = c(a.element);
|
|
1173
1203
|
e && (yield e());
|
|
1174
|
-
})), p(this,
|
|
1204
|
+
})), p(this, dr, t(function* () {
|
|
1175
1205
|
let e = d();
|
|
1176
1206
|
e && (yield e());
|
|
1177
|
-
})), p(this,
|
|
1207
|
+
})), p(this, fr, () => s(this.element)), p(this, pr, () => ae()), p(this, mr, () => re(this.element) === "picture-in-picture"), p(this, hr, (e) => (i(this.element) && ie(this.element, e), Promise.resolve())), p(this, gr, () => 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);
|
|
1178
1208
|
}
|
|
1179
1209
|
get videoElement() {
|
|
1180
1210
|
return this.element;
|
|
@@ -1182,7 +1212,7 @@ var rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar =
|
|
|
1182
1212
|
};
|
|
1183
1213
|
//#endregion
|
|
1184
1214
|
//#region ../../libs/player-next/src/timeshift/firstMediaPlaylistUrl.ts
|
|
1185
|
-
function
|
|
1215
|
+
function vr(e, t) {
|
|
1186
1216
|
let n = e.split("\n").map((e) => e.trim());
|
|
1187
1217
|
for (let e = 0; e < n.length; e++) {
|
|
1188
1218
|
var r;
|
|
@@ -1194,7 +1224,7 @@ function pr(e, t) {
|
|
|
1194
1224
|
}
|
|
1195
1225
|
//#endregion
|
|
1196
1226
|
//#region ../../libs/player-next/src/timeshift/parseMediaPlaylistDuration.ts
|
|
1197
|
-
function
|
|
1227
|
+
function yr(e) {
|
|
1198
1228
|
let t = 0;
|
|
1199
1229
|
for (let n of e.split("\n")) {
|
|
1200
1230
|
let e = n.trim().match(/^#EXTINF:([\d.]+)/), r = e != null && e[1] ? Number.parseFloat(e[1]) : NaN;
|
|
@@ -1204,90 +1234,90 @@ function mr(e) {
|
|
|
1204
1234
|
}
|
|
1205
1235
|
//#endregion
|
|
1206
1236
|
//#region ../../libs/player-next/src/timeshift/probeTimeshiftDuration.ts
|
|
1207
|
-
var
|
|
1208
|
-
function
|
|
1209
|
-
return
|
|
1237
|
+
var br = 5e3;
|
|
1238
|
+
function xr(e, t) {
|
|
1239
|
+
return Sr.apply(this, arguments);
|
|
1210
1240
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1213
|
-
let { signal: r, timeoutMs: i =
|
|
1241
|
+
function Sr() {
|
|
1242
|
+
return Sr = t(function* (e, t, n = {}) {
|
|
1243
|
+
let { signal: r, timeoutMs: i = br } = n, a = new AbortController(), o = () => a.abort();
|
|
1214
1244
|
r && (r.aborted ? a.abort() : r.addEventListener("abort", o, { once: !0 }));
|
|
1215
1245
|
let s = setTimeout(o, i);
|
|
1216
1246
|
try {
|
|
1217
1247
|
let n = yield fetch(e, { signal: a.signal });
|
|
1218
1248
|
if (!n.ok) return;
|
|
1219
|
-
let r =
|
|
1249
|
+
let r = vr(yield n.text(), e);
|
|
1220
1250
|
if (!r) return;
|
|
1221
1251
|
let i = new URL(r);
|
|
1222
1252
|
i.searchParams.set("channelId", t.channelId), i.searchParams.set("from", t.from), t.authToken && i.searchParams.set("authToken", t.authToken);
|
|
1223
1253
|
let o = yield fetch(i.toString(), { signal: a.signal });
|
|
1224
|
-
return o.ok ?
|
|
1254
|
+
return o.ok ? yr(yield o.text()) : void 0;
|
|
1225
1255
|
} catch (e) {
|
|
1226
1256
|
return;
|
|
1227
1257
|
} finally {
|
|
1228
1258
|
clearTimeout(s), r == null || r.removeEventListener("abort", o);
|
|
1229
1259
|
}
|
|
1230
|
-
}),
|
|
1260
|
+
}), Sr.apply(this, arguments);
|
|
1231
1261
|
}
|
|
1232
1262
|
//#endregion
|
|
1233
1263
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
1234
|
-
var
|
|
1235
|
-
constructor({ onChange: e, probe: t =
|
|
1236
|
-
C(this, A), p(this,
|
|
1264
|
+
var Cr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), jr = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), Nr = class {
|
|
1265
|
+
constructor({ onChange: e, probe: t = xr, now: n = () => performance.now() }) {
|
|
1266
|
+
C(this, A), p(this, Cr, void 0), p(this, wr, void 0), p(this, Tr, void 0), p(this, Er, void 0), p(this, Dr, !0), p(this, Or, !1), p(this, kr, 0), p(this, Ar, 0), p(this, jr, 0), p(this, Mr, null), m(Cr, this, e), m(wr, this, t), m(Tr, this, n);
|
|
1237
1267
|
}
|
|
1238
1268
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1239
|
-
if (h(A, this,
|
|
1240
|
-
g(
|
|
1269
|
+
if (h(A, this, Pr).call(this), !(n > 0)) {
|
|
1270
|
+
g(Cr, this).call(this, n);
|
|
1241
1271
|
return;
|
|
1242
1272
|
}
|
|
1243
1273
|
let r = new AbortController();
|
|
1244
|
-
m(
|
|
1274
|
+
m(Er, this, r);
|
|
1245
1275
|
let { signal: i } = r;
|
|
1246
|
-
g(
|
|
1276
|
+
g(wr, this).call(this, e, t, { signal: i }).then((e) => {
|
|
1247
1277
|
if (!i.aborted) {
|
|
1248
1278
|
if (e === void 0) {
|
|
1249
|
-
g(
|
|
1279
|
+
g(Cr, this).call(this, n);
|
|
1250
1280
|
return;
|
|
1251
1281
|
}
|
|
1252
|
-
m(
|
|
1282
|
+
m(Ar, this, n), m(kr, this, Math.min(Math.max(e, 0), n)), m(jr, this, g(Tr, this).call(this)), m(Or, this, !0), h(A, this, Fr).call(this), g(Dr, this) && h(A, this, Ir).call(this);
|
|
1253
1283
|
}
|
|
1254
1284
|
});
|
|
1255
1285
|
}
|
|
1256
1286
|
setLive(e) {
|
|
1257
|
-
m(
|
|
1287
|
+
m(Dr, this, e), !(!g(Er, this) || e) && (h(A, this, Lr).call(this), h(A, this, Fr).call(this));
|
|
1258
1288
|
}
|
|
1259
1289
|
applyLoadedDuration(e) {
|
|
1260
|
-
h(A, this,
|
|
1290
|
+
h(A, this, Pr).call(this), g(Cr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1261
1291
|
}
|
|
1262
1292
|
stop() {
|
|
1263
|
-
h(A, this,
|
|
1293
|
+
h(A, this, Pr).call(this);
|
|
1264
1294
|
}
|
|
1265
1295
|
};
|
|
1266
|
-
function
|
|
1296
|
+
function Pr() {
|
|
1267
1297
|
var e;
|
|
1268
|
-
(e = g(
|
|
1298
|
+
(e = g(Er, this)) == null || e.abort(), m(Er, this, void 0), h(A, this, Lr).call(this), m(Or, this, !1);
|
|
1269
1299
|
}
|
|
1270
|
-
function
|
|
1271
|
-
if (!g(
|
|
1272
|
-
let e = g(
|
|
1273
|
-
g(
|
|
1300
|
+
function Fr() {
|
|
1301
|
+
if (!g(Or, this)) return;
|
|
1302
|
+
let e = g(kr, this) + Math.max(0, (g(Tr, this).call(this) - g(jr, this)) / 1e3), t = Math.min(g(Ar, this), e);
|
|
1303
|
+
g(Cr, this).call(this, t), t >= g(Ar, this) && h(A, this, Lr).call(this);
|
|
1274
1304
|
}
|
|
1275
|
-
function
|
|
1276
|
-
g(
|
|
1305
|
+
function Ir() {
|
|
1306
|
+
g(Mr, this) === null && m(Mr, this, window.setInterval(() => h(A, this, Fr).call(this), 1e3));
|
|
1277
1307
|
}
|
|
1278
|
-
function
|
|
1279
|
-
g(
|
|
1308
|
+
function Lr() {
|
|
1309
|
+
g(Mr, this) !== null && (clearInterval(g(Mr, this)), m(Mr, this, null));
|
|
1280
1310
|
}
|
|
1281
1311
|
//#endregion
|
|
1282
1312
|
//#region ../../libs/player-next/src/utils/getVindralAttributes.ts
|
|
1283
|
-
var
|
|
1313
|
+
var Rr = (e) => {
|
|
1284
1314
|
var t;
|
|
1285
1315
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1286
1316
|
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)) : [];
|
|
1287
1317
|
};
|
|
1288
1318
|
//#endregion
|
|
1289
1319
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1290
|
-
function
|
|
1320
|
+
function zr(e) {
|
|
1291
1321
|
if (typeof e != "string") return NaN;
|
|
1292
1322
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1293
1323
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1303,37 +1333,37 @@ function Pr(e) {
|
|
|
1303
1333
|
}
|
|
1304
1334
|
//#endregion
|
|
1305
1335
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1306
|
-
var
|
|
1307
|
-
|
|
1308
|
-
},
|
|
1336
|
+
var Br = de.get().createContext("TimelineMarkers"), Vr = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, Hr = (e) => {
|
|
1337
|
+
Br.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.`);
|
|
1338
|
+
}, Ur = (e) => {
|
|
1309
1339
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1310
1340
|
if (typeof e == "string") {
|
|
1311
1341
|
let t = Date.parse(e);
|
|
1312
|
-
return Number.isNaN(t) ? null : (
|
|
1342
|
+
return Number.isNaN(t) ? null : (Vr.test(e) && Hr(e), t);
|
|
1313
1343
|
}
|
|
1314
1344
|
if (e instanceof Date) {
|
|
1315
1345
|
let t = e.getTime();
|
|
1316
1346
|
return Number.isNaN(t) ? null : t;
|
|
1317
1347
|
}
|
|
1318
1348
|
return null;
|
|
1319
|
-
},
|
|
1349
|
+
}, Wr = (e) => {
|
|
1320
1350
|
if (typeof e != "object" || !e) return null;
|
|
1321
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1351
|
+
let { time: t, label: n, type: r } = e, i = Ur(t);
|
|
1322
1352
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1323
1353
|
let a = {
|
|
1324
1354
|
time: i,
|
|
1325
1355
|
label: n
|
|
1326
1356
|
};
|
|
1327
1357
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1328
|
-
},
|
|
1358
|
+
}, Gr = (e) => {
|
|
1329
1359
|
if (!Array.isArray(e)) return [];
|
|
1330
|
-
let t = e.map(
|
|
1331
|
-
return n > 0 &&
|
|
1332
|
-
},
|
|
1360
|
+
let t = e.map(Wr).filter((e) => e !== null), n = e.length - t.length;
|
|
1361
|
+
return n > 0 && Br.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;
|
|
1362
|
+
}, Kr = (e) => e ? Gr(ce(e)) : [], qr = (e, t, n) => {
|
|
1333
1363
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1334
1364
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1335
1365
|
return r < 0 || r > 1 ? null : r;
|
|
1336
|
-
},
|
|
1366
|
+
}, Jr = class extends fe {
|
|
1337
1367
|
constructor(t) {
|
|
1338
1368
|
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", () => {
|
|
1339
1369
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1385,44 +1415,44 @@ var Fr = de.get().createContext("TimelineMarkers"), Ir = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1385
1415
|
get isMediaElementSource() {
|
|
1386
1416
|
return this.source instanceof HTMLMediaElement;
|
|
1387
1417
|
}
|
|
1388
|
-
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(),
|
|
1418
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakMap(), ei = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap(), ni = /* @__PURE__ */ new WeakMap(), ri = /* @__PURE__ */ new WeakMap(), ii = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), ai = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap(), si = /* @__PURE__ */ new WeakMap(), ci = /* @__PURE__ */ new WeakMap(), li = class {
|
|
1389
1419
|
constructor(t, n) {
|
|
1390
|
-
C(this, F), p(this, j, void 0), p(this, M, void 0), p(this, N, void 0), p(this,
|
|
1391
|
-
g(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !g(j, this).paused && h(F, this,
|
|
1392
|
-
}), p(this,
|
|
1393
|
-
g(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && h(F, this,
|
|
1394
|
-
}), m(M, this, t), m(
|
|
1420
|
+
C(this, F), p(this, j, void 0), p(this, M, void 0), p(this, N, void 0), p(this, Yr, void 0), p(this, Xr, void 0), e(this, "userPaused", !0), p(this, Zr, void 0), p(this, Qr, void 0), p(this, $r, !1), p(this, ei, !1), p(this, ti, null), p(this, ni, 0), p(this, ri, null), p(this, ii, !1), p(this, P, de.get().createContext("HlsPlayer")), p(this, ai, () => h(F, this, Ci).call(this, !0)), p(this, oi, () => h(F, this, Ci).call(this, !1)), p(this, si, () => {
|
|
1421
|
+
g(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !g(j, this).paused && h(F, this, Ci).call(this, !1);
|
|
1422
|
+
}), p(this, ci, () => {
|
|
1423
|
+
g(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && h(F, this, Ci).call(this, !1);
|
|
1424
|
+
}), 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";
|
|
1395
1425
|
let r = document.createElement("video");
|
|
1396
|
-
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,
|
|
1426
|
+
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, xi).call(this), m(ii, 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);
|
|
1397
1427
|
}
|
|
1398
1428
|
hide() {
|
|
1399
|
-
m(
|
|
1429
|
+
m($r, this, !0), m(ei, this, !1), g(M, this).classList.remove("active"), g(M, this).style.opacity = "0", g(M, this).style.pointerEvents = "none", m(ti, this, null);
|
|
1400
1430
|
}
|
|
1401
1431
|
play() {
|
|
1402
1432
|
var e = this;
|
|
1403
1433
|
return t(function* () {
|
|
1404
|
-
if (g(
|
|
1405
|
-
e.userPaused = !1, m(
|
|
1434
|
+
if (g(ri, e) !== null) {
|
|
1435
|
+
e.userPaused = !1, m(ri, e, !0);
|
|
1406
1436
|
return;
|
|
1407
1437
|
}
|
|
1408
|
-
return h(F, e,
|
|
1438
|
+
return h(F, e, mi).call(e);
|
|
1409
1439
|
})();
|
|
1410
1440
|
}
|
|
1411
1441
|
seek(e) {
|
|
1412
1442
|
var n = this;
|
|
1413
1443
|
return t(function* () {
|
|
1414
1444
|
if (g(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1415
|
-
m(
|
|
1445
|
+
m(ti, n, null);
|
|
1416
1446
|
return;
|
|
1417
1447
|
}
|
|
1418
|
-
if (m(
|
|
1419
|
-
else return h(F, n,
|
|
1448
|
+
if (m(ti, n, e.time > .1 ? e.time : null), n.isActive() && g(N, n)) h(F, n, hi).call(n, e.time);
|
|
1449
|
+
else return h(F, n, gi).call(n, e);
|
|
1420
1450
|
})();
|
|
1421
1451
|
}
|
|
1422
1452
|
shouldIgnoreTimeupdate() {
|
|
1423
|
-
if (g(
|
|
1453
|
+
if (g(ti, this) == null) return !1;
|
|
1424
1454
|
let e = g(j, this).currentTime;
|
|
1425
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (m(
|
|
1455
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (m(ti, this, null), !1);
|
|
1426
1456
|
}
|
|
1427
1457
|
isPipSupported() {
|
|
1428
1458
|
return "pictureInPictureEnabled" in document && !g(j, this).disablePictureInPicture;
|
|
@@ -1437,7 +1467,7 @@ var Fr = de.get().createContext("TimelineMarkers"), Ir = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1437
1467
|
return g(M, this).style.opacity === "1" || g(M, this).classList.contains("active");
|
|
1438
1468
|
}
|
|
1439
1469
|
cleanup() {
|
|
1440
|
-
h(F, this,
|
|
1470
|
+
h(F, this, Si).call(this), h(F, this, pi).call(this), g(Zr, this) && (cancelAnimationFrame(g(Zr, this)), m(Zr, this, void 0)), m(ti, this, null), g(j, this).remove();
|
|
1441
1471
|
}
|
|
1442
1472
|
addEventListener(e, t) {
|
|
1443
1473
|
g(j, this).addEventListener(e, t);
|
|
@@ -1449,13 +1479,13 @@ var Fr = de.get().createContext("TimelineMarkers"), Ir = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1449
1479
|
return g(j, this).dispatchEvent(e);
|
|
1450
1480
|
}
|
|
1451
1481
|
setTimeshiftUrl(e) {
|
|
1452
|
-
g(
|
|
1482
|
+
g(Xr, this) !== e && (g(P, this).debug("HLSPlayer Setting timeshift URL to", e), m(Xr, this, e));
|
|
1453
1483
|
}
|
|
1454
1484
|
get videoElement() {
|
|
1455
1485
|
return g(j, this);
|
|
1456
1486
|
}
|
|
1457
1487
|
pause() {
|
|
1458
|
-
this.userPaused = !0, g(
|
|
1488
|
+
this.userPaused = !0, g(ri, this) !== null && m(ri, this, !1), g(j, this).pause();
|
|
1459
1489
|
}
|
|
1460
1490
|
get paused() {
|
|
1461
1491
|
return g(j, this).paused;
|
|
@@ -1467,10 +1497,10 @@ var Fr = de.get().createContext("TimelineMarkers"), Ir = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1467
1497
|
return g(j, this).volume;
|
|
1468
1498
|
}
|
|
1469
1499
|
set muted(e) {
|
|
1470
|
-
m(
|
|
1500
|
+
m(ii, this, e), g(j, this).muted = e;
|
|
1471
1501
|
}
|
|
1472
1502
|
get muted() {
|
|
1473
|
-
return g(
|
|
1503
|
+
return g(ii, this);
|
|
1474
1504
|
}
|
|
1475
1505
|
set currentTime(e) {
|
|
1476
1506
|
g(j, this).currentTime = e;
|
|
@@ -1485,17 +1515,17 @@ var Fr = de.get().createContext("TimelineMarkers"), Ir = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1485
1515
|
return g(j, this).duration;
|
|
1486
1516
|
}
|
|
1487
1517
|
get maxVideoBitRate() {
|
|
1488
|
-
return g(
|
|
1518
|
+
return g(Qr, this);
|
|
1489
1519
|
}
|
|
1490
1520
|
set maxVideoBitRate(e) {
|
|
1491
|
-
m(
|
|
1521
|
+
m(Qr, this, e), e !== void 0 && g(N, this) && h(F, this, di).call(this, e);
|
|
1492
1522
|
}
|
|
1493
1523
|
};
|
|
1494
|
-
function
|
|
1524
|
+
function ui() {
|
|
1495
1525
|
var e = this;
|
|
1496
1526
|
return t(function* () {
|
|
1497
1527
|
let { default: t } = yield import("./Ct8GqCxq.js");
|
|
1498
|
-
if (m(
|
|
1528
|
+
if (m(Yr, e, t), !t.isSupported()) {
|
|
1499
1529
|
g(P, e).warn("HLS not supported");
|
|
1500
1530
|
return;
|
|
1501
1531
|
}
|
|
@@ -1519,17 +1549,17 @@ function ai() {
|
|
|
1519
1549
|
testBandwidth: !1,
|
|
1520
1550
|
debug: !1
|
|
1521
1551
|
})), 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) => {
|
|
1522
|
-
g(P, e).error("[HLS] error:", n), n.fatal && h(F, e,
|
|
1552
|
+
g(P, e).error("[HLS] error:", n), n.fatal && h(F, e, fi).call(e, n);
|
|
1523
1553
|
}), g(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1524
1554
|
var t;
|
|
1525
|
-
!g(
|
|
1555
|
+
!g(Qr, e) || ((t = g(N, e)) == null ? void 0 : t.levels.length) === 0 || h(F, e, di).call(e, g(Qr, e));
|
|
1526
1556
|
}), g(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1527
1557
|
var t, n;
|
|
1528
1558
|
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);
|
|
1529
1559
|
});
|
|
1530
1560
|
})();
|
|
1531
1561
|
}
|
|
1532
|
-
function
|
|
1562
|
+
function di(e) {
|
|
1533
1563
|
if (!g(N, this)) {
|
|
1534
1564
|
g(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1535
1565
|
return;
|
|
@@ -1545,12 +1575,12 @@ function oi(e) {
|
|
|
1545
1575
|
let r = g(N, this).currentLevel;
|
|
1546
1576
|
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);
|
|
1547
1577
|
}
|
|
1548
|
-
function
|
|
1549
|
-
if (!g(
|
|
1578
|
+
function fi(e) {
|
|
1579
|
+
if (!g(Yr, this)) {
|
|
1550
1580
|
g(P, this).error("Hls class not available for error handling");
|
|
1551
1581
|
return;
|
|
1552
1582
|
}
|
|
1553
|
-
let t = g(
|
|
1583
|
+
let t = g(Yr, this);
|
|
1554
1584
|
switch (e.type) {
|
|
1555
1585
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1556
1586
|
var n;
|
|
@@ -1561,14 +1591,14 @@ function si(e) {
|
|
|
1561
1591
|
g(P, this).warn("[HLS] media error -> recoverMediaError"), (r = g(N, this)) == null || r.recoverMediaError();
|
|
1562
1592
|
break;
|
|
1563
1593
|
default:
|
|
1564
|
-
g(P, this).error("[HLS] fatal -> destroy"), h(F, this,
|
|
1594
|
+
g(P, this).error("[HLS] fatal -> destroy"), h(F, this, pi).call(this);
|
|
1565
1595
|
break;
|
|
1566
1596
|
}
|
|
1567
1597
|
}
|
|
1568
|
-
function
|
|
1598
|
+
function pi() {
|
|
1569
1599
|
g(N, this) && (g(N, this).destroy(), m(N, this, void 0));
|
|
1570
1600
|
}
|
|
1571
|
-
function
|
|
1601
|
+
function mi() {
|
|
1572
1602
|
var e = this;
|
|
1573
1603
|
return t(function* () {
|
|
1574
1604
|
try {
|
|
@@ -1578,35 +1608,35 @@ function li() {
|
|
|
1578
1608
|
}
|
|
1579
1609
|
})();
|
|
1580
1610
|
}
|
|
1581
|
-
function
|
|
1611
|
+
function hi(e) {
|
|
1582
1612
|
if (!Number.isFinite(e)) {
|
|
1583
|
-
m(
|
|
1613
|
+
m(ti, this, null);
|
|
1584
1614
|
return;
|
|
1585
1615
|
}
|
|
1586
|
-
let t = h(F, this,
|
|
1587
|
-
m(
|
|
1616
|
+
let t = h(F, this, bi).call(this, g(j, this), e);
|
|
1617
|
+
m(ti, this, t > .1 ? t : null), g(Zr, this) && cancelAnimationFrame(g(Zr, this)), m(Zr, this, requestAnimationFrame(() => {
|
|
1588
1618
|
g(j, this).currentTime = t;
|
|
1589
1619
|
}));
|
|
1590
1620
|
}
|
|
1591
|
-
function
|
|
1621
|
+
function gi(e) {
|
|
1592
1622
|
var n = this;
|
|
1593
1623
|
return t(function* () {
|
|
1594
1624
|
var t;
|
|
1595
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = m(
|
|
1596
|
-
if (m(
|
|
1597
|
-
g(P, n).warn("No timeshift URL"), m(
|
|
1625
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = m(ni, n, (t = g(ni, n), ++t));
|
|
1626
|
+
if (m(ri, n, i), !g(Xr, n)) {
|
|
1627
|
+
g(P, n).warn("No timeshift URL"), m(ri, n, null);
|
|
1598
1628
|
return;
|
|
1599
1629
|
}
|
|
1600
|
-
if (!g(N, n) && (yield h(F, n,
|
|
1601
|
-
m(
|
|
1630
|
+
if (!g(N, n) && (yield h(F, n, ui).call(n), !h(F, n, wi).call(n, a))) return;
|
|
1631
|
+
m($r, n, !1), m(ei, n, !1), g(N, n) && (!g(N, n).url || g(N, n).url !== g(Xr, n)) && (g(P, n).debug("Loading timeshift URL", g(Xr, n)), g(N, n).loadSource(g(Xr, n)));
|
|
1602
1632
|
let o = n.muted;
|
|
1603
|
-
if (g(j, n).muted = !0, yield h(F, n,
|
|
1604
|
-
h(F, n,
|
|
1605
|
-
let s = g(
|
|
1606
|
-
m(
|
|
1633
|
+
if (g(j, n).muted = !0, yield h(F, n, _i).call(n), !h(F, n, wi).call(n, a)) return;
|
|
1634
|
+
h(F, n, hi).call(n, r);
|
|
1635
|
+
let s = g(ri, n);
|
|
1636
|
+
m(ri, n, null), !(s && (yield h(F, n, mi).call(n), !h(F, n, wi).call(n, a))) && h(F, n, vi).call(n, o, a);
|
|
1607
1637
|
})();
|
|
1608
1638
|
}
|
|
1609
|
-
function
|
|
1639
|
+
function _i() {
|
|
1610
1640
|
return g(j, this).duration && !Number.isNaN(g(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1611
1641
|
g(P, this).debug("Waiting for duration...");
|
|
1612
1642
|
let t = () => {
|
|
@@ -1617,11 +1647,11 @@ function fi() {
|
|
|
1617
1647
|
g(j, this).addEventListener("loadedmetadata", t);
|
|
1618
1648
|
});
|
|
1619
1649
|
}
|
|
1620
|
-
function
|
|
1650
|
+
function vi(e, t) {
|
|
1621
1651
|
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => g(j, this).readyState >= n && g(j, this).videoWidth > 0 && g(j, this).videoHeight > 0, i = () => {
|
|
1622
|
-
g(
|
|
1652
|
+
g($r, this) || g(ei, this) || !h(F, this, wi).call(this, t) || (m(ei, 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, yi).call(this, t));
|
|
1623
1653
|
}, a = () => {
|
|
1624
|
-
g(
|
|
1654
|
+
g($r, this) || g(ei, this) || !h(F, this, wi).call(this, t) || r() && (s(), i());
|
|
1625
1655
|
}, o = !1, s = () => {
|
|
1626
1656
|
o || (o = !0, g(j, this).removeEventListener("canplay", a), g(j, this).removeEventListener("canplaythrough", a), g(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1627
1657
|
};
|
|
@@ -1634,9 +1664,9 @@ function pi(e, t) {
|
|
|
1634
1664
|
g(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1635
1665
|
}, 2e3);
|
|
1636
1666
|
}
|
|
1637
|
-
function
|
|
1667
|
+
function yi(e) {
|
|
1638
1668
|
let t = () => {
|
|
1639
|
-
h(F, this,
|
|
1669
|
+
h(F, this, wi).call(this, e) && (g(j, this).muted = !1);
|
|
1640
1670
|
};
|
|
1641
1671
|
"requestVideoFrameCallback" in g(j, this) ? g(j, this).requestVideoFrameCallback(() => {
|
|
1642
1672
|
setTimeout(() => {
|
|
@@ -1646,43 +1676,43 @@ function mi(e) {
|
|
|
1646
1676
|
t();
|
|
1647
1677
|
}, 120);
|
|
1648
1678
|
}
|
|
1649
|
-
function
|
|
1679
|
+
function bi(e, t) {
|
|
1650
1680
|
let n = e.seekable;
|
|
1651
1681
|
if (!n || n.length === 0) return t;
|
|
1652
1682
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1653
1683
|
return g(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1654
1684
|
}
|
|
1655
|
-
function
|
|
1656
|
-
for (let e of
|
|
1657
|
-
for (let e of
|
|
1658
|
-
g(j, this).addEventListener("timeupdate", g(
|
|
1685
|
+
function xi() {
|
|
1686
|
+
for (let e of Ti._) g(j, this).addEventListener(e, g(ai, this));
|
|
1687
|
+
for (let e of Ei._) g(j, this).addEventListener(e, g(oi, this));
|
|
1688
|
+
g(j, this).addEventListener("timeupdate", g(si, this)), g(j, this).addEventListener("progress", g(ci, this));
|
|
1659
1689
|
}
|
|
1660
|
-
function
|
|
1661
|
-
for (let e of
|
|
1662
|
-
for (let e of
|
|
1663
|
-
g(j, this).removeEventListener("timeupdate", g(
|
|
1690
|
+
function Si() {
|
|
1691
|
+
for (let e of Ti._) g(j, this).removeEventListener(e, g(ai, this));
|
|
1692
|
+
for (let e of Ei._) g(j, this).removeEventListener(e, g(oi, this));
|
|
1693
|
+
g(j, this).removeEventListener("timeupdate", g(si, this)), g(j, this).removeEventListener("progress", g(ci, this));
|
|
1664
1694
|
}
|
|
1665
|
-
function
|
|
1695
|
+
function Ci(e) {
|
|
1666
1696
|
let t = e && (g(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || g(j, this).seeking || g(j, this).paused && !this.userPaused);
|
|
1667
1697
|
g(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1668
1698
|
bubbles: !0,
|
|
1669
1699
|
composed: !0
|
|
1670
1700
|
}));
|
|
1671
1701
|
}
|
|
1672
|
-
function
|
|
1673
|
-
return g(
|
|
1702
|
+
function wi(e) {
|
|
1703
|
+
return g(ni, this) === e;
|
|
1674
1704
|
}
|
|
1675
|
-
var
|
|
1705
|
+
var Ti = { _: [
|
|
1676
1706
|
"waiting",
|
|
1677
1707
|
"seeking",
|
|
1678
1708
|
"stalled",
|
|
1679
1709
|
"loadstart"
|
|
1680
|
-
] },
|
|
1710
|
+
] }, Ei = { _: [
|
|
1681
1711
|
"canplay",
|
|
1682
1712
|
"canplaythrough",
|
|
1683
1713
|
"seeked",
|
|
1684
1714
|
"loadeddata"
|
|
1685
|
-
] },
|
|
1715
|
+
] }, Di = class {
|
|
1686
1716
|
constructor(e) {
|
|
1687
1717
|
this.vindral = e;
|
|
1688
1718
|
}
|
|
@@ -1702,19 +1732,19 @@ var bi = { _: [
|
|
|
1702
1732
|
pause() {
|
|
1703
1733
|
this.vindral.pause();
|
|
1704
1734
|
}
|
|
1705
|
-
},
|
|
1706
|
-
|
|
1707
|
-
var
|
|
1735
|
+
}, Oi = document.createElement("template");
|
|
1736
|
+
Oi.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";
|
|
1737
|
+
var ki = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = class extends HTMLElement {
|
|
1708
1738
|
constructor() {
|
|
1709
|
-
super(), p(this,
|
|
1739
|
+
super(), p(this, ki, null), p(this, Ai, void 0), e(this, "range", void 0), m(Ai, this, this.attachShadow({ mode: "open" })), g(Ai, this).appendChild(Oi.content.cloneNode(!0)), this.range = g(Ai, this).getElementById("range");
|
|
1710
1740
|
}
|
|
1711
1741
|
connectedCallback() {
|
|
1712
1742
|
var e;
|
|
1713
|
-
m(
|
|
1743
|
+
m(ki, this, this.closest("vindral-controller")), (e = g(ki, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1714
1744
|
}
|
|
1715
1745
|
disconnectedCallback() {
|
|
1716
1746
|
var e;
|
|
1717
|
-
(e = g(
|
|
1747
|
+
(e = g(ki, this)) == null || e.disconnectListener(this);
|
|
1718
1748
|
}
|
|
1719
1749
|
attributeChangedCallback(e, t, n) {
|
|
1720
1750
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1740,11 +1770,11 @@ var wi = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei =
|
|
|
1740
1770
|
];
|
|
1741
1771
|
}
|
|
1742
1772
|
};
|
|
1743
|
-
e(
|
|
1773
|
+
e(ji, "observedAttributes", ["disabled"]);
|
|
1744
1774
|
//#endregion
|
|
1745
1775
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1746
|
-
var
|
|
1747
|
-
|
|
1776
|
+
var Mi = document.createElement("template");
|
|
1777
|
+
Mi.innerHTML = `
|
|
1748
1778
|
<style>
|
|
1749
1779
|
:host {
|
|
1750
1780
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1957,7 +1987,7 @@ Di.innerHTML = `
|
|
|
1957
1987
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1958
1988
|
</div>
|
|
1959
1989
|
`;
|
|
1960
|
-
var
|
|
1990
|
+
var Ni = [
|
|
1961
1991
|
"ArrowDown",
|
|
1962
1992
|
"ArrowLeft",
|
|
1963
1993
|
"ArrowRight",
|
|
@@ -1966,27 +1996,27 @@ var Oi = [
|
|
|
1966
1996
|
" ",
|
|
1967
1997
|
"f",
|
|
1968
1998
|
"m"
|
|
1969
|
-
],
|
|
1999
|
+
], Pi, Fi = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), Gi = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Ji = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), Qi = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), 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 = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), La = /* @__PURE__ */ new WeakMap(), Ra = /* @__PURE__ */ new WeakMap(), za = /* @__PURE__ */ new WeakMap(), Ba = class extends HTMLElement {
|
|
1970
2000
|
constructor() {
|
|
1971
2001
|
var t;
|
|
1972
|
-
super(), C(this, H), p(this,
|
|
2002
|
+
super(), C(this, H), p(this, Fi, /* @__PURE__ */ new Map()), p(this, Ii, 2e3), p(this, Li, null), p(this, Ri, new Nr({ onChange: (e) => h(H, this, U).call(this, _.DURATION, e.toString()) })), p(this, zi, null), p(this, Bi, void 0), p(this, I, void 0), p(this, L, void 0), p(this, Vi, void 0), p(this, R, void 0), p(this, Hi, void 0), p(this, Ui, Ce), p(this, Wi, void 0), p(this, Gi, void 0), p(this, Ki, void 0), p(this, qi, void 0), p(this, z, void 0), p(this, Ji, void 0), p(this, Yi, void 0), p(this, Xi, void 0), p(this, B, void 0), p(this, Zi, void 0), p(this, Qi, void 0), p(this, $i, void 0), p(this, V, void 0), p(this, ea, null), p(this, ta, !1), p(this, na, null), p(this, ra, void 0), p(this, ia, void 0), p(this, aa, void 0), p(this, oa, (e) => {
|
|
1973
2003
|
let t = e.filter((e) => {
|
|
1974
2004
|
var t;
|
|
1975
2005
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1976
2006
|
});
|
|
1977
2007
|
h(H, this, U).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1978
|
-
}), p(this,
|
|
2008
|
+
}), p(this, sa, (e) => {
|
|
1979
2009
|
h(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1980
|
-
}), p(this,
|
|
1981
|
-
let t = g(
|
|
1982
|
-
m(
|
|
2010
|
+
}), p(this, ca, !1), p(this, la, (e) => {
|
|
2011
|
+
let t = g(ca, this);
|
|
2012
|
+
m(ca, this, !0);
|
|
1983
2013
|
try {
|
|
1984
2014
|
e();
|
|
1985
2015
|
} finally {
|
|
1986
|
-
m(
|
|
2016
|
+
m(ca, this, t);
|
|
1987
2017
|
}
|
|
1988
|
-
}), p(this,
|
|
1989
|
-
g(
|
|
2018
|
+
}), p(this, ua, (e) => {
|
|
2019
|
+
g(la, this).call(this, () => {
|
|
1990
2020
|
switch (e) {
|
|
1991
2021
|
case "playing":
|
|
1992
2022
|
h(H, this, W).call(this, _.PAUSED), h(H, this, W).call(this, _.BUFFERING);
|
|
@@ -2000,40 +2030,40 @@ var Oi = [
|
|
|
2000
2030
|
default: break;
|
|
2001
2031
|
}
|
|
2002
2032
|
});
|
|
2003
|
-
}), p(this,
|
|
2004
|
-
g(
|
|
2033
|
+
}), p(this, da, (e) => {
|
|
2034
|
+
g(la, this).call(this, () => {
|
|
2005
2035
|
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);
|
|
2006
2036
|
});
|
|
2007
|
-
}), p(this,
|
|
2037
|
+
}), p(this, fa, ({ channelId: e }) => {
|
|
2008
2038
|
var t;
|
|
2009
2039
|
this.setAttribute(_.CHANNEL_ID, e), ((t = g(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && h(H, this, W).call(this, _.BUFFERING);
|
|
2010
|
-
}), p(this,
|
|
2040
|
+
}), p(this, pa, ({ channelId: e }) => {
|
|
2011
2041
|
var t;
|
|
2012
|
-
g(
|
|
2013
|
-
}), p(this,
|
|
2014
|
-
m(
|
|
2015
|
-
}), p(this,
|
|
2042
|
+
g(Wi, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = g(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && h(H, this, W).call(this, _.BUFFERING);
|
|
2043
|
+
}), p(this, ma, (e) => {
|
|
2044
|
+
m(Ia, this, Date.now()), h(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
2045
|
+
}), p(this, ha, (e) => {
|
|
2016
2046
|
var t;
|
|
2017
2047
|
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);
|
|
2018
|
-
}), p(this,
|
|
2048
|
+
}), p(this, ga, (e) => {
|
|
2019
2049
|
var t;
|
|
2020
2050
|
if (h(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = g(I, this)) != null && t.textTrack) {
|
|
2021
2051
|
var n, r;
|
|
2022
2052
|
h(H, this, U).call(this, _.TEXT_TRACK, (n = (r = g(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
2023
2053
|
}
|
|
2024
|
-
}), p(this,
|
|
2054
|
+
}), p(this, _a, (e) => {
|
|
2025
2055
|
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));
|
|
2026
|
-
}), p(this,
|
|
2027
|
-
e || h(H, this, W).call(this, _.BUFFERING), g(
|
|
2028
|
-
}), p(this,
|
|
2056
|
+
}), p(this, va, (e) => {
|
|
2057
|
+
e || h(H, this, W).call(this, _.BUFFERING), g(Ri, this).setLive(e);
|
|
2058
|
+
}), p(this, ya, (e) => {
|
|
2029
2059
|
var t, n;
|
|
2030
2060
|
let { urls: r, duration: i } = e;
|
|
2031
2061
|
if (!r[0] || !g(R, this)) return;
|
|
2032
2062
|
let a = new URL(r[0]);
|
|
2033
|
-
a.searchParams.set("channelId", (t = g(
|
|
2063
|
+
a.searchParams.set("channelId", (t = g(Wi, this)) == null ? "" : t);
|
|
2034
2064
|
let o = this.getAttribute("authentication-token");
|
|
2035
2065
|
o && a.searchParams.set("authToken", o);
|
|
2036
|
-
let s =
|
|
2066
|
+
let s = zr(i);
|
|
2037
2067
|
if (Number.isNaN(s)) {
|
|
2038
2068
|
g(V, this).error(`Invalid duration format: ${i}`);
|
|
2039
2069
|
return;
|
|
@@ -2043,70 +2073,70 @@ var Oi = [
|
|
|
2043
2073
|
let u = a.toString();
|
|
2044
2074
|
g(R, this).setTimeshiftUrl(u);
|
|
2045
2075
|
let d = new URL(a);
|
|
2046
|
-
d.pathname = d.pathname.replace(/[^/]*$/, "thumbs/playlist.m3u8"), m(
|
|
2076
|
+
d.pathname = d.pathname.replace(/[^/]*$/, "thumbs/playlist.m3u8"), m(Hi, this, d.toString()), h(H, this, U).call(this, _.TIMESHIFT_THUMBNAIL_URL, g(Hi, this)), g(Ri, this).start({
|
|
2047
2077
|
multivariantUrl: u,
|
|
2048
2078
|
params: {
|
|
2049
|
-
channelId: (n = g(
|
|
2079
|
+
channelId: (n = g(Wi, this)) == null ? "" : n,
|
|
2050
2080
|
authToken: o == null ? void 0 : o,
|
|
2051
2081
|
from: l
|
|
2052
2082
|
},
|
|
2053
2083
|
windowCapSeconds: s
|
|
2054
2084
|
});
|
|
2055
|
-
}), p(this,
|
|
2085
|
+
}), p(this, ba, () => {
|
|
2056
2086
|
h(H, this, W).call(this, _.PAUSED), h(H, this, W).call(this, _.BUFFERING);
|
|
2057
|
-
}), p(this,
|
|
2087
|
+
}), p(this, xa, () => {
|
|
2058
2088
|
h(H, this, U).call(this, _.PAUSED, ""), h(H, this, W).call(this, _.BUFFERING);
|
|
2059
|
-
}), p(this,
|
|
2060
|
-
g(
|
|
2061
|
-
}), p(this,
|
|
2062
|
-
g(R, this) && g(
|
|
2063
|
-
}), p(this,
|
|
2089
|
+
}), p(this, Sa, () => {
|
|
2090
|
+
g(Na, this).call(this), h(H, this, W).call(this, _.BUFFERING);
|
|
2091
|
+
}), p(this, Ca, () => {
|
|
2092
|
+
g(R, this) && g(Ri, this).applyLoadedDuration(g(R, this).duration);
|
|
2093
|
+
}), p(this, wa, () => {
|
|
2064
2094
|
var e, t;
|
|
2065
2095
|
if (!g(R, this) || g(R, this).seeking || (e = (t = g(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2066
2096
|
let n = g(R, this).currentTime;
|
|
2067
2097
|
n !== void 0 && h(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2068
|
-
}), p(this,
|
|
2098
|
+
}), p(this, Ta, () => {
|
|
2069
2099
|
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));
|
|
2070
|
-
}), p(this,
|
|
2100
|
+
}), p(this, Ea, () => {
|
|
2071
2101
|
h(H, this, U).call(this, _.BUFFERING, "");
|
|
2072
|
-
}), p(this,
|
|
2102
|
+
}), p(this, Da, () => {
|
|
2073
2103
|
h(H, this, W).call(this, _.BUFFERING);
|
|
2074
|
-
}), p(this,
|
|
2075
|
-
if (g(
|
|
2104
|
+
}), p(this, Oa, () => {
|
|
2105
|
+
if (g(ta, this)) {
|
|
2076
2106
|
if (g(L, this) !== g(R, this)) {
|
|
2077
|
-
m(
|
|
2107
|
+
m(ta, this, !1);
|
|
2078
2108
|
return;
|
|
2079
2109
|
}
|
|
2080
|
-
m(
|
|
2110
|
+
m(ta, this, !1), h(H, this, xo).call(this);
|
|
2081
2111
|
}
|
|
2082
|
-
}), p(this,
|
|
2112
|
+
}), p(this, ka, 0), e(this, "handleEvent", (e) => {
|
|
2083
2113
|
switch (e.type) {
|
|
2084
2114
|
case "pointerdown":
|
|
2085
|
-
m(
|
|
2115
|
+
m(ka, this, e.timeStamp);
|
|
2086
2116
|
break;
|
|
2087
2117
|
case "pointermove":
|
|
2088
|
-
h(H, this,
|
|
2118
|
+
h(H, this, lo).call(this, e);
|
|
2089
2119
|
break;
|
|
2090
2120
|
case "pointerup":
|
|
2091
|
-
h(H, this,
|
|
2121
|
+
h(H, this, uo).call(this, e);
|
|
2092
2122
|
break;
|
|
2093
2123
|
case "mouseleave":
|
|
2094
|
-
h(H, this,
|
|
2124
|
+
h(H, this, yo).call(this);
|
|
2095
2125
|
break;
|
|
2096
2126
|
case "dblclick":
|
|
2097
|
-
h(H, this,
|
|
2127
|
+
h(H, this, po).call(this, e);
|
|
2098
2128
|
break;
|
|
2099
2129
|
case "mousemove":
|
|
2100
|
-
h(H, this,
|
|
2130
|
+
h(H, this, mo).call(this, e);
|
|
2101
2131
|
break;
|
|
2102
2132
|
case "keydown":
|
|
2103
|
-
g(
|
|
2133
|
+
g(Ma, this).call(this, e);
|
|
2104
2134
|
break;
|
|
2105
2135
|
case "keyup":
|
|
2106
|
-
h(H, this,
|
|
2136
|
+
h(H, this, yo).call(this), g(ja, this).call(this, e);
|
|
2107
2137
|
break;
|
|
2108
2138
|
}
|
|
2109
|
-
}), p(this,
|
|
2139
|
+
}), p(this, Aa, (e) => {
|
|
2110
2140
|
if (g(I, this) && (g(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2111
2141
|
case S.PLAY:
|
|
2112
2142
|
this.removeAttribute(_.PAUSED);
|
|
@@ -2151,10 +2181,10 @@ var Oi = [
|
|
|
2151
2181
|
}
|
|
2152
2182
|
break;
|
|
2153
2183
|
case S.CHANNEL_GRID_OPENED:
|
|
2154
|
-
g(
|
|
2184
|
+
g(ea, this) === null && h(H, this, go).call(this);
|
|
2155
2185
|
break;
|
|
2156
2186
|
case S.CHANNEL_GRID_CLOSED:
|
|
2157
|
-
g(
|
|
2187
|
+
g(ea, this) !== null && (clearTimeout(g(ea, this)), m(ea, this, null));
|
|
2158
2188
|
break;
|
|
2159
2189
|
case S.ENTER_PIP:
|
|
2160
2190
|
this.setAttribute(_.IS_PIP, "");
|
|
@@ -2164,7 +2194,7 @@ var Oi = [
|
|
|
2164
2194
|
break;
|
|
2165
2195
|
case S.REQUEST_AIRPLAY:
|
|
2166
2196
|
var t;
|
|
2167
|
-
(t = g(
|
|
2197
|
+
(t = g(Xi, this)) == null || t.showPlaybackTargetPicker();
|
|
2168
2198
|
break;
|
|
2169
2199
|
case S.SET_LANGUAGE:
|
|
2170
2200
|
v(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
@@ -2190,7 +2220,7 @@ var Oi = [
|
|
|
2190
2220
|
break;
|
|
2191
2221
|
}
|
|
2192
2222
|
case S.GO_LIVE:
|
|
2193
|
-
g(
|
|
2223
|
+
g(Na, this).call(this);
|
|
2194
2224
|
break;
|
|
2195
2225
|
case S.TOGGLE_DEBUG_PANEL:
|
|
2196
2226
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
@@ -2202,71 +2232,71 @@ var Oi = [
|
|
|
2202
2232
|
}
|
|
2203
2233
|
break;
|
|
2204
2234
|
}
|
|
2205
|
-
}), p(this,
|
|
2235
|
+
}), p(this, ja, (e) => {
|
|
2206
2236
|
let { key: t } = e;
|
|
2207
|
-
if (!
|
|
2237
|
+
if (!Ni.includes(t)) {
|
|
2208
2238
|
this.removeEventListener("keyup", this);
|
|
2209
2239
|
return;
|
|
2210
2240
|
}
|
|
2211
|
-
h(H, this,
|
|
2212
|
-
}), p(this,
|
|
2241
|
+
h(H, this, ho).call(this, e);
|
|
2242
|
+
}), p(this, Ma, (e) => {
|
|
2213
2243
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2214
|
-
t || n || !
|
|
2215
|
-
}), p(this,
|
|
2244
|
+
t || n || !Ni.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2245
|
+
}), p(this, Na, () => {
|
|
2216
2246
|
this.removeAttribute(_.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2217
|
-
}), p(this,
|
|
2247
|
+
}), p(this, Pa, (e) => {
|
|
2218
2248
|
var t;
|
|
2219
|
-
g(R, this) || h(H, this,
|
|
2220
|
-
}), p(this,
|
|
2249
|
+
g(R, this) || h(H, this, Ka).call(this), g(L, this) !== g(R, this) && (e && h(H, this, So).call(this), m(L, this, g(R, this)), h(H, this, Wa).call(this), h(H, this, Ga).call(this), h(H, this, Xa).call(this), (t = g(I, this)) == null || t.pause(), m(ta, this, e));
|
|
2250
|
+
}), p(this, Fa, (e) => {
|
|
2221
2251
|
var t, n, r, i;
|
|
2222
|
-
e && h(H, this,
|
|
2223
|
-
h(H, this,
|
|
2252
|
+
e && h(H, this, So).call(this), (t = g(R, this)) == null || t.hide(), m(L, this, g(Vi, this)), h(H, this, Xa).call(this), this.hasAttribute(_.PAUSED) ? (n = g(L, this)) == null || n.pause() : (r = g(L, this)) == null || r.play(), h(H, this, Ja).call(this), h(H, this, Ua).call(this), (i = g(R, this)) == null || i.pause(), e && (m(ta, this, !1), setTimeout(() => {
|
|
2253
|
+
h(H, this, xo).call(this);
|
|
2224
2254
|
}, 100));
|
|
2225
2255
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2226
2256
|
let t = this.hasAttribute(_.IS_PIP);
|
|
2227
2257
|
if (e !== !1) {
|
|
2228
2258
|
var n;
|
|
2229
|
-
g(
|
|
2259
|
+
g(Pa, this).call(this, t), (n = g(R, this)) == null || n.seek({
|
|
2230
2260
|
time: parseFloat(e),
|
|
2231
2261
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2232
2262
|
});
|
|
2233
2263
|
return;
|
|
2234
2264
|
}
|
|
2235
|
-
g(L, this) !== g(
|
|
2236
|
-
}), p(this,
|
|
2265
|
+
g(L, this) !== g(Vi, this) && g(Fa, this).call(this, t);
|
|
2266
|
+
}), p(this, Ia, null), p(this, La, () => {
|
|
2237
2267
|
var e;
|
|
2238
2268
|
let t = (e = g(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2239
2269
|
if (!(t != null && t.video)) return;
|
|
2240
2270
|
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2241
2271
|
n && n.catch(() => {});
|
|
2242
|
-
}), p(this,
|
|
2272
|
+
}), p(this, Ra, () => {
|
|
2243
2273
|
r();
|
|
2244
|
-
}), p(this,
|
|
2274
|
+
}), p(this, za, null);
|
|
2245
2275
|
let n = this.attachShadow({ mode: "open" });
|
|
2246
|
-
n.appendChild(
|
|
2276
|
+
n.appendChild(Mi.content.cloneNode(!0));
|
|
2247
2277
|
let i = ve(this.getAttribute("log-level"));
|
|
2248
|
-
m(V, this, de.get().createContext("VindralController")), g(V, this).setLevel(i), m(
|
|
2249
|
-
|
|
2278
|
+
m(V, this, de.get().createContext("VindralController")), g(V, this).setLevel(i), m(Bi, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), m(ra, this, new or(n)), this.addEventListener("focusin", (e) => {
|
|
2279
|
+
Pi = this, m(aa, this, e.composedPath()[0]);
|
|
2250
2280
|
});
|
|
2251
2281
|
}
|
|
2252
2282
|
connectedCallback() {
|
|
2253
2283
|
var e = this;
|
|
2254
2284
|
return t(function* () {
|
|
2255
|
-
if (g(
|
|
2256
|
-
if (clearTimeout(g(
|
|
2285
|
+
if (g(ia, e) !== void 0) {
|
|
2286
|
+
if (clearTimeout(g(ia, e)), m(ia, e, void 0), document.activeElement === document.body && Pi === e) {
|
|
2257
2287
|
var t;
|
|
2258
|
-
((t = g(
|
|
2288
|
+
((t = g(aa, e)) != null && t.isConnected ? g(aa, e) : e).focus({ preventScroll: !0 });
|
|
2259
2289
|
}
|
|
2260
2290
|
return;
|
|
2261
2291
|
}
|
|
2262
|
-
x(e.getAttribute("auto-instance-enabled"), !0) && (yield h(H, e,
|
|
2263
|
-
for (let t of Object.values(S)) e.addEventListener(t, g(
|
|
2264
|
-
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(
|
|
2292
|
+
x(e.getAttribute("auto-instance-enabled"), !0) && (yield h(H, e, Ha).call(e));
|
|
2293
|
+
for (let t of Object.values(S)) e.addEventListener(t, g(Aa, e));
|
|
2294
|
+
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(la, e).call(e, () => e.connectListener(e)), h(H, e, so).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2265
2295
|
})();
|
|
2266
2296
|
}
|
|
2267
2297
|
disconnectedCallback() {
|
|
2268
|
-
m(
|
|
2269
|
-
m(
|
|
2298
|
+
m(ia, this, setTimeout(() => {
|
|
2299
|
+
m(ia, this, void 0), h(H, this, oo).call(this);
|
|
2270
2300
|
}));
|
|
2271
2301
|
}
|
|
2272
2302
|
attributeChangedCallback(e, t, n) {
|
|
@@ -2277,22 +2307,22 @@ var Oi = [
|
|
|
2277
2307
|
newValue: n
|
|
2278
2308
|
}), e) {
|
|
2279
2309
|
case "channel-id":
|
|
2280
|
-
m(
|
|
2310
|
+
m(Wi, this, n), h(H, this, Va).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()));
|
|
2281
2311
|
break;
|
|
2282
2312
|
case "channel-group-id":
|
|
2283
|
-
m(
|
|
2313
|
+
m(Gi, this, n);
|
|
2284
2314
|
break;
|
|
2285
2315
|
case "url":
|
|
2286
|
-
n && m(
|
|
2316
|
+
n && m(Ui, this, n);
|
|
2287
2317
|
break;
|
|
2288
2318
|
case "paused":
|
|
2289
2319
|
if (v(n)) {
|
|
2290
|
-
if (!g(
|
|
2320
|
+
if (!g(ca, this)) {
|
|
2291
2321
|
var r;
|
|
2292
2322
|
(r = g(L, this)) == null || r.pause();
|
|
2293
2323
|
}
|
|
2294
2324
|
h(H, this, U).call(this, _.PAUSED, "");
|
|
2295
|
-
} else if (h(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO), h(H, this, W).call(this, _.PAUSED), !g(
|
|
2325
|
+
} else if (h(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO), h(H, this, W).call(this, _.PAUSED), !g(ca, this)) {
|
|
2296
2326
|
var i;
|
|
2297
2327
|
(i = g(L, this)) == null || i.play();
|
|
2298
2328
|
}
|
|
@@ -2316,7 +2346,7 @@ var Oi = [
|
|
|
2316
2346
|
}
|
|
2317
2347
|
break;
|
|
2318
2348
|
case _.DEBUG_PANEL_OPEN:
|
|
2319
|
-
v(n) ? h(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : h(H, this, W).call(this, _.DEBUG_PANEL_OPEN), h(H, this,
|
|
2349
|
+
v(n) ? h(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : h(H, this, W).call(this, _.DEBUG_PANEL_OPEN), h(H, this, Do).call(this);
|
|
2320
2350
|
break;
|
|
2321
2351
|
case "user-interacting":
|
|
2322
2352
|
v(n) ? h(H, this, U).call(this, _.USER_INTERACTING, "") : h(H, this, W).call(this, _.USER_INTERACTING);
|
|
@@ -2324,7 +2354,7 @@ var Oi = [
|
|
|
2324
2354
|
case "muted":
|
|
2325
2355
|
if (g(I, this)) if (v(n)) {
|
|
2326
2356
|
var a;
|
|
2327
|
-
if (g(
|
|
2357
|
+
if (g(ca, 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) {
|
|
2328
2358
|
var o;
|
|
2329
2359
|
(o = g(B, this)) == null || o.stop(), h(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2330
2360
|
left: null,
|
|
@@ -2333,14 +2363,14 @@ var Oi = [
|
|
|
2333
2363
|
}
|
|
2334
2364
|
} else {
|
|
2335
2365
|
var s;
|
|
2336
|
-
g(
|
|
2366
|
+
g(ca, 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();
|
|
2337
2367
|
}
|
|
2338
2368
|
break;
|
|
2339
2369
|
case "ui-locked":
|
|
2340
|
-
v(n) ? h(H, this,
|
|
2370
|
+
v(n) ? h(H, this, vo).call(this) : h(H, this, yo).call(this);
|
|
2341
2371
|
break;
|
|
2342
2372
|
case "is-fullscreen":
|
|
2343
|
-
v(n) ? h(H, this,
|
|
2373
|
+
v(n) ? h(H, this, Co).call(this) : h(H, this, wo).call(this);
|
|
2344
2374
|
break;
|
|
2345
2375
|
case "abr-enabled":
|
|
2346
2376
|
{
|
|
@@ -2355,13 +2385,13 @@ var Oi = [
|
|
|
2355
2385
|
}
|
|
2356
2386
|
break;
|
|
2357
2387
|
case "max-video-bit-rate":
|
|
2358
|
-
m(
|
|
2388
|
+
m(Ki, 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);
|
|
2359
2389
|
break;
|
|
2360
2390
|
case "max-initial-bit-rate":
|
|
2361
|
-
m(
|
|
2391
|
+
m(qi, this, n), v(n) ? h(H, this, U).call(this, _.MAX_INITIAL_BITRATE, n) : h(H, this, W).call(this, _.MAX_INITIAL_BITRATE);
|
|
2362
2392
|
break;
|
|
2363
2393
|
case "is-pip":
|
|
2364
|
-
v(n) ? h(H, this,
|
|
2394
|
+
v(n) ? h(H, this, xo).call(this) : h(H, this, So).call(this);
|
|
2365
2395
|
break;
|
|
2366
2396
|
case "is-airplaying":
|
|
2367
2397
|
if (v(n)) {
|
|
@@ -2375,17 +2405,17 @@ var Oi = [
|
|
|
2375
2405
|
case "is-casting":
|
|
2376
2406
|
if (v(n)) {
|
|
2377
2407
|
var d, f;
|
|
2378
|
-
(d = g(
|
|
2408
|
+
(d = g(Ji, this)) != null && d.isFullscreen() && h(H, this, wo).call(this), (f = g(I, this)) == null || f.pause();
|
|
2379
2409
|
} else if (!document.hidden) {
|
|
2380
2410
|
var ee;
|
|
2381
2411
|
(ee = g(I, this)) == null || ee.play();
|
|
2382
2412
|
}
|
|
2383
2413
|
break;
|
|
2384
2414
|
case "cast-receiver-id":
|
|
2385
|
-
m(
|
|
2415
|
+
m(Qi, this, n);
|
|
2386
2416
|
break;
|
|
2387
2417
|
case "cast-background":
|
|
2388
|
-
m(
|
|
2418
|
+
m($i, this, n);
|
|
2389
2419
|
break;
|
|
2390
2420
|
case "language":
|
|
2391
2421
|
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));
|
|
@@ -2399,7 +2429,7 @@ var Oi = [
|
|
|
2399
2429
|
case "authentication-token":
|
|
2400
2430
|
if (v(n)) {
|
|
2401
2431
|
var te, ne;
|
|
2402
|
-
(te = g(I, this)) == null || te.updateAuthenticationToken(n), (ne = g(
|
|
2432
|
+
(te = g(I, this)) == null || te.updateAuthenticationToken(n), (ne = g(Xi, this)) == null || ne.updateAuthenticationToken(n), h(H, this, U).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2403
2433
|
} else h(H, this, W).call(this, _.AUTHENTICATION_TOKEN);
|
|
2404
2434
|
break;
|
|
2405
2435
|
case "volume":
|
|
@@ -2437,13 +2467,13 @@ var Oi = [
|
|
|
2437
2467
|
_.USER_INTERACTING,
|
|
2438
2468
|
_.PAUSED,
|
|
2439
2469
|
_.HIDE_UI_ON_PAUSE
|
|
2440
|
-
].includes(e) && h(H, this,
|
|
2470
|
+
].includes(e) && h(H, this, bo).call(this);
|
|
2441
2471
|
}
|
|
2442
2472
|
}
|
|
2443
2473
|
connectListener(e) {
|
|
2444
|
-
|
|
2445
|
-
let n = g(
|
|
2446
|
-
switch (n ? n.push(e) : g(
|
|
2474
|
+
Rr(e).forEach((t) => {
|
|
2475
|
+
let n = g(Fi, this).get(t);
|
|
2476
|
+
switch (n ? n.push(e) : g(Fi, this).set(t, [e]), t) {
|
|
2447
2477
|
case _.PAUSED:
|
|
2448
2478
|
var r;
|
|
2449
2479
|
(((r = g(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
@@ -2453,7 +2483,7 @@ var Oi = [
|
|
|
2453
2483
|
((i = g(I, this)) != null && i.muted || this.hasAttribute(_.MUTED)) && e.setAttribute(_.MUTED, "");
|
|
2454
2484
|
break;
|
|
2455
2485
|
case _.MAX_VIDEO_BITRATE:
|
|
2456
|
-
g(
|
|
2486
|
+
g(Ki, this) && e.setAttribute(_.MAX_VIDEO_BITRATE, g(Ki, this));
|
|
2457
2487
|
break;
|
|
2458
2488
|
case _.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2459
2489
|
{
|
|
@@ -2463,10 +2493,10 @@ var Oi = [
|
|
|
2463
2493
|
}
|
|
2464
2494
|
break;
|
|
2465
2495
|
case _.CHANNEL_ID:
|
|
2466
|
-
g(
|
|
2496
|
+
g(Wi, this) && e.setAttribute(_.CHANNEL_ID, g(Wi, this));
|
|
2467
2497
|
break;
|
|
2468
2498
|
case _.CHANNEL_GROUP_ID:
|
|
2469
|
-
g(
|
|
2499
|
+
g(Gi, this) && e.setAttribute(_.CHANNEL_GROUP_ID, g(Gi, this));
|
|
2470
2500
|
break;
|
|
2471
2501
|
case _.AUTHENTICATION_TOKEN: {
|
|
2472
2502
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2479,7 +2509,7 @@ var Oi = [
|
|
|
2479
2509
|
break;
|
|
2480
2510
|
}
|
|
2481
2511
|
case _.TIMESHIFT_THUMBNAIL_URL:
|
|
2482
|
-
g(
|
|
2512
|
+
g(Hi, this) && e.setAttribute(_.TIMESHIFT_THUMBNAIL_URL, g(Hi, this));
|
|
2483
2513
|
break;
|
|
2484
2514
|
case _.DEBUG_PANEL_OPEN:
|
|
2485
2515
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) && e.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
@@ -2505,42 +2535,42 @@ var Oi = [
|
|
|
2505
2535
|
});
|
|
2506
2536
|
}
|
|
2507
2537
|
disconnectListener(e) {
|
|
2508
|
-
|
|
2509
|
-
let n = g(
|
|
2510
|
-
n && g(
|
|
2538
|
+
Rr(e).forEach((t) => {
|
|
2539
|
+
let n = g(Fi, this).get(t);
|
|
2540
|
+
n && g(Fi, this).set(t, n.filter((t) => t !== e));
|
|
2511
2541
|
});
|
|
2512
2542
|
}
|
|
2513
2543
|
get instance() {
|
|
2514
2544
|
return g(I, this);
|
|
2515
2545
|
}
|
|
2516
2546
|
get fullscreen() {
|
|
2517
|
-
return h(H, this,
|
|
2547
|
+
return h(H, this, $a).call(this);
|
|
2518
2548
|
}
|
|
2519
2549
|
get airPlay() {
|
|
2520
|
-
return g(
|
|
2550
|
+
return g(Xi, this);
|
|
2521
2551
|
}
|
|
2522
2552
|
get timelineMarkers() {
|
|
2523
|
-
return
|
|
2553
|
+
return Kr(this.getAttribute(_.TIMELINE_MARKERS));
|
|
2524
2554
|
}
|
|
2525
2555
|
set timelineMarkers(e) {
|
|
2526
|
-
let t =
|
|
2556
|
+
let t = Gr(e);
|
|
2527
2557
|
t.length === 0 ? this.removeAttribute(_.TIMELINE_MARKERS) : this.setAttribute(_.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2528
2558
|
}
|
|
2529
2559
|
connect() {
|
|
2530
|
-
h(H, this,
|
|
2560
|
+
h(H, this, Ha).call(this);
|
|
2531
2561
|
}
|
|
2532
2562
|
};
|
|
2533
|
-
function
|
|
2534
|
-
g(
|
|
2563
|
+
function Va() {
|
|
2564
|
+
g(Hi, this) && (m(Hi, this, void 0), h(H, this, W).call(this, _.TIMESHIFT_THUMBNAIL_URL), h(H, this, W).call(this, _.SEEK_PREVIEW));
|
|
2535
2565
|
}
|
|
2536
|
-
function
|
|
2566
|
+
function Ha() {
|
|
2537
2567
|
var e = this;
|
|
2538
2568
|
return t(function* () {
|
|
2539
2569
|
var t, n;
|
|
2540
|
-
if (!g(
|
|
2541
|
-
h(H, e,
|
|
2542
|
-
let r = g(L, e) === g(
|
|
2543
|
-
g(
|
|
2570
|
+
if (!g(Wi, e)) return;
|
|
2571
|
+
h(H, e, Va).call(e);
|
|
2572
|
+
let r = g(L, e) === g(Vi, e);
|
|
2573
|
+
g(Ri, e).stop(), yield (t = g(I, e)) == null ? void 0 : t.unload(), r && m(L, e, void 0);
|
|
2544
2574
|
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 = {
|
|
2545
2575
|
headers: Te(e.getAttribute("drm-headers")),
|
|
2546
2576
|
queryParams: Te(e.getAttribute("drm-queryparams")),
|
|
@@ -2554,9 +2584,9 @@ function La() {
|
|
|
2554
2584
|
}
|
|
2555
2585
|
}, 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;
|
|
2556
2586
|
m(I, e, new ne({
|
|
2557
|
-
url: g(
|
|
2558
|
-
channelId: g(
|
|
2559
|
-
channelGroupId: g(
|
|
2587
|
+
url: g(Ui, e),
|
|
2588
|
+
channelId: g(Wi, e),
|
|
2589
|
+
channelGroupId: g(Gi, e),
|
|
2560
2590
|
edgeUrl: u,
|
|
2561
2591
|
authenticationToken: d,
|
|
2562
2592
|
muted: a,
|
|
@@ -2592,114 +2622,114 @@ function La() {
|
|
|
2592
2622
|
decoders: ke,
|
|
2593
2623
|
offscreenCanvasEnabled: S,
|
|
2594
2624
|
reconnectHandler: Me
|
|
2595
|
-
})), m(
|
|
2625
|
+
})), m(Vi, e, new Di(g(I, e))), g(L, e) || m(L, e, g(Vi, e)), h(H, e, Ua).call(e), m(zi, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), g(zi, e) && (g(I, e).attach(g(zi, e)), g(ra, e).observe(g(zi, e))), e.setAttribute(_.MEDIA, g(I, e).media);
|
|
2596
2626
|
let Ie = g(I, e);
|
|
2597
|
-
g(
|
|
2627
|
+
g(la, e).call(e, () => {
|
|
2598
2628
|
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());
|
|
2599
2629
|
}), v(Ce) || h(H, e, U).call(e, _.POSTER_SRC, g(I, e).getThumbnailUrl());
|
|
2600
2630
|
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);
|
|
2601
|
-
w && h(H, e,
|
|
2631
|
+
w && h(H, e, io).call(e, g(I, e)), Le && h(H, e, eo).call(e, g(I, e)), Re && h(H, e, Za).call(e, g(I, e)), ze && h(H, e, Ya).call(e, g(I, e)), i || g(I, e).play(), Be && h(H, e, ao).call(e, g(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2602
2632
|
bubbles: !0,
|
|
2603
2633
|
composed: !0,
|
|
2604
2634
|
detail: g(I, e)
|
|
2605
|
-
})), Ve && (h(H, e,
|
|
2635
|
+
})), Ve && (h(H, e, Ka).call(e), Re && h(H, e, Qa).call(e));
|
|
2606
2636
|
})();
|
|
2607
2637
|
}
|
|
2608
|
-
function
|
|
2609
|
-
g(I, this) && (g(I, this).on("rendition levels", g(
|
|
2638
|
+
function Ua() {
|
|
2639
|
+
g(I, this) && (g(I, this).on("rendition levels", g(oa, this)), g(I, this).on("rendition level", g(sa, this)), g(I, this).on("playback state", g(ua, this)), g(I, this).on("volume state", g(da, this)), g(I, this).on("channel switch failed", g(fa, this)), g(I, this).on("channel switch", g(pa, this)), g(I, this).on("channels", g(ma, this)), g(I, this).on("languages", g(ha, this)), g(I, this).on("text tracks", g(ga, this)), g(I, this).on("needs user input", g(_a, this)), g(I, this).on("is live", g(va, this)), g(I, this).on("timeshift info", g(ya, this)));
|
|
2610
2640
|
}
|
|
2611
|
-
function
|
|
2612
|
-
g(I, this) && (g(I, this).off("playback state", g(
|
|
2641
|
+
function Wa() {
|
|
2642
|
+
g(I, this) && (g(I, this).off("playback state", g(ua, this)), g(I, this).off("volume state", g(da, this)), g(I, this).off("channel switch failed", g(fa, this)), g(I, this).off("channel switch", g(pa, this)), g(I, this).off("channels", g(ma, this)), g(I, this).off("languages", g(ha, this)), g(I, this).off("text tracks", g(ga, this)), g(I, this).off("needs user input", g(_a, this)), g(I, this).off("is live", g(va, this)), g(I, this).off("timeshift info", g(ya, this)));
|
|
2613
2643
|
}
|
|
2614
|
-
function
|
|
2615
|
-
g(R, this) && (g(R, this).addEventListener("playing", g(
|
|
2644
|
+
function Ga() {
|
|
2645
|
+
g(R, this) && (g(R, this).addEventListener("playing", g(ba, this)), g(R, this).addEventListener("pause", g(xa, this)), g(R, this).addEventListener("ended", g(Sa, this)), g(R, this).addEventListener("timeupdate", g(wa, this)), g(R, this).addEventListener("volumechange", g(Ta, this)), g(R, this).addEventListener("hlsbuffering", g(Ea, this)), g(R, this).addEventListener("hlsnotbuffering", g(Da, this)), g(R, this).addEventListener("timeshiftready", g(Oa, this)));
|
|
2616
2646
|
}
|
|
2617
|
-
function
|
|
2647
|
+
function Ka() {
|
|
2618
2648
|
var e, t, n, r;
|
|
2619
2649
|
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);
|
|
2620
|
-
h(H, this,
|
|
2650
|
+
h(H, this, qa).call(this), m(R, this, new li(g(Bi, this), {
|
|
2621
2651
|
volume: a,
|
|
2622
2652
|
muted: o,
|
|
2623
|
-
maxVideoBitRate: g(
|
|
2624
|
-
})), g(R, this).addEventListener("durationchange", g(
|
|
2653
|
+
maxVideoBitRate: g(Ki, this) ? parseInt(g(Ki, this), 10) : void 0
|
|
2654
|
+
})), g(R, this).addEventListener("durationchange", g(Ca, this));
|
|
2625
2655
|
}
|
|
2626
|
-
function
|
|
2627
|
-
g(R, this) && (h(H, this,
|
|
2656
|
+
function qa() {
|
|
2657
|
+
g(R, this) && (h(H, this, Ja).call(this), g(R, this).removeEventListener("durationchange", g(Ca, this)), g(R, this).cleanup(), g(L, this) === g(R, this) && m(L, this, void 0), m(R, this, void 0));
|
|
2628
2658
|
}
|
|
2629
|
-
function
|
|
2630
|
-
g(R, this) && (g(R, this).removeEventListener("playing", g(
|
|
2659
|
+
function Ja() {
|
|
2660
|
+
g(R, this) && (g(R, this).removeEventListener("playing", g(ba, this)), g(R, this).removeEventListener("pause", g(xa, this)), g(R, this).removeEventListener("ended", g(Sa, this)), g(R, this).removeEventListener("timeupdate", g(wa, this)), g(R, this).removeEventListener("volumechange", g(Ta, this)), g(R, this).removeEventListener("hlsbuffering", g(Ea, this)), g(R, this).removeEventListener("hlsnotbuffering", g(Da, this)), g(R, this).removeEventListener("timeshiftready", g(Oa, this)));
|
|
2631
2661
|
}
|
|
2632
|
-
function
|
|
2633
|
-
e.mediaElement instanceof HTMLVideoElement && (m(z, this, new
|
|
2662
|
+
function Ya(e) {
|
|
2663
|
+
e.mediaElement instanceof HTMLVideoElement && (m(z, this, new _r(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) => {
|
|
2634
2664
|
e ? h(H, this, U).call(this, _.IS_PIP, "") : h(H, this, W).call(this, _.IS_PIP);
|
|
2635
2665
|
}));
|
|
2636
2666
|
}
|
|
2637
|
-
function
|
|
2667
|
+
function Xa() {
|
|
2638
2668
|
var e;
|
|
2639
2669
|
if (!g(z, this)) return;
|
|
2640
2670
|
let t = null;
|
|
2641
|
-
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
|
|
2671
|
+
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 _r(t)), g(z, this).on("on picture in picture change", (e) => {
|
|
2642
2672
|
e ? h(H, this, U).call(this, _.IS_PIP, "") : h(H, this, W).call(this, _.IS_PIP);
|
|
2643
2673
|
}));
|
|
2644
2674
|
}
|
|
2645
|
-
function
|
|
2646
|
-
let t = !
|
|
2647
|
-
m(
|
|
2675
|
+
function Za(e) {
|
|
2676
|
+
let t = !sr.isFullscreenApiSupported(this) && sr.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2677
|
+
m(Ji, this, new sr(t)), g(Ji, this).on("on fullscreen change", (e) => {
|
|
2648
2678
|
e ? h(H, this, U).call(this, _.FULLSCREEN, "") : h(H, this, W).call(this, _.FULLSCREEN);
|
|
2649
2679
|
});
|
|
2650
2680
|
}
|
|
2651
|
-
function
|
|
2681
|
+
function Qa() {
|
|
2652
2682
|
var e;
|
|
2653
|
-
g(R, this) && (m(
|
|
2683
|
+
g(R, this) && (m(Yi, this, !sr.isFullscreenApiSupported(this) && sr.isFullscreenApiSupported((e = g(R, this)) == null ? void 0 : e.videoElement) ? new sr(g(R, this).videoElement) : new sr(this)), g(Yi, this).on("on fullscreen change", (e) => {
|
|
2654
2684
|
e ? h(H, this, U).call(this, _.FULLSCREEN, "") : h(H, this, W).call(this, _.FULLSCREEN);
|
|
2655
2685
|
}));
|
|
2656
2686
|
}
|
|
2657
|
-
function
|
|
2658
|
-
return this.hasAttribute(_.TIMESHIFT_POSITION) ? g(
|
|
2687
|
+
function $a() {
|
|
2688
|
+
return this.hasAttribute(_.TIMESHIFT_POSITION) ? g(Yi, this) : g(Ji, this);
|
|
2659
2689
|
}
|
|
2660
|
-
function
|
|
2661
|
-
m(
|
|
2662
|
-
background: g(
|
|
2663
|
-
receiverApplicationId: g(
|
|
2690
|
+
function eo(e) {
|
|
2691
|
+
m(Zi, this, new Ae({
|
|
2692
|
+
background: g($i, this),
|
|
2693
|
+
receiverApplicationId: g(Qi, this),
|
|
2664
2694
|
options: e.getCastOptions()
|
|
2665
|
-
})), g(
|
|
2695
|
+
})), g(Zi, this).on("devices available", h(H, this, to).bind(this)), g(Zi, this).on("connected", h(H, this, no).bind(this)), g(Zi, this).on("resumed", h(H, this, no).bind(this)), g(Zi, this).on("disconnected", h(H, this, ro).bind(this)), g(Zi, this).init().catch((e) => {
|
|
2666
2696
|
g(V, this).warn("Failed to initialize CastSender", e);
|
|
2667
2697
|
});
|
|
2668
2698
|
}
|
|
2669
|
-
function
|
|
2699
|
+
function to(e) {
|
|
2670
2700
|
e ? h(H, this, U).call(this, _.CAST_AVAILABLE, "") : h(H, this, W).call(this, _.CAST_AVAILABLE);
|
|
2671
2701
|
}
|
|
2672
|
-
function
|
|
2702
|
+
function no() {
|
|
2673
2703
|
var e, t;
|
|
2674
2704
|
h(H, this, U).call(this, _.IS_CASTING, "");
|
|
2675
|
-
let n = (e = (t = g(
|
|
2705
|
+
let n = (e = (t = g(Zi, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2676
2706
|
h(H, this, U).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2677
2707
|
}
|
|
2678
|
-
function
|
|
2708
|
+
function ro() {
|
|
2679
2709
|
h(H, this, W).call(this, _.IS_CASTING), h(H, this, W).call(this, _.CAST_RECEIVER_NAME);
|
|
2680
2710
|
}
|
|
2681
|
-
function
|
|
2711
|
+
function io(e) {
|
|
2682
2712
|
var t;
|
|
2683
|
-
(t = g(
|
|
2713
|
+
(t = g(Xi, this)) == null || t.unload();
|
|
2684
2714
|
let n = e.getCastOptions();
|
|
2685
|
-
m(
|
|
2715
|
+
m(Xi, this, new Jn({
|
|
2686
2716
|
url: n.url,
|
|
2687
2717
|
channelId: n.channelId,
|
|
2688
2718
|
authenticationToken: n.authenticationToken,
|
|
2689
2719
|
container: this
|
|
2690
|
-
})), g(
|
|
2720
|
+
})), g(Xi, this).once("available", () => {
|
|
2691
2721
|
h(H, this, U).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2692
|
-
}), g(
|
|
2722
|
+
}), g(Xi, this).on("connected", () => {
|
|
2693
2723
|
h(H, this, U).call(this, _.IS_AIRPLAYING, "");
|
|
2694
|
-
}), g(
|
|
2724
|
+
}), g(Xi, this).on("disconnected", () => {
|
|
2695
2725
|
h(H, this, W).call(this, _.IS_AIRPLAYING);
|
|
2696
2726
|
});
|
|
2697
2727
|
}
|
|
2698
|
-
function
|
|
2728
|
+
function ao(e) {
|
|
2699
2729
|
var t;
|
|
2700
2730
|
if ((t = g(B, this)) == null || t.unload(), !a()) {
|
|
2701
|
-
if (e.audioNode) m(B, this, new
|
|
2702
|
-
else if (e.mediaElement instanceof HTMLMediaElement) m(B, this, new
|
|
2731
|
+
if (e.audioNode) m(B, this, new Jr(e.audioNode));
|
|
2732
|
+
else if (e.mediaElement instanceof HTMLMediaElement) m(B, this, new Jr(e.mediaElement));
|
|
2703
2733
|
else return;
|
|
2704
2734
|
g(B, this).on("on decibel change", (e) => {
|
|
2705
2735
|
h(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
@@ -2709,43 +2739,43 @@ function eo(e) {
|
|
|
2709
2739
|
})), (!g(B, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && g(B, this).start();
|
|
2710
2740
|
}
|
|
2711
2741
|
}
|
|
2712
|
-
function
|
|
2742
|
+
function oo() {
|
|
2713
2743
|
var e, t, n, r, i;
|
|
2714
|
-
|
|
2715
|
-
for (let e of Object.values(S)) this.removeEventListener(e, g(
|
|
2716
|
-
h(H, this,
|
|
2744
|
+
Pi === this && (Pi = void 0), h(H, this, co).call(this), h(H, this, ko).call(this), g(ra, this).unload(), (e = g(I, this)) == null || e.unload(), (t = g(z, this)) == null || t.unload(), (n = g(Ji, this)) == null || n.unload(), (r = g(Yi, this)) == null || r.unload(), (i = g(B, this)) == null || i.unload(), h(H, this, qa).call(this);
|
|
2745
|
+
for (let e of Object.values(S)) this.removeEventListener(e, g(Aa, this));
|
|
2746
|
+
h(H, this, Wa).call(this), g(Li, this) && (clearTimeout(g(Li, this)), m(Li, this, null)), g(Ri, this).stop(), this.disconnectListener(this);
|
|
2717
2747
|
}
|
|
2718
|
-
function
|
|
2719
|
-
let e = () => (customElements.get("vindral-debug-panel") || import("./
|
|
2720
|
-
window._vindralDebug = e, m(
|
|
2748
|
+
function so() {
|
|
2749
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./DyoeX7Rz.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), g(I, this));
|
|
2750
|
+
window._vindralDebug = e, m(na, this, e);
|
|
2721
2751
|
}
|
|
2722
|
-
function
|
|
2752
|
+
function co() {
|
|
2723
2753
|
let e = window;
|
|
2724
|
-
g(
|
|
2754
|
+
g(na, this) && e._vindralDebug === g(na, this) && delete e._vindralDebug, m(na, this, null);
|
|
2725
2755
|
}
|
|
2726
|
-
function
|
|
2727
|
-
e.pointerType !== "mouse" && e.timeStamp - g(
|
|
2756
|
+
function lo(e) {
|
|
2757
|
+
e.pointerType !== "mouse" && e.timeStamp - g(ka, this) < 250 || (h(H, this, vo).call(this), g(Li, this) && clearTimeout(g(Li, this)), e.target instanceof HTMLElement && ([this, g(zi, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && h(H, this, yo).call(this));
|
|
2728
2758
|
}
|
|
2729
|
-
function
|
|
2759
|
+
function uo(e) {
|
|
2730
2760
|
let t = this.hasAttribute(_.USER_INTERACTING);
|
|
2731
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, g(
|
|
2761
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, g(zi, this)].includes(e.target) && t ? h(H, this, _o).call(this) : h(H, this, yo).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && h(H, this, yo).call(this);
|
|
2732
2762
|
}
|
|
2733
|
-
function
|
|
2763
|
+
function fo(e) {
|
|
2734
2764
|
switch (e) {
|
|
2735
2765
|
case "dblclick-fullscreen": return x(this.getAttribute(_.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2736
2766
|
default: return !0;
|
|
2737
2767
|
}
|
|
2738
2768
|
}
|
|
2739
|
-
function
|
|
2740
|
-
h(H, this,
|
|
2769
|
+
function po(e) {
|
|
2770
|
+
h(H, this, fo).call(this, "dblclick-fullscreen") && (!g(Ji, this) || e.target instanceof y || e.target instanceof Ve || e.target instanceof ji || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2741
2771
|
}
|
|
2742
|
-
function
|
|
2743
|
-
this.hasAttribute(_.USER_INTERACTING) || h(H, this,
|
|
2772
|
+
function mo(e) {
|
|
2773
|
+
this.hasAttribute(_.USER_INTERACTING) || h(H, this, yo).call(this);
|
|
2744
2774
|
}
|
|
2745
|
-
function
|
|
2775
|
+
function ho(e) {
|
|
2746
2776
|
var t;
|
|
2747
2777
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2748
|
-
if (n || r || !
|
|
2778
|
+
if (n || r || !Ni.includes(i)) return;
|
|
2749
2779
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2750
2780
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2751
2781
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2763,28 +2793,28 @@ function lo(e) {
|
|
|
2763
2793
|
break;
|
|
2764
2794
|
}
|
|
2765
2795
|
}
|
|
2766
|
-
function
|
|
2796
|
+
function go() {
|
|
2767
2797
|
var e = this;
|
|
2768
2798
|
return t(function* () {
|
|
2769
|
-
if (!g(I, e) || !g(
|
|
2799
|
+
if (!g(I, e) || !g(Gi, e)) return;
|
|
2770
2800
|
let t = Date.now();
|
|
2771
|
-
if (g(
|
|
2801
|
+
if (g(Ia, e) && t - g(Ia, e) < 1e4) g(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2772
2802
|
else {
|
|
2773
|
-
m(
|
|
2774
|
-
let n = yield g(I, e).getApiClient().getChannels(g(
|
|
2803
|
+
m(Ia, e, t);
|
|
2804
|
+
let n = yield g(I, e).getApiClient().getChannels(g(Gi, e));
|
|
2775
2805
|
h(H, e, U).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2776
2806
|
}
|
|
2777
|
-
m(
|
|
2807
|
+
m(ea, e, window.setTimeout(() => void h(H, e, go).call(e), 1e4));
|
|
2778
2808
|
})();
|
|
2779
2809
|
}
|
|
2780
|
-
function
|
|
2810
|
+
function _o() {
|
|
2781
2811
|
!this.hasAttribute(_.USER_INTERACTING) || this.hasAttribute(_.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2782
2812
|
bubbles: !0,
|
|
2783
2813
|
composed: !0,
|
|
2784
2814
|
detail: { active: !1 }
|
|
2785
2815
|
})), this.removeAttribute(_.USER_INTERACTING));
|
|
2786
2816
|
}
|
|
2787
|
-
function
|
|
2817
|
+
function vo() {
|
|
2788
2818
|
this.hasAttribute(_.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2789
2819
|
this.setAttribute(_.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2790
2820
|
bubbles: !0,
|
|
@@ -2793,64 +2823,64 @@ function po() {
|
|
|
2793
2823
|
}));
|
|
2794
2824
|
});
|
|
2795
2825
|
}
|
|
2796
|
-
function
|
|
2797
|
-
h(H, this,
|
|
2798
|
-
h(H, this,
|
|
2799
|
-
}, g(
|
|
2826
|
+
function yo() {
|
|
2827
|
+
h(H, this, vo).call(this), g(Li, this) && clearTimeout(g(Li, this)), g(Ii, this) && m(Li, this, self.setTimeout(() => {
|
|
2828
|
+
h(H, this, _o).call(this);
|
|
2829
|
+
}, g(Ii, this)));
|
|
2800
2830
|
}
|
|
2801
|
-
function
|
|
2831
|
+
function bo() {
|
|
2802
2832
|
var e;
|
|
2803
2833
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2804
2834
|
(e = g(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2805
2835
|
}
|
|
2806
|
-
function
|
|
2836
|
+
function xo() {
|
|
2807
2837
|
var e;
|
|
2808
|
-
h(H, this,
|
|
2838
|
+
h(H, this, Xa).call(this), h(H, this, To).call(this), (e = g(z, this)) == null || e.request().catch((e) => {
|
|
2809
2839
|
g(V, this).warn("Failed to enter picture in picture:", e);
|
|
2810
2840
|
});
|
|
2811
2841
|
}
|
|
2812
|
-
function
|
|
2842
|
+
function So() {
|
|
2813
2843
|
var e;
|
|
2814
2844
|
(e = g(z, this)) == null || e.exit().catch((e) => {
|
|
2815
2845
|
g(V, this).warn("Failed to exit picture in picture:", e);
|
|
2816
2846
|
});
|
|
2817
2847
|
}
|
|
2818
|
-
function
|
|
2819
|
-
let e = h(H, this,
|
|
2848
|
+
function Co() {
|
|
2849
|
+
let e = h(H, this, $a).call(this);
|
|
2820
2850
|
if (!e) {
|
|
2821
2851
|
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), h(H, this, U).call(this, _.FULLSCREEN, "");
|
|
2822
2852
|
return;
|
|
2823
2853
|
}
|
|
2824
|
-
e != null && e.isFullscreenApiSupported() ? (h(H, this,
|
|
2825
|
-
g(
|
|
2854
|
+
e != null && e.isFullscreenApiSupported() ? (h(H, this, To).call(this), e == null || e.request().then(() => {
|
|
2855
|
+
g(La, this).call(this);
|
|
2826
2856
|
}).catch((e) => {
|
|
2827
2857
|
g(V, this).warn("Failed to enter fullscreen:", e);
|
|
2828
2858
|
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), h(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2829
2859
|
}
|
|
2830
|
-
function
|
|
2831
|
-
let e = h(H, this,
|
|
2860
|
+
function wo() {
|
|
2861
|
+
let e = h(H, this, $a).call(this);
|
|
2832
2862
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2833
|
-
g(
|
|
2863
|
+
g(Ra, this).call(this);
|
|
2834
2864
|
}).catch((e) => {
|
|
2835
2865
|
g(V, this).warn("Failed to exit fullscreen:", e);
|
|
2836
2866
|
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), h(H, this, W).call(this, _.FULLSCREEN));
|
|
2837
2867
|
}
|
|
2838
|
-
function
|
|
2868
|
+
function To() {
|
|
2839
2869
|
g(I, this) && g(I, this).emitter.emit("ios-hack: reset size");
|
|
2840
2870
|
}
|
|
2841
|
-
function
|
|
2871
|
+
function Eo() {
|
|
2842
2872
|
return this.hasAttribute(_.DEBUG_PANEL_OPEN);
|
|
2843
2873
|
}
|
|
2844
|
-
function
|
|
2845
|
-
h(H, this,
|
|
2874
|
+
function Do() {
|
|
2875
|
+
h(H, this, Eo).call(this) ? h(H, this, Oo).call(this) : h(H, this, ko).call(this);
|
|
2846
2876
|
}
|
|
2847
|
-
function
|
|
2848
|
-
g(
|
|
2877
|
+
function Oo() {
|
|
2878
|
+
g(za, this) === null && (h(H, this, Ao).call(this), m(za, this, window.setInterval(() => h(H, this, Ao).call(this), 1e3)));
|
|
2849
2879
|
}
|
|
2850
|
-
function
|
|
2851
|
-
g(
|
|
2880
|
+
function ko() {
|
|
2881
|
+
g(za, this) && (clearInterval(g(za, this)), m(za, 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);
|
|
2852
2882
|
}
|
|
2853
|
-
function
|
|
2883
|
+
function Ao() {
|
|
2854
2884
|
if (!g(I, this)) return;
|
|
2855
2885
|
try {
|
|
2856
2886
|
let e = g(I, this).getStatistics().drift;
|
|
@@ -2866,13 +2896,13 @@ function To() {
|
|
|
2866
2896
|
}
|
|
2867
2897
|
function U(e, t) {
|
|
2868
2898
|
var n;
|
|
2869
|
-
(n = g(
|
|
2899
|
+
(n = g(Fi, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2870
2900
|
}
|
|
2871
2901
|
function W(e) {
|
|
2872
2902
|
var t;
|
|
2873
|
-
(t = g(
|
|
2903
|
+
(t = g(Fi, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2874
2904
|
}
|
|
2875
|
-
e(
|
|
2905
|
+
e(Ba, "observedAttributes", [
|
|
2876
2906
|
...ke,
|
|
2877
2907
|
"url",
|
|
2878
2908
|
"edge-url",
|
|
@@ -2917,8 +2947,8 @@ e(Fa, "observedAttributes", [
|
|
|
2917
2947
|
]);
|
|
2918
2948
|
//#endregion
|
|
2919
2949
|
//#region ../../libs/player-next/src/components/FullscreenButton.ts
|
|
2920
|
-
var
|
|
2921
|
-
|
|
2950
|
+
var jo, Mo = document.createElement("template");
|
|
2951
|
+
Mo.innerHTML = `
|
|
2922
2952
|
<style>
|
|
2923
2953
|
:host {
|
|
2924
2954
|
display: var(--fullscreen-button-display);
|
|
@@ -2942,10 +2972,10 @@ Do.innerHTML = `
|
|
|
2942
2972
|
</slot>
|
|
2943
2973
|
</slot>
|
|
2944
2974
|
`;
|
|
2945
|
-
var
|
|
2975
|
+
var No = class extends y {
|
|
2946
2976
|
constructor() {
|
|
2947
2977
|
var e;
|
|
2948
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2978
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Mo.content.cloneNode(!0));
|
|
2949
2979
|
}
|
|
2950
2980
|
connectedCallback() {
|
|
2951
2981
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Fullscreen");
|
|
@@ -2970,48 +3000,48 @@ var Oo = class extends y {
|
|
|
2970
3000
|
}));
|
|
2971
3001
|
}
|
|
2972
3002
|
};
|
|
2973
|
-
|
|
3003
|
+
jo = No, e(No, "observedAttributes", [...b(jo, "observedAttributes", jo), _.FULLSCREEN]);
|
|
2974
3004
|
//#endregion
|
|
2975
3005
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2976
|
-
var
|
|
2977
|
-
|
|
3006
|
+
var Po, Fo = "\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", Io = document.createElement("template");
|
|
3007
|
+
Io.innerHTML = `
|
|
2978
3008
|
<style>
|
|
2979
3009
|
:host(:not([hidden])) {
|
|
2980
3010
|
display: var(--language-menu-display);
|
|
2981
3011
|
}
|
|
2982
3012
|
</style>
|
|
2983
3013
|
|
|
2984
|
-
<slot name="button">${
|
|
3014
|
+
<slot name="button">${Fo}</slot>
|
|
2985
3015
|
<slot name="listbox" hidden>
|
|
2986
3016
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2987
3017
|
</slot>
|
|
2988
3018
|
`;
|
|
2989
|
-
var
|
|
3019
|
+
var Lo = /* @__PURE__ */ new WeakSet(), Ro = class extends Ve {
|
|
2990
3020
|
constructor() {
|
|
2991
3021
|
var e, t, n;
|
|
2992
|
-
super(), C(this,
|
|
3022
|
+
super(), C(this, Lo), (e = this.shadowRoot) == null || e.appendChild(Io.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]");
|
|
2993
3023
|
}
|
|
2994
3024
|
connectedCallback() {
|
|
2995
|
-
super.connectedCallback(), h(
|
|
3025
|
+
super.connectedCallback(), h(Lo, this, zo).call(this), this.setAttribute("aria-label", "Audio & Subtitles");
|
|
2996
3026
|
}
|
|
2997
3027
|
attributeChangedCallback(e, t, n) {
|
|
2998
|
-
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && h(
|
|
3028
|
+
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && h(Lo, this, zo).call(this);
|
|
2999
3029
|
}
|
|
3000
3030
|
};
|
|
3001
|
-
|
|
3002
|
-
function
|
|
3031
|
+
Po = Ro;
|
|
3032
|
+
function zo() {
|
|
3003
3033
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(_.LANGUAGES)), n = e(this.getAttribute(_.TEXT_TRACKS));
|
|
3004
3034
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
3005
3035
|
}
|
|
3006
|
-
e(
|
|
3007
|
-
...b(
|
|
3036
|
+
e(Ro, "observedAttributes", [
|
|
3037
|
+
...b(Po, "observedAttributes", Po),
|
|
3008
3038
|
_.LANGUAGES,
|
|
3009
3039
|
_.TEXT_TRACKS
|
|
3010
3040
|
]);
|
|
3011
3041
|
//#endregion
|
|
3012
3042
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
3013
|
-
var
|
|
3014
|
-
|
|
3043
|
+
var Bo = document.createElement("template");
|
|
3044
|
+
Bo.innerHTML = `
|
|
3015
3045
|
<style>
|
|
3016
3046
|
:host {
|
|
3017
3047
|
font: inherit;
|
|
@@ -3125,21 +3155,21 @@ Fo.innerHTML = `
|
|
|
3125
3155
|
<div class="menu"></div>
|
|
3126
3156
|
</div>
|
|
3127
3157
|
`;
|
|
3128
|
-
var
|
|
3158
|
+
var 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(), Jo = /* @__PURE__ */ new WeakMap(), Yo = /* @__PURE__ */ new WeakMap(), Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), $o = class extends HTMLElement {
|
|
3129
3159
|
constructor() {
|
|
3130
|
-
super(), C(this, G), p(this,
|
|
3160
|
+
super(), C(this, G), p(this, Vo, []), p(this, Ho, []), p(this, Uo, void 0), p(this, Wo, void 0), p(this, Go, []), p(this, Ko, []), p(this, qo, null), p(this, Jo, null), p(this, Yo, null), p(this, Xo, null), p(this, Zo, null), p(this, Qo, null), e(this, "handleEvent", (e) => {
|
|
3131
3161
|
switch (e.type) {
|
|
3132
3162
|
case "keydown":
|
|
3133
|
-
h(G, this,
|
|
3163
|
+
h(G, this, cs).call(this, e);
|
|
3134
3164
|
break;
|
|
3135
3165
|
}
|
|
3136
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3166
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Bo.content.cloneNode(!0));
|
|
3137
3167
|
}
|
|
3138
3168
|
connectedCallback() {
|
|
3139
3169
|
let e = this.getRootNode();
|
|
3140
3170
|
if (e instanceof ShadowRoot) {
|
|
3141
3171
|
var t, n, r;
|
|
3142
|
-
m(
|
|
3172
|
+
m(Yo, this, e.host.closest("vindral-controller")), (t = g(Yo, this)) == null || t.connectListener(this), m(qo, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), m(Jo, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), h(G, this, es).call(this), h(G, this, ts).call(this), m(Xo, this, e.host), this.addEventListener("keydown", this);
|
|
3143
3173
|
}
|
|
3144
3174
|
}
|
|
3145
3175
|
disconnectedCallback() {
|
|
@@ -3149,16 +3179,16 @@ var Io = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Ro =
|
|
|
3149
3179
|
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));
|
|
3150
3180
|
}
|
|
3151
3181
|
set languages(e) {
|
|
3152
|
-
m(
|
|
3182
|
+
m(Vo, this, e), h(G, this, rs).call(this), h(G, this, as).call(this);
|
|
3153
3183
|
}
|
|
3154
3184
|
set textTracks(e) {
|
|
3155
|
-
m(
|
|
3185
|
+
m(Ho, this, e), h(G, this, ns).call(this), h(G, this, os).call(this);
|
|
3156
3186
|
}
|
|
3157
3187
|
set language(e) {
|
|
3158
|
-
m(
|
|
3188
|
+
m(Uo, this, e), h(G, this, as).call(this);
|
|
3159
3189
|
}
|
|
3160
3190
|
set textTrack(e) {
|
|
3161
|
-
m(
|
|
3191
|
+
m(Wo, this, e), h(G, this, os).call(this);
|
|
3162
3192
|
}
|
|
3163
3193
|
get keysUsed() {
|
|
3164
3194
|
return [
|
|
@@ -3175,10 +3205,10 @@ var Io = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Ro =
|
|
|
3175
3205
|
];
|
|
3176
3206
|
}
|
|
3177
3207
|
focus() {
|
|
3178
|
-
g(
|
|
3208
|
+
g(Zo, this) ? g(Zo, this).focus() : g(Qo, this) && g(Qo, this).focus();
|
|
3179
3209
|
}
|
|
3180
3210
|
};
|
|
3181
|
-
function
|
|
3211
|
+
function es() {
|
|
3182
3212
|
new IntersectionObserver((e) => {
|
|
3183
3213
|
e.forEach((e) => {
|
|
3184
3214
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3187,55 +3217,55 @@ function Yo() {
|
|
|
3187
3217
|
} else this.style.height = "auto";
|
|
3188
3218
|
});
|
|
3189
3219
|
}, {
|
|
3190
|
-
root: g(
|
|
3220
|
+
root: g(Yo, this),
|
|
3191
3221
|
threshold: 0
|
|
3192
3222
|
}).observe(this);
|
|
3193
3223
|
}
|
|
3194
|
-
function
|
|
3195
|
-
g(
|
|
3224
|
+
function ts() {
|
|
3225
|
+
g(qo, this) && (h(G, this, rs).call(this), h(G, this, as).call(this)), g(Jo, this) && (h(G, this, ns).call(this), h(G, this, os).call(this));
|
|
3196
3226
|
}
|
|
3197
|
-
function
|
|
3198
|
-
g(
|
|
3199
|
-
let e = h(G, this,
|
|
3200
|
-
g(
|
|
3227
|
+
function ns() {
|
|
3228
|
+
g(Jo, this).innerHTML = "", m(Ko, this, []);
|
|
3229
|
+
let e = h(G, this, is).call(this, "Off", "textTrack", void 0);
|
|
3230
|
+
g(Jo, this).appendChild(e), g(Ko, this).push({
|
|
3201
3231
|
element: e,
|
|
3202
3232
|
value: void 0
|
|
3203
|
-
}), g(
|
|
3204
|
-
let t = h(G, this,
|
|
3205
|
-
g(
|
|
3233
|
+
}), g(Ho, this).forEach((e) => {
|
|
3234
|
+
let t = h(G, this, is).call(this, e, "textTrack", e);
|
|
3235
|
+
g(Jo, this).appendChild(t), g(Ko, this).push({
|
|
3206
3236
|
element: t,
|
|
3207
3237
|
value: e
|
|
3208
3238
|
});
|
|
3209
|
-
}), h(G, this,
|
|
3239
|
+
}), h(G, this, os).call(this);
|
|
3210
3240
|
}
|
|
3211
|
-
function
|
|
3212
|
-
g(
|
|
3213
|
-
let t = h(G, this,
|
|
3214
|
-
g(
|
|
3241
|
+
function rs() {
|
|
3242
|
+
g(qo, this).innerHTML = "", m(Go, this, []), g(Vo, this).forEach((e) => {
|
|
3243
|
+
let t = h(G, this, is).call(this, e, "language", e);
|
|
3244
|
+
g(qo, this).appendChild(t), g(Go, this).push({
|
|
3215
3245
|
element: t,
|
|
3216
3246
|
value: e
|
|
3217
3247
|
});
|
|
3218
|
-
}), h(G, this,
|
|
3248
|
+
}), h(G, this, as).call(this);
|
|
3219
3249
|
}
|
|
3220
|
-
function
|
|
3250
|
+
function is(e, t, n) {
|
|
3221
3251
|
let r = document.createElement("div");
|
|
3222
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => h(G, this,
|
|
3252
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => h(G, this, ss).call(this, n, t)), r;
|
|
3223
3253
|
}
|
|
3224
|
-
function
|
|
3225
|
-
g(
|
|
3226
|
-
let e = g(
|
|
3227
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3254
|
+
function as() {
|
|
3255
|
+
g(Zo, this) && (g(Zo, this).removeAttribute("aria-selected"), g(Zo, this).tabIndex = -1);
|
|
3256
|
+
let e = g(Go, this).find((e) => e.value === g(Uo, this));
|
|
3257
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(Zo, this, e.element));
|
|
3228
3258
|
}
|
|
3229
|
-
function
|
|
3230
|
-
g(
|
|
3231
|
-
let e = g(
|
|
3232
|
-
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3259
|
+
function os() {
|
|
3260
|
+
g(Qo, this) && (g(Qo, this).removeAttribute("aria-selected"), g(Qo, this).tabIndex = -1);
|
|
3261
|
+
let e = g(Ko, this).find((e) => e.value === g(Wo, this));
|
|
3262
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(Qo, this, e.element);
|
|
3233
3263
|
else {
|
|
3234
|
-
let e = g(
|
|
3235
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3264
|
+
let e = g(Ko, this).find((e) => e.value === void 0);
|
|
3265
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(Qo, this, e.element));
|
|
3236
3266
|
}
|
|
3237
3267
|
}
|
|
3238
|
-
function
|
|
3268
|
+
function ss(e, t) {
|
|
3239
3269
|
this.dispatchEvent(new Event("change", {
|
|
3240
3270
|
bubbles: !0,
|
|
3241
3271
|
composed: !0
|
|
@@ -3247,36 +3277,36 @@ function ns(e, t) {
|
|
|
3247
3277
|
detail: e
|
|
3248
3278
|
}));
|
|
3249
3279
|
}
|
|
3250
|
-
function
|
|
3280
|
+
function cs(e) {
|
|
3251
3281
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3252
3282
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3253
3283
|
var a;
|
|
3254
|
-
(a = g(
|
|
3284
|
+
(a = g(Xo, this)) == null || a.hide();
|
|
3255
3285
|
} else if (t === "Enter" || t === " ") {
|
|
3256
3286
|
var o;
|
|
3257
|
-
(o = h(G, this,
|
|
3258
|
-
} else h(G, this,
|
|
3287
|
+
(o = h(G, this, ds).call(this)) == null || (o = o.element) == null || o.click();
|
|
3288
|
+
} else h(G, this, ls).call(this, e);
|
|
3259
3289
|
}
|
|
3260
|
-
function
|
|
3290
|
+
function ls(e) {
|
|
3261
3291
|
var t;
|
|
3262
|
-
let { key: n } = e, r = [...g(
|
|
3292
|
+
let { key: n } = e, r = [...g(Go, this), ...g(Ko, this)], i = (t = h(G, this, ds).call(this)) == null ? r[0] : t;
|
|
3263
3293
|
if (!i) return;
|
|
3264
3294
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3265
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = h(G, this,
|
|
3295
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = h(G, this, us).call(this, a, "left") : n === "ArrowRight" ? o = h(G, this, us).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);
|
|
3266
3296
|
let s = r[o];
|
|
3267
|
-
s && (h(G, this,
|
|
3297
|
+
s && (h(G, this, fs).call(this, s.value), s.element.focus());
|
|
3268
3298
|
}
|
|
3269
|
-
function
|
|
3270
|
-
let n = g(
|
|
3299
|
+
function us(e, t) {
|
|
3300
|
+
let n = g(Go, this).length, r = g(Ko, this).length;
|
|
3271
3301
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3272
3302
|
}
|
|
3273
|
-
function
|
|
3274
|
-
return [...g(
|
|
3303
|
+
function ds() {
|
|
3304
|
+
return [...g(Go, this), ...g(Ko, this)].find((e) => e.element.tabIndex === 0);
|
|
3275
3305
|
}
|
|
3276
|
-
function
|
|
3277
|
-
for (let t of [...g(
|
|
3306
|
+
function fs(e) {
|
|
3307
|
+
for (let t of [...g(Go, this), ...g(Ko, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3278
3308
|
}
|
|
3279
|
-
e(
|
|
3309
|
+
e($o, "observedAttributes", [
|
|
3280
3310
|
_.LANGUAGES,
|
|
3281
3311
|
_.TEXT_TRACKS,
|
|
3282
3312
|
_.LANGUAGE,
|
|
@@ -3284,12 +3314,12 @@ e(Jo, "observedAttributes", [
|
|
|
3284
3314
|
]);
|
|
3285
3315
|
//#endregion
|
|
3286
3316
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3287
|
-
var
|
|
3288
|
-
|
|
3289
|
-
var
|
|
3317
|
+
var ps, ms = document.createElement("template");
|
|
3318
|
+
ms.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";
|
|
3319
|
+
var hs = class extends y {
|
|
3290
3320
|
constructor() {
|
|
3291
3321
|
var e;
|
|
3292
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3322
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(ms.content.cloneNode(!0));
|
|
3293
3323
|
}
|
|
3294
3324
|
connectedCallback() {
|
|
3295
3325
|
super.connectedCallback(), this.updateState();
|
|
@@ -3320,15 +3350,15 @@ var us = class extends y {
|
|
|
3320
3350
|
}));
|
|
3321
3351
|
}
|
|
3322
3352
|
};
|
|
3323
|
-
|
|
3324
|
-
...b(
|
|
3353
|
+
ps = hs, e(hs, "observedAttributes", [
|
|
3354
|
+
...b(ps, "observedAttributes", ps),
|
|
3325
3355
|
_.TIMESHIFT_POSITION,
|
|
3326
3356
|
_.DURATION
|
|
3327
3357
|
]);
|
|
3328
3358
|
//#endregion
|
|
3329
3359
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3330
|
-
var
|
|
3331
|
-
|
|
3360
|
+
var gs, _s = document.createElement("template");
|
|
3361
|
+
_s.innerHTML = `
|
|
3332
3362
|
<style>
|
|
3333
3363
|
:host {
|
|
3334
3364
|
display: var(--mute-button-display);
|
|
@@ -3356,10 +3386,10 @@ fs.innerHTML = `
|
|
|
3356
3386
|
</slot>
|
|
3357
3387
|
</slot>
|
|
3358
3388
|
`;
|
|
3359
|
-
var
|
|
3389
|
+
var vs = class extends y {
|
|
3360
3390
|
constructor() {
|
|
3361
3391
|
var e;
|
|
3362
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3392
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(_s.content.cloneNode(!0));
|
|
3363
3393
|
}
|
|
3364
3394
|
connectedCallback() {
|
|
3365
3395
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "Unmute" : "Mute");
|
|
@@ -3384,11 +3414,11 @@ var ps = class extends y {
|
|
|
3384
3414
|
}));
|
|
3385
3415
|
}
|
|
3386
3416
|
};
|
|
3387
|
-
|
|
3417
|
+
gs = vs, e(vs, "observedAttributes", [...b(gs, "observedAttributes", gs), _.MUTED]);
|
|
3388
3418
|
//#endregion
|
|
3389
3419
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3390
|
-
var
|
|
3391
|
-
|
|
3420
|
+
var ys, bs = document.createElement("template");
|
|
3421
|
+
bs.innerHTML = `
|
|
3392
3422
|
<style>
|
|
3393
3423
|
:host {
|
|
3394
3424
|
display: var(--pip-button-display);
|
|
@@ -3402,10 +3432,10 @@ hs.innerHTML = `
|
|
|
3402
3432
|
<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>
|
|
3403
3433
|
</slot>
|
|
3404
3434
|
`;
|
|
3405
|
-
var
|
|
3435
|
+
var xs = class extends y {
|
|
3406
3436
|
constructor() {
|
|
3407
3437
|
var e;
|
|
3408
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3438
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(bs.content.cloneNode(!0));
|
|
3409
3439
|
}
|
|
3410
3440
|
connectedCallback() {
|
|
3411
3441
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture-in-picture" : "Picture-in-picture");
|
|
@@ -3430,15 +3460,15 @@ var gs = class extends y {
|
|
|
3430
3460
|
}));
|
|
3431
3461
|
}
|
|
3432
3462
|
};
|
|
3433
|
-
|
|
3434
|
-
...b(
|
|
3463
|
+
ys = xs, e(xs, "observedAttributes", [
|
|
3464
|
+
...b(ys, "observedAttributes", ys),
|
|
3435
3465
|
_.IS_PIP,
|
|
3436
3466
|
_.PIP_AVAILABLE
|
|
3437
3467
|
]);
|
|
3438
3468
|
//#endregion
|
|
3439
3469
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3440
|
-
var
|
|
3441
|
-
|
|
3470
|
+
var Ss, Cs = document.createElement("template");
|
|
3471
|
+
Cs.innerHTML = `
|
|
3442
3472
|
<style>
|
|
3443
3473
|
:host {
|
|
3444
3474
|
display: var(--play-button-display);
|
|
@@ -3462,10 +3492,10 @@ vs.innerHTML = `
|
|
|
3462
3492
|
</slot>
|
|
3463
3493
|
</slot>
|
|
3464
3494
|
`;
|
|
3465
|
-
var
|
|
3495
|
+
var ws = class extends y {
|
|
3466
3496
|
constructor() {
|
|
3467
3497
|
var e;
|
|
3468
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3498
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Cs.content.cloneNode(!0));
|
|
3469
3499
|
}
|
|
3470
3500
|
connectedCallback() {
|
|
3471
3501
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3490,7 +3520,7 @@ var ys = class extends y {
|
|
|
3490
3520
|
}));
|
|
3491
3521
|
}
|
|
3492
3522
|
};
|
|
3493
|
-
|
|
3523
|
+
Ss = ws, e(ws, "observedAttributes", [...b(Ss, "observedAttributes", Ss), _.PAUSED]);
|
|
3494
3524
|
//#endregion
|
|
3495
3525
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3496
3526
|
var K = {
|
|
@@ -3499,55 +3529,55 @@ var K = {
|
|
|
3499
3529
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3500
3530
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3501
3531
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3502
|
-
},
|
|
3532
|
+
}, Ts = Object.values(K), Es = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakSet(), Ps = class extends fe {
|
|
3503
3533
|
constructor(e) {
|
|
3504
|
-
super(), C(this,
|
|
3534
|
+
super(), C(this, Ns), p(this, Es, void 0), p(this, Ds, void 0), p(this, Os, !1), p(this, ks, !1), p(this, As, !0), p(this, js, null), p(this, Ms, null), m(Ds, this, e), m(Es, this, new ue({
|
|
3505
3535
|
publicEndpoint: e.url,
|
|
3506
3536
|
tokenFactory: () => e.authenticationToken
|
|
3507
3537
|
}));
|
|
3508
3538
|
}
|
|
3509
3539
|
start(e = 5e3) {
|
|
3510
|
-
g(
|
|
3511
|
-
!g(
|
|
3540
|
+
g(Ms, this) && clearInterval(g(Ms, this)), m(Os, this, !1), m(ks, this, !1), h(Ns, this, Rs).call(this), h(Ns, this, Fs).call(this), m(Ms, this, window.setInterval(() => {
|
|
3541
|
+
!g(ks, this) && !g(Ds, this).infiniteReconnect && !g(js, this) && g(As, this) && m(js, this, window.setTimeout(() => h(Ns, this, Is).call(this), 300 * 1e3)), !g(ks, this) && g(As, this) && h(Ns, this, Fs).call(this);
|
|
3512
3542
|
}, e));
|
|
3513
3543
|
}
|
|
3514
3544
|
stop() {
|
|
3515
|
-
h(
|
|
3545
|
+
h(Ns, this, Ls).call(this), g(Ms, this) && (window.clearInterval(g(Ms, this)), m(Ms, this, null));
|
|
3516
3546
|
}
|
|
3517
3547
|
};
|
|
3518
|
-
function
|
|
3548
|
+
function Fs() {
|
|
3519
3549
|
var e = this;
|
|
3520
3550
|
return t(function* () {
|
|
3521
|
-
if (g(
|
|
3522
|
-
m(
|
|
3551
|
+
if (g(Os, e)) return;
|
|
3552
|
+
m(Os, e, !0);
|
|
3523
3553
|
let t = "Stream is offline", n = "Please stand by";
|
|
3524
3554
|
try {
|
|
3525
|
-
let t = yield g(
|
|
3555
|
+
let t = yield g(Es, e).getChannel(g(Ds, e).channelId);
|
|
3526
3556
|
if (t.isLive) {
|
|
3527
|
-
m(
|
|
3557
|
+
m(ks, e, !0), h(Ns, e, Rs).call(e), e.emit("live", t), m(Os, e, !1);
|
|
3528
3558
|
return;
|
|
3529
3559
|
}
|
|
3530
3560
|
} catch (e) {
|
|
3531
3561
|
le(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3532
3562
|
}
|
|
3533
|
-
g(
|
|
3563
|
+
g(As, e) && e.emit("error", {
|
|
3534
3564
|
title: t,
|
|
3535
3565
|
message: n
|
|
3536
|
-
}), m(
|
|
3566
|
+
}), m(Os, e, !1);
|
|
3537
3567
|
})();
|
|
3538
3568
|
}
|
|
3539
|
-
function
|
|
3540
|
-
this.stop(), m(
|
|
3569
|
+
function Is() {
|
|
3570
|
+
this.stop(), m(As, this, !1), this.emit("timeout");
|
|
3541
3571
|
}
|
|
3542
|
-
function
|
|
3543
|
-
g(
|
|
3572
|
+
function Ls() {
|
|
3573
|
+
g(js, this) && (window.clearTimeout(g(js, this)), m(js, this, null));
|
|
3544
3574
|
}
|
|
3545
|
-
function
|
|
3546
|
-
h(
|
|
3575
|
+
function Rs() {
|
|
3576
|
+
h(Ns, this, Ls).call(this), m(As, this, !0);
|
|
3547
3577
|
}
|
|
3548
3578
|
//#endregion
|
|
3549
3579
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3550
|
-
var
|
|
3580
|
+
var zs = /\/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, Bs = navigator.userAgent.toLowerCase(), Vs = zs.test(Bs), Hs = (e) => Ba.observedAttributes.includes(e), Us = `
|
|
3551
3581
|
<style>
|
|
3552
3582
|
:host {
|
|
3553
3583
|
container-type: inline-size;
|
|
@@ -3557,7 +3587,7 @@ var Ps = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3557
3587
|
display: flex;
|
|
3558
3588
|
justify-content: center;
|
|
3559
3589
|
|
|
3560
|
-
--vindral-volume-range-display: ${
|
|
3590
|
+
--vindral-volume-range-display: ${Vs ? "none" : "flex"};
|
|
3561
3591
|
--vindral-airplay-button-display: none;
|
|
3562
3592
|
--vindral-play-overlay-display: none;
|
|
3563
3593
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3638,10 +3668,10 @@ var Ps = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3638
3668
|
--vindral-subtitle-offset: -48px;
|
|
3639
3669
|
}
|
|
3640
3670
|
</style>
|
|
3641
|
-
`,
|
|
3671
|
+
`, Ws = (e) => {
|
|
3642
3672
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3643
3673
|
return `
|
|
3644
|
-
${
|
|
3674
|
+
${Us}
|
|
3645
3675
|
|
|
3646
3676
|
<vindral-controller>
|
|
3647
3677
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3680,8 +3710,8 @@ var Ps = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3680
3710
|
</vindral-center-overlay>
|
|
3681
3711
|
</vindral-controller>
|
|
3682
3712
|
`;
|
|
3683
|
-
},
|
|
3684
|
-
${
|
|
3713
|
+
}, Gs = `
|
|
3714
|
+
${Us}
|
|
3685
3715
|
|
|
3686
3716
|
<style>
|
|
3687
3717
|
#control-bar {
|
|
@@ -3705,58 +3735,58 @@ var Ps = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3705
3735
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3706
3736
|
</vindral-center-overlay>
|
|
3707
3737
|
</vindral-controller>
|
|
3708
|
-
`,
|
|
3738
|
+
`, Ks = document.createElement("template"), qs = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Js = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakMap(), $s = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakMap(), tc = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakSet(), nc = /* @__PURE__ */ new WeakMap(), rc = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ new WeakMap(), ac = class extends HTMLElement {
|
|
3709
3739
|
constructor() {
|
|
3710
|
-
super(), C(this, J), p(this,
|
|
3740
|
+
super(), C(this, J), p(this, qs, void 0), p(this, q, void 0), p(this, Js, void 0), p(this, Ys, void 0), p(this, Xs, void 0), p(this, Zs, void 0), p(this, Qs, /* @__PURE__ */ new Set()), p(this, $s, void 0), p(this, ec, () => {
|
|
3711
3741
|
Array.from(this.attributes).forEach((e) => {
|
|
3712
|
-
g(
|
|
3742
|
+
g(tc, this).call(this, e.name, e.value);
|
|
3713
3743
|
});
|
|
3714
|
-
}), p(this,
|
|
3715
|
-
|
|
3716
|
-
}), p(this,
|
|
3744
|
+
}), p(this, tc, (e, t) => {
|
|
3745
|
+
Hs(e) && (v(t) ? g(q, this).setAttribute(e, t) : g(q, this).removeAttribute(e));
|
|
3746
|
+
}), p(this, nc, () => {
|
|
3717
3747
|
Array.from(this.children).forEach((e) => {
|
|
3718
|
-
g(
|
|
3748
|
+
g(Qs, this).add(e);
|
|
3719
3749
|
});
|
|
3720
|
-
}), p(this,
|
|
3750
|
+
}), p(this, rc, () => {
|
|
3721
3751
|
let e = g(q, this).instance;
|
|
3722
3752
|
e && (e.on("is live", (e) => {
|
|
3723
|
-
e ? (this.removeAttribute(K.OFFLINE), h(J, this,
|
|
3753
|
+
e ? (this.removeAttribute(K.OFFLINE), h(J, this, pc).call(this)) : (this.setAttribute(K.OFFLINE, ""), h(J, this, fc).call(this, "Stream is offline", "Please stand by"));
|
|
3724
3754
|
}), e.on("channels", (e) => {
|
|
3725
3755
|
let t = g(q, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3726
|
-
n && h(J, this,
|
|
3756
|
+
n && h(J, this, uc).call(this, n);
|
|
3727
3757
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3728
3758
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3729
|
-
n && h(J, this,
|
|
3759
|
+
n && h(J, this, uc).call(this, n);
|
|
3730
3760
|
}), e.on("error", (e) => {
|
|
3731
3761
|
if (e.code() === "connection_failed") {
|
|
3732
|
-
h(J, this,
|
|
3762
|
+
h(J, this, fc).call(this, "Stream is offline", "Please stand by");
|
|
3733
3763
|
return;
|
|
3734
3764
|
}
|
|
3735
|
-
e.isFatal() && (e.code() === "access_forbidden" ? h(J, this,
|
|
3765
|
+
e.isFatal() && (e.code() === "access_forbidden" ? h(J, this, fc).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? h(J, this, fc).call(this, "Stream is offline", "Please stand by") : h(J, this, fc).call(this, "An error occurred", e.message), g(Ys, 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)));
|
|
3736
3766
|
}));
|
|
3737
|
-
}), p(this,
|
|
3738
|
-
g(q, this).connect(), g(
|
|
3739
|
-
}), m(
|
|
3767
|
+
}), p(this, ic, () => {
|
|
3768
|
+
g(q, this).connect(), g(Ys, this).setAttribute("hidden", ""), h(J, this, pc).call(this), g(q, this).focus();
|
|
3769
|
+
}), m(qs, this, this.attachShadow({ mode: "open" })), h(J, this, cc).call(this), m(q, this, g(qs, this).querySelector("vindral-controller")), m(Js, this, g(qs, this).querySelector("#vindral-message")), m(Ys, this, g(qs, this).querySelector("#play-overlay")), m(Xs, this, g(qs, this).querySelector("#center-overlay"));
|
|
3740
3770
|
}
|
|
3741
3771
|
connectedCallback() {
|
|
3742
|
-
if (g(
|
|
3743
|
-
clearTimeout(g(
|
|
3772
|
+
if (g($s, this) !== void 0) {
|
|
3773
|
+
clearTimeout(g($s, this)), m($s, this, void 0);
|
|
3744
3774
|
return;
|
|
3745
3775
|
}
|
|
3746
|
-
this.setAttribute(K.OFFLINE, ""), g(q, this).addEventListener("vindral-instance-ready", g(
|
|
3776
|
+
this.setAttribute(K.OFFLINE, ""), g(q, this).addEventListener("vindral-instance-ready", g(rc, this)), h(J, this, lc).call(this);
|
|
3747
3777
|
}
|
|
3748
3778
|
disconnectedCallback() {
|
|
3749
|
-
m(
|
|
3779
|
+
m($s, this, setTimeout(() => {
|
|
3750
3780
|
var e;
|
|
3751
|
-
m(
|
|
3781
|
+
m($s, this, void 0), g(q, this).removeEventListener("vindral-instance-ready", g(rc, this)), g(Ys, this).removeEventListener("click", g(ic, this)), (e = g(Zs, this)) == null || e.stop();
|
|
3752
3782
|
}));
|
|
3753
3783
|
}
|
|
3754
3784
|
attributeChangedCallback(e, t, n) {
|
|
3755
|
-
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) h(J, this,
|
|
3785
|
+
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) h(J, this, cc).call(this);
|
|
3756
3786
|
else if (e === K.REFRESH_POSTER_ENABLED) {
|
|
3757
|
-
let e = g(
|
|
3787
|
+
let e = g(qs, this).querySelector("vindral-poster-overlay");
|
|
3758
3788
|
e && (e.disabled = x(this.getAttribute(K.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3759
|
-
} else g(
|
|
3789
|
+
} else g(tc, this).call(this, e, n);
|
|
3760
3790
|
}
|
|
3761
3791
|
get instance() {
|
|
3762
3792
|
return g(q, this).instance;
|
|
@@ -3771,67 +3801,67 @@ var Ps = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3771
3801
|
g(q, this).timelineMarkers = e;
|
|
3772
3802
|
}
|
|
3773
3803
|
};
|
|
3774
|
-
function
|
|
3804
|
+
function oc() {
|
|
3775
3805
|
let e = be(this.getAttribute(_.MEDIA)), t = x(this.getAttribute(K.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3776
|
-
return e === "audio" ?
|
|
3806
|
+
return e === "audio" ? Gs : Ws(t);
|
|
3777
3807
|
}
|
|
3778
|
-
function
|
|
3779
|
-
return this.isConnected || g(
|
|
3808
|
+
function sc() {
|
|
3809
|
+
return this.isConnected || g($s, this) !== void 0;
|
|
3780
3810
|
}
|
|
3781
|
-
function
|
|
3782
|
-
let e = g(
|
|
3783
|
-
|
|
3784
|
-
let r =
|
|
3785
|
-
m(q, this, r.querySelector("vindral-controller")), m(
|
|
3811
|
+
function cc() {
|
|
3812
|
+
let e = g(qs, this).hasChildNodes(), t = e ? g(q, this) : void 0, n = e ? g(Ys, this) : void 0;
|
|
3813
|
+
sc.call(h(J, this)) && t && t.removeEventListener("vindral-instance-ready", g(rc, this)), sc.call(h(J, this)) && n && g(Zs, this) && n.removeEventListener("click", g(ic, this)), Ks.innerHTML = h(J, this, oc).call(this);
|
|
3814
|
+
let r = Ks.content.cloneNode(!0);
|
|
3815
|
+
m(q, this, r.querySelector("vindral-controller")), m(Js, this, r.querySelector("#vindral-message")), m(Ys, this, r.querySelector("#play-overlay")), m(Xs, this, r.querySelector("#center-overlay")), g(nc, this).call(this), g(Qs, this).forEach((e) => {
|
|
3786
3816
|
g(q, this).appendChild(e);
|
|
3787
|
-
}), g(
|
|
3817
|
+
}), g(ec, this).call(this), g(qs, this).innerHTML = "", g(qs, this).appendChild(r), sc.call(h(J, this)) && (g(q, this).addEventListener("vindral-instance-ready", g(rc, this)), g(Zs, this) && g(Ys, this).addEventListener("click", g(ic, this)));
|
|
3788
3818
|
}
|
|
3789
|
-
function
|
|
3819
|
+
function lc() {
|
|
3790
3820
|
var e;
|
|
3791
3821
|
if (x(this.getAttribute(K.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3792
3822
|
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");
|
|
3793
3823
|
if (!n) {
|
|
3794
|
-
this.setAttribute(K.OFFLINE, ""), h(J, this,
|
|
3824
|
+
this.setAttribute(K.OFFLINE, ""), h(J, this, fc).call(this, "Invalid options", "Please enter a channel id to start the stream");
|
|
3795
3825
|
return;
|
|
3796
3826
|
}
|
|
3797
|
-
m(
|
|
3827
|
+
m(Zs, this, new Ps({
|
|
3798
3828
|
url: t,
|
|
3799
3829
|
channelId: n,
|
|
3800
3830
|
authenticationToken: r,
|
|
3801
3831
|
infiniteReconnect: i
|
|
3802
|
-
})), g(
|
|
3803
|
-
g(q, this).connect(), this.removeAttribute("offline"), h(J, this,
|
|
3804
|
-
}), g(
|
|
3805
|
-
h(J, this,
|
|
3806
|
-
}), g(
|
|
3807
|
-
this.setAttribute(K.OFFLINE, ""), h(J, this,
|
|
3808
|
-
}), g(
|
|
3809
|
-
}
|
|
3810
|
-
function
|
|
3832
|
+
})), g(Zs, this).on("live", (e) => {
|
|
3833
|
+
g(q, this).connect(), this.removeAttribute("offline"), h(J, this, pc).call(this), h(J, this, uc).call(this, e);
|
|
3834
|
+
}), g(Zs, this).on("timeout", () => {
|
|
3835
|
+
h(J, this, pc).call(this), g(Ys, this).removeAttribute("hidden");
|
|
3836
|
+
}), g(Zs, this).on("error", (e) => {
|
|
3837
|
+
this.setAttribute(K.OFFLINE, ""), h(J, this, fc).call(this, e.title, e.message);
|
|
3838
|
+
}), g(Ys, this).addEventListener("click", g(ic, this)), this.hasAttribute("paused") && g(Zs, this).start();
|
|
3839
|
+
}
|
|
3840
|
+
function uc(e) {
|
|
3811
3841
|
var t, n, r;
|
|
3812
3842
|
let i = _e(this.getAttribute("title"), !1);
|
|
3813
3843
|
i && je({
|
|
3814
3844
|
title: typeof i == "string" ? i : e.name,
|
|
3815
|
-
poster: (t = (n = h(J, this,
|
|
3845
|
+
poster: (t = (n = h(J, this, dc).call(this)) == null ? (r = this.instance) == null ? void 0 : r.getThumbnailUrl() : n) == null ? e.thumbnailUrls[0] : t
|
|
3816
3846
|
});
|
|
3817
3847
|
}
|
|
3818
|
-
function
|
|
3848
|
+
function dc() {
|
|
3819
3849
|
let e = _e(this.getAttribute("poster"));
|
|
3820
3850
|
return v(e) ? e : void 0;
|
|
3821
3851
|
}
|
|
3822
|
-
function
|
|
3823
|
-
g(
|
|
3824
|
-
let n = h(J, this,
|
|
3825
|
-
n ? g(
|
|
3852
|
+
function fc(e, t) {
|
|
3853
|
+
g(Js, this).setAttribute("title", e), g(Js, this).setAttribute("description", t), g(Js, this).removeAttribute("hidden");
|
|
3854
|
+
let n = h(J, this, dc).call(this);
|
|
3855
|
+
n ? g(Xs, this).setAttribute("poster", n) : g(Xs, this).removeAttribute("poster"), g(Xs, this).setAttribute("backdrop", "");
|
|
3826
3856
|
}
|
|
3827
|
-
function
|
|
3828
|
-
g(
|
|
3857
|
+
function pc() {
|
|
3858
|
+
g(Js, this).setAttribute("hidden", ""), g(Xs, this).removeAttribute("backdrop");
|
|
3829
3859
|
}
|
|
3830
|
-
e(
|
|
3860
|
+
e(ac, "observedAttributes", [...Ba.observedAttributes, ...Ts]);
|
|
3831
3861
|
//#endregion
|
|
3832
3862
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3833
|
-
var
|
|
3834
|
-
|
|
3863
|
+
var mc = document.createElement("template");
|
|
3864
|
+
mc.innerHTML = `
|
|
3835
3865
|
<style>
|
|
3836
3866
|
:host {
|
|
3837
3867
|
display: var(--poster-overlay-display);
|
|
@@ -3866,26 +3896,26 @@ lc.innerHTML = `
|
|
|
3866
3896
|
}
|
|
3867
3897
|
</style>
|
|
3868
3898
|
`;
|
|
3869
|
-
var
|
|
3899
|
+
var hc = 6e3, gc = /* @__PURE__ */ new WeakMap(), _c = /* @__PURE__ */ new WeakMap(), vc = /* @__PURE__ */ new WeakMap(), yc = /* @__PURE__ */ new WeakMap(), bc = /* @__PURE__ */ new WeakSet(), xc = /* @__PURE__ */ new WeakMap(), Sc = class extends HTMLElement {
|
|
3870
3900
|
constructor() {
|
|
3871
|
-
super(), C(this,
|
|
3872
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? h(
|
|
3873
|
-
}), p(this,
|
|
3901
|
+
super(), C(this, bc), p(this, gc, null), p(this, _c, null), p(this, vc, null), p(this, yc, () => {
|
|
3902
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? h(bc, this, Cc).call(this) : h(bc, this, wc).call(this);
|
|
3903
|
+
}), p(this, xc, (e) => {
|
|
3874
3904
|
e.forEach((e) => {
|
|
3875
3905
|
e.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3876
3906
|
});
|
|
3877
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3907
|
+
}), this.attachShadow({ mode: "open" }).appendChild(mc.content.cloneNode(!0));
|
|
3878
3908
|
}
|
|
3879
3909
|
connectedCallback() {
|
|
3880
3910
|
var e;
|
|
3881
|
-
m(
|
|
3911
|
+
m(gc, this, this.closest("vindral-controller")), (e = g(gc, this)) == null || e.connectListener(this), document.addEventListener("visibilitychange", g(yc, this)), m(vc, this, new IntersectionObserver(g(xc, this))), g(vc, this).observe(this);
|
|
3882
3912
|
}
|
|
3883
3913
|
disconnectedCallback() {
|
|
3884
3914
|
var e, t;
|
|
3885
|
-
(e = g(
|
|
3915
|
+
(e = g(gc, this)) == null || e.disconnectListener(this), document.removeEventListener("visibilitychange", g(yc, this)), (t = g(vc, this)) == null || t.disconnect(), m(vc, this, null), h(bc, this, wc).call(this);
|
|
3886
3916
|
}
|
|
3887
3917
|
attributeChangedCallback(e, t, n) {
|
|
3888
|
-
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && h(
|
|
3918
|
+
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && h(bc, this, Tc).call(this), (e === _.PAUSED || e === "disabled" || e === "intersecting") && g(yc, this).call(this));
|
|
3889
3919
|
}
|
|
3890
3920
|
get disabled() {
|
|
3891
3921
|
return this.hasAttribute("disabled");
|
|
@@ -3900,18 +3930,18 @@ var uc = 6e3, dc = /* @__PURE__ */ new WeakMap(), fc = /* @__PURE__ */ new WeakM
|
|
|
3900
3930
|
return this.hasAttribute(_.PAUSED);
|
|
3901
3931
|
}
|
|
3902
3932
|
};
|
|
3903
|
-
function
|
|
3904
|
-
g(
|
|
3933
|
+
function Cc() {
|
|
3934
|
+
g(_c, this) === null && (h(bc, this, wc).call(this), m(_c, this, window.setInterval(() => h(bc, this, Tc).call(this), hc)));
|
|
3905
3935
|
}
|
|
3906
|
-
function
|
|
3907
|
-
g(
|
|
3936
|
+
function wc() {
|
|
3937
|
+
g(_c, this) !== null && (clearInterval(g(_c, this)), m(_c, this, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3908
3938
|
}
|
|
3909
|
-
function
|
|
3939
|
+
function Tc() {
|
|
3910
3940
|
if (!this.posterSrc) return;
|
|
3911
3941
|
let e = new URL(this.posterSrc), t = new Image();
|
|
3912
3942
|
e.searchParams.set("t", Date.now().toString()), t.src = e.toString(), t.onload = () => this.style.backgroundImage = `url(${e.toString()})`;
|
|
3913
3943
|
}
|
|
3914
|
-
e(
|
|
3944
|
+
e(Sc, "observedAttributes", [
|
|
3915
3945
|
_.POSTER_SRC,
|
|
3916
3946
|
_.PAUSED,
|
|
3917
3947
|
"disabled",
|
|
@@ -3919,70 +3949,70 @@ e(_c, "observedAttributes", [
|
|
|
3919
3949
|
]);
|
|
3920
3950
|
//#endregion
|
|
3921
3951
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenu.ts
|
|
3922
|
-
var
|
|
3923
|
-
|
|
3952
|
+
var Ec, Dc = "\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", Oc = document.createElement("template");
|
|
3953
|
+
Oc.innerHTML = `
|
|
3924
3954
|
<style>
|
|
3925
3955
|
:host {
|
|
3926
3956
|
display: var(--rendition-menu-display);
|
|
3927
3957
|
}
|
|
3928
3958
|
</style>
|
|
3929
3959
|
|
|
3930
|
-
<slot name="button">${
|
|
3960
|
+
<slot name="button">${Dc}</slot>
|
|
3931
3961
|
<slot name="listbox" hidden>
|
|
3932
3962
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3933
3963
|
</slot>
|
|
3934
3964
|
`;
|
|
3935
|
-
var
|
|
3965
|
+
var kc = /* @__PURE__ */ new WeakSet(), Ac = class extends Ve {
|
|
3936
3966
|
constructor() {
|
|
3937
3967
|
var e, t, n;
|
|
3938
|
-
super(), C(this,
|
|
3968
|
+
super(), C(this, kc), (e = this.shadowRoot) == null || e.appendChild(Oc.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]");
|
|
3939
3969
|
}
|
|
3940
3970
|
connectedCallback() {
|
|
3941
|
-
super.connectedCallback(), h(
|
|
3971
|
+
super.connectedCallback(), h(kc, this, jc).call(this), this.setAttribute("aria-label", "Quality");
|
|
3942
3972
|
}
|
|
3943
3973
|
attributeChangedCallback(e, t, n) {
|
|
3944
|
-
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && h(
|
|
3974
|
+
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && h(kc, this, jc).call(this);
|
|
3945
3975
|
}
|
|
3946
3976
|
};
|
|
3947
|
-
|
|
3948
|
-
function
|
|
3977
|
+
Ec = Ac;
|
|
3978
|
+
function jc() {
|
|
3949
3979
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
3950
3980
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3951
3981
|
}
|
|
3952
|
-
e(
|
|
3982
|
+
e(Ac, "observedAttributes", [...b(Ec, "observedAttributes", Ec), _.RENDITION_LEVELS]);
|
|
3953
3983
|
//#endregion
|
|
3954
3984
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3955
|
-
var
|
|
3956
|
-
|
|
3957
|
-
var
|
|
3985
|
+
var Mc = document.createElement("template");
|
|
3986
|
+
Mc.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";
|
|
3987
|
+
var Nc = /* @__PURE__ */ new WeakMap(), Pc = /* @__PURE__ */ new WeakMap(), Fc = /* @__PURE__ */ new WeakMap(), Ic = /* @__PURE__ */ new WeakMap(), Lc = /* @__PURE__ */ new WeakMap(), Rc = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), zc = class extends HTMLElement {
|
|
3958
3988
|
constructor() {
|
|
3959
|
-
super(), C(this, Y), p(this,
|
|
3989
|
+
super(), C(this, Y), p(this, Nc, []), p(this, Pc, 2 ** 53 - 1), p(this, Fc, null), p(this, Ic, []), p(this, Lc, null), p(this, Rc, null), e(this, "handleEvent", (e) => {
|
|
3960
3990
|
switch (e.type) {
|
|
3961
3991
|
case "keydown":
|
|
3962
|
-
h(Y, this,
|
|
3992
|
+
h(Y, this, Gc).call(this, e);
|
|
3963
3993
|
break;
|
|
3964
3994
|
}
|
|
3965
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3995
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Mc.content.cloneNode(!0));
|
|
3966
3996
|
}
|
|
3967
3997
|
connectedCallback() {
|
|
3968
3998
|
let e = this.getRootNode();
|
|
3969
3999
|
if (e instanceof ShadowRoot) {
|
|
3970
4000
|
var t;
|
|
3971
|
-
m(
|
|
4001
|
+
m(Lc, this, e.host.closest("vindral-controller")), (t = g(Lc, this)) == null || t.connectListener(this), h(Y, this, Bc).call(this), h(Y, this, Vc).call(this), m(Rc, this, e.host), this.addEventListener("keydown", this);
|
|
3972
4002
|
}
|
|
3973
4003
|
}
|
|
3974
4004
|
disconnectedCallback() {
|
|
3975
4005
|
var e;
|
|
3976
|
-
(e = g(
|
|
4006
|
+
(e = g(Lc, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3977
4007
|
}
|
|
3978
4008
|
attributeChangedCallback(e, t, n) {
|
|
3979
4009
|
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));
|
|
3980
4010
|
}
|
|
3981
4011
|
set list(e) {
|
|
3982
|
-
m(
|
|
4012
|
+
m(Nc, this, e), h(Y, this, Vc).call(this);
|
|
3983
4013
|
}
|
|
3984
4014
|
set maxVideoBitrate(e) {
|
|
3985
|
-
m(
|
|
4015
|
+
m(Pc, this, e), h(Y, this, Uc).call(this);
|
|
3986
4016
|
}
|
|
3987
4017
|
get keysUsed() {
|
|
3988
4018
|
return [
|
|
@@ -3998,10 +4028,10 @@ var Oc = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Ac =
|
|
|
3998
4028
|
}
|
|
3999
4029
|
focus() {
|
|
4000
4030
|
var e;
|
|
4001
|
-
(e = g(
|
|
4031
|
+
(e = g(Fc, this)) == null || e.focus();
|
|
4002
4032
|
}
|
|
4003
4033
|
};
|
|
4004
|
-
function
|
|
4034
|
+
function Bc() {
|
|
4005
4035
|
new IntersectionObserver((e) => {
|
|
4006
4036
|
e.forEach((e) => {
|
|
4007
4037
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -4010,50 +4040,50 @@ function Fc() {
|
|
|
4010
4040
|
} else this.style.height = "auto";
|
|
4011
4041
|
});
|
|
4012
4042
|
}, {
|
|
4013
|
-
root: g(
|
|
4043
|
+
root: g(Lc, this),
|
|
4014
4044
|
threshold: 0
|
|
4015
4045
|
}).observe(this);
|
|
4016
4046
|
}
|
|
4017
|
-
function
|
|
4047
|
+
function Vc() {
|
|
4018
4048
|
var e;
|
|
4019
4049
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
4020
|
-
t && (m(
|
|
4050
|
+
t && (m(Ic, this, []), t.innerHTML = "", g(Nc, this).sort((e, t) => {
|
|
4021
4051
|
var n, r;
|
|
4022
4052
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
4023
4053
|
}).forEach((e) => {
|
|
4024
4054
|
var n, r, i, a, o, s, c, l;
|
|
4025
4055
|
let u = document.createElement("div");
|
|
4026
4056
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
4027
|
-
let d = h(Y, this,
|
|
4057
|
+
let d = h(Y, this, Hc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
4028
4058
|
u.textContent = e.video ? pe(e.video) : "";
|
|
4029
4059
|
let f = document.createElement("span");
|
|
4030
|
-
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,
|
|
4060
|
+
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, Wc).call(this, e)), g(Ic, this).push({
|
|
4031
4061
|
el: u,
|
|
4032
4062
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
4033
4063
|
}), t.appendChild(u);
|
|
4034
|
-
}), h(Y, this,
|
|
4064
|
+
}), h(Y, this, Uc).call(this));
|
|
4035
4065
|
}
|
|
4036
|
-
function
|
|
4066
|
+
function Hc(e) {
|
|
4037
4067
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
4038
4068
|
}
|
|
4039
|
-
function
|
|
4040
|
-
g(
|
|
4041
|
-
let e = g(
|
|
4069
|
+
function Uc() {
|
|
4070
|
+
g(Fc, this) && (g(Fc, this).removeAttribute("aria-selected"), g(Fc, this).tabIndex = -1);
|
|
4071
|
+
let e = g(Nc, this).sort((e, t) => {
|
|
4042
4072
|
var n, r;
|
|
4043
4073
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
4044
|
-
}), t = g(
|
|
4074
|
+
}), t = g(Nc, this).filter((e) => {
|
|
4045
4075
|
var t;
|
|
4046
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= g(
|
|
4076
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= g(Pc, this);
|
|
4047
4077
|
})[0] || e[e.length - 1];
|
|
4048
4078
|
if (t) {
|
|
4049
|
-
let e = g(
|
|
4079
|
+
let e = g(Ic, this).find((e) => {
|
|
4050
4080
|
var n;
|
|
4051
4081
|
return e.id === ((n = t.video) == null ? void 0 : n.id);
|
|
4052
4082
|
});
|
|
4053
|
-
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), m(
|
|
4083
|
+
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), m(Fc, this, e.el));
|
|
4054
4084
|
}
|
|
4055
4085
|
}
|
|
4056
|
-
function
|
|
4086
|
+
function Wc(e) {
|
|
4057
4087
|
this.dispatchEvent(new Event("change", {
|
|
4058
4088
|
bubbles: !0,
|
|
4059
4089
|
composed: !0
|
|
@@ -4063,36 +4093,36 @@ function zc(e) {
|
|
|
4063
4093
|
detail: e
|
|
4064
4094
|
}));
|
|
4065
4095
|
}
|
|
4066
|
-
function
|
|
4096
|
+
function Gc(e) {
|
|
4067
4097
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
4068
4098
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
4069
4099
|
var a;
|
|
4070
|
-
(a = g(
|
|
4100
|
+
(a = g(Rc, this)) == null || a.hide();
|
|
4071
4101
|
} else if (t === "Enter" || t === " ") {
|
|
4072
4102
|
var o;
|
|
4073
|
-
(o = h(Y, this,
|
|
4074
|
-
} else h(Y, this,
|
|
4103
|
+
(o = h(Y, this, qc).call(this)) == null || (o = o.el) == null || o.click();
|
|
4104
|
+
} else h(Y, this, Kc).call(this, e);
|
|
4075
4105
|
}
|
|
4076
|
-
function
|
|
4106
|
+
function Kc(e) {
|
|
4077
4107
|
var t;
|
|
4078
|
-
let { key: n } = e, r = g(
|
|
4108
|
+
let { key: n } = e, r = g(Ic, this), i = (t = h(Y, this, qc).call(this)) == null ? r[0] : t;
|
|
4079
4109
|
if (!i) return;
|
|
4080
4110
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
4081
4111
|
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);
|
|
4082
4112
|
let s = r[o];
|
|
4083
|
-
s && (h(Y, this,
|
|
4113
|
+
s && (h(Y, this, Jc).call(this, s.id), s.el.focus());
|
|
4084
4114
|
}
|
|
4085
|
-
function
|
|
4086
|
-
return g(
|
|
4115
|
+
function qc() {
|
|
4116
|
+
return g(Ic, this).find((e) => e.el.tabIndex === 0);
|
|
4087
4117
|
}
|
|
4088
|
-
function
|
|
4089
|
-
for (let t of g(
|
|
4118
|
+
function Jc(e) {
|
|
4119
|
+
for (let t of g(Ic, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
4090
4120
|
}
|
|
4091
|
-
e(
|
|
4121
|
+
e(zc, "observedAttributes", [_.RENDITION_LEVELS, _.MAX_VIDEO_BITRATE]);
|
|
4092
4122
|
//#endregion
|
|
4093
4123
|
//#region ../../libs/player-next/src/components/ScrollOverlay.ts
|
|
4094
|
-
var
|
|
4095
|
-
|
|
4124
|
+
var Yc = document.createElement("template");
|
|
4125
|
+
Yc.innerHTML = `
|
|
4096
4126
|
<style>
|
|
4097
4127
|
:host {
|
|
4098
4128
|
--scroll-overlay-offset: var(--vindral-scroll-overlay-offset, 0px);
|
|
@@ -4160,71 +4190,81 @@ Wc.innerHTML = `
|
|
|
4160
4190
|
<div id="scroll-area"></div>
|
|
4161
4191
|
<slot id="content"></slot>
|
|
4162
4192
|
`;
|
|
4163
|
-
var
|
|
4193
|
+
var Xc = /* @__PURE__ */ new WeakMap(), Zc = /* @__PURE__ */ new WeakMap(), Qc = /* @__PURE__ */ new WeakMap(), $c = /* @__PURE__ */ new WeakMap(), el = /* @__PURE__ */ new WeakMap(), tl = /* @__PURE__ */ new WeakMap(), nl = /* @__PURE__ */ new WeakMap(), rl = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), il = /* @__PURE__ */ new WeakMap(), al = class extends HTMLElement {
|
|
4164
4194
|
constructor() {
|
|
4165
|
-
super(), C(this, X), p(this,
|
|
4195
|
+
super(), C(this, X), p(this, Xc, null), p(this, Zc, null), p(this, Qc, !1), p(this, $c, !1), p(this, el, !1), p(this, tl, () => {
|
|
4166
4196
|
this.open && (this.open = !1);
|
|
4167
|
-
}), p(this,
|
|
4197
|
+
}), p(this, nl, null), p(this, rl, window.ResizeObserver ? new ResizeObserver(() => {
|
|
4198
|
+
if (this.open && !g(Qc, this)) {
|
|
4199
|
+
var e;
|
|
4200
|
+
this.scrollTo({
|
|
4201
|
+
top: (e = g(Zc, this)) == null ? void 0 : e.clientHeight,
|
|
4202
|
+
behavior: "smooth"
|
|
4203
|
+
});
|
|
4204
|
+
}
|
|
4205
|
+
}) : null), e(this, "handleEvent", (e) => {
|
|
4168
4206
|
switch (e.type) {
|
|
4169
4207
|
case "touchstart":
|
|
4170
|
-
h(X, this,
|
|
4208
|
+
h(X, this, sl).call(this, e);
|
|
4171
4209
|
break;
|
|
4172
4210
|
case "touchmove":
|
|
4173
|
-
h(X, this,
|
|
4211
|
+
h(X, this, cl).call(this, e);
|
|
4174
4212
|
break;
|
|
4175
4213
|
case "touchend":
|
|
4176
|
-
h(X, this,
|
|
4214
|
+
h(X, this, ll).call(this, e);
|
|
4177
4215
|
break;
|
|
4178
4216
|
}
|
|
4179
|
-
}), p(this,
|
|
4180
|
-
let e = g(
|
|
4217
|
+
}), p(this, il, () => {
|
|
4218
|
+
let e = g(el, this);
|
|
4181
4219
|
if (this.scrollTop === 0) {
|
|
4182
|
-
h(X, this,
|
|
4220
|
+
h(X, this, _l).call(this, e);
|
|
4183
4221
|
return;
|
|
4184
4222
|
}
|
|
4185
|
-
if (!e && !h(X, this,
|
|
4186
|
-
h(X, this,
|
|
4223
|
+
if (!e && !h(X, this, ul).call(this)) {
|
|
4224
|
+
h(X, this, hl).call(this), h(X, this, _l).call(this);
|
|
4187
4225
|
return;
|
|
4188
4226
|
}
|
|
4189
|
-
!this.visible && this.scrollTop > 0 && !g(
|
|
4190
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4227
|
+
!this.visible && this.scrollTop > 0 && !g(Qc, this) ? h(X, this, vl).call(this) : !g(Qc, this) && h(X, this, fl).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4228
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Yc.content.cloneNode(!0));
|
|
4191
4229
|
}
|
|
4192
4230
|
connectedCallback() {
|
|
4193
4231
|
let e = this.getRootNode();
|
|
4194
4232
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4195
|
-
var t, n, r;
|
|
4196
|
-
m(
|
|
4197
|
-
let
|
|
4198
|
-
|
|
4233
|
+
var t, n, r, i, a;
|
|
4234
|
+
m(Xc, this, e.querySelector("vindral-controller")), (t = g(Xc, this)) == null || t.connectListener(this), m(Zc, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area"));
|
|
4235
|
+
let l = (r = this.shadowRoot) == null ? void 0 : r.querySelector("#content");
|
|
4236
|
+
l && ((i = g(rl, this)) == null || i.observe(l)), (a = g(Zc, this)) == null || a.addEventListener("click", g(tl, this));
|
|
4237
|
+
let u = this.hasAttribute("touch-enabled");
|
|
4238
|
+
if (m(el, this, f() && u), !g(el, this)) this.setAttribute("snap", "");
|
|
4199
4239
|
else {
|
|
4200
|
-
var
|
|
4201
|
-
(
|
|
4240
|
+
var o, s, c;
|
|
4241
|
+
(o = g(Xc, this)) == null || o.addEventListener("touchstart", this, { passive: !0 }), (s = g(Xc, this)) == null || s.addEventListener("touchmove", this, { passive: !1 }), (c = g(Xc, this)) == null || c.addEventListener("touchend", this, { passive: !0 });
|
|
4202
4242
|
}
|
|
4203
|
-
this.addEventListener("scroll", g(
|
|
4243
|
+
this.addEventListener("scroll", g(il, this));
|
|
4204
4244
|
}
|
|
4205
4245
|
}
|
|
4206
4246
|
disconnectedCallback() {
|
|
4207
|
-
var e, t, n, r, i;
|
|
4208
|
-
(e = g(
|
|
4247
|
+
var e, t, n, r, i, a;
|
|
4248
|
+
(e = g(rl, this)) == null || e.disconnect(), (t = g(Zc, this)) == null || t.removeEventListener("click", g(tl, this)), this.removeEventListener("scroll", g(il, this)), (n = g(Xc, this)) == null || n.removeEventListener("touchstart", this), (r = g(Xc, this)) == null || r.removeEventListener("touchmove", this), (i = g(Xc, this)) == null || i.removeEventListener("touchend", this), (a = g(Xc, this)) == null || a.disconnectListener(this);
|
|
4209
4249
|
}
|
|
4210
4250
|
attributeChangedCallback(e, t, n) {
|
|
4211
|
-
if (t !== n && (e === _.USER_INTERACTING && n === null && h(X, this,
|
|
4251
|
+
if (t !== n && (e === _.USER_INTERACTING && n === null && h(X, this, dl).call(this) && setTimeout(() => {
|
|
4212
4252
|
this.open = !1;
|
|
4213
4253
|
}, 300), e === "open")) if (n !== null) {
|
|
4214
4254
|
var r;
|
|
4215
|
-
m(
|
|
4216
|
-
top: (r = g(
|
|
4255
|
+
m(Qc, this, !1), this.scrollTop > 0 && h(X, this, vl).call(this), this.scrollTo({
|
|
4256
|
+
top: (r = g(Zc, this)) == null ? void 0 : r.clientHeight,
|
|
4217
4257
|
behavior: "smooth"
|
|
4218
4258
|
});
|
|
4219
|
-
} else h(X, this,
|
|
4259
|
+
} else h(X, this, gl).call(this);
|
|
4220
4260
|
}
|
|
4221
4261
|
set open(e) {
|
|
4222
4262
|
if (e) {
|
|
4223
4263
|
this.setAttribute("open", "");
|
|
4224
4264
|
return;
|
|
4225
4265
|
}
|
|
4226
|
-
let t = this.hasAttribute("open"), n = this.visible || h(X, this,
|
|
4227
|
-
t ? this.removeAttribute("open") : n ? h(X, this,
|
|
4266
|
+
let t = this.hasAttribute("open"), n = this.visible || h(X, this, dl).call(this);
|
|
4267
|
+
t ? this.removeAttribute("open") : n ? h(X, this, gl).call(this) : (m(Qc, this, !1), this.removeAttribute("snap-touch"));
|
|
4228
4268
|
}
|
|
4229
4269
|
get open() {
|
|
4230
4270
|
return this.hasAttribute("open");
|
|
@@ -4236,86 +4276,86 @@ var Gc = /* @__PURE__ */ new WeakMap(), Kc = /* @__PURE__ */ new WeakMap(), qc =
|
|
|
4236
4276
|
return this.hasAttribute("visible");
|
|
4237
4277
|
}
|
|
4238
4278
|
};
|
|
4239
|
-
function
|
|
4240
|
-
return h(X, this,
|
|
4279
|
+
function ol() {
|
|
4280
|
+
return h(X, this, ul).call(this) || h(X, this, ml).call(this) || h(X, this, dl).call(this);
|
|
4241
4281
|
}
|
|
4242
|
-
function
|
|
4282
|
+
function sl(e) {
|
|
4243
4283
|
let t = e.touches[0];
|
|
4244
|
-
t && (m(
|
|
4284
|
+
t && (m($c, this, h(X, this, ol).call(this)), g($c, this) && (m(Qc, this, !1), m(nl, this, t.clientY)));
|
|
4245
4285
|
}
|
|
4246
|
-
function
|
|
4247
|
-
if (!(!g(
|
|
4248
|
-
let t = e.touches[0].clientY, n = g(
|
|
4286
|
+
function cl(e) {
|
|
4287
|
+
if (!(!g($c, this) || g(nl, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4288
|
+
let t = e.touches[0].clientY, n = g(nl, this) - t;
|
|
4249
4289
|
this.scrollTop = Math.max(0, n);
|
|
4250
4290
|
}
|
|
4251
4291
|
}
|
|
4252
|
-
function
|
|
4253
|
-
g(
|
|
4292
|
+
function ll(e) {
|
|
4293
|
+
g($c, this) && !g(Qc, this) && h(X, this, dl).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), m(nl, this, null), m($c, this, !1);
|
|
4254
4294
|
}
|
|
4255
|
-
function
|
|
4295
|
+
function ul() {
|
|
4256
4296
|
return this.hasAttribute(_.USER_INTERACTING);
|
|
4257
4297
|
}
|
|
4258
|
-
function
|
|
4298
|
+
function dl() {
|
|
4259
4299
|
return this.scrollTop > 0;
|
|
4260
4300
|
}
|
|
4261
|
-
function
|
|
4301
|
+
function fl() {
|
|
4262
4302
|
var e;
|
|
4263
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = g(
|
|
4303
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = g(Zc, this)) == null ? void 0 : e.clientHeight);
|
|
4264
4304
|
}
|
|
4265
|
-
function
|
|
4305
|
+
function pl() {
|
|
4266
4306
|
var e;
|
|
4267
|
-
let t = (e = g(
|
|
4307
|
+
let t = (e = g(Zc, this)) == null ? void 0 : e.clientHeight;
|
|
4268
4308
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4269
4309
|
}
|
|
4270
|
-
function
|
|
4310
|
+
function ml() {
|
|
4271
4311
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4272
|
-
return Number.isNaN(t) ? h(X, this,
|
|
4312
|
+
return Number.isNaN(t) ? h(X, this, pl).call(this) > 0 : t > 0;
|
|
4273
4313
|
}
|
|
4274
|
-
function
|
|
4314
|
+
function hl() {
|
|
4275
4315
|
let e = this.style.scrollBehavior;
|
|
4276
4316
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4277
4317
|
top: 0,
|
|
4278
4318
|
behavior: "auto"
|
|
4279
4319
|
}), this.style.scrollBehavior = e;
|
|
4280
4320
|
}
|
|
4281
|
-
function
|
|
4282
|
-
m(
|
|
4321
|
+
function gl() {
|
|
4322
|
+
m(Qc, this, !0), this.removeAttribute("snap-touch"), h(X, this, yl).call(this), this.scrollTo({
|
|
4283
4323
|
top: 0,
|
|
4284
4324
|
behavior: "smooth"
|
|
4285
4325
|
});
|
|
4286
4326
|
}
|
|
4287
|
-
function
|
|
4288
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), m(
|
|
4327
|
+
function _l(e = !1) {
|
|
4328
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), m(Qc, this, !1), h(X, this, yl).call(this);
|
|
4289
4329
|
}
|
|
4290
|
-
function
|
|
4330
|
+
function vl() {
|
|
4291
4331
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(S.LOCK_UI, {
|
|
4292
4332
|
bubbles: !0,
|
|
4293
4333
|
composed: !0
|
|
4294
4334
|
})));
|
|
4295
4335
|
}
|
|
4296
|
-
function
|
|
4336
|
+
function yl() {
|
|
4297
4337
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(S.UNLOCK_UI, {
|
|
4298
4338
|
bubbles: !0,
|
|
4299
4339
|
composed: !0
|
|
4300
4340
|
})));
|
|
4301
4341
|
}
|
|
4302
|
-
e(
|
|
4342
|
+
e(al, "observedAttributes", [
|
|
4303
4343
|
_.USER_INTERACTING,
|
|
4304
4344
|
"open",
|
|
4305
4345
|
"touch-enabled"
|
|
4306
4346
|
]);
|
|
4307
4347
|
//#endregion
|
|
4308
4348
|
//#region ../../libs/player-next/src/utils/thumbnailTrack.ts
|
|
4309
|
-
var
|
|
4349
|
+
var bl = "#EXT-X-TILES:", xl = "#EXT-X-PROGRAM-DATE-TIME:", Sl = "#EXTINF:", Cl = (e) => {
|
|
4310
4350
|
let t = /* @__PURE__ */ new Map();
|
|
4311
4351
|
for (let n of e.split(",")) {
|
|
4312
4352
|
let e = n.indexOf("=");
|
|
4313
4353
|
e > 0 && t.set(n.slice(0, e).trim(), n.slice(e + 1).trim());
|
|
4314
4354
|
}
|
|
4315
4355
|
return t;
|
|
4316
|
-
},
|
|
4356
|
+
}, wl = (e) => {
|
|
4317
4357
|
var t, n;
|
|
4318
|
-
let r =
|
|
4358
|
+
let r = Cl(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"));
|
|
4319
4359
|
return !i || !a || !Number.isFinite(o) || o <= 0 ? null : {
|
|
4320
4360
|
width: Number(i[1]),
|
|
4321
4361
|
height: Number(i[2]),
|
|
@@ -4323,15 +4363,15 @@ var ml = "#EXT-X-TILES:", hl = "#EXT-X-PROGRAM-DATE-TIME:", gl = "#EXTINF:", _l
|
|
|
4323
4363
|
rows: Number(a[2]),
|
|
4324
4364
|
tileSeconds: o
|
|
4325
4365
|
};
|
|
4326
|
-
},
|
|
4366
|
+
}, Tl = (e, t) => {
|
|
4327
4367
|
let n = null, r = [], i = null, a = null;
|
|
4328
4368
|
for (let o of e.split(/\r?\n/)) {
|
|
4329
4369
|
let e = o.trim();
|
|
4330
|
-
if (e.startsWith(
|
|
4331
|
-
else if (e.startsWith(
|
|
4370
|
+
if (e.startsWith(bl)) n = wl(e.slice(13));
|
|
4371
|
+
else if (e.startsWith(xl)) {
|
|
4332
4372
|
let t = Date.parse(e.slice(25));
|
|
4333
4373
|
i = Number.isNaN(t) ? null : t;
|
|
4334
|
-
} else if (e.startsWith(
|
|
4374
|
+
} else if (e.startsWith(Sl)) {
|
|
4335
4375
|
let t = Number.parseFloat(e.slice(8));
|
|
4336
4376
|
a = Number.isFinite(t) ? Math.round(t * 1e3) : null;
|
|
4337
4377
|
} else if (e.length > 0 && !e.startsWith("#")) {
|
|
@@ -4348,7 +4388,7 @@ var ml = "#EXT-X-TILES:", hl = "#EXT-X-PROGRAM-DATE-TIME:", gl = "#EXTINF:", _l
|
|
|
4348
4388
|
}
|
|
4349
4389
|
}
|
|
4350
4390
|
return n ? { sheets: r } : null;
|
|
4351
|
-
},
|
|
4391
|
+
}, El = (e, t) => {
|
|
4352
4392
|
let n = e.sheets.find((e) => t >= e.startMs && t < e.startMs + e.durationMs);
|
|
4353
4393
|
if (!n) return null;
|
|
4354
4394
|
let { layout: r } = n, i = Math.floor((t - n.startMs) / (r.tileSeconds * 1e3));
|
|
@@ -4358,47 +4398,47 @@ var ml = "#EXT-X-TILES:", hl = "#EXT-X-PROGRAM-DATE-TIME:", gl = "#EXTINF:", _l
|
|
|
4358
4398
|
y: Math.floor(i / r.columns) * r.height,
|
|
4359
4399
|
layout: r
|
|
4360
4400
|
};
|
|
4361
|
-
},
|
|
4401
|
+
}, Dl = /* @__PURE__ */ new WeakMap(), Ol = /* @__PURE__ */ new WeakMap(), kl = /* @__PURE__ */ new WeakMap(), Al = /* @__PURE__ */ new WeakMap(), jl = /* @__PURE__ */ new WeakMap(), Ml = /* @__PURE__ */ new WeakSet(), Nl = class {
|
|
4362
4402
|
constructor(e, t = () => {}) {
|
|
4363
|
-
C(this,
|
|
4403
|
+
C(this, Ml), p(this, Dl, void 0), p(this, Ol, void 0), p(this, kl, null), p(this, Al, null), p(this, jl, null), m(Dl, this, e), m(Ol, this, t);
|
|
4364
4404
|
}
|
|
4365
4405
|
get hasFrame() {
|
|
4366
|
-
return g(
|
|
4406
|
+
return g(kl, this) !== null;
|
|
4367
4407
|
}
|
|
4368
4408
|
paint(e) {
|
|
4369
4409
|
var t;
|
|
4370
|
-
if (m(
|
|
4371
|
-
h(
|
|
4410
|
+
if (m(Al, this, e), ((t = g(kl, this)) == null ? void 0 : t.url) === e.url) {
|
|
4411
|
+
h(Ml, this, Fl).call(this, e);
|
|
4372
4412
|
return;
|
|
4373
4413
|
}
|
|
4374
|
-
h(
|
|
4414
|
+
h(Ml, this, Pl).call(this, e.url);
|
|
4375
4415
|
}
|
|
4376
4416
|
reset() {
|
|
4377
|
-
m(
|
|
4417
|
+
m(kl, this, null), m(Al, this, null), m(jl, this, null), g(Dl, this).style.backgroundImage = "";
|
|
4378
4418
|
}
|
|
4379
4419
|
};
|
|
4380
|
-
function
|
|
4381
|
-
if (g(
|
|
4382
|
-
m(
|
|
4420
|
+
function Pl(e) {
|
|
4421
|
+
if (g(jl, this) === e) return;
|
|
4422
|
+
m(jl, this, e);
|
|
4383
4423
|
let t = new Image();
|
|
4384
4424
|
t.src = e, (typeof t.decode == "function" ? t.decode() : Promise.resolve()).catch(() => {}).then(() => {
|
|
4385
4425
|
var n;
|
|
4386
|
-
g(
|
|
4387
|
-
let r = g(
|
|
4388
|
-
r && (r.url === e ? (m(
|
|
4426
|
+
g(jl, this) === e && m(jl, this, null);
|
|
4427
|
+
let r = g(Al, this);
|
|
4428
|
+
r && (r.url === e ? (m(kl, this, {
|
|
4389
4429
|
url: e,
|
|
4390
4430
|
image: t
|
|
4391
|
-
}), h(
|
|
4431
|
+
}), h(Ml, this, Fl).call(this, r)) : ((n = g(kl, this)) == null ? void 0 : n.url) !== r.url && h(Ml, this, Pl).call(this, r.url));
|
|
4392
4432
|
});
|
|
4393
4433
|
}
|
|
4394
|
-
function
|
|
4395
|
-
let t = g(
|
|
4396
|
-
t.backgroundImage !== `url("${e.url}")` && (t.backgroundImage = `url("${e.url}")`), t.backgroundSize = e.size, t.backgroundPosition = e.position, g(
|
|
4434
|
+
function Fl(e) {
|
|
4435
|
+
let t = g(Dl, this).style;
|
|
4436
|
+
t.backgroundImage !== `url("${e.url}")` && (t.backgroundImage = `url("${e.url}")`), t.backgroundSize = e.size, t.backgroundPosition = e.position, g(Ol, this).call(this);
|
|
4397
4437
|
}
|
|
4398
4438
|
//#endregion
|
|
4399
4439
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4400
|
-
var
|
|
4401
|
-
|
|
4440
|
+
var Il = 1e3, Ll = 8, Rl = 3e4, zl = 1e4, Bl = 2, Vl = 1, Hl = document.createElement("template");
|
|
4441
|
+
Hl.innerHTML = `
|
|
4402
4442
|
<style>
|
|
4403
4443
|
:host {
|
|
4404
4444
|
--buffered: 0;
|
|
@@ -4491,56 +4531,56 @@ Il.innerHTML = `
|
|
|
4491
4531
|
<div id="thumbnail"></div>
|
|
4492
4532
|
<div id="time-tooltip"></div>
|
|
4493
4533
|
`;
|
|
4494
|
-
var Z = /* @__PURE__ */ new WeakMap(),
|
|
4534
|
+
var Z = /* @__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(), tu = /* @__PURE__ */ new WeakMap(), nu = /* @__PURE__ */ new WeakMap(), ru = /* @__PURE__ */ new WeakMap(), iu = /* @__PURE__ */ new WeakMap(), au = /* @__PURE__ */ new WeakMap(), ou = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), su = /* @__PURE__ */ new WeakMap(), cu = /* @__PURE__ */ new WeakMap(), lu = /* @__PURE__ */ new WeakMap(), uu = /* @__PURE__ */ new WeakMap(), du = /* @__PURE__ */ new WeakMap(), fu = /* @__PURE__ */ new WeakMap(), pu = /* @__PURE__ */ new WeakMap(), mu = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), hu = /* @__PURE__ */ new WeakMap(), gu = /* @__PURE__ */ new WeakMap(), _u = /* @__PURE__ */ new WeakMap(), vu = /* @__PURE__ */ new WeakMap(), yu = /* @__PURE__ */ new WeakMap(), bu = /* @__PURE__ */ new WeakMap(), xu = /* @__PURE__ */ new WeakMap(), Su = class extends ji {
|
|
4495
4535
|
constructor() {
|
|
4496
4536
|
var e, t, n, r, i;
|
|
4497
|
-
super(), C(this, $), p(this, Z, void 0), p(this,
|
|
4498
|
-
if (!h($, this,
|
|
4537
|
+
super(), C(this, $), p(this, Z, void 0), p(this, Ul, void 0), p(this, Wl, null), p(this, Gl, null), p(this, Kl, 0), p(this, ql, null), p(this, Jl, void 0), p(this, Yl, !1), p(this, Xl, !1), p(this, Zl, /* @__PURE__ */ new Set()), p(this, Ql, /* @__PURE__ */ new Set()), p(this, $l, /* @__PURE__ */ new Set()), p(this, eu, null), p(this, tu, !1), p(this, nu, void 0), p(this, ru, void 0), p(this, iu, void 0), p(this, au, []), p(this, ou, null), p(this, Q, !1), p(this, su, null), p(this, cu, null), p(this, lu, null), p(this, uu, !1), p(this, du, null), p(this, fu, null), p(this, pu, !1), p(this, mu, !1), p(this, hu, (e) => {
|
|
4538
|
+
if (!h($, this, Tu).call(this) || h($, this, Eu).call(this)) {
|
|
4499
4539
|
e.preventDefault();
|
|
4500
4540
|
return;
|
|
4501
4541
|
}
|
|
4502
|
-
m(Q, this, !0), m(
|
|
4542
|
+
m(Q, this, !0), m(fu, this, e.pointerId), m(su, this, e.pointerType), m(cu, this, this.range.value), m(uu, this, !this.hasAttribute(_.PAUSED)), g(uu, this) && h($, this, Bu).call(this, S.PAUSE);
|
|
4503
4543
|
try {
|
|
4504
4544
|
this.setPointerCapture(e.pointerId);
|
|
4505
4545
|
} catch (e) {}
|
|
4506
|
-
h($, this,
|
|
4507
|
-
}), p(this,
|
|
4508
|
-
if (!(!h($, this,
|
|
4509
|
-
if (g(
|
|
4510
|
-
e.preventDefault(), h($, this,
|
|
4546
|
+
h($, this, Nu).call(this), h($, this, zu).call(this, e);
|
|
4547
|
+
}), p(this, gu, (e) => {
|
|
4548
|
+
if (!(!h($, this, Tu).call(this) || h($, this, Eu).call(this))) {
|
|
4549
|
+
if (g(du, this) && (cancelAnimationFrame(g(du, this)), m(du, this, null)), g(Q, this) && e.pointerId === g(fu, this)) {
|
|
4550
|
+
e.preventDefault(), h($, this, zu).call(this, e);
|
|
4511
4551
|
return;
|
|
4512
4552
|
}
|
|
4513
|
-
m(
|
|
4553
|
+
m(du, this, requestAnimationFrame(() => {
|
|
4514
4554
|
var t;
|
|
4515
4555
|
if (e.pointerType !== "mouse" || g(Q, this) || !this.duration) {
|
|
4516
|
-
g(
|
|
4556
|
+
g(ru, this).style.opacity = "0", m(du, this, null);
|
|
4517
4557
|
return;
|
|
4518
4558
|
}
|
|
4519
|
-
let n = h($, this,
|
|
4520
|
-
if (h($, this,
|
|
4559
|
+
let n = h($, this, Ru).call(this, e.clientX), r = h($, this, ju).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4560
|
+
if (h($, this, Uu).call(this, i, r), h($, this, Iu).call(this, i), i > this.range.valueAsNumber) {
|
|
4521
4561
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4522
|
-
g(
|
|
4523
|
-
} else g(
|
|
4524
|
-
m(
|
|
4562
|
+
g(ru, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, g(ru, this).style.opacity = "1";
|
|
4563
|
+
} else g(ru, this).style.opacity = "0";
|
|
4564
|
+
m(du, this, null);
|
|
4525
4565
|
}));
|
|
4526
4566
|
}
|
|
4527
|
-
}), p(this,
|
|
4528
|
-
if (e.pointerId !== g(
|
|
4567
|
+
}), p(this, _u, (e) => {
|
|
4568
|
+
if (e.pointerId !== g(fu, this)) return;
|
|
4529
4569
|
try {
|
|
4530
4570
|
this.releasePointerCapture(e.pointerId);
|
|
4531
4571
|
} catch (e) {}
|
|
4532
|
-
m(Q, this, !1), m(
|
|
4533
|
-
let t = g(
|
|
4534
|
-
m(
|
|
4535
|
-
}), p(this,
|
|
4536
|
-
this.duration && !h($, this,
|
|
4537
|
-
}), p(this,
|
|
4538
|
-
g(
|
|
4539
|
-
}), p(this,
|
|
4540
|
-
m(
|
|
4541
|
-
}), p(this,
|
|
4542
|
-
if (h($, this,
|
|
4543
|
-
let t = h($, this,
|
|
4572
|
+
m(Q, this, !1), m(fu, this, null), m(su, this, null), h($, this, Vu).call(this, null);
|
|
4573
|
+
let t = g(lu, this), n = g(cu, this);
|
|
4574
|
+
m(lu, this, null), m(cu, this, null), e.type === "pointerup" && t !== null ? h($, this, Hu).call(this, t) : n !== null && (this.range.value = n, this.updateBar()), g(uu, this) && h($, this, Bu).call(this, S.PLAY), m(uu, this, !1), e.pointerType !== "mouse" && (g(nu, this).style.opacity = "0", g(bu, this).call(this)), g(mu, this) && h($, this, Ku).call(this) && (m(pu, this, !1), m(mu, this, !1));
|
|
4575
|
+
}), p(this, vu, () => {
|
|
4576
|
+
this.duration && !h($, this, Eu).call(this) && (g(nu, this).style.opacity = "1"), m(Xl, this, !0), h($, this, Nu).call(this);
|
|
4577
|
+
}), p(this, yu, () => {
|
|
4578
|
+
g(nu, this).style.opacity = "0", g(ru, this).style.opacity = "0", m(Xl, this, !1), g(bu, this).call(this);
|
|
4579
|
+
}), p(this, bu, () => {
|
|
4580
|
+
m(Yl, this, !1), g(Ul, this).style.opacity = "0";
|
|
4581
|
+
}), p(this, xu, (e) => {
|
|
4582
|
+
if (h($, this, Eu).call(this) || !g(Z, this) || g(Z, this) <= 0 || !Number.isFinite(g(Z, this))) return;
|
|
4583
|
+
let t = h($, this, Cu).call(this);
|
|
4544
4584
|
if (t <= 0) return;
|
|
4545
4585
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4546
4586
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4548,55 +4588,55 @@ var Z = /* @__PURE__ */ new WeakMap(), Ll = /* @__PURE__ */ new WeakMap(), Rl =
|
|
|
4548
4588
|
r = Math.max(0, n - 5);
|
|
4549
4589
|
break;
|
|
4550
4590
|
case "ArrowRight":
|
|
4551
|
-
if (h($, this,
|
|
4591
|
+
if (h($, this, Ku).call(this)) return;
|
|
4552
4592
|
r = Math.min(t, n + 5);
|
|
4553
4593
|
break;
|
|
4554
4594
|
case "Home":
|
|
4555
4595
|
r = 0;
|
|
4556
4596
|
break;
|
|
4557
4597
|
case "End":
|
|
4558
|
-
if (h($, this,
|
|
4598
|
+
if (h($, this, Ku).call(this)) return;
|
|
4559
4599
|
r = t;
|
|
4560
4600
|
break;
|
|
4561
4601
|
default: return;
|
|
4562
4602
|
}
|
|
4563
4603
|
let i = Math.min(r / t, 1);
|
|
4564
|
-
h($, this,
|
|
4565
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4566
|
-
g(
|
|
4567
|
-
})), this.addEventListener("pointerdown", g(
|
|
4604
|
+
h($, this, Hu).call(this, i);
|
|
4605
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Hl.content.cloneNode(!0)), m(nu, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), m(ru, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), m(iu, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), m(Ul, this, (i = this.shadowRoot) == null ? void 0 : i.getElementById("thumbnail")), m(Jl, this, new Nl(g(Ul, this), () => {
|
|
4606
|
+
g(Yl, this) && (g(Xl, this) || g(Q, this)) && (g(Ul, this).style.opacity = "1");
|
|
4607
|
+
})), this.addEventListener("pointerdown", g(hu, this)), this.addEventListener("pointermove", g(gu, this)), this.addEventListener("pointerup", g(_u, this)), this.addEventListener("pointercancel", g(_u, this)), this.addEventListener("mouseenter", g(vu, this)), this.addEventListener("mouseleave", g(yu, this));
|
|
4568
4608
|
}
|
|
4569
4609
|
connectedCallback() {
|
|
4570
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), h($, this,
|
|
4610
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), h($, this, Mu).call(this), this.addEventListener("keydown", g(xu, this)), h($, this, Ku).call(this) && (this.range.value = "1", h($, this, Mu).call(this)), h($, this, Du).call(this), h($, this, ku).call(this);
|
|
4571
4611
|
}
|
|
4572
4612
|
disconnectedCallback() {
|
|
4573
|
-
super.disconnectedCallback(), h($, this,
|
|
4613
|
+
super.disconnectedCallback(), h($, this, Au).call(this), this.removeEventListener("pointerdown", g(hu, this)), this.removeEventListener("pointermove", g(gu, this)), this.removeEventListener("pointerup", g(_u, this)), this.removeEventListener("pointercancel", g(_u, this)), this.removeEventListener("mouseenter", g(vu, this)), this.removeEventListener("mouseleave", g(yu, this)), this.removeEventListener("keydown", g(xu, this)), m(fu, this, null);
|
|
4574
4614
|
}
|
|
4575
4615
|
attributeChangedCallback(e, t, n) {
|
|
4576
4616
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4577
4617
|
case _.TIMESHIFT_POSITION:
|
|
4578
|
-
if (h($, this,
|
|
4618
|
+
if (h($, this, Ku).call(this)) {
|
|
4579
4619
|
if (g(Q, this)) {
|
|
4580
|
-
m(
|
|
4620
|
+
m(mu, this, !0);
|
|
4581
4621
|
return;
|
|
4582
4622
|
}
|
|
4583
|
-
m(
|
|
4623
|
+
m(pu, this, !1), m(mu, this, !1), this.range.value = "1", h($, this, Mu).call(this);
|
|
4584
4624
|
return;
|
|
4585
4625
|
}
|
|
4586
4626
|
if (g(Z, this)) {
|
|
4587
|
-
if (m(
|
|
4627
|
+
if (m(mu, this, !1), g(Q, this)) return;
|
|
4588
4628
|
let e = Math.max(parseFloat(n) / g(Z, this), 0);
|
|
4589
|
-
this.range.value = e.toString(), h($, this,
|
|
4629
|
+
this.range.value = e.toString(), h($, this, Mu).call(this);
|
|
4590
4630
|
}
|
|
4591
4631
|
break;
|
|
4592
4632
|
case _.DURATION:
|
|
4593
|
-
m(Z, this, parseFloat(n) || 0), h($, this,
|
|
4633
|
+
m(Z, this, parseFloat(n) || 0), h($, this, Mu).call(this), h($, this, Du).call(this), h($, this, ku).call(this);
|
|
4594
4634
|
break;
|
|
4595
4635
|
case _.TIMELINE_MARKERS:
|
|
4596
|
-
m(
|
|
4636
|
+
m(au, this, Kr(n)), h($, this, Du).call(this), h($, this, ku).call(this);
|
|
4597
4637
|
break;
|
|
4598
4638
|
case _.TIMESHIFT_THUMBNAIL_URL:
|
|
4599
|
-
m(
|
|
4639
|
+
m(Wl, this, n || null), m(Gl, this, null), m(Kl, this, 0), g(Jl, this).reset(), g(Zl, this).clear(), g(Ql, this).clear(), g($l, this).clear(), g(bu, this).call(this), g(ql, this) ? m(tu, this, !0) : (g(Xl, this) || g(Q, this)) && h($, this, Nu).call(this);
|
|
4600
4640
|
break;
|
|
4601
4641
|
}
|
|
4602
4642
|
}
|
|
@@ -4614,54 +4654,54 @@ var Z = /* @__PURE__ */ new WeakMap(), Ll = /* @__PURE__ */ new WeakMap(), Rl =
|
|
|
4614
4654
|
this.setAttribute(_.DURATION, e.toString());
|
|
4615
4655
|
}
|
|
4616
4656
|
};
|
|
4617
|
-
function
|
|
4657
|
+
function Cu() {
|
|
4618
4658
|
return g(Z, this) ? g(Z, this) : 1;
|
|
4619
4659
|
}
|
|
4620
|
-
function
|
|
4660
|
+
function wu() {
|
|
4621
4661
|
let e = g(Z, this);
|
|
4622
4662
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4623
4663
|
}
|
|
4624
|
-
function
|
|
4625
|
-
return h($, this,
|
|
4664
|
+
function Tu() {
|
|
4665
|
+
return h($, this, wu).call(this) !== void 0;
|
|
4626
4666
|
}
|
|
4627
|
-
function
|
|
4628
|
-
return g(
|
|
4667
|
+
function Eu() {
|
|
4668
|
+
return g(pu, this);
|
|
4629
4669
|
}
|
|
4630
|
-
function
|
|
4670
|
+
function Du() {
|
|
4631
4671
|
var e;
|
|
4632
|
-
let t = Date.now(), n = (e = g(Z, this)) == null ? 0 : e, r = g(
|
|
4633
|
-
for (let e of g(
|
|
4634
|
-
let a =
|
|
4672
|
+
let t = Date.now(), n = (e = g(Z, this)) == null ? 0 : e, r = g(iu, this).children, i = 0;
|
|
4673
|
+
for (let e of g(au, this)) {
|
|
4674
|
+
let a = qr(e.time, t, n);
|
|
4635
4675
|
if (a === null) continue;
|
|
4636
4676
|
let o = r[i];
|
|
4637
|
-
o || (o = document.createElement("div"), o.className = "marker", g(
|
|
4677
|
+
o || (o = document.createElement("div"), o.className = "marker", g(iu, 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++;
|
|
4638
4678
|
}
|
|
4639
|
-
for (; g(
|
|
4679
|
+
for (; g(iu, this).children.length > i;) {
|
|
4640
4680
|
var a;
|
|
4641
|
-
(a = g(
|
|
4681
|
+
(a = g(iu, this).lastElementChild) == null || a.remove();
|
|
4642
4682
|
}
|
|
4643
4683
|
}
|
|
4644
|
-
function
|
|
4645
|
-
let e = h($, this,
|
|
4684
|
+
function Ou() {
|
|
4685
|
+
let e = h($, this, wu).call(this);
|
|
4646
4686
|
if (e === void 0) return !1;
|
|
4647
4687
|
let t = Date.now() - e * 1e3;
|
|
4648
|
-
return g(
|
|
4688
|
+
return g(au, this).some((e) => e.time >= t);
|
|
4649
4689
|
}
|
|
4650
|
-
function
|
|
4651
|
-
this.isConnected && h($, this,
|
|
4652
|
-
h($, this,
|
|
4653
|
-
},
|
|
4690
|
+
function ku() {
|
|
4691
|
+
this.isConnected && h($, this, Ou).call(this) ? g(ou, this) === null && m(ou, this, window.setInterval(() => {
|
|
4692
|
+
h($, this, Du).call(this), h($, this, ku).call(this);
|
|
4693
|
+
}, Il)) : h($, this, Au).call(this);
|
|
4654
4694
|
}
|
|
4655
|
-
function
|
|
4656
|
-
g(
|
|
4695
|
+
function Au() {
|
|
4696
|
+
g(ou, this) !== null && (window.clearInterval(g(ou, this)), m(ou, this, null));
|
|
4657
4697
|
}
|
|
4658
|
-
function
|
|
4659
|
-
if (g(
|
|
4698
|
+
function ju(e) {
|
|
4699
|
+
if (g(au, this).length === 0 || !g(Z, this)) return null;
|
|
4660
4700
|
let t = this.getBoundingClientRect().width;
|
|
4661
4701
|
if (!t) return null;
|
|
4662
|
-
let n =
|
|
4663
|
-
for (let t of g(
|
|
4664
|
-
let a =
|
|
4702
|
+
let n = Ll / t, r = Date.now(), i = null;
|
|
4703
|
+
for (let t of g(au, this)) {
|
|
4704
|
+
let a = qr(t.time, r, g(Z, this));
|
|
4665
4705
|
if (a === null) continue;
|
|
4666
4706
|
let o = Math.abs(a - e);
|
|
4667
4707
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4671,125 +4711,125 @@ function Tu(e) {
|
|
|
4671
4711
|
}
|
|
4672
4712
|
return i;
|
|
4673
4713
|
}
|
|
4674
|
-
function
|
|
4675
|
-
let e = h($, this,
|
|
4676
|
-
!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,
|
|
4714
|
+
function Mu() {
|
|
4715
|
+
let e = h($, this, Cu).call(this);
|
|
4716
|
+
!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, qu).call(this, this.range.valueAsNumber * e)} of ${h($, this, qu).call(this, e)}`), !g(Q, this) && !h($, this, Eu).call(this) && h($, this, Gu).call(this, this.range.valueAsNumber));
|
|
4677
4717
|
}
|
|
4678
|
-
function
|
|
4718
|
+
function Nu() {
|
|
4679
4719
|
var e = this;
|
|
4680
4720
|
return t(function* () {
|
|
4681
|
-
let n = g(
|
|
4682
|
-
if (!(!n || g(
|
|
4683
|
-
let t = new AbortController(), r = setTimeout(() => t.abort(),
|
|
4721
|
+
let n = g(Wl, e);
|
|
4722
|
+
if (!(!n || g(ql, e)) && !(Date.now() - g(Kl, e) < Rl)) return m(ql, e, t(function* () {
|
|
4723
|
+
let t = new AbortController(), r = setTimeout(() => t.abort(), zl);
|
|
4684
4724
|
try {
|
|
4685
4725
|
let r = yield fetch(n, { signal: t.signal });
|
|
4686
|
-
if (g(
|
|
4687
|
-
let i =
|
|
4688
|
-
if (!i || g(
|
|
4689
|
-
m(
|
|
4690
|
-
for (let t of i.sheets.slice(-
|
|
4691
|
-
h($, e,
|
|
4726
|
+
if (g(Wl, e) !== n || (m(Kl, e, Date.now()), !r.ok)) return;
|
|
4727
|
+
let i = Tl(yield r.text(), n);
|
|
4728
|
+
if (!i || g(Wl, e) !== n) return;
|
|
4729
|
+
m(Gl, e, i);
|
|
4730
|
+
for (let t of i.sheets.slice(-Bl)) h($, e, Fu).call(e, t.url);
|
|
4731
|
+
h($, e, Lu).call(e);
|
|
4692
4732
|
} catch (t) {
|
|
4693
|
-
m(
|
|
4733
|
+
m(Kl, e, Date.now());
|
|
4694
4734
|
} finally {
|
|
4695
|
-
clearTimeout(r), m(
|
|
4735
|
+
clearTimeout(r), m(ql, e, null), g(tu, e) && (m(tu, e, !1), h($, e, Nu).call(e));
|
|
4696
4736
|
}
|
|
4697
|
-
})()), g(
|
|
4737
|
+
})()), g(ql, e);
|
|
4698
4738
|
})();
|
|
4699
4739
|
}
|
|
4700
|
-
function
|
|
4740
|
+
function Pu(e, t) {
|
|
4701
4741
|
let n = e.sheets.findIndex((e) => e.url === t);
|
|
4702
4742
|
if (n < 0) return;
|
|
4703
|
-
let r = Math.max(0, n -
|
|
4704
|
-
for (let t of e.sheets.slice(r, n +
|
|
4743
|
+
let r = Math.max(0, n - Vl);
|
|
4744
|
+
for (let t of e.sheets.slice(r, n + Vl + 1)) h($, this, Fu).call(this, t.url);
|
|
4705
4745
|
}
|
|
4706
|
-
function
|
|
4707
|
-
if (g(
|
|
4708
|
-
g(
|
|
4746
|
+
function Fu(e) {
|
|
4747
|
+
if (g(Zl, this).has(e)) return;
|
|
4748
|
+
g(Zl, this).add(e);
|
|
4709
4749
|
let t = new Image();
|
|
4710
4750
|
t.onload = () => {
|
|
4711
|
-
g(
|
|
4751
|
+
g(Ql, this).add(e), h($, this, Lu).call(this);
|
|
4712
4752
|
}, t.onerror = () => {
|
|
4713
|
-
g(
|
|
4753
|
+
g($l, this).add(e);
|
|
4714
4754
|
}, t.src = e;
|
|
4715
4755
|
}
|
|
4716
|
-
function
|
|
4717
|
-
m(
|
|
4718
|
-
let n = g(
|
|
4719
|
-
if (h($, this,
|
|
4720
|
-
let i =
|
|
4721
|
-
if (!i || g(
|
|
4722
|
-
if (h($, this,
|
|
4756
|
+
function Iu(e, t = !0) {
|
|
4757
|
+
m(eu, this, e);
|
|
4758
|
+
let n = g(Gl, this), r = h($, this, wu).call(this);
|
|
4759
|
+
if (h($, this, Nu).call(this), !n || r === void 0) return null;
|
|
4760
|
+
let i = El(n, Date.now() - (1 - Math.max(0, Math.min(1, e))) * r * 1e3);
|
|
4761
|
+
if (!i || g($l, this).has(i.url)) return g(bu, this).call(this), null;
|
|
4762
|
+
if (h($, this, Pu).call(this, n, i.url), !g(Ql, this).has(i.url)) return h($, this, Fu).call(this, i.url), g(bu, this).call(this), null;
|
|
4723
4763
|
if (!t) return i;
|
|
4724
4764
|
let { width: a, height: o, columns: s, rows: c } = i.layout;
|
|
4725
|
-
g(
|
|
4726
|
-
let l = g(
|
|
4727
|
-
return g(
|
|
4765
|
+
g(Ul, this).style.aspectRatio = `${a} / ${o}`;
|
|
4766
|
+
let l = g(Ul, this).clientWidth > 0 ? g(Ul, this).clientWidth / a : 1, u = this.clientWidth, d = g(Ul, this).clientWidth / 2, f = u > 0 ? Math.min(Math.max(e * u, d), u - d) : e * 100;
|
|
4767
|
+
return g(Ul, this).style.left = u > 0 ? `${f}px` : `${f}%`, m(Yl, this, !0), g(Jl, this).paint({
|
|
4728
4768
|
url: i.url,
|
|
4729
4769
|
size: `${a * s * l}px ${o * c * l}px`,
|
|
4730
4770
|
position: `-${i.x * l}px -${i.y * l}px`
|
|
4731
4771
|
}), i;
|
|
4732
4772
|
}
|
|
4733
|
-
function
|
|
4734
|
-
let e = g(
|
|
4735
|
-
e !== null && (g(Q, this) ? h($, this,
|
|
4773
|
+
function Lu() {
|
|
4774
|
+
let e = g(eu, this);
|
|
4775
|
+
e !== null && (g(Q, this) ? h($, this, Vu).call(this, h($, this, Iu).call(this, e, g(su, this) === "mouse")) : g(Xl, this) && h($, this, Iu).call(this, e));
|
|
4736
4776
|
}
|
|
4737
|
-
function
|
|
4777
|
+
function Ru(e) {
|
|
4738
4778
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4739
4779
|
return Math.max(0, Math.min(1, n));
|
|
4740
4780
|
}
|
|
4741
|
-
function
|
|
4781
|
+
function zu(e) {
|
|
4742
4782
|
var t;
|
|
4743
|
-
let n = h($, this,
|
|
4744
|
-
h($, this,
|
|
4745
|
-
let a = h($, this,
|
|
4746
|
-
h($, this,
|
|
4783
|
+
let n = h($, this, Ru).call(this, e.clientX), r = h($, this, ju).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4784
|
+
h($, this, Uu).call(this, i, r), g(Q, this) || (g(nu, this).style.opacity = "1");
|
|
4785
|
+
let a = h($, this, Iu).call(this, i, e.pointerType === "mouse");
|
|
4786
|
+
h($, this, Vu).call(this, a), m(lu, this, i), h($, this, Eu).call(this) || (this.range.value = i.toString(), this.updateBar());
|
|
4747
4787
|
}
|
|
4748
|
-
function
|
|
4788
|
+
function Bu(e) {
|
|
4749
4789
|
this.dispatchEvent(new CustomEvent(e, {
|
|
4750
4790
|
bubbles: !0,
|
|
4751
4791
|
composed: !0
|
|
4752
4792
|
}));
|
|
4753
4793
|
}
|
|
4754
|
-
function
|
|
4794
|
+
function Vu(e) {
|
|
4755
4795
|
this.dispatchEvent(new CustomEvent(S.SEEK_PREVIEW, {
|
|
4756
4796
|
bubbles: !0,
|
|
4757
4797
|
composed: !0,
|
|
4758
4798
|
detail: e
|
|
4759
4799
|
}));
|
|
4760
4800
|
}
|
|
4761
|
-
function
|
|
4762
|
-
if (h($, this,
|
|
4763
|
-
let t = e * h($, this,
|
|
4764
|
-
this.range.value = e.toString(), this.updateBar(), h($, this,
|
|
4801
|
+
function Hu(e) {
|
|
4802
|
+
if (h($, this, Eu).call(this) || h($, this, Gu).call(this, e)) return;
|
|
4803
|
+
let t = e * h($, this, Cu).call(this);
|
|
4804
|
+
this.range.value = e.toString(), this.updateBar(), h($, this, Wu).call(this, t);
|
|
4765
4805
|
}
|
|
4766
|
-
function
|
|
4806
|
+
function Uu(e, t) {
|
|
4767
4807
|
if (!g(Z, this) || !Number.isFinite(g(Z, this))) return;
|
|
4768
|
-
let n = e * g(Z, this), r = g(Z, this) - n, i = `-${h($, this,
|
|
4769
|
-
g(
|
|
4808
|
+
let n = e * g(Z, this), r = g(Z, this) - n, i = `-${h($, this, qu).call(this, r)}`;
|
|
4809
|
+
g(nu, this).textContent = t ? `${t.marker.label}: ${i}` : i, g(nu, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4770
4810
|
}
|
|
4771
|
-
function
|
|
4811
|
+
function Wu(e) {
|
|
4772
4812
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4773
4813
|
bubbles: !0,
|
|
4774
4814
|
composed: !0,
|
|
4775
4815
|
detail: e
|
|
4776
4816
|
}));
|
|
4777
4817
|
}
|
|
4778
|
-
function
|
|
4779
|
-
return g(
|
|
4818
|
+
function Gu(e) {
|
|
4819
|
+
return g(pu, this) || h($, this, Ku).call(this) || e < .999 ? !1 : (m(pu, this, !0), m(mu, this, !1), this.dispatchEvent(new CustomEvent(S.GO_LIVE, {
|
|
4780
4820
|
bubbles: !0,
|
|
4781
4821
|
composed: !0
|
|
4782
4822
|
})), !0);
|
|
4783
4823
|
}
|
|
4784
|
-
function
|
|
4824
|
+
function Ku() {
|
|
4785
4825
|
return !this.hasAttribute(_.TIMESHIFT_POSITION);
|
|
4786
4826
|
}
|
|
4787
|
-
function
|
|
4827
|
+
function qu(e) {
|
|
4788
4828
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4789
4829
|
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")}`;
|
|
4790
4830
|
}
|
|
4791
|
-
e(
|
|
4792
|
-
...
|
|
4831
|
+
e(Su, "observedAttributes", [
|
|
4832
|
+
...ji.observedAttributes,
|
|
4793
4833
|
_.TIMESHIFT_POSITION,
|
|
4794
4834
|
_.DURATION,
|
|
4795
4835
|
_.TIMELINE_MARKERS,
|
|
@@ -4798,9 +4838,9 @@ e(gu, "observedAttributes", [
|
|
|
4798
4838
|
]);
|
|
4799
4839
|
//#endregion
|
|
4800
4840
|
//#region ../../libs/player-next/src/components/SeekPreviewOverlay.ts
|
|
4801
|
-
var
|
|
4802
|
-
|
|
4803
|
-
var
|
|
4841
|
+
var Ju = document.createElement("template");
|
|
4842
|
+
Ju.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";
|
|
4843
|
+
var Yu = (e) => {
|
|
4804
4844
|
if (!e) return null;
|
|
4805
4845
|
try {
|
|
4806
4846
|
let t = JSON.parse(e);
|
|
@@ -4808,42 +4848,42 @@ var Uu = (e) => {
|
|
|
4808
4848
|
} catch (e) {
|
|
4809
4849
|
return null;
|
|
4810
4850
|
}
|
|
4811
|
-
},
|
|
4851
|
+
}, Xu = /* @__PURE__ */ new WeakMap(), Zu = /* @__PURE__ */ new WeakMap(), Qu = /* @__PURE__ */ new WeakMap(), $u = /* @__PURE__ */ new WeakMap(), ed = class extends HTMLElement {
|
|
4812
4852
|
constructor() {
|
|
4813
|
-
super(), p(this,
|
|
4853
|
+
super(), p(this, Xu, null), p(this, Zu, void 0), p(this, Qu, void 0), p(this, $u, !1);
|
|
4814
4854
|
let e = this.attachShadow({ mode: "open" });
|
|
4815
|
-
e.appendChild(
|
|
4816
|
-
g(
|
|
4855
|
+
e.appendChild(Ju.content.cloneNode(!0)), m(Zu, this, e.getElementById("frame")), m(Qu, this, new Nl(g(Zu, this), () => {
|
|
4856
|
+
g($u, this) && this.setAttribute("data-active", "");
|
|
4817
4857
|
}));
|
|
4818
4858
|
}
|
|
4819
4859
|
connectedCallback() {
|
|
4820
4860
|
var e;
|
|
4821
|
-
m(
|
|
4861
|
+
m(Xu, this, this.closest("vindral-controller")), (e = g(Xu, this)) == null || e.connectListener(this);
|
|
4822
4862
|
}
|
|
4823
4863
|
disconnectedCallback() {
|
|
4824
4864
|
var e;
|
|
4825
|
-
(e = g(
|
|
4865
|
+
(e = g(Xu, this)) == null || e.disconnectListener(this);
|
|
4826
4866
|
}
|
|
4827
4867
|
attributeChangedCallback(e, t, n) {
|
|
4828
4868
|
if (e !== _.SEEK_PREVIEW) return;
|
|
4829
|
-
let r =
|
|
4830
|
-
if (m(
|
|
4869
|
+
let r = Yu(n);
|
|
4870
|
+
if (m($u, this, r !== null), !r) {
|
|
4831
4871
|
this.removeAttribute("data-active");
|
|
4832
4872
|
return;
|
|
4833
4873
|
}
|
|
4834
4874
|
let { width: i, height: a, columns: o, rows: s } = r.layout, c = Math.min(this.clientWidth / i, this.clientHeight / a) || 1;
|
|
4835
|
-
g(
|
|
4875
|
+
g(Zu, this).style.width = `${i * c}px`, g(Zu, this).style.height = `${a * c}px`, g(Qu, this).paint({
|
|
4836
4876
|
url: r.url,
|
|
4837
4877
|
size: `${i * o * c}px ${a * s * c}px`,
|
|
4838
4878
|
position: `-${r.x * c}px -${r.y * c}px`
|
|
4839
4879
|
});
|
|
4840
4880
|
}
|
|
4841
4881
|
};
|
|
4842
|
-
e(
|
|
4882
|
+
e(ed, "observedAttributes", [_.SEEK_PREVIEW]);
|
|
4843
4883
|
//#endregion
|
|
4844
4884
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4845
|
-
var
|
|
4846
|
-
|
|
4885
|
+
var td = document.createElement("template");
|
|
4886
|
+
td.innerHTML = `
|
|
4847
4887
|
<style>
|
|
4848
4888
|
:host {
|
|
4849
4889
|
display: var(--play-overlay-display);
|
|
@@ -4903,51 +4943,51 @@ Yu.innerHTML = `
|
|
|
4903
4943
|
</slot>
|
|
4904
4944
|
</slot>
|
|
4905
4945
|
`;
|
|
4906
|
-
var
|
|
4946
|
+
var nd = /* @__PURE__ */ new WeakMap(), rd = /* @__PURE__ */ new WeakMap(), id = /* @__PURE__ */ new WeakMap(), ad = /* @__PURE__ */ new WeakMap(), od = class extends HTMLElement {
|
|
4907
4947
|
constructor() {
|
|
4908
|
-
super(), p(this,
|
|
4948
|
+
super(), p(this, nd, null), p(this, rd, () => {
|
|
4909
4949
|
this.dispatchEvent(new CustomEvent(S.REQUEST_USER_INPUT, {
|
|
4910
4950
|
bubbles: !0,
|
|
4911
4951
|
composed: !0
|
|
4912
4952
|
}));
|
|
4913
|
-
}), p(this,
|
|
4953
|
+
}), p(this, id, (e) => {
|
|
4914
4954
|
let { key: t } = e;
|
|
4915
4955
|
if (!this.keysUsed.includes(t)) {
|
|
4916
|
-
this.removeEventListener("keyup", g(
|
|
4956
|
+
this.removeEventListener("keyup", g(id, this));
|
|
4917
4957
|
return;
|
|
4918
4958
|
}
|
|
4919
4959
|
this.dispatchEvent(new CustomEvent(S.REQUEST_USER_INPUT, {
|
|
4920
4960
|
bubbles: !0,
|
|
4921
4961
|
composed: !0
|
|
4922
4962
|
}));
|
|
4923
|
-
}), p(this,
|
|
4963
|
+
}), p(this, ad, (e) => {
|
|
4924
4964
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4925
4965
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4926
|
-
this.removeEventListener("keyup", g(
|
|
4966
|
+
this.removeEventListener("keyup", g(id, this));
|
|
4927
4967
|
return;
|
|
4928
4968
|
}
|
|
4929
|
-
this.addEventListener("keyup", g(
|
|
4930
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4969
|
+
this.addEventListener("keyup", g(id, this), { once: !0 });
|
|
4970
|
+
}), this.attachShadow({ mode: "open" }).appendChild(td.content.cloneNode(!0));
|
|
4931
4971
|
}
|
|
4932
4972
|
get keysUsed() {
|
|
4933
4973
|
return ["Enter", " "];
|
|
4934
4974
|
}
|
|
4935
4975
|
connectedCallback() {
|
|
4936
4976
|
var e;
|
|
4937
|
-
m(
|
|
4977
|
+
m(nd, this, this.closest("vindral-controller")), (e = g(nd, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4938
4978
|
}
|
|
4939
4979
|
enable() {
|
|
4940
|
-
this.addEventListener("click", g(
|
|
4980
|
+
this.addEventListener("click", g(rd, this)), this.addEventListener("keydown", g(ad, this)), this.tabIndex = 0;
|
|
4941
4981
|
}
|
|
4942
4982
|
disable() {
|
|
4943
|
-
this.removeEventListener("click", g(
|
|
4983
|
+
this.removeEventListener("click", g(rd, this)), this.removeEventListener("keydown", g(ad, this)), this.removeEventListener("keyup", g(id, this)), this.tabIndex = -1;
|
|
4944
4984
|
}
|
|
4945
4985
|
disconnectedCallback() {
|
|
4946
4986
|
var e;
|
|
4947
|
-
(e = g(
|
|
4987
|
+
(e = g(nd, this)) == null || e.disconnectListener(this), this.disable();
|
|
4948
4988
|
}
|
|
4949
4989
|
};
|
|
4950
|
-
e(
|
|
4990
|
+
e(od, "observedAttributes", [
|
|
4951
4991
|
"hidden",
|
|
4952
4992
|
_.NEEDS_USER_INPUT_VIDEO,
|
|
4953
4993
|
_.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4955,68 +4995,68 @@ e(ed, "observedAttributes", [
|
|
|
4955
4995
|
]);
|
|
4956
4996
|
//#endregion
|
|
4957
4997
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4958
|
-
var
|
|
4959
|
-
|
|
4960
|
-
var
|
|
4998
|
+
var sd = document.createElement("template");
|
|
4999
|
+
sd.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";
|
|
5000
|
+
var cd = class extends HTMLElement {
|
|
4961
5001
|
constructor() {
|
|
4962
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
5002
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(sd.content.cloneNode(!0));
|
|
4963
5003
|
}
|
|
4964
5004
|
attributeChangedCallback(e, t, n) {
|
|
4965
5005
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4966
5006
|
}
|
|
4967
5007
|
};
|
|
4968
|
-
e(
|
|
5008
|
+
e(cd, "observedAttributes", [
|
|
4969
5009
|
"backdrop",
|
|
4970
5010
|
"poster",
|
|
4971
5011
|
"disable-backdrop"
|
|
4972
5012
|
]);
|
|
4973
5013
|
//#endregion
|
|
4974
5014
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4975
|
-
var
|
|
4976
|
-
|
|
4977
|
-
var
|
|
5015
|
+
var ld = document.createElement("template");
|
|
5016
|
+
ld.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";
|
|
5017
|
+
var ud = /* @__PURE__ */ new WeakMap(), dd = /* @__PURE__ */ new WeakMap(), fd = class extends HTMLElement {
|
|
4978
5018
|
constructor() {
|
|
4979
|
-
super(), p(this,
|
|
5019
|
+
super(), p(this, ud, void 0), p(this, dd, void 0);
|
|
4980
5020
|
let e = this.attachShadow({ mode: "open" });
|
|
4981
|
-
e.appendChild(
|
|
5021
|
+
e.appendChild(ld.content.cloneNode(!0)), m(ud, this, e.querySelector("#title")), m(dd, this, e.querySelector("#description"));
|
|
4982
5022
|
}
|
|
4983
5023
|
connectedCallback() {
|
|
4984
5024
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4985
5025
|
}
|
|
4986
5026
|
attributeChangedCallback(e, t, n) {
|
|
4987
|
-
t !== n && (e === "title" ? g(
|
|
5027
|
+
t !== n && (e === "title" ? g(ud, this).textContent = n : e === "description" && (g(dd, this).textContent = n));
|
|
4988
5028
|
}
|
|
4989
5029
|
};
|
|
4990
|
-
e(
|
|
5030
|
+
e(fd, "observedAttributes", [
|
|
4991
5031
|
"title",
|
|
4992
5032
|
"description",
|
|
4993
5033
|
"hidden"
|
|
4994
5034
|
]);
|
|
4995
5035
|
//#endregion
|
|
4996
5036
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4997
|
-
var
|
|
4998
|
-
|
|
4999
|
-
var
|
|
5037
|
+
var pd = document.createElement("template");
|
|
5038
|
+
pd.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";
|
|
5039
|
+
var md = /* @__PURE__ */ new WeakMap(), hd = class extends HTMLElement {
|
|
5000
5040
|
constructor() {
|
|
5001
|
-
super(), p(this,
|
|
5041
|
+
super(), p(this, md, null), this.attachShadow({ mode: "open" }).appendChild(pd.content.cloneNode(!0));
|
|
5002
5042
|
}
|
|
5003
5043
|
connectedCallback() {
|
|
5004
5044
|
var e;
|
|
5005
|
-
m(
|
|
5045
|
+
m(md, this, this.closest("vindral-controller")), (e = g(md, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
5006
5046
|
}
|
|
5007
5047
|
disconnectedCallback() {
|
|
5008
5048
|
var e;
|
|
5009
|
-
(e = g(
|
|
5049
|
+
(e = g(md, this)) == null || e.disconnectListener(this);
|
|
5010
5050
|
}
|
|
5011
5051
|
attributeChangedCallback(e, t, n) {
|
|
5012
5052
|
t !== n && e === "hidden" && !v(n) && this.focus();
|
|
5013
5053
|
}
|
|
5014
5054
|
};
|
|
5015
|
-
e(
|
|
5055
|
+
e(hd, "observedAttributes", ["hidden"]);
|
|
5016
5056
|
//#endregion
|
|
5017
5057
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
5018
|
-
var
|
|
5019
|
-
|
|
5058
|
+
var gd, _d = "Volume", vd = document.createElement("template");
|
|
5059
|
+
vd.innerHTML = `
|
|
5020
5060
|
<style>
|
|
5021
5061
|
:host {
|
|
5022
5062
|
display: var(--volume-range-display);
|
|
@@ -5041,29 +5081,29 @@ fd.innerHTML = `
|
|
|
5041
5081
|
transition-delay: 0s;
|
|
5042
5082
|
}
|
|
5043
5083
|
</style>
|
|
5044
|
-
<span class="tooltip" aria-hidden="true">${
|
|
5084
|
+
<span class="tooltip" aria-hidden="true">${_d}</span>
|
|
5045
5085
|
`;
|
|
5046
|
-
var
|
|
5086
|
+
var yd = (e) => `${Math.round(e * 100)}%`, bd = /* @__PURE__ */ new WeakMap(), xd = /* @__PURE__ */ new WeakMap(), Sd = /* @__PURE__ */ new WeakMap(), Cd = class extends ji {
|
|
5047
5087
|
constructor() {
|
|
5048
5088
|
var e, t;
|
|
5049
|
-
super(), p(this,
|
|
5089
|
+
super(), p(this, bd, void 0), p(this, xd, void 0), p(this, Sd, () => {
|
|
5050
5090
|
let e = this.range.valueAsNumber;
|
|
5051
5091
|
this.dispatchEvent(new CustomEvent(S.SET_VOLUME, {
|
|
5052
5092
|
bubbles: !0,
|
|
5053
5093
|
composed: !0,
|
|
5054
5094
|
detail: e
|
|
5055
5095
|
}));
|
|
5056
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
5096
|
+
}), (e = this.shadowRoot) == null || e.appendChild(vd.content.cloneNode(!0)), m(bd, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector(".tooltip"));
|
|
5057
5097
|
}
|
|
5058
5098
|
connectedCallback() {
|
|
5059
|
-
super.connectedCallback(), this.range.addEventListener("input", g(
|
|
5099
|
+
super.connectedCallback(), this.range.addEventListener("input", g(Sd, this)), this.range.setAttribute("aria-label", _d), m(xd, this, Ee(this, g(bd, this)));
|
|
5060
5100
|
}
|
|
5061
5101
|
disconnectedCallback() {
|
|
5062
5102
|
var e;
|
|
5063
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", g(
|
|
5103
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", g(Sd, this)), (e = g(xd, this)) == null || e.call(this);
|
|
5064
5104
|
}
|
|
5065
5105
|
attributeChangedCallback(e, t, n) {
|
|
5066
|
-
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
5106
|
+
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", yd(this.range.valueAsNumber)), this.updateBar());
|
|
5067
5107
|
}
|
|
5068
5108
|
get volume() {
|
|
5069
5109
|
var e;
|
|
@@ -5073,15 +5113,15 @@ var pd = (e) => `${Math.round(e * 100)}%`, md = /* @__PURE__ */ new WeakMap(), h
|
|
|
5073
5113
|
return this.hasAttribute(_.MUTED);
|
|
5074
5114
|
}
|
|
5075
5115
|
};
|
|
5076
|
-
|
|
5077
|
-
...b(
|
|
5116
|
+
gd = Cd, e(Cd, "observedAttributes", [
|
|
5117
|
+
...b(gd, "observedAttributes", gd),
|
|
5078
5118
|
_.MUTED,
|
|
5079
5119
|
_.VOLUME
|
|
5080
5120
|
]);
|
|
5081
5121
|
//#endregion
|
|
5082
5122
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
5083
|
-
function
|
|
5084
|
-
customElements.define("vindral-controller",
|
|
5123
|
+
function wd() {
|
|
5124
|
+
customElements.define("vindral-controller", Ba), customElements.define("vindral-control-bar", qn), customElements.define("vindral-advanced-rendition-menu", Je), customElements.define("vindral-advanced-rendition-menu-list", st), customElements.define("vindral-play-button", ws), customElements.define("vindral-mute-button", vs), customElements.define("vindral-buffering-overlay", Pt), customElements.define("vindral-seek-preview-overlay", ed), customElements.define("vindral-scroll-overlay", al), customElements.define("vindral-play-overlay", hd), customElements.define("vindral-user-input-play-overlay", od), customElements.define("vindral-fullscreen-button", No), customElements.define("vindral-rendition-levels-menu", Ac), customElements.define("vindral-rendition-levels-menu-list", zc), customElements.define("vindral-channel-grid-button", Bn), customElements.define("vindral-channel-grid", ln), customElements.define("vindral-channel-grid-item", Jt), customElements.define("vindral-pip-button", xs), 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", Ro), customElements.define("vindral-language-menu-list", $o), customElements.define("vindral-center-overlay", cd), customElements.define("vindral-message", fd), customElements.define("vindral-volume-range", Cd), customElements.define("vindral-poster-overlay", Sc), customElements.define("vindral-player", ac), customElements.define("vindral-seek-bar", Su), customElements.define("vindral-live-button", hs);
|
|
5085
5125
|
}
|
|
5086
5126
|
//#endregion
|
|
5087
|
-
export {
|
|
5127
|
+
export { wd as t };
|