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