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