@vindral/web-sdk 4.5.1-9-gb7e40eb2c → 4.6.0
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/{CiWlpwR0.js → BBVSf5AB.js} +2 -2
- package/{DRMUL9n5.js → BT3QQVZE.js} +1 -1
- package/{DZ1kJVLj.js → BV8nX-0b.js} +1032 -1006
- package/{ir89G42i.js → BZPrVRbb.js} +44 -21
- package/BddIq5-p.js +154 -0
- package/{Cj61-Cjf.js → CN8w7_en.js} +3462 -2912
- package/cast-sender.d.ts +28 -0
- package/core.d.ts +115 -1
- package/core.js +3 -3
- package/legacy.d.ts +115 -1
- package/legacy.es.js +4183 -3603
- package/legacy.umd.js +124 -86
- package/package.json +1 -1
- package/player.d.ts +80 -2
- package/player.js +2 -2
- package/react.d.ts +80 -2
- package/vindral-player-component.js +2 -2
- package/CN4egPyY.js +0 -149
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
-
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se } from "./
|
|
3
|
-
import {
|
|
2
|
+
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se } from "./CN8w7_en.js";
|
|
3
|
+
import { F as ce } from "./BBVSf5AB.js";
|
|
4
4
|
import { i as f, n as p, r as m, t as h } from "./DSw1XhvD.js";
|
|
5
5
|
import { c as le, n as ue, t as de } from "./BOdyvABa.js";
|
|
6
6
|
import { n as fe, r as pe } from "./B1PhBNUa.js";
|
|
@@ -9,11 +9,18 @@ import { t as S } from "./94-sTJd8.js";
|
|
|
9
9
|
import { t as Oe } from "./xYchr7Lz.js";
|
|
10
10
|
//#region ../../libs/utils/src/mediaMetadata.ts
|
|
11
11
|
var ke = ({ title: e, subTitle: t = "Live stream", poster: n }) => {
|
|
12
|
-
document.title = e, "mediaSession" in navigator
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
if (document.title = e, "mediaSession" in navigator) try {
|
|
13
|
+
navigator.mediaSession.metadata = new MediaMetadata({
|
|
14
|
+
title: e,
|
|
15
|
+
artist: t,
|
|
16
|
+
artwork: n ? [{ src: n }] : []
|
|
17
|
+
});
|
|
18
|
+
} catch (n) {
|
|
19
|
+
navigator.mediaSession.metadata = new MediaMetadata({
|
|
20
|
+
title: e,
|
|
21
|
+
artist: t
|
|
22
|
+
});
|
|
23
|
+
}
|
|
17
24
|
}, Ae = (e) => e === "mse" || e === "webcodecs" || e === "wasm";
|
|
18
25
|
function je(e) {
|
|
19
26
|
if (e === null || e === "auto") return;
|
|
@@ -934,48 +941,48 @@ Dn.innerHTML = `
|
|
|
934
941
|
</style>
|
|
935
942
|
<slot name="button">${En}</slot>
|
|
936
943
|
`;
|
|
937
|
-
var On = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(),
|
|
944
|
+
var On = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), jn = class extends y {
|
|
938
945
|
constructor() {
|
|
939
946
|
var e, t;
|
|
940
|
-
super(), S(this,
|
|
941
|
-
e.composedPath().includes(this) || m(
|
|
947
|
+
super(), S(this, k), f(this, On, void 0), f(this, O, void 0), f(this, kn, void 0), f(this, An, (e) => {
|
|
948
|
+
e.composedPath().includes(this) || m(k, this, Pn).call(this);
|
|
942
949
|
}), (e = this.shadowRoot) == null || e.appendChild(Dn.content.cloneNode(!0)), p(On, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"));
|
|
943
950
|
}
|
|
944
951
|
connectedCallback() {
|
|
945
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), m(
|
|
952
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), m(k, this, Fn).call(this);
|
|
946
953
|
let e = this.getRootNode();
|
|
947
954
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
948
955
|
var t;
|
|
949
|
-
p(O, this, e.querySelector("vindral-channel-grid")), ((t = h(O, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (h(O, this).hidden = !1, h(O, this).style.position = "relative", p(
|
|
956
|
+
p(O, this, e.querySelector("vindral-channel-grid")), ((t = h(O, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (h(O, this).hidden = !1, h(O, this).style.position = "relative", p(kn, this, h(O, this).parentElement));
|
|
950
957
|
}
|
|
951
|
-
m(
|
|
958
|
+
m(k, this, In).call(this);
|
|
952
959
|
}
|
|
953
960
|
disconnectedCallback() {}
|
|
954
961
|
attributeChangedCallback(e, t, n) {
|
|
955
|
-
super.attributeChangedCallback(e, t, n), (e === g.CHANNEL_GROUP_ID || e === g.CHANNELS) && m(
|
|
962
|
+
super.attributeChangedCallback(e, t, n), (e === g.CHANNEL_GROUP_ID || e === g.CHANNELS) && m(k, this, Fn).call(this);
|
|
956
963
|
}
|
|
957
964
|
enable() {
|
|
958
|
-
super.enable(), document.addEventListener("click", h(
|
|
965
|
+
super.enable(), document.addEventListener("click", h(An, this));
|
|
959
966
|
}
|
|
960
967
|
handleClick(e) {
|
|
961
|
-
m(
|
|
968
|
+
m(k, this, Mn).call(this);
|
|
962
969
|
}
|
|
963
970
|
get isOpen() {
|
|
964
971
|
var e;
|
|
965
|
-
return h(
|
|
972
|
+
return h(kn, this) ? h(kn, this).hasAttribute("open") : !((e = h(O, this)) != null && e.hidden);
|
|
966
973
|
}
|
|
967
974
|
};
|
|
968
|
-
Tn =
|
|
969
|
-
function
|
|
970
|
-
if (h(
|
|
975
|
+
Tn = jn;
|
|
976
|
+
function Mn() {
|
|
977
|
+
if (h(kn, this)) h(kn, this).hasAttribute("open") ? m(k, this, Pn).call(this) : m(k, this, Nn).call(this);
|
|
971
978
|
else {
|
|
972
979
|
var e;
|
|
973
|
-
(e = h(O, this)) != null && e.hidden ? m(
|
|
980
|
+
(e = h(O, this)) != null && e.hidden ? m(k, this, Nn).call(this) : m(k, this, Pn).call(this);
|
|
974
981
|
}
|
|
975
|
-
m(
|
|
982
|
+
m(k, this, In).call(this);
|
|
976
983
|
}
|
|
977
|
-
function
|
|
978
|
-
if (h(
|
|
984
|
+
function Nn() {
|
|
985
|
+
if (h(kn, this)) h(kn, this).setAttribute("open", "");
|
|
979
986
|
else {
|
|
980
987
|
var e;
|
|
981
988
|
if (!((e = h(O, this)) != null && e.hidden)) return;
|
|
@@ -983,21 +990,21 @@ function Mn() {
|
|
|
983
990
|
}
|
|
984
991
|
h(On, this).setAttribute("aria-expanded", "true");
|
|
985
992
|
}
|
|
986
|
-
function
|
|
987
|
-
if (h(
|
|
993
|
+
function Pn() {
|
|
994
|
+
if (h(kn, this)) h(kn, this).open = !1;
|
|
988
995
|
else {
|
|
989
996
|
if (!h(O, this) || h(O, this).hidden) return;
|
|
990
997
|
h(O, this).hidden = !0;
|
|
991
998
|
}
|
|
992
999
|
h(On, this).setAttribute("aria-expanded", "false");
|
|
993
1000
|
}
|
|
994
|
-
function
|
|
1001
|
+
function Fn() {
|
|
995
1002
|
this.getAttribute(g.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(g.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
996
1003
|
}
|
|
997
|
-
function
|
|
1004
|
+
function In() {
|
|
998
1005
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
999
1006
|
}
|
|
1000
|
-
e(
|
|
1007
|
+
e(jn, "observedAttributes", [
|
|
1001
1008
|
...b(Tn, "observedAttributes", Tn),
|
|
1002
1009
|
g.CHANNEL_GROUP_ID,
|
|
1003
1010
|
g.CHANNELS,
|
|
@@ -1005,19 +1012,19 @@ e(An, "observedAttributes", [
|
|
|
1005
1012
|
]);
|
|
1006
1013
|
//#endregion
|
|
1007
1014
|
//#region ../../libs/player-next/src/components/ControlBar.ts
|
|
1008
|
-
var
|
|
1009
|
-
|
|
1010
|
-
var
|
|
1015
|
+
var Ln = document.createElement("template");
|
|
1016
|
+
Ln.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";
|
|
1017
|
+
var Rn = class extends HTMLElement {
|
|
1011
1018
|
constructor() {
|
|
1012
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1019
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Ln.content.cloneNode(!0));
|
|
1013
1020
|
}
|
|
1014
1021
|
connectedCallback() {}
|
|
1015
1022
|
disconnectedCallback() {}
|
|
1016
1023
|
};
|
|
1017
|
-
e(
|
|
1024
|
+
e(Rn, "observedAttributes", []);
|
|
1018
1025
|
//#endregion
|
|
1019
1026
|
//#region ../../libs/airplay-sender/src/AirPlaySender.ts
|
|
1020
|
-
var
|
|
1027
|
+
var zn = class extends pe {
|
|
1021
1028
|
constructor(t) {
|
|
1022
1029
|
super(), e(this, "config", void 0), e(this, "hlsUrl", void 0), e(this, "element", void 0), e(this, "connectingTimeout", void 0), e(this, "castingAvailable", !1), e(this, "updateAuthenticationToken", (e) => {
|
|
1023
1030
|
this.config.authenticationToken = e, this.hlsUrl = this.getHlsUrl(), this.castingAvailable && (this.element.src = this.hlsUrl);
|
|
@@ -1064,43 +1071,43 @@ var Rn = class extends pe {
|
|
|
1064
1071
|
}
|
|
1065
1072
|
})();
|
|
1066
1073
|
}
|
|
1067
|
-
},
|
|
1068
|
-
function
|
|
1074
|
+
}, Bn = 28, Vn = ["::cue", "::-webkit-media-text-track-display"];
|
|
1075
|
+
function Hn(e) {
|
|
1069
1076
|
let t = e.styleSheets[0];
|
|
1070
1077
|
if (!t) return [];
|
|
1071
1078
|
try {
|
|
1072
|
-
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule &&
|
|
1079
|
+
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule && Vn.some((t) => e.selectorText.endsWith(t)));
|
|
1073
1080
|
} catch (e) {
|
|
1074
1081
|
return [];
|
|
1075
1082
|
}
|
|
1076
1083
|
}
|
|
1077
|
-
var
|
|
1084
|
+
var Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = class {
|
|
1078
1085
|
constructor(t) {
|
|
1079
|
-
f(this,
|
|
1080
|
-
h(
|
|
1086
|
+
f(this, Un, void 0), f(this, Wn, null), f(this, Gn, null), f(this, Kn, null), f(this, qn, !0), e(this, "observe", (e) => {
|
|
1087
|
+
h(Kn, this) || (p(Kn, this, e), window.ResizeObserver && (p(Wn, this, new ResizeObserver(() => h(Jn, this).call(this))), h(Wn, this).observe(e)));
|
|
1081
1088
|
}), e(this, "setEnabled", (e) => {
|
|
1082
|
-
if (h(
|
|
1083
|
-
if (p(
|
|
1084
|
-
h(
|
|
1089
|
+
if (h(qn, this) !== e) {
|
|
1090
|
+
if (p(qn, this, e), p(Gn, this, null), e) {
|
|
1091
|
+
h(Jn, this).call(this);
|
|
1085
1092
|
return;
|
|
1086
1093
|
}
|
|
1087
|
-
for (let e of h(
|
|
1094
|
+
for (let e of h(Un, this)) e.style.removeProperty("font-size");
|
|
1088
1095
|
}
|
|
1089
1096
|
}), e(this, "unload", () => {
|
|
1090
1097
|
var e;
|
|
1091
|
-
(e = h(
|
|
1092
|
-
}), f(this,
|
|
1093
|
-
if (!h(
|
|
1094
|
-
let { clientWidth: e, clientHeight: t } = h(
|
|
1098
|
+
(e = h(Wn, this)) == null || e.disconnect(), p(Wn, this, null), p(Kn, this, null), p(qn, this, !0);
|
|
1099
|
+
}), f(this, Jn, () => {
|
|
1100
|
+
if (!h(qn, this) || h(Un, this).length === 0 || !h(Kn, this)) return;
|
|
1101
|
+
let { clientWidth: e, clientHeight: t } = h(Kn, this);
|
|
1095
1102
|
if (e <= 0 || t <= 0) return;
|
|
1096
|
-
let n = d(e, t, { max:
|
|
1097
|
-
if (n !== h(
|
|
1098
|
-
p(
|
|
1099
|
-
for (let e of h(
|
|
1103
|
+
let n = d(e, t, { max: Bn });
|
|
1104
|
+
if (n !== h(Gn, this)) {
|
|
1105
|
+
p(Gn, this, n);
|
|
1106
|
+
for (let e of h(Un, this)) e.style.fontSize = n;
|
|
1100
1107
|
}
|
|
1101
|
-
}), p(
|
|
1108
|
+
}), p(Un, this, Hn(t));
|
|
1102
1109
|
}
|
|
1103
|
-
},
|
|
1110
|
+
}, Xn = class n extends pe {
|
|
1104
1111
|
constructor(r) {
|
|
1105
1112
|
var a;
|
|
1106
1113
|
super(), a = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
@@ -1131,35 +1138,35 @@ var Hn = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Wn =
|
|
|
1131
1138
|
return () => Promise.resolve();
|
|
1132
1139
|
}
|
|
1133
1140
|
};
|
|
1134
|
-
e(
|
|
1141
|
+
e(Xn, "isFullscreenApiSupported", (e) => u(e));
|
|
1135
1142
|
//#endregion
|
|
1136
1143
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1137
|
-
var
|
|
1144
|
+
var Zn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = class extends pe {
|
|
1138
1145
|
constructor(n) {
|
|
1139
1146
|
var r;
|
|
1140
1147
|
super(), r = this, e(this, "unload", () => {
|
|
1141
1148
|
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), this.element.removeEventListener("webkitpresentationmodechanged", this.onChange), o(this.element, !1);
|
|
1142
1149
|
}), e(this, "request", t(function* () {
|
|
1143
1150
|
try {
|
|
1144
|
-
return yield h(
|
|
1151
|
+
return yield h(Zn, r).call(r);
|
|
1145
1152
|
} catch (e) {
|
|
1146
1153
|
throw r.onChange(), e;
|
|
1147
1154
|
}
|
|
1148
1155
|
})), e(this, "exit", t(function* () {
|
|
1149
1156
|
try {
|
|
1150
|
-
return yield h(
|
|
1157
|
+
return yield h(Qn, r).call(r);
|
|
1151
1158
|
} catch (e) {
|
|
1152
1159
|
throw r.onChange(), e;
|
|
1153
1160
|
}
|
|
1154
1161
|
})), e(this, "onChange", () => {
|
|
1155
1162
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1156
|
-
}), e(this, "isPictureInPictureActive", () => this.isWebkitPresentationModeActive() || h(
|
|
1163
|
+
}), e(this, "isPictureInPictureActive", () => this.isWebkitPresentationModeActive() || h(nr, this).call(this)), e(this, "isSupported", () => h(ir, this).call(this) || h(tr, this).call(this)), f(this, Zn, () => h(tr, this).call(this) ? h($n, this).call(this) : h(ir, this).call(this) ? h(rr, this).call(this, "picture-in-picture") : Promise.resolve()), f(this, Qn, () => this.isPictureInPictureActive() ? h(tr, this).call(this) ? h(er, this).call(this) : h(ir, this).call(this) ? h(rr, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), f(this, $n, t(function* () {
|
|
1157
1164
|
let e = te(r.element);
|
|
1158
1165
|
e && (yield e());
|
|
1159
|
-
})), f(this,
|
|
1166
|
+
})), f(this, er, t(function* () {
|
|
1160
1167
|
let e = l();
|
|
1161
1168
|
e && (yield e());
|
|
1162
|
-
})), f(this,
|
|
1169
|
+
})), f(this, tr, () => ee(this.element)), f(this, nr, () => oe()), e(this, "isWebkitPresentationModeActive", () => ie(this.element) === "picture-in-picture"), f(this, rr, (e) => (c(this.element) && ne(this.element, e), Promise.resolve())), f(this, ir, () => c(this.element)), this.element = n, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.addEventListener("webkitpresentationmodechanged", this.onChange), o(this.element, !0);
|
|
1163
1170
|
}
|
|
1164
1171
|
get videoElement() {
|
|
1165
1172
|
return this.element;
|
|
@@ -1167,7 +1174,7 @@ var Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn =
|
|
|
1167
1174
|
};
|
|
1168
1175
|
//#endregion
|
|
1169
1176
|
//#region ../../libs/player-next/src/timeshift/firstMediaPlaylistUrl.ts
|
|
1170
|
-
function
|
|
1177
|
+
function or(e, t) {
|
|
1171
1178
|
let n = e.split("\n").map((e) => e.trim());
|
|
1172
1179
|
for (let e = 0; e < n.length; e++) {
|
|
1173
1180
|
var r;
|
|
@@ -1179,7 +1186,7 @@ function ar(e, t) {
|
|
|
1179
1186
|
}
|
|
1180
1187
|
//#endregion
|
|
1181
1188
|
//#region ../../libs/player-next/src/timeshift/parseMediaPlaylistDuration.ts
|
|
1182
|
-
function
|
|
1189
|
+
function sr(e) {
|
|
1183
1190
|
let t = 0;
|
|
1184
1191
|
for (let n of e.split("\n")) {
|
|
1185
1192
|
let e = n.trim().match(/^#EXTINF:([\d.]+)/), r = e != null && e[1] ? Number.parseFloat(e[1]) : NaN;
|
|
@@ -1189,90 +1196,90 @@ function or(e) {
|
|
|
1189
1196
|
}
|
|
1190
1197
|
//#endregion
|
|
1191
1198
|
//#region ../../libs/player-next/src/timeshift/probeTimeshiftDuration.ts
|
|
1192
|
-
var
|
|
1193
|
-
function
|
|
1194
|
-
return
|
|
1199
|
+
var cr = 5e3;
|
|
1200
|
+
function lr(e, t) {
|
|
1201
|
+
return ur.apply(this, arguments);
|
|
1195
1202
|
}
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1198
|
-
let { signal: r, timeoutMs: i =
|
|
1203
|
+
function ur() {
|
|
1204
|
+
return ur = t(function* (e, t, n = {}) {
|
|
1205
|
+
let { signal: r, timeoutMs: i = cr } = n, a = new AbortController(), o = () => a.abort();
|
|
1199
1206
|
r && (r.aborted ? a.abort() : r.addEventListener("abort", o, { once: !0 }));
|
|
1200
1207
|
let s = setTimeout(o, i);
|
|
1201
1208
|
try {
|
|
1202
1209
|
let n = yield fetch(e, { signal: a.signal });
|
|
1203
1210
|
if (!n.ok) return;
|
|
1204
|
-
let r =
|
|
1211
|
+
let r = or(yield n.text(), e);
|
|
1205
1212
|
if (!r) return;
|
|
1206
1213
|
let i = new URL(r);
|
|
1207
1214
|
i.searchParams.set("channelId", t.channelId), i.searchParams.set("from", t.from), t.authToken && i.searchParams.set("authToken", t.authToken);
|
|
1208
1215
|
let o = yield fetch(i.toString(), { signal: a.signal });
|
|
1209
|
-
return o.ok ?
|
|
1216
|
+
return o.ok ? sr(yield o.text()) : void 0;
|
|
1210
1217
|
} catch (e) {
|
|
1211
1218
|
return;
|
|
1212
1219
|
} finally {
|
|
1213
1220
|
clearTimeout(s), r == null || r.removeEventListener("abort", o);
|
|
1214
1221
|
}
|
|
1215
|
-
}),
|
|
1222
|
+
}), ur.apply(this, arguments);
|
|
1216
1223
|
}
|
|
1217
1224
|
//#endregion
|
|
1218
1225
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
1219
|
-
var
|
|
1220
|
-
constructor({ onChange: e, probe: t =
|
|
1221
|
-
S(this,
|
|
1226
|
+
var 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 = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), xr = class {
|
|
1227
|
+
constructor({ onChange: e, probe: t = lr, now: n = () => performance.now() }) {
|
|
1228
|
+
S(this, A), f(this, dr, void 0), f(this, fr, void 0), f(this, pr, void 0), f(this, mr, void 0), f(this, hr, !0), f(this, gr, !1), f(this, _r, 0), f(this, vr, 0), f(this, yr, 0), f(this, br, null), p(dr, this, e), p(fr, this, t), p(pr, this, n);
|
|
1222
1229
|
}
|
|
1223
1230
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1224
|
-
if (m(
|
|
1225
|
-
h(
|
|
1231
|
+
if (m(A, this, Sr).call(this), !(n > 0)) {
|
|
1232
|
+
h(dr, this).call(this, n);
|
|
1226
1233
|
return;
|
|
1227
1234
|
}
|
|
1228
1235
|
let r = new AbortController();
|
|
1229
|
-
p(
|
|
1236
|
+
p(mr, this, r);
|
|
1230
1237
|
let { signal: i } = r;
|
|
1231
|
-
h(
|
|
1238
|
+
h(fr, this).call(this, e, t, { signal: i }).then((e) => {
|
|
1232
1239
|
if (!i.aborted) {
|
|
1233
1240
|
if (e === void 0) {
|
|
1234
|
-
h(
|
|
1241
|
+
h(dr, this).call(this, n);
|
|
1235
1242
|
return;
|
|
1236
1243
|
}
|
|
1237
|
-
p(
|
|
1244
|
+
p(vr, this, n), p(_r, this, Math.min(Math.max(e, 0), n)), p(yr, this, h(pr, this).call(this)), p(gr, this, !0), m(A, this, Cr).call(this), h(hr, this) && m(A, this, wr).call(this);
|
|
1238
1245
|
}
|
|
1239
1246
|
});
|
|
1240
1247
|
}
|
|
1241
1248
|
setLive(e) {
|
|
1242
|
-
p(
|
|
1249
|
+
p(hr, this, e), !(!h(mr, this) || e) && (m(A, this, Tr).call(this), m(A, this, Cr).call(this));
|
|
1243
1250
|
}
|
|
1244
1251
|
applyLoadedDuration(e) {
|
|
1245
|
-
m(
|
|
1252
|
+
m(A, this, Sr).call(this), h(dr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1246
1253
|
}
|
|
1247
1254
|
stop() {
|
|
1248
|
-
m(
|
|
1255
|
+
m(A, this, Sr).call(this);
|
|
1249
1256
|
}
|
|
1250
1257
|
};
|
|
1251
|
-
function xr() {
|
|
1252
|
-
var e;
|
|
1253
|
-
(e = h(pr, this)) == null || e.abort(), p(pr, this, void 0), m(j, this, wr).call(this), p(hr, this, !1);
|
|
1254
|
-
}
|
|
1255
1258
|
function Sr() {
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
h(ur, this).call(this, t), t >= h(_r, this) && m(j, this, wr).call(this);
|
|
1259
|
+
var e;
|
|
1260
|
+
(e = h(mr, this)) == null || e.abort(), p(mr, this, void 0), m(A, this, Tr).call(this), p(gr, this, !1);
|
|
1259
1261
|
}
|
|
1260
1262
|
function Cr() {
|
|
1261
|
-
|
|
1263
|
+
if (!h(gr, this)) return;
|
|
1264
|
+
let e = h(_r, this) + Math.max(0, (h(pr, this).call(this) - h(yr, this)) / 1e3), t = Math.min(h(vr, this), e);
|
|
1265
|
+
h(dr, this).call(this, t), t >= h(vr, this) && m(A, this, Tr).call(this);
|
|
1262
1266
|
}
|
|
1263
1267
|
function wr() {
|
|
1264
|
-
h(
|
|
1268
|
+
h(br, this) === null && p(br, this, window.setInterval(() => m(A, this, Cr).call(this), 1e3));
|
|
1269
|
+
}
|
|
1270
|
+
function Tr() {
|
|
1271
|
+
h(br, this) !== null && (clearInterval(h(br, this)), p(br, this, null));
|
|
1265
1272
|
}
|
|
1266
1273
|
//#endregion
|
|
1267
1274
|
//#region ../../libs/player-next/src/utils/getVindralAttributes.ts
|
|
1268
|
-
var
|
|
1275
|
+
var Er = (e) => {
|
|
1269
1276
|
var t;
|
|
1270
1277
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1271
1278
|
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) => Ee.includes(e)) : [];
|
|
1272
1279
|
};
|
|
1273
1280
|
//#endregion
|
|
1274
1281
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1275
|
-
function
|
|
1282
|
+
function Dr(e) {
|
|
1276
1283
|
if (typeof e != "string") return NaN;
|
|
1277
1284
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1278
1285
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1288,37 +1295,37 @@ function Er(e) {
|
|
|
1288
1295
|
}
|
|
1289
1296
|
//#endregion
|
|
1290
1297
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1291
|
-
var
|
|
1292
|
-
|
|
1293
|
-
},
|
|
1298
|
+
var Or = fe.get().createContext("TimelineMarkers"), kr = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, Ar = (e) => {
|
|
1299
|
+
Or.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.`);
|
|
1300
|
+
}, jr = (e) => {
|
|
1294
1301
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1295
1302
|
if (typeof e == "string") {
|
|
1296
1303
|
let t = Date.parse(e);
|
|
1297
|
-
return Number.isNaN(t) ? null : (
|
|
1304
|
+
return Number.isNaN(t) ? null : (kr.test(e) && Ar(e), t);
|
|
1298
1305
|
}
|
|
1299
1306
|
if (e instanceof Date) {
|
|
1300
1307
|
let t = e.getTime();
|
|
1301
1308
|
return Number.isNaN(t) ? null : t;
|
|
1302
1309
|
}
|
|
1303
1310
|
return null;
|
|
1304
|
-
},
|
|
1311
|
+
}, Mr = (e) => {
|
|
1305
1312
|
if (typeof e != "object" || !e) return null;
|
|
1306
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1313
|
+
let { time: t, label: n, type: r } = e, i = jr(t);
|
|
1307
1314
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1308
1315
|
let a = {
|
|
1309
1316
|
time: i,
|
|
1310
1317
|
label: n
|
|
1311
1318
|
};
|
|
1312
1319
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1313
|
-
},
|
|
1320
|
+
}, Nr = (e) => {
|
|
1314
1321
|
if (!Array.isArray(e)) return [];
|
|
1315
|
-
let t = e.map(
|
|
1316
|
-
return n > 0 &&
|
|
1317
|
-
},
|
|
1322
|
+
let t = e.map(Mr).filter((e) => e !== null), n = e.length - t.length;
|
|
1323
|
+
return n > 0 && Or.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;
|
|
1324
|
+
}, Pr = (e) => e ? Nr(le(e)) : [], Fr = (e, t, n) => {
|
|
1318
1325
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1319
1326
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1320
1327
|
return r < 0 || r > 1 ? null : r;
|
|
1321
|
-
},
|
|
1328
|
+
}, Ir = class extends pe {
|
|
1322
1329
|
constructor(t) {
|
|
1323
1330
|
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", () => {
|
|
1324
1331
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1370,121 +1377,121 @@ var Dr = fe.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1370
1377
|
get isMediaElementSource() {
|
|
1371
1378
|
return this.source instanceof HTMLMediaElement;
|
|
1372
1379
|
}
|
|
1373
|
-
},
|
|
1380
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Kr = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = class {
|
|
1374
1381
|
constructor(t, n) {
|
|
1375
|
-
S(this,
|
|
1376
|
-
h(
|
|
1377
|
-
}), f(this,
|
|
1378
|
-
h(
|
|
1379
|
-
}), p(
|
|
1382
|
+
S(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this, Lr, void 0), f(this, Rr, void 0), e(this, "userPaused", !0), f(this, zr, void 0), f(this, Br, void 0), f(this, Vr, !1), f(this, Hr, !1), f(this, Ur, null), f(this, Wr, 0), f(this, Gr, !1), f(this, P, fe.get().createContext("HlsPlayer")), f(this, Kr, () => m(F, this, li).call(this, !0)), f(this, qr, () => m(F, this, li).call(this, !1)), f(this, Jr, () => {
|
|
1383
|
+
h(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !h(j, this).paused && m(F, this, li).call(this, !1);
|
|
1384
|
+
}), f(this, Yr, () => {
|
|
1385
|
+
h(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && m(F, this, li).call(this, !1);
|
|
1386
|
+
}), p(M, this, t), p(Br, this, n == null ? void 0 : n.maxVideoBitRate), h(M, this).style.position = "absolute", h(M, this).style.top = "0", h(M, this).style.left = "0", h(M, this).style.width = "100%", h(M, this).style.height = "100%", h(M, this).style.opacity = "0", h(M, this).style.pointerEvents = "none", h(M, this).style.transition = "opacity 0.12s linear";
|
|
1380
1387
|
let r = document.createElement("video");
|
|
1381
|
-
p(
|
|
1388
|
+
p(j, this, r), t.appendChild(h(j, this)), h(j, this).style.width = "100%", h(j, this).style.height = "100%", h(j, this).setAttribute("playsinline", ""), h(j, this).setAttribute("webkit-playsinline", ""), h(j, this).setAttribute("preload", "metadata"), m(F, this, si).call(this), p(Gr, this, h(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);
|
|
1382
1389
|
}
|
|
1383
1390
|
hide() {
|
|
1384
|
-
p(
|
|
1391
|
+
p(Vr, this, !0), p(Hr, this, !1), h(M, this).classList.remove("active"), h(M, this).style.opacity = "0", h(M, this).style.pointerEvents = "none", p(Ur, this, null);
|
|
1385
1392
|
}
|
|
1386
1393
|
play() {
|
|
1387
1394
|
var e = this;
|
|
1388
1395
|
return t(function* () {
|
|
1389
1396
|
try {
|
|
1390
|
-
return h(
|
|
1397
|
+
return h(N, e) ? (e.userPaused = !1, yield h(j, e).play()) : Promise.reject("HLS not initialized");
|
|
1391
1398
|
} catch (t) {
|
|
1392
|
-
h(
|
|
1399
|
+
h(P, e).error("Failed to play timeshift video:", t);
|
|
1393
1400
|
}
|
|
1394
1401
|
})();
|
|
1395
1402
|
}
|
|
1396
1403
|
seek(e) {
|
|
1397
1404
|
var n = this;
|
|
1398
1405
|
return t(function* () {
|
|
1399
|
-
if (h(
|
|
1400
|
-
p(
|
|
1406
|
+
if (h(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1407
|
+
p(Ur, n, null);
|
|
1401
1408
|
return;
|
|
1402
1409
|
}
|
|
1403
|
-
if (p(
|
|
1404
|
-
else return m(
|
|
1410
|
+
if (p(Ur, n, e.time > .1 ? e.time : null), n.isActive() && h(N, n)) m(F, n, ti).call(n, e.time);
|
|
1411
|
+
else return m(F, n, ni).call(n, e);
|
|
1405
1412
|
})();
|
|
1406
1413
|
}
|
|
1407
1414
|
shouldIgnoreTimeupdate() {
|
|
1408
|
-
if (h(
|
|
1409
|
-
let e = h(
|
|
1410
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (p(
|
|
1415
|
+
if (h(Ur, this) == null) return !1;
|
|
1416
|
+
let e = h(j, this).currentTime;
|
|
1417
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (p(Ur, this, null), !1);
|
|
1411
1418
|
}
|
|
1412
1419
|
isPipSupported() {
|
|
1413
|
-
return "pictureInPictureEnabled" in document && !h(
|
|
1420
|
+
return "pictureInPictureEnabled" in document && !h(j, this).disablePictureInPicture;
|
|
1414
1421
|
}
|
|
1415
1422
|
requestPictureInPicture() {
|
|
1416
|
-
return h(
|
|
1423
|
+
return h(j, this).requestPictureInPicture();
|
|
1417
1424
|
}
|
|
1418
1425
|
exitPictureInPicture() {
|
|
1419
|
-
return document.pictureInPictureElement === h(
|
|
1426
|
+
return document.pictureInPictureElement === h(j, this) ? document.exitPictureInPicture() : Promise.resolve();
|
|
1420
1427
|
}
|
|
1421
1428
|
isActive() {
|
|
1422
|
-
return h(
|
|
1429
|
+
return h(M, this).style.opacity === "1" || h(M, this).classList.contains("active");
|
|
1423
1430
|
}
|
|
1424
1431
|
cleanup() {
|
|
1425
|
-
m(
|
|
1432
|
+
m(F, this, ci).call(this), m(F, this, ei).call(this), h(zr, this) && (cancelAnimationFrame(h(zr, this)), p(zr, this, void 0)), p(Ur, this, null), h(j, this).remove();
|
|
1426
1433
|
}
|
|
1427
1434
|
addEventListener(e, t) {
|
|
1428
|
-
h(
|
|
1435
|
+
h(j, this).addEventListener(e, t);
|
|
1429
1436
|
}
|
|
1430
1437
|
removeEventListener(e, t) {
|
|
1431
|
-
h(
|
|
1438
|
+
h(j, this).removeEventListener(e, t);
|
|
1432
1439
|
}
|
|
1433
1440
|
dispatchEvent(e) {
|
|
1434
|
-
return h(
|
|
1441
|
+
return h(j, this).dispatchEvent(e);
|
|
1435
1442
|
}
|
|
1436
1443
|
setTimeshiftUrl(e) {
|
|
1437
|
-
h(
|
|
1444
|
+
h(Rr, this) !== e && (h(P, this).debug("HLSPlayer Setting timeshift URL to", e), p(Rr, this, e));
|
|
1438
1445
|
}
|
|
1439
1446
|
get videoElement() {
|
|
1440
|
-
return h(
|
|
1447
|
+
return h(j, this);
|
|
1441
1448
|
}
|
|
1442
1449
|
pause() {
|
|
1443
|
-
this.userPaused = !0, h(
|
|
1450
|
+
this.userPaused = !0, h(j, this).pause();
|
|
1444
1451
|
}
|
|
1445
1452
|
get paused() {
|
|
1446
|
-
return h(
|
|
1453
|
+
return h(j, this).paused;
|
|
1447
1454
|
}
|
|
1448
1455
|
set volume(e) {
|
|
1449
|
-
h(
|
|
1456
|
+
h(j, this).volume = e;
|
|
1450
1457
|
}
|
|
1451
1458
|
get volume() {
|
|
1452
|
-
return h(
|
|
1459
|
+
return h(j, this).volume;
|
|
1453
1460
|
}
|
|
1454
1461
|
set muted(e) {
|
|
1455
|
-
p(
|
|
1462
|
+
p(Gr, this, e), h(j, this).muted = e;
|
|
1456
1463
|
}
|
|
1457
1464
|
get muted() {
|
|
1458
|
-
return h(
|
|
1465
|
+
return h(Gr, this);
|
|
1459
1466
|
}
|
|
1460
1467
|
set currentTime(e) {
|
|
1461
|
-
h(
|
|
1468
|
+
h(j, this).currentTime = e;
|
|
1462
1469
|
}
|
|
1463
1470
|
get currentTime() {
|
|
1464
|
-
return h(
|
|
1471
|
+
return h(j, this).currentTime;
|
|
1465
1472
|
}
|
|
1466
1473
|
get seeking() {
|
|
1467
|
-
return h(
|
|
1474
|
+
return h(j, this).seeking;
|
|
1468
1475
|
}
|
|
1469
1476
|
get duration() {
|
|
1470
|
-
return h(
|
|
1477
|
+
return h(j, this).duration;
|
|
1471
1478
|
}
|
|
1472
1479
|
get maxVideoBitRate() {
|
|
1473
|
-
return h(
|
|
1480
|
+
return h(Br, this);
|
|
1474
1481
|
}
|
|
1475
1482
|
set maxVideoBitRate(e) {
|
|
1476
|
-
p(
|
|
1483
|
+
p(Br, this, e), e !== void 0 && h(N, this) && m(F, this, Qr).call(this, e);
|
|
1477
1484
|
}
|
|
1478
1485
|
};
|
|
1479
|
-
function
|
|
1486
|
+
function Zr() {
|
|
1480
1487
|
var e = this;
|
|
1481
1488
|
return t(function* () {
|
|
1482
1489
|
let { default: t } = yield import("./Ct8GqCxq.js");
|
|
1483
|
-
if (p(
|
|
1484
|
-
h(
|
|
1490
|
+
if (p(Lr, e, t), !t.isSupported()) {
|
|
1491
|
+
h(P, e).warn("HLS not supported");
|
|
1485
1492
|
return;
|
|
1486
1493
|
}
|
|
1487
|
-
p(
|
|
1494
|
+
p(N, e, new t({
|
|
1488
1495
|
capLevelToPlayerSize: !0,
|
|
1489
1496
|
enableWorker: !0,
|
|
1490
1497
|
backBufferLength: 30,
|
|
@@ -1503,114 +1510,114 @@ function Xr() {
|
|
|
1503
1510
|
startFragPrefetch: !0,
|
|
1504
1511
|
testBandwidth: !1,
|
|
1505
1512
|
debug: !1
|
|
1506
|
-
})), h(
|
|
1507
|
-
h(
|
|
1508
|
-
}), h(
|
|
1513
|
+
})), h(N, e).attachMedia(h(j, e)), h(N, e).on(t.Events.MEDIA_ATTACHED, () => h(P, e).debug("[HLS] media attached")), h(N, e).on(t.Events.MANIFEST_PARSED, () => h(P, e).debug("[HLS] manifest parsed")), h(N, e).on(t.Events.ERROR, (t, n) => {
|
|
1514
|
+
h(P, e).error("[HLS] error:", n), n.fatal && m(F, e, $r).call(e, n);
|
|
1515
|
+
}), h(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1509
1516
|
var t;
|
|
1510
|
-
!h(
|
|
1511
|
-
}), h(
|
|
1517
|
+
!h(Br, e) || ((t = h(N, e)) == null ? void 0 : t.levels.length) === 0 || m(F, e, Qr).call(e, h(Br, e));
|
|
1518
|
+
}), h(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1512
1519
|
var t, n;
|
|
1513
|
-
h(
|
|
1520
|
+
h(P, e).debug("Level switched:", (t = h(N, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = h(N, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1514
1521
|
});
|
|
1515
1522
|
})();
|
|
1516
1523
|
}
|
|
1517
|
-
function
|
|
1518
|
-
if (!h(
|
|
1519
|
-
h(
|
|
1524
|
+
function Qr(e) {
|
|
1525
|
+
if (!h(N, this)) {
|
|
1526
|
+
h(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1520
1527
|
return;
|
|
1521
1528
|
}
|
|
1522
|
-
let t = h(
|
|
1529
|
+
let t = h(N, this).levels.map((e, t) => ({
|
|
1523
1530
|
i: t,
|
|
1524
1531
|
bitrate: e.bitrate
|
|
1525
1532
|
})).filter((t) => e >= t.bitrate * .8).map((e) => e.i).pop();
|
|
1526
1533
|
if (t === void 0) {
|
|
1527
1534
|
var n;
|
|
1528
|
-
t = 0, h(
|
|
1535
|
+
t = 0, h(P, this).debug("No level fits under bitrate cap: " + e + ", defaulting to lowest level: " + ((n = h(N, this).levels[0]) == null ? void 0 : n.bitrate));
|
|
1529
1536
|
}
|
|
1530
|
-
let r = h(
|
|
1531
|
-
h(
|
|
1537
|
+
let r = h(N, this).currentLevel;
|
|
1538
|
+
h(N, this).autoLevelCapping = t, r !== t && (h(P, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), h(N, this).currentLevel = t);
|
|
1532
1539
|
}
|
|
1533
|
-
function
|
|
1534
|
-
if (!h(
|
|
1535
|
-
h(
|
|
1540
|
+
function $r(e) {
|
|
1541
|
+
if (!h(Lr, this)) {
|
|
1542
|
+
h(P, this).error("Hls class not available for error handling");
|
|
1536
1543
|
return;
|
|
1537
1544
|
}
|
|
1538
|
-
let t = h(
|
|
1545
|
+
let t = h(Lr, this);
|
|
1539
1546
|
switch (e.type) {
|
|
1540
1547
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1541
1548
|
var n;
|
|
1542
|
-
h(
|
|
1549
|
+
h(P, this).warn("[HLS] network error -> startLoad"), (n = h(N, this)) == null || n.startLoad();
|
|
1543
1550
|
break;
|
|
1544
1551
|
case t.ErrorTypes.MEDIA_ERROR:
|
|
1545
1552
|
var r;
|
|
1546
|
-
h(
|
|
1553
|
+
h(P, this).warn("[HLS] media error -> recoverMediaError"), (r = h(N, this)) == null || r.recoverMediaError();
|
|
1547
1554
|
break;
|
|
1548
1555
|
default:
|
|
1549
|
-
h(
|
|
1556
|
+
h(P, this).error("[HLS] fatal -> destroy"), m(F, this, ei).call(this);
|
|
1550
1557
|
break;
|
|
1551
1558
|
}
|
|
1552
1559
|
}
|
|
1553
|
-
function
|
|
1554
|
-
h(
|
|
1560
|
+
function ei() {
|
|
1561
|
+
h(N, this) && (h(N, this).destroy(), p(N, this, void 0));
|
|
1555
1562
|
}
|
|
1556
|
-
function
|
|
1563
|
+
function ti(e) {
|
|
1557
1564
|
if (!Number.isFinite(e)) {
|
|
1558
|
-
p(
|
|
1565
|
+
p(Ur, this, null);
|
|
1559
1566
|
return;
|
|
1560
1567
|
}
|
|
1561
|
-
let t = m(
|
|
1562
|
-
p(
|
|
1563
|
-
h(
|
|
1568
|
+
let t = m(F, this, oi).call(this, h(j, this), e);
|
|
1569
|
+
p(Ur, this, t > .1 ? t : null), h(zr, this) && cancelAnimationFrame(h(zr, this)), p(zr, this, requestAnimationFrame(() => {
|
|
1570
|
+
h(j, this).currentTime = t;
|
|
1564
1571
|
}));
|
|
1565
1572
|
}
|
|
1566
|
-
function
|
|
1573
|
+
function ni(e) {
|
|
1567
1574
|
var n = this;
|
|
1568
1575
|
return t(function* () {
|
|
1569
1576
|
var t;
|
|
1570
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = p(
|
|
1571
|
-
if (!h(
|
|
1572
|
-
h(
|
|
1577
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = p(Wr, n, (t = h(Wr, n), ++t));
|
|
1578
|
+
if (!h(Rr, n)) {
|
|
1579
|
+
h(P, n).warn("No timeshift URL");
|
|
1573
1580
|
return;
|
|
1574
1581
|
}
|
|
1575
|
-
if (!h(
|
|
1576
|
-
p(
|
|
1582
|
+
if (!h(N, n) && (yield m(F, n, Zr).call(n), !m(F, n, ui).call(n, a))) return;
|
|
1583
|
+
p(Vr, n, !1), p(Hr, n, !1), h(N, n) && (!h(N, n).url || h(N, n).url !== h(Rr, n)) && (h(P, n).debug("Loading timeshift URL", h(Rr, n)), h(N, n).loadSource(h(Rr, n)));
|
|
1577
1584
|
let o = n.muted;
|
|
1578
|
-
h(
|
|
1585
|
+
h(j, n).muted = !0, yield m(F, n, ri).call(n), m(F, n, ui).call(n, a) && (m(F, n, ti).call(n, r), !(i && (yield n.play(), !m(F, n, ui).call(n, a))) && m(F, n, ii).call(n, o, a));
|
|
1579
1586
|
})();
|
|
1580
1587
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return h(
|
|
1583
|
-
h(
|
|
1588
|
+
function ri() {
|
|
1589
|
+
return h(j, this).duration && !Number.isNaN(h(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1590
|
+
h(P, this).debug("Waiting for duration...");
|
|
1584
1591
|
let t = () => {
|
|
1585
|
-
h(
|
|
1592
|
+
h(P, this).debug("Duration loaded:", h(j, this).duration), h(j, this).removeEventListener("loadedmetadata", t), clearTimeout(n), e();
|
|
1586
1593
|
}, n = setTimeout(() => {
|
|
1587
|
-
h(
|
|
1594
|
+
h(P, this).debug("Duration timeout, proceeding anyway"), h(j, this).removeEventListener("loadedmetadata", t), e();
|
|
1588
1595
|
}, 2e4);
|
|
1589
|
-
h(
|
|
1596
|
+
h(j, this).addEventListener("loadedmetadata", t);
|
|
1590
1597
|
});
|
|
1591
1598
|
}
|
|
1592
|
-
function
|
|
1593
|
-
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => h(
|
|
1594
|
-
h(
|
|
1599
|
+
function ii(e, t) {
|
|
1600
|
+
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => h(j, this).readyState >= n && h(j, this).videoWidth > 0 && h(j, this).videoHeight > 0, i = () => {
|
|
1601
|
+
h(Vr, this) || h(Hr, this) || !m(F, this, ui).call(this, t) || (p(Hr, this, !0), h(P, this).debug("Revealing timeshift video"), h(M, this).classList.add("active"), h(M, this).style.opacity = "1", h(M, this).style.pointerEvents = "auto", h(j, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || m(F, this, ai).call(this, t));
|
|
1595
1602
|
}, a = () => {
|
|
1596
|
-
h(
|
|
1603
|
+
h(Vr, this) || h(Hr, this) || !m(F, this, ui).call(this, t) || r() && (s(), i());
|
|
1597
1604
|
}, o = !1, s = () => {
|
|
1598
|
-
o || (o = !0, h(
|
|
1605
|
+
o || (o = !0, h(j, this).removeEventListener("canplay", a), h(j, this).removeEventListener("canplaythrough", a), h(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1599
1606
|
};
|
|
1600
1607
|
if (r()) {
|
|
1601
1608
|
i();
|
|
1602
1609
|
return;
|
|
1603
1610
|
}
|
|
1604
|
-
h(
|
|
1611
|
+
h(j, this).addEventListener("canplay", a), h(j, this).addEventListener("canplaythrough", a), h(j, this).addEventListener("loadeddata", a);
|
|
1605
1612
|
let c = setTimeout(() => {
|
|
1606
|
-
h(
|
|
1613
|
+
h(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1607
1614
|
}, 2e3);
|
|
1608
1615
|
}
|
|
1609
|
-
function
|
|
1616
|
+
function ai(e) {
|
|
1610
1617
|
let t = () => {
|
|
1611
|
-
m(
|
|
1618
|
+
m(F, this, ui).call(this, e) && (h(j, this).muted = !1);
|
|
1612
1619
|
};
|
|
1613
|
-
"requestVideoFrameCallback" in h(
|
|
1620
|
+
"requestVideoFrameCallback" in h(j, this) ? h(j, this).requestVideoFrameCallback(() => {
|
|
1614
1621
|
setTimeout(() => {
|
|
1615
1622
|
t();
|
|
1616
1623
|
}, 100);
|
|
@@ -1618,43 +1625,43 @@ function ii(e) {
|
|
|
1618
1625
|
t();
|
|
1619
1626
|
}, 120);
|
|
1620
1627
|
}
|
|
1621
|
-
function
|
|
1628
|
+
function oi(e, t) {
|
|
1622
1629
|
let n = e.seekable;
|
|
1623
1630
|
if (!n || n.length === 0) return t;
|
|
1624
1631
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1625
|
-
return h(
|
|
1626
|
-
}
|
|
1627
|
-
function oi() {
|
|
1628
|
-
for (let e of ui._) h(M, this).addEventListener(e, h(Gr, this));
|
|
1629
|
-
for (let e of di._) h(M, this).addEventListener(e, h(Kr, this));
|
|
1630
|
-
h(M, this).addEventListener("timeupdate", h(qr, this)), h(M, this).addEventListener("progress", h(Jr, this));
|
|
1632
|
+
return h(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1631
1633
|
}
|
|
1632
1634
|
function si() {
|
|
1633
|
-
for (let e of
|
|
1634
|
-
for (let e of
|
|
1635
|
-
h(
|
|
1635
|
+
for (let e of di._) h(j, this).addEventListener(e, h(Kr, this));
|
|
1636
|
+
for (let e of fi._) h(j, this).addEventListener(e, h(qr, this));
|
|
1637
|
+
h(j, this).addEventListener("timeupdate", h(Jr, this)), h(j, this).addEventListener("progress", h(Yr, this));
|
|
1636
1638
|
}
|
|
1637
|
-
function ci(
|
|
1638
|
-
let
|
|
1639
|
-
h(
|
|
1639
|
+
function ci() {
|
|
1640
|
+
for (let e of di._) h(j, this).removeEventListener(e, h(Kr, this));
|
|
1641
|
+
for (let e of fi._) h(j, this).removeEventListener(e, h(qr, this));
|
|
1642
|
+
h(j, this).removeEventListener("timeupdate", h(Jr, this)), h(j, this).removeEventListener("progress", h(Yr, this));
|
|
1643
|
+
}
|
|
1644
|
+
function li(e) {
|
|
1645
|
+
let t = e && (h(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || h(j, this).seeking || h(j, this).paused && !this.userPaused);
|
|
1646
|
+
h(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1640
1647
|
bubbles: !0,
|
|
1641
1648
|
composed: !0
|
|
1642
1649
|
}));
|
|
1643
1650
|
}
|
|
1644
|
-
function
|
|
1645
|
-
return h(
|
|
1651
|
+
function ui(e) {
|
|
1652
|
+
return h(Wr, this) === e;
|
|
1646
1653
|
}
|
|
1647
|
-
var
|
|
1654
|
+
var di = { _: [
|
|
1648
1655
|
"waiting",
|
|
1649
1656
|
"seeking",
|
|
1650
1657
|
"stalled",
|
|
1651
1658
|
"loadstart"
|
|
1652
|
-
] },
|
|
1659
|
+
] }, fi = { _: [
|
|
1653
1660
|
"canplay",
|
|
1654
1661
|
"canplaythrough",
|
|
1655
1662
|
"seeked",
|
|
1656
1663
|
"loadeddata"
|
|
1657
|
-
] },
|
|
1664
|
+
] }, pi = class {
|
|
1658
1665
|
constructor(e) {
|
|
1659
1666
|
this.vindral = e;
|
|
1660
1667
|
}
|
|
@@ -1674,19 +1681,19 @@ var ui = { _: [
|
|
|
1674
1681
|
pause() {
|
|
1675
1682
|
this.vindral.pause();
|
|
1676
1683
|
}
|
|
1677
|
-
},
|
|
1678
|
-
|
|
1679
|
-
var
|
|
1684
|
+
}, mi = document.createElement("template");
|
|
1685
|
+
mi.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";
|
|
1686
|
+
var hi = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), _i = class extends HTMLElement {
|
|
1680
1687
|
constructor() {
|
|
1681
|
-
super(), f(this,
|
|
1688
|
+
super(), f(this, hi, null), f(this, gi, void 0), e(this, "range", void 0), p(gi, this, this.attachShadow({ mode: "open" })), h(gi, this).appendChild(mi.content.cloneNode(!0)), this.range = h(gi, this).getElementById("range");
|
|
1682
1689
|
}
|
|
1683
1690
|
connectedCallback() {
|
|
1684
1691
|
var e;
|
|
1685
|
-
p(
|
|
1692
|
+
p(hi, this, this.closest("vindral-controller")), (e = h(hi, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1686
1693
|
}
|
|
1687
1694
|
disconnectedCallback() {
|
|
1688
1695
|
var e;
|
|
1689
|
-
(e = h(
|
|
1696
|
+
(e = h(hi, this)) == null || e.disconnectListener(this);
|
|
1690
1697
|
}
|
|
1691
1698
|
attributeChangedCallback(e, t, n) {
|
|
1692
1699
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1712,11 +1719,11 @@ var mi = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap(), gi =
|
|
|
1712
1719
|
];
|
|
1713
1720
|
}
|
|
1714
1721
|
};
|
|
1715
|
-
e(
|
|
1722
|
+
e(_i, "observedAttributes", ["disabled"]);
|
|
1716
1723
|
//#endregion
|
|
1717
1724
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1718
|
-
var
|
|
1719
|
-
|
|
1725
|
+
var vi = document.createElement("template");
|
|
1726
|
+
vi.innerHTML = `
|
|
1720
1727
|
<style>
|
|
1721
1728
|
:host {
|
|
1722
1729
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1928,7 +1935,7 @@ _i.innerHTML = `
|
|
|
1928
1935
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1929
1936
|
</div>
|
|
1930
1937
|
`;
|
|
1931
|
-
var
|
|
1938
|
+
var yi = [
|
|
1932
1939
|
"ArrowDown",
|
|
1933
1940
|
"ArrowLeft",
|
|
1934
1941
|
"ArrowRight",
|
|
@@ -1937,134 +1944,146 @@ var vi = [
|
|
|
1937
1944
|
" ",
|
|
1938
1945
|
"f",
|
|
1939
1946
|
"m"
|
|
1940
|
-
],
|
|
1947
|
+
], bi = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), Hi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), Gi = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), Ji = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), Qi = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), _a = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap(), ya = /* @__PURE__ */ new WeakMap(), ba = /* @__PURE__ */ new WeakMap(), xa = /* @__PURE__ */ new WeakMap(), Sa = class extends HTMLElement {
|
|
1941
1948
|
constructor() {
|
|
1942
1949
|
var t;
|
|
1943
|
-
super(), S(this,
|
|
1950
|
+
super(), S(this, H), f(this, bi, /* @__PURE__ */ new Map()), f(this, xi, 2e3), f(this, Si, null), f(this, Ci, new xr({ onChange: (e) => m(H, this, U).call(this, g.DURATION, e.toString()) })), f(this, wi, null), f(this, Ti, void 0), f(this, I, void 0), f(this, L, void 0), f(this, Ei, void 0), f(this, R, void 0), f(this, Di, xe), f(this, Oi, void 0), f(this, ki, void 0), f(this, Ai, void 0), f(this, ji, void 0), f(this, z, void 0), f(this, Mi, void 0), f(this, Ni, void 0), f(this, Pi, void 0), f(this, B, void 0), f(this, Fi, void 0), f(this, Ii, void 0), f(this, Li, void 0), f(this, V, void 0), f(this, Ri, null), f(this, zi, !1), f(this, Bi, null), f(this, Vi, void 0), f(this, Hi, (e) => {
|
|
1944
1951
|
let t = e.filter((e) => {
|
|
1945
1952
|
var t;
|
|
1946
1953
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1947
1954
|
});
|
|
1948
|
-
m(
|
|
1949
|
-
}), f(this, Hi, (e) => {
|
|
1950
|
-
m(U, this, W).call(this, g.RENDITION_LEVEL, JSON.stringify(e));
|
|
1955
|
+
m(H, this, U).call(this, g.RENDITION_LEVELS, JSON.stringify(t));
|
|
1951
1956
|
}), f(this, Ui, (e) => {
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
m(U, this, G).call(this, g.PAUSED), m(U, this, W).call(this, g.BUFFERING, "");
|
|
1961
|
-
break;
|
|
1962
|
-
default: break;
|
|
1957
|
+
m(H, this, U).call(this, g.RENDITION_LEVEL, JSON.stringify(e));
|
|
1958
|
+
}), f(this, Wi, !1), f(this, Gi, (e) => {
|
|
1959
|
+
let t = h(Wi, this);
|
|
1960
|
+
p(Wi, this, !0);
|
|
1961
|
+
try {
|
|
1962
|
+
e();
|
|
1963
|
+
} finally {
|
|
1964
|
+
p(Wi, this, t);
|
|
1963
1965
|
}
|
|
1964
|
-
}), f(this,
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1966
|
+
}), f(this, Ki, (e) => {
|
|
1967
|
+
h(Gi, this).call(this, () => {
|
|
1968
|
+
switch (e) {
|
|
1969
|
+
case "playing":
|
|
1970
|
+
m(H, this, W).call(this, g.PAUSED), m(H, this, W).call(this, g.BUFFERING);
|
|
1971
|
+
break;
|
|
1972
|
+
case "paused":
|
|
1973
|
+
m(H, this, U).call(this, g.PAUSED, ""), m(H, this, W).call(this, g.BUFFERING);
|
|
1974
|
+
break;
|
|
1975
|
+
case "buffering":
|
|
1976
|
+
m(H, this, W).call(this, g.PAUSED), m(H, this, U).call(this, g.BUFFERING, "");
|
|
1977
|
+
break;
|
|
1978
|
+
default: break;
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1972
1981
|
}), f(this, qi, (e) => {
|
|
1973
|
-
|
|
1974
|
-
|
|
1982
|
+
h(Gi, this).call(this, () => {
|
|
1983
|
+
m(H, this, U).call(this, g.VOLUME, e.volume.toString()), e.isMuted ? m(H, this, U).call(this, g.MUTED, "") : m(H, this, W).call(this, g.MUTED);
|
|
1984
|
+
});
|
|
1985
|
+
}), f(this, Ji, ({ channelId: e }) => {
|
|
1975
1986
|
var t;
|
|
1976
|
-
|
|
1977
|
-
}), f(this, Yi, (e) => {
|
|
1987
|
+
this.setAttribute(g.CHANNEL_ID, e), ((t = h(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && m(H, this, W).call(this, g.BUFFERING);
|
|
1988
|
+
}), f(this, Yi, ({ channelId: e }) => {
|
|
1978
1989
|
var t;
|
|
1979
|
-
|
|
1980
|
-
var n, r;
|
|
1981
|
-
m(U, this, W).call(this, g.TEXT_TRACK, (n = (r = h(L, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
1982
|
-
}
|
|
1990
|
+
h(Oi, this) !== e && this.setAttribute(g.CHANNEL_ID, e), ((t = h(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && m(H, this, W).call(this, g.BUFFERING);
|
|
1983
1991
|
}), f(this, Xi, (e) => {
|
|
1984
|
-
|
|
1992
|
+
p(va, this, Date.now()), m(H, this, U).call(this, g.CHANNELS, JSON.stringify(e));
|
|
1985
1993
|
}), f(this, Zi, (e) => {
|
|
1986
|
-
|
|
1994
|
+
var t;
|
|
1995
|
+
m(H, this, U).call(this, g.LANGUAGES, JSON.stringify(e)), (t = h(I, this)) != null && t.language && m(H, this, U).call(this, g.LANGUAGE, h(I, this).language);
|
|
1987
1996
|
}), f(this, Qi, (e) => {
|
|
1997
|
+
var t;
|
|
1998
|
+
if (m(H, this, U).call(this, g.TEXT_TRACKS, JSON.stringify(e)), (t = h(I, this)) != null && t.textTrack) {
|
|
1999
|
+
var n, r;
|
|
2000
|
+
m(H, this, U).call(this, g.TEXT_TRACK, (n = (r = h(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
2001
|
+
}
|
|
2002
|
+
}), f(this, $i, (e) => {
|
|
2003
|
+
e != null && e.forVideo ? (m(H, this, U).call(this, g.NEEDS_USER_INPUT_VIDEO, ""), m(H, this, W).call(this, g.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (m(H, this, U).call(this, g.NEEDS_USER_INPUT_AUDIO, ""), m(H, this, W).call(this, g.NEEDS_USER_INPUT_VIDEO));
|
|
2004
|
+
}), f(this, ea, (e) => {
|
|
2005
|
+
e || m(H, this, W).call(this, g.BUFFERING), h(Ci, this).setLive(e);
|
|
2006
|
+
}), f(this, ta, (e) => {
|
|
1988
2007
|
var t, n;
|
|
1989
2008
|
let { urls: r, duration: i } = e;
|
|
1990
|
-
if (!r[0] || !h(
|
|
2009
|
+
if (!r[0] || !h(R, this)) return;
|
|
1991
2010
|
let a = new URL(r[0]);
|
|
1992
|
-
a.searchParams.set("channelId", (t = h(
|
|
2011
|
+
a.searchParams.set("channelId", (t = h(Oi, this)) == null ? "" : t);
|
|
1993
2012
|
let o = this.getAttribute("authentication-token");
|
|
1994
2013
|
o && a.searchParams.set("authToken", o);
|
|
1995
|
-
let s =
|
|
2014
|
+
let s = Dr(i);
|
|
1996
2015
|
if (Number.isNaN(s)) {
|
|
1997
|
-
h(
|
|
2016
|
+
h(V, this).error(`Invalid duration format: ${i}`);
|
|
1998
2017
|
return;
|
|
1999
2018
|
}
|
|
2000
2019
|
let c = Math.floor(Date.now() / 1e3), l = (/* @__PURE__ */ new Date((c - s) * 1e3)).toISOString();
|
|
2001
2020
|
a.searchParams.set("from", l);
|
|
2002
2021
|
let u = a.toString();
|
|
2003
|
-
h(
|
|
2022
|
+
h(R, this).setTimeshiftUrl(u), h(Ci, this).start({
|
|
2004
2023
|
multivariantUrl: u,
|
|
2005
2024
|
params: {
|
|
2006
|
-
channelId: (n = h(
|
|
2025
|
+
channelId: (n = h(Oi, this)) == null ? "" : n,
|
|
2007
2026
|
authToken: o == null ? void 0 : o,
|
|
2008
2027
|
from: l
|
|
2009
2028
|
},
|
|
2010
2029
|
windowCapSeconds: s
|
|
2011
2030
|
});
|
|
2012
|
-
}), f(this, $i, () => {
|
|
2013
|
-
m(U, this, G).call(this, g.PAUSED), m(U, this, G).call(this, g.BUFFERING);
|
|
2014
|
-
}), f(this, ea, () => {
|
|
2015
|
-
m(U, this, W).call(this, g.PAUSED, ""), m(U, this, G).call(this, g.BUFFERING);
|
|
2016
|
-
}), f(this, ta, () => {
|
|
2017
|
-
h(fa, this).call(this), m(U, this, G).call(this, g.BUFFERING);
|
|
2018
2031
|
}), f(this, na, () => {
|
|
2019
|
-
|
|
2032
|
+
m(H, this, W).call(this, g.PAUSED), m(H, this, W).call(this, g.BUFFERING);
|
|
2020
2033
|
}), f(this, ra, () => {
|
|
2021
|
-
|
|
2022
|
-
if (!h(z, this) || h(z, this).seeking || (e = (t = h(z, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2023
|
-
let n = h(z, this).currentTime;
|
|
2024
|
-
n !== void 0 && m(U, this, W).call(this, g.TIMESHIFT_POSITION, n.toString());
|
|
2034
|
+
m(H, this, U).call(this, g.PAUSED, ""), m(H, this, W).call(this, g.BUFFERING);
|
|
2025
2035
|
}), f(this, ia, () => {
|
|
2026
|
-
h(
|
|
2036
|
+
h(ha, this).call(this), m(H, this, W).call(this, g.BUFFERING);
|
|
2027
2037
|
}), f(this, aa, () => {
|
|
2028
|
-
|
|
2038
|
+
h(R, this) && h(Ci, this).applyLoadedDuration(h(R, this).duration);
|
|
2029
2039
|
}), f(this, oa, () => {
|
|
2030
|
-
|
|
2040
|
+
var e, t;
|
|
2041
|
+
if (!h(R, this) || h(R, this).seeking || (e = (t = h(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2042
|
+
let n = h(R, this).currentTime;
|
|
2043
|
+
n !== void 0 && m(H, this, U).call(this, g.TIMESHIFT_POSITION, n.toString());
|
|
2031
2044
|
}), f(this, sa, () => {
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2045
|
+
h(R, this) && (m(H, this, U).call(this, g.VOLUME, h(R, this).volume.toString()), h(R, this).muted ? m(H, this, U).call(this, g.MUTED, "") : m(H, this, W).call(this, g.MUTED));
|
|
2046
|
+
}), f(this, ca, () => {
|
|
2047
|
+
m(H, this, U).call(this, g.BUFFERING, "");
|
|
2048
|
+
}), f(this, la, () => {
|
|
2049
|
+
m(H, this, W).call(this, g.BUFFERING);
|
|
2050
|
+
}), f(this, ua, () => {
|
|
2051
|
+
if (h(zi, this)) {
|
|
2052
|
+
if (h(L, this) !== h(R, this)) {
|
|
2053
|
+
p(zi, this, !1);
|
|
2035
2054
|
return;
|
|
2036
2055
|
}
|
|
2037
|
-
p(
|
|
2056
|
+
p(zi, this, !1), m(H, this, eo).call(this);
|
|
2038
2057
|
}
|
|
2039
|
-
}), f(this,
|
|
2058
|
+
}), f(this, da, 0), e(this, "handleEvent", (e) => {
|
|
2040
2059
|
switch (e.type) {
|
|
2041
2060
|
case "pointerdown":
|
|
2042
|
-
p(
|
|
2061
|
+
p(da, this, e.timeStamp);
|
|
2043
2062
|
break;
|
|
2044
2063
|
case "pointermove":
|
|
2045
|
-
m(
|
|
2064
|
+
m(H, this, Ua).call(this, e);
|
|
2046
2065
|
break;
|
|
2047
2066
|
case "pointerup":
|
|
2048
|
-
m(
|
|
2067
|
+
m(H, this, Wa).call(this, e);
|
|
2049
2068
|
break;
|
|
2050
2069
|
case "mouseleave":
|
|
2051
|
-
m(
|
|
2070
|
+
m(H, this, Qa).call(this);
|
|
2052
2071
|
break;
|
|
2053
2072
|
case "dblclick":
|
|
2054
|
-
m(
|
|
2073
|
+
m(H, this, Ka).call(this, e);
|
|
2055
2074
|
break;
|
|
2056
2075
|
case "mousemove":
|
|
2057
|
-
m(
|
|
2076
|
+
m(H, this, qa).call(this, e);
|
|
2058
2077
|
break;
|
|
2059
2078
|
case "keydown":
|
|
2060
|
-
h(
|
|
2079
|
+
h(ma, this).call(this, e);
|
|
2061
2080
|
break;
|
|
2062
2081
|
case "keyup":
|
|
2063
|
-
m(
|
|
2082
|
+
m(H, this, Qa).call(this), h(pa, this).call(this, e);
|
|
2064
2083
|
break;
|
|
2065
2084
|
}
|
|
2066
|
-
}), f(this,
|
|
2067
|
-
if (h(
|
|
2085
|
+
}), f(this, fa, (e) => {
|
|
2086
|
+
if (h(I, this) && (h(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2068
2087
|
case v.PLAY:
|
|
2069
2088
|
this.removeAttribute(g.PAUSED);
|
|
2070
2089
|
break;
|
|
@@ -2092,13 +2111,13 @@ var vi = [
|
|
|
2092
2111
|
case v.SET_RENDITION:
|
|
2093
2112
|
{
|
|
2094
2113
|
let t = e.detail;
|
|
2095
|
-
t.audio && (h(
|
|
2114
|
+
t.audio && (h(I, this).maxAudioBitRate = t.audio.bitRate), t.video && (h(I, this).maxVideoBitRate = t.video.bitRate, h(I, this).maxSize = t.video, this.setAttribute(g.MAX_VIDEO_BITRATE, String(t.video.bitRate)));
|
|
2096
2115
|
}
|
|
2097
2116
|
break;
|
|
2098
2117
|
case v.SET_ABR_MODE:
|
|
2099
2118
|
{
|
|
2100
2119
|
let t = e.detail;
|
|
2101
|
-
t ? (h(
|
|
2120
|
+
t ? (h(I, this).abrEnabled = !0, this.setAttribute(g.ABR_ENABLED, "")) : (h(I, this).abrEnabled = !1, this.removeAttribute(g.ABR_ENABLED)), m(H, this, U).call(this, g.ABR_ENABLED, String(t));
|
|
2102
2121
|
}
|
|
2103
2122
|
break;
|
|
2104
2123
|
case v.SET_SIZE_BASED_RESOLUTION_CAP_MODE:
|
|
@@ -2108,10 +2127,10 @@ var vi = [
|
|
|
2108
2127
|
}
|
|
2109
2128
|
break;
|
|
2110
2129
|
case v.CHANNEL_GRID_OPENED:
|
|
2111
|
-
h(
|
|
2130
|
+
h(Ri, this) === null && m(H, this, Ya).call(this);
|
|
2112
2131
|
break;
|
|
2113
2132
|
case v.CHANNEL_GRID_CLOSED:
|
|
2114
|
-
h(
|
|
2133
|
+
h(Ri, this) !== null && (clearTimeout(h(Ri, this)), p(Ri, this, null));
|
|
2115
2134
|
break;
|
|
2116
2135
|
case v.ENTER_PIP:
|
|
2117
2136
|
this.setAttribute(g.IS_PIP, "");
|
|
@@ -2121,7 +2140,7 @@ var vi = [
|
|
|
2121
2140
|
break;
|
|
2122
2141
|
case v.REQUEST_AIRPLAY:
|
|
2123
2142
|
var t;
|
|
2124
|
-
(t = h(
|
|
2143
|
+
(t = h(Pi, this)) == null || t.showPlaybackTargetPicker();
|
|
2125
2144
|
break;
|
|
2126
2145
|
case v.SET_LANGUAGE:
|
|
2127
2146
|
_(e.detail) ? this.setAttribute(g.LANGUAGE, e.detail) : this.removeAttribute(g.LANGUAGE);
|
|
@@ -2130,19 +2149,19 @@ var vi = [
|
|
|
2130
2149
|
_(e.detail) ? this.setAttribute(g.TEXT_TRACK, e.detail) : this.removeAttribute(g.TEXT_TRACK);
|
|
2131
2150
|
break;
|
|
2132
2151
|
case v.REQUEST_USER_INPUT:
|
|
2133
|
-
h(
|
|
2152
|
+
h(I, this).play(), h(I, this).muted = !1;
|
|
2134
2153
|
break;
|
|
2135
2154
|
case v.SET_VOLUME:
|
|
2136
2155
|
{
|
|
2137
2156
|
let t = e.detail;
|
|
2138
|
-
h(
|
|
2157
|
+
h(I, this).muted && t > 0 ? (h(I, this).muted = !1, h(R, this) && (h(R, this).muted = !1)) : t === 0 && (h(I, this).muted = !0, h(R, this) && (h(R, this).muted = !0)), this.setAttribute(g.VOLUME, t.toString());
|
|
2139
2158
|
}
|
|
2140
2159
|
break;
|
|
2141
2160
|
case v.SEEK:
|
|
2142
2161
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
2143
2162
|
break;
|
|
2144
2163
|
case v.GO_LIVE:
|
|
2145
|
-
h(
|
|
2164
|
+
h(ha, this).call(this);
|
|
2146
2165
|
break;
|
|
2147
2166
|
case v.TOGGLE_DEBUG_PANEL:
|
|
2148
2167
|
this.hasAttribute(g.DEBUG_PANEL_OPEN) ? this.removeAttribute(g.DEBUG_PANEL_OPEN) : this.setAttribute(g.DEBUG_PANEL_OPEN, "");
|
|
@@ -2154,214 +2173,217 @@ var vi = [
|
|
|
2154
2173
|
}
|
|
2155
2174
|
break;
|
|
2156
2175
|
}
|
|
2157
|
-
}), f(this,
|
|
2176
|
+
}), f(this, pa, (e) => {
|
|
2158
2177
|
let { key: t } = e;
|
|
2159
|
-
if (!
|
|
2178
|
+
if (!yi.includes(t)) {
|
|
2160
2179
|
this.removeEventListener("keyup", this);
|
|
2161
2180
|
return;
|
|
2162
2181
|
}
|
|
2163
|
-
m(
|
|
2164
|
-
}), f(this,
|
|
2182
|
+
m(H, this, Ja).call(this, e);
|
|
2183
|
+
}), f(this, ma, (e) => {
|
|
2165
2184
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2166
|
-
t || n || !
|
|
2167
|
-
}), f(this,
|
|
2185
|
+
t || n || !yi.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2186
|
+
}), f(this, ha, () => {
|
|
2168
2187
|
this.removeAttribute(g.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2169
|
-
}), f(this,
|
|
2188
|
+
}), f(this, ga, (e) => {
|
|
2170
2189
|
var t;
|
|
2171
|
-
h(
|
|
2172
|
-
}), f(this,
|
|
2190
|
+
h(R, this) || m(H, this, Da).call(this), h(L, this) !== h(R, this) && (e && m(H, this, to).call(this), p(L, this, h(R, this)), m(H, this, Ta).call(this), m(H, this, Ea).call(this), m(H, this, ja).call(this), (t = h(I, this)) == null || t.pause(), p(zi, this, e));
|
|
2191
|
+
}), f(this, _a, (e) => {
|
|
2173
2192
|
var t, n, r, i;
|
|
2174
|
-
e && m(
|
|
2175
|
-
m(
|
|
2193
|
+
e && m(H, this, to).call(this), (t = h(R, this)) == null || t.hide(), p(L, this, h(Ei, this)), m(H, this, ja).call(this), this.hasAttribute(g.PAUSED) ? (n = h(L, this)) == null || n.pause() : (r = h(L, this)) == null || r.play(), m(H, this, ka).call(this), m(H, this, wa).call(this), (i = h(R, this)) == null || i.pause(), e && (p(zi, this, !1), setTimeout(() => {
|
|
2194
|
+
m(H, this, eo).call(this);
|
|
2176
2195
|
}, 100));
|
|
2177
2196
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2178
2197
|
let t = this.hasAttribute(g.IS_PIP);
|
|
2179
2198
|
if (e !== !1) {
|
|
2180
2199
|
var n;
|
|
2181
|
-
h(
|
|
2200
|
+
h(ga, this).call(this, t), (n = h(R, this)) == null || n.seek({
|
|
2182
2201
|
time: parseFloat(e),
|
|
2183
2202
|
playWhenReady: !this.hasAttribute(g.PAUSED)
|
|
2184
2203
|
});
|
|
2185
2204
|
return;
|
|
2186
2205
|
}
|
|
2187
|
-
h(
|
|
2188
|
-
}), f(this,
|
|
2206
|
+
h(L, this) !== h(Ei, this) && h(_a, this).call(this, t);
|
|
2207
|
+
}), f(this, va, null), f(this, ya, () => {
|
|
2189
2208
|
var e;
|
|
2190
|
-
let t = (e = h(
|
|
2209
|
+
let t = (e = h(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2191
2210
|
if (!(t != null && t.video)) return;
|
|
2192
2211
|
let n = a(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2193
2212
|
n && n.catch(() => {});
|
|
2194
|
-
}), f(this,
|
|
2213
|
+
}), f(this, ba, () => {
|
|
2195
2214
|
s();
|
|
2196
|
-
}), f(this,
|
|
2215
|
+
}), f(this, xa, null);
|
|
2197
2216
|
let n = this.attachShadow({ mode: "open" });
|
|
2198
|
-
n.appendChild(
|
|
2217
|
+
n.appendChild(vi.content.cloneNode(!0));
|
|
2199
2218
|
let r = ye(this.getAttribute("log-level"));
|
|
2200
|
-
p(
|
|
2219
|
+
p(V, this, fe.get().createContext("VindralController")), h(V, this).setLevel(r), p(Ti, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), p(Vi, this, new Yn(n));
|
|
2201
2220
|
}
|
|
2202
2221
|
connectedCallback() {
|
|
2203
2222
|
var e = this;
|
|
2204
2223
|
return t(function* () {
|
|
2205
|
-
x(e.getAttribute("auto-instance-enabled"), !0) && (yield m(
|
|
2206
|
-
for (let t of Object.values(v)) e.addEventListener(t, h(
|
|
2207
|
-
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), e.connectListener(e), m(
|
|
2224
|
+
x(e.getAttribute("auto-instance-enabled"), !0) && (yield m(H, e, Ca).call(e));
|
|
2225
|
+
for (let t of Object.values(v)) e.addEventListener(t, h(fa, e));
|
|
2226
|
+
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), h(Gi, e).call(e, () => e.connectListener(e)), m(H, e, Va).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2208
2227
|
})();
|
|
2209
2228
|
}
|
|
2210
2229
|
disconnectedCallback() {
|
|
2211
2230
|
var e, t, n, r, i;
|
|
2212
|
-
m(
|
|
2213
|
-
for (let e of Object.values(v)) this.removeEventListener(e, h(
|
|
2214
|
-
m(
|
|
2231
|
+
m(H, this, Ha).call(this), m(H, this, co).call(this), h(Vi, this).unload(), (e = h(I, this)) == null || e.unload(), (t = h(z, this)) == null || t.unload(), (n = h(Mi, this)) == null || n.unload(), (r = h(Ni, this)) == null || r.unload(), (i = h(B, this)) == null || i.unload(), m(H, this, Oa).call(this);
|
|
2232
|
+
for (let e of Object.values(v)) this.removeEventListener(e, h(fa, this));
|
|
2233
|
+
m(H, this, Ta).call(this), h(Si, this) && (clearTimeout(h(Si, this)), p(Si, this, null)), h(Ci, this).stop(), this.disconnectListener(this);
|
|
2215
2234
|
}
|
|
2216
2235
|
attributeChangedCallback(e, t, n) {
|
|
2217
2236
|
if (t !== n) {
|
|
2218
|
-
switch (h(
|
|
2237
|
+
switch (h(V, this).debug("Attribute changed", {
|
|
2219
2238
|
name: e,
|
|
2220
2239
|
oldValue: t,
|
|
2221
2240
|
newValue: n
|
|
2222
2241
|
}), e) {
|
|
2223
2242
|
case "channel-id":
|
|
2224
|
-
p(
|
|
2243
|
+
p(Oi, this, n), h(I, this) && n && (h(I, this).channelId = n, h(I, this).play(), m(H, this, U).call(this, g.BUFFERING, ""), m(H, this, U).call(this, g.CHANNEL_ID, n), m(H, this, U).call(this, g.POSTER_SRC, h(I, this).getThumbnailUrl()));
|
|
2225
2244
|
break;
|
|
2226
2245
|
case "channel-group-id":
|
|
2227
|
-
p(
|
|
2246
|
+
p(ki, this, n);
|
|
2228
2247
|
break;
|
|
2229
2248
|
case "url":
|
|
2230
|
-
n && p(
|
|
2249
|
+
n && p(Di, this, n);
|
|
2231
2250
|
break;
|
|
2232
2251
|
case "paused":
|
|
2233
2252
|
if (_(n)) {
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2253
|
+
if (!h(Wi, this)) {
|
|
2254
|
+
var r;
|
|
2255
|
+
(r = h(L, this)) == null || r.pause();
|
|
2256
|
+
}
|
|
2257
|
+
m(H, this, U).call(this, g.PAUSED, "");
|
|
2258
|
+
} else if (m(H, this, W).call(this, g.NEEDS_USER_INPUT_VIDEO), m(H, this, W).call(this, g.PAUSED), !h(Wi, this)) {
|
|
2237
2259
|
var i;
|
|
2238
|
-
|
|
2260
|
+
(i = h(L, this)) == null || i.play();
|
|
2239
2261
|
}
|
|
2240
2262
|
break;
|
|
2241
2263
|
case "target-buffer-time":
|
|
2242
2264
|
if (n) {
|
|
2243
2265
|
let e = parseInt(n, 10);
|
|
2244
|
-
Number.isNaN(e) || (h(
|
|
2266
|
+
Number.isNaN(e) || (h(I, this) && (h(I, this).targetBufferTime = e), m(H, this, U).call(this, g.TARGET_BUFFER_TIME, String(e)));
|
|
2245
2267
|
}
|
|
2246
2268
|
break;
|
|
2247
2269
|
case "min-buffer-time":
|
|
2248
|
-
if (h(
|
|
2270
|
+
if (h(I, this) && _(n)) {
|
|
2249
2271
|
let e = Ce(n);
|
|
2250
|
-
e !== void 0 && h(
|
|
2272
|
+
e !== void 0 && h(I, this).updateBufferTimeConfig({ minBufferTime: e });
|
|
2251
2273
|
}
|
|
2252
2274
|
break;
|
|
2253
2275
|
case "max-buffer-time":
|
|
2254
|
-
if (h(
|
|
2276
|
+
if (h(I, this) && _(n)) {
|
|
2255
2277
|
let e = Ce(n);
|
|
2256
|
-
e !== void 0 && h(
|
|
2278
|
+
e !== void 0 && h(I, this).updateBufferTimeConfig({ maxBufferTime: e });
|
|
2257
2279
|
}
|
|
2258
2280
|
break;
|
|
2259
2281
|
case g.DEBUG_PANEL_OPEN:
|
|
2260
|
-
_(n) ? m(
|
|
2282
|
+
_(n) ? m(H, this, U).call(this, g.DEBUG_PANEL_OPEN, "") : m(H, this, W).call(this, g.DEBUG_PANEL_OPEN), m(H, this, oo).call(this);
|
|
2261
2283
|
break;
|
|
2262
2284
|
case "user-interacting":
|
|
2263
|
-
_(n) ? m(
|
|
2285
|
+
_(n) ? m(H, this, U).call(this, g.USER_INTERACTING, "") : m(H, this, W).call(this, g.USER_INTERACTING);
|
|
2264
2286
|
break;
|
|
2265
2287
|
case "muted":
|
|
2266
|
-
if (h(
|
|
2288
|
+
if (h(I, this)) if (_(n)) {
|
|
2267
2289
|
var a;
|
|
2268
|
-
if (h(
|
|
2290
|
+
if (h(Wi, this) || (h(I, this).muted = !0, h(R, this) && (h(R, this).muted = !0)), m(H, this, U).call(this, g.MUTED, ""), (a = h(B, this)) != null && a.isMediaElementSource) {
|
|
2269
2291
|
var o;
|
|
2270
|
-
(o = h(
|
|
2292
|
+
(o = h(B, this)) == null || o.stop(), m(H, this, U).call(this, g.VOLUME_LEVEL, JSON.stringify({
|
|
2271
2293
|
left: null,
|
|
2272
2294
|
right: null
|
|
2273
2295
|
}));
|
|
2274
2296
|
}
|
|
2275
2297
|
} else {
|
|
2276
2298
|
var s;
|
|
2277
|
-
h(
|
|
2299
|
+
h(Wi, this) || (h(I, this).muted = !1, h(R, this) && (h(R, this).muted = !1), h(I, this).volume === 0 && (h(I, this).volume = .3)), m(H, this, W).call(this, g.MUTED), m(H, this, W).call(this, g.NEEDS_USER_INPUT_AUDIO), (s = h(B, this)) == null || s.start();
|
|
2278
2300
|
}
|
|
2279
2301
|
break;
|
|
2280
2302
|
case "ui-locked":
|
|
2281
|
-
_(n) ? m(
|
|
2303
|
+
_(n) ? m(H, this, Za).call(this) : m(H, this, Qa).call(this);
|
|
2282
2304
|
break;
|
|
2283
2305
|
case "is-fullscreen":
|
|
2284
|
-
_(n) ? m(
|
|
2306
|
+
_(n) ? m(H, this, no).call(this) : m(H, this, ro).call(this);
|
|
2285
2307
|
break;
|
|
2286
2308
|
case "abr-enabled":
|
|
2287
2309
|
{
|
|
2288
2310
|
let e = x(n == null ? null : n, !1);
|
|
2289
|
-
h(
|
|
2311
|
+
h(I, this) && (h(I, this).abrEnabled = e, e && (h(I, this).sizeBasedResolutionCapEnabled = x(this.getAttribute(g.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0))), e ? m(H, this, U).call(this, g.ABR_ENABLED, "") : m(H, this, W).call(this, g.ABR_ENABLED);
|
|
2290
2312
|
}
|
|
2291
2313
|
break;
|
|
2292
2314
|
case "size-based-resolution-cap-enabled":
|
|
2293
2315
|
{
|
|
2294
2316
|
let e = x(n == null ? null : n, !0);
|
|
2295
|
-
h(
|
|
2317
|
+
h(I, this) && (h(I, this).sizeBasedResolutionCapEnabled = e), m(H, this, U).call(this, g.SIZE_BASED_RESOLUTION_CAP_ENABLED, e ? "true" : "false");
|
|
2296
2318
|
}
|
|
2297
2319
|
break;
|
|
2298
2320
|
case "max-video-bit-rate":
|
|
2299
|
-
p(
|
|
2321
|
+
p(Ai, this, n), _(n) ? m(H, this, U).call(this, g.MAX_VIDEO_BITRATE, n) : m(H, this, W).call(this, g.MAX_VIDEO_BITRATE), h(R, this) && (h(R, this).maxVideoBitRate = n ? Ce(n) : void 0);
|
|
2300
2322
|
break;
|
|
2301
2323
|
case "max-initial-bit-rate":
|
|
2302
|
-
p(
|
|
2324
|
+
p(ji, this, n), _(n) ? m(H, this, U).call(this, g.MAX_INITIAL_BITRATE, n) : m(H, this, W).call(this, g.MAX_INITIAL_BITRATE);
|
|
2303
2325
|
break;
|
|
2304
2326
|
case "is-pip":
|
|
2305
|
-
_(n) ? m(
|
|
2327
|
+
_(n) ? m(H, this, eo).call(this) : m(H, this, to).call(this);
|
|
2306
2328
|
break;
|
|
2307
2329
|
case "is-airplaying":
|
|
2308
2330
|
if (_(n)) {
|
|
2309
2331
|
var c, l;
|
|
2310
|
-
(c = h(
|
|
2332
|
+
(c = h(I, this)) != null && c.mediaElement && (h(I, this).mediaElement.style.display = "hidden"), (l = h(I, this)) == null || l.pause();
|
|
2311
2333
|
} else {
|
|
2312
2334
|
var u;
|
|
2313
|
-
(u = h(
|
|
2335
|
+
(u = h(I, this)) != null && u.mediaElement && (h(I, this).mediaElement.style.display = "block");
|
|
2314
2336
|
}
|
|
2315
2337
|
break;
|
|
2316
2338
|
case "is-casting":
|
|
2317
2339
|
if (_(n)) {
|
|
2318
2340
|
var ee, d;
|
|
2319
|
-
(ee = h(
|
|
2341
|
+
(ee = h(Mi, this)) != null && ee.isFullscreen() && m(H, this, ro).call(this), (d = h(I, this)) == null || d.pause();
|
|
2320
2342
|
} else if (!document.hidden) {
|
|
2321
2343
|
var te;
|
|
2322
|
-
(te = h(
|
|
2344
|
+
(te = h(I, this)) == null || te.play();
|
|
2323
2345
|
}
|
|
2324
2346
|
break;
|
|
2325
2347
|
case "cast-receiver-id":
|
|
2326
|
-
p(
|
|
2348
|
+
p(Ii, this, n);
|
|
2327
2349
|
break;
|
|
2328
2350
|
case "cast-background":
|
|
2329
|
-
p(
|
|
2351
|
+
p(Li, this, n);
|
|
2330
2352
|
break;
|
|
2331
2353
|
case "language":
|
|
2332
|
-
h(
|
|
2354
|
+
h(I, this) && (h(I, this).language = n, _(n) ? m(H, this, U).call(this, g.LANGUAGE, n) : m(H, this, W).call(this, g.LANGUAGE));
|
|
2333
2355
|
break;
|
|
2334
2356
|
case "text-track":
|
|
2335
|
-
h(
|
|
2357
|
+
h(I, this) && (h(I, this).textTrack = n, _(n) ? m(H, this, U).call(this, g.TEXT_TRACK, n) : m(H, this, W).call(this, g.TEXT_TRACK));
|
|
2336
2358
|
break;
|
|
2337
2359
|
case "log-level":
|
|
2338
|
-
_(n) && h(
|
|
2360
|
+
_(n) && h(V, this).setLevel(ye(n));
|
|
2339
2361
|
break;
|
|
2340
2362
|
case "authentication-token":
|
|
2341
2363
|
if (_(n)) {
|
|
2342
2364
|
var ne, re;
|
|
2343
|
-
(ne = h(
|
|
2344
|
-
} else m(
|
|
2365
|
+
(ne = h(I, this)) == null || ne.updateAuthenticationToken(n), (re = h(Pi, this)) == null || re.updateAuthenticationToken(n), m(H, this, U).call(this, g.AUTHENTICATION_TOKEN, n);
|
|
2366
|
+
} else m(H, this, W).call(this, g.AUTHENTICATION_TOKEN);
|
|
2345
2367
|
break;
|
|
2346
2368
|
case "volume":
|
|
2347
2369
|
if (_(n)) {
|
|
2348
2370
|
let e = parseFloat(n);
|
|
2349
|
-
h(
|
|
2371
|
+
h(R, this) && (h(R, this).volume = e), h(I, this) && (h(I, this).volume = e);
|
|
2350
2372
|
}
|
|
2351
2373
|
break;
|
|
2352
2374
|
case "timeshift-position":
|
|
2353
|
-
_(n) ? m(
|
|
2375
|
+
_(n) ? m(H, this, U).call(this, g.TIMESHIFT_POSITION, n) : m(H, this, W).call(this, g.TIMESHIFT_POSITION);
|
|
2354
2376
|
break;
|
|
2355
2377
|
case "timeline-markers":
|
|
2356
|
-
_(n) ? m(
|
|
2378
|
+
_(n) ? m(H, this, U).call(this, g.TIMELINE_MARKERS, n) : m(H, this, W).call(this, g.TIMELINE_MARKERS);
|
|
2357
2379
|
break;
|
|
2358
2380
|
case "drm-headers":
|
|
2359
2381
|
if (_(n)) {
|
|
2360
2382
|
let e = Te(n);
|
|
2361
2383
|
if (e) {
|
|
2362
2384
|
var ie;
|
|
2363
|
-
(ie = h(
|
|
2364
|
-
} else h(
|
|
2385
|
+
(ie = h(I, this)) == null || ie.drm.setHeaders(e);
|
|
2386
|
+
} else h(V, this).warn("Invalid DRM headers format:", n);
|
|
2365
2387
|
}
|
|
2366
2388
|
break;
|
|
2367
2389
|
case "drm-queryparams":
|
|
@@ -2369,8 +2391,8 @@ var vi = [
|
|
|
2369
2391
|
let e = Te(n);
|
|
2370
2392
|
if (e) {
|
|
2371
2393
|
var ae;
|
|
2372
|
-
(ae = h(
|
|
2373
|
-
} else h(
|
|
2394
|
+
(ae = h(I, this)) == null || ae.drm.setQueryParams(e);
|
|
2395
|
+
} else h(V, this).warn("Invalid DRM query parameters format:", n);
|
|
2374
2396
|
}
|
|
2375
2397
|
break;
|
|
2376
2398
|
}
|
|
@@ -2378,36 +2400,36 @@ var vi = [
|
|
|
2378
2400
|
g.USER_INTERACTING,
|
|
2379
2401
|
g.PAUSED,
|
|
2380
2402
|
g.HIDE_UI_ON_PAUSE
|
|
2381
|
-
].includes(e) && m(
|
|
2403
|
+
].includes(e) && m(H, this, $a).call(this);
|
|
2382
2404
|
}
|
|
2383
2405
|
}
|
|
2384
2406
|
connectListener(e) {
|
|
2385
|
-
|
|
2386
|
-
let n = h(
|
|
2387
|
-
switch (n ? n.push(e) : h(
|
|
2407
|
+
Er(e).forEach((t) => {
|
|
2408
|
+
let n = h(bi, this).get(t);
|
|
2409
|
+
switch (n ? n.push(e) : h(bi, this).set(t, [e]), t) {
|
|
2388
2410
|
case g.PAUSED:
|
|
2389
2411
|
var r;
|
|
2390
|
-
(((r = h(
|
|
2412
|
+
(((r = h(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(g.PAUSED)) && e.setAttribute(g.PAUSED, "");
|
|
2391
2413
|
break;
|
|
2392
2414
|
case g.MUTED:
|
|
2393
2415
|
var i;
|
|
2394
|
-
((i = h(
|
|
2416
|
+
((i = h(I, this)) != null && i.muted || this.hasAttribute(g.MUTED)) && e.setAttribute(g.MUTED, "");
|
|
2395
2417
|
break;
|
|
2396
2418
|
case g.MAX_VIDEO_BITRATE:
|
|
2397
|
-
h(
|
|
2419
|
+
h(Ai, this) && e.setAttribute(g.MAX_VIDEO_BITRATE, h(Ai, this));
|
|
2398
2420
|
break;
|
|
2399
2421
|
case g.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2400
2422
|
{
|
|
2401
2423
|
var a, o;
|
|
2402
|
-
let t = (a = (o = h(
|
|
2424
|
+
let t = (a = (o = h(I, this)) == null ? void 0 : o.sizeBasedResolutionCapEnabled) == null ? x(this.getAttribute(g.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0) : a;
|
|
2403
2425
|
e.setAttribute(g.SIZE_BASED_RESOLUTION_CAP_ENABLED, t ? "true" : "false");
|
|
2404
2426
|
}
|
|
2405
2427
|
break;
|
|
2406
2428
|
case g.CHANNEL_ID:
|
|
2407
|
-
h(
|
|
2429
|
+
h(Oi, this) && e.setAttribute(g.CHANNEL_ID, h(Oi, this));
|
|
2408
2430
|
break;
|
|
2409
2431
|
case g.CHANNEL_GROUP_ID:
|
|
2410
|
-
h(
|
|
2432
|
+
h(ki, this) && e.setAttribute(g.CHANNEL_GROUP_ID, h(ki, this));
|
|
2411
2433
|
break;
|
|
2412
2434
|
case g.AUTHENTICATION_TOKEN: {
|
|
2413
2435
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2429,53 +2451,53 @@ var vi = [
|
|
|
2429
2451
|
}
|
|
2430
2452
|
case g.PLAYBACK_LATENCY: {
|
|
2431
2453
|
var s;
|
|
2432
|
-
let t = (s = h(
|
|
2454
|
+
let t = (s = h(I, this)) == null ? void 0 : s.playbackLatency;
|
|
2433
2455
|
typeof t == "number" && e.setAttribute(g.PLAYBACK_LATENCY, String(t));
|
|
2434
2456
|
break;
|
|
2435
2457
|
}
|
|
2436
2458
|
case g.CONNECTION_STATE:
|
|
2437
|
-
h(
|
|
2459
|
+
h(I, this) && e.setAttribute(g.CONNECTION_STATE, h(I, this).connectionState);
|
|
2438
2460
|
break;
|
|
2439
2461
|
case g.ABR_ENABLED:
|
|
2440
|
-
h(
|
|
2462
|
+
h(I, this) ? e.setAttribute(g.ABR_ENABLED, String(h(I, this).abrEnabled)) : _(this.getAttribute(g.ABR_ENABLED)) ? e.setAttribute(g.ABR_ENABLED, this.getAttribute(g.ABR_ENABLED) || "") : e.removeAttribute(g.ABR_ENABLED);
|
|
2441
2463
|
break;
|
|
2442
2464
|
}
|
|
2443
2465
|
});
|
|
2444
2466
|
}
|
|
2445
2467
|
disconnectListener(e) {
|
|
2446
|
-
|
|
2447
|
-
let n = h(
|
|
2448
|
-
n && h(
|
|
2468
|
+
Er(e).forEach((t) => {
|
|
2469
|
+
let n = h(bi, this).get(t);
|
|
2470
|
+
n && h(bi, this).set(t, n.filter((t) => t !== e));
|
|
2449
2471
|
});
|
|
2450
2472
|
}
|
|
2451
2473
|
get instance() {
|
|
2452
|
-
return h(
|
|
2474
|
+
return h(I, this);
|
|
2453
2475
|
}
|
|
2454
2476
|
get fullscreen() {
|
|
2455
|
-
return m(
|
|
2477
|
+
return m(H, this, Pa).call(this);
|
|
2456
2478
|
}
|
|
2457
2479
|
get airPlay() {
|
|
2458
|
-
return h(
|
|
2480
|
+
return h(Pi, this);
|
|
2459
2481
|
}
|
|
2460
2482
|
get timelineMarkers() {
|
|
2461
|
-
return
|
|
2483
|
+
return Pr(this.getAttribute(g.TIMELINE_MARKERS));
|
|
2462
2484
|
}
|
|
2463
2485
|
set timelineMarkers(e) {
|
|
2464
|
-
let t =
|
|
2486
|
+
let t = Nr(e);
|
|
2465
2487
|
t.length === 0 ? this.removeAttribute(g.TIMELINE_MARKERS) : this.setAttribute(g.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2466
2488
|
}
|
|
2467
2489
|
connect() {
|
|
2468
|
-
m(
|
|
2490
|
+
m(H, this, Ca).call(this);
|
|
2469
2491
|
}
|
|
2470
2492
|
};
|
|
2471
|
-
function
|
|
2493
|
+
function Ca() {
|
|
2472
2494
|
var e = this;
|
|
2473
2495
|
return t(function* () {
|
|
2474
2496
|
var t, n;
|
|
2475
|
-
if (!h(
|
|
2476
|
-
let r = h(
|
|
2477
|
-
h(
|
|
2478
|
-
let i = e.hasAttribute(g.PAUSED), a = e.hasAttribute(g.MUTED), o = Ce(e.getAttribute(g.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = _e(e.getAttribute(g.MEDIA)), l = e.getAttribute(g.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, ee = e.getAttribute("authentication-token") || void 0, d = Ce(e.getAttribute("max-video-bit-rate")), te = Ce(e.getAttribute("max-initial-bit-rate")), ne = ge(e.getAttribute("max-size")), re = Ce(e.getAttribute("min-buffer-time")), ie = Ce(e.getAttribute("max-buffer-time")), oe = x(e.getAttribute("burst-enabled")), se = x(e.getAttribute("mse-enabled")), ce = x(e.getAttribute("mse-opus-enabled")), f = x(e.getAttribute("background-play-enabled")), le = x(e.getAttribute("ios-background-play-enabled")), ue = x(e.getAttribute("ios-wake-lock-enabled")),
|
|
2497
|
+
if (!h(Oi, e)) return;
|
|
2498
|
+
let r = h(L, e) === h(Ei, e);
|
|
2499
|
+
h(Ci, e).stop(), yield (t = h(I, e)) == null ? void 0 : t.unload(), r && p(L, e, void 0);
|
|
2500
|
+
let i = e.hasAttribute(g.PAUSED), a = e.hasAttribute(g.MUTED), o = Ce(e.getAttribute(g.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = _e(e.getAttribute(g.MEDIA)), l = e.getAttribute(g.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, ee = e.getAttribute("authentication-token") || void 0, d = Ce(e.getAttribute("max-video-bit-rate")), te = Ce(e.getAttribute("max-initial-bit-rate")), ne = ge(e.getAttribute("max-size")), re = Ce(e.getAttribute("min-buffer-time")), ie = Ce(e.getAttribute("max-buffer-time")), oe = x(e.getAttribute("burst-enabled")), se = x(e.getAttribute("mse-enabled")), ce = x(e.getAttribute("mse-opus-enabled")), f = x(e.getAttribute("background-play-enabled")), le = x(e.getAttribute("ios-background-play-enabled")), ue = x(e.getAttribute("media-session-enabled")), de = x(e.getAttribute("ios-wake-lock-enabled")), fe = x(e.getAttribute("stream-to-media-element-enabled")), pe = x(e.getAttribute("ios-media-element-enabled")), me = x(e.getAttribute("abr-enabled"), !0), v = x(e.getAttribute("size-based-resolution-cap-enabled")), y = x(e.getAttribute("telemetry-enabled")), xe = ve(e.getAttribute("video-codecs")), b = he(e.getAttribute("poster")), we = Se(e.getAttribute("advanced")), Ee = ye(e.getAttribute("log-level")), De = {
|
|
2479
2501
|
headers: Te(e.getAttribute("drm-headers")),
|
|
2480
2502
|
queryParams: Te(e.getAttribute("drm-queryparams")),
|
|
2481
2503
|
widevine: {
|
|
@@ -2486,11 +2508,11 @@ function ba() {
|
|
|
2486
2508
|
videoRobustness: be(e.getAttribute("drm-playready-video-robustness")),
|
|
2487
2509
|
audioRobustness: be(e.getAttribute("drm-playready-audio-robustness"))
|
|
2488
2510
|
}
|
|
2489
|
-
},
|
|
2490
|
-
p(
|
|
2491
|
-
url: h(
|
|
2492
|
-
channelId: h(
|
|
2493
|
-
channelGroupId: h(
|
|
2511
|
+
}, S = Me(e.getAttribute("webcodecs-hardware-acceleration")), Oe = je(e.getAttribute("decoders")), ke = x(e.getAttribute("offscreen-canvas-enabled")), Ae = x(e.getAttribute("webtransport-enabled")), Ne = Ce(e.getAttribute("reconnect-retries")), Pe = Ne === void 0 ? void 0 : (e) => e.reconnectRetries < Ne, Fe = e.getAttribute("language") || void 0;
|
|
2512
|
+
p(I, e, new ae({
|
|
2513
|
+
url: h(Di, e),
|
|
2514
|
+
channelId: h(Oi, e),
|
|
2515
|
+
channelGroupId: h(ki, e),
|
|
2494
2516
|
edgeUrl: u,
|
|
2495
2517
|
authenticationToken: ee,
|
|
2496
2518
|
muted: a,
|
|
@@ -2506,170 +2528,175 @@ function ba() {
|
|
|
2506
2528
|
mseOpusEnabled: ce,
|
|
2507
2529
|
backgroundPlayEnabled: f,
|
|
2508
2530
|
iosBackgroundPlayEnabled: le,
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2531
|
+
mediaSessionEnabled: ue,
|
|
2532
|
+
iosWakeLockEnabled: de,
|
|
2533
|
+
streamToMediaElementEnabled: fe,
|
|
2534
|
+
iosMediaElementEnabled: pe,
|
|
2535
|
+
abrEnabled: me,
|
|
2536
|
+
sizeBasedResolutionCapEnabled: v,
|
|
2537
|
+
telemetryEnabled: y,
|
|
2538
|
+
videoCodecs: xe,
|
|
2539
|
+
poster: b,
|
|
2517
2540
|
textTrack: l,
|
|
2518
|
-
advanced:
|
|
2519
|
-
logLevel:
|
|
2520
|
-
language:
|
|
2521
|
-
drm:
|
|
2522
|
-
webtransportEnabled:
|
|
2523
|
-
webcodecsHardwareAcceleration:
|
|
2524
|
-
decoders:
|
|
2525
|
-
offscreenCanvasEnabled:
|
|
2526
|
-
reconnectHandler:
|
|
2527
|
-
})), p(
|
|
2528
|
-
let
|
|
2529
|
-
|
|
2541
|
+
advanced: we,
|
|
2542
|
+
logLevel: Ee,
|
|
2543
|
+
language: Fe,
|
|
2544
|
+
drm: De,
|
|
2545
|
+
webtransportEnabled: Ae,
|
|
2546
|
+
webcodecsHardwareAcceleration: S,
|
|
2547
|
+
decoders: Oe,
|
|
2548
|
+
offscreenCanvasEnabled: ke,
|
|
2549
|
+
reconnectHandler: Pe
|
|
2550
|
+
})), p(Ei, e, new pi(h(I, e))), h(L, e) || p(L, e, h(Ei, e)), m(H, e, wa).call(e), p(wi, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), h(wi, e) && (h(I, e).attach(h(wi, e)), h(Vi, e).observe(h(wi, e))), e.setAttribute(g.MEDIA, h(I, e).media);
|
|
2551
|
+
let C = h(I, e);
|
|
2552
|
+
h(Gi, e).call(e, () => {
|
|
2553
|
+
C.muted && m(H, e, U).call(e, g.MUTED, ""), C.abrEnabled ? m(H, e, U).call(e, g.ABR_ENABLED, "") : m(H, e, W).call(e, g.ABR_ENABLED), m(H, e, U).call(e, g.SIZE_BASED_RESOLUTION_CAP_ENABLED, C.sizeBasedResolutionCapEnabled ? "true" : "false"), m(H, e, U).call(e, g.VOLUME, C.volume.toString());
|
|
2554
|
+
}), _(b) || m(H, e, U).call(e, g.POSTER_SRC, h(I, e).getThumbnailUrl());
|
|
2555
|
+
let Ie = x(e.getAttribute(g.AIRPLAY_ENABLED), !1), Le = x(e.getAttribute(g.CAST_ENABLED), !0), Re = x(e.getAttribute(g.FULLSCREEN_ENABLED), !0), ze = x(e.getAttribute(g.PIP_ENABLED), !0), Be = x(e.getAttribute(g.VU_METER_ENABLED), !1), Ve = x(e.getAttribute(g.TIMESHIFT_ENABLED), !1);
|
|
2556
|
+
Ie && m(H, e, za).call(e, h(I, e)), Le && m(H, e, Fa).call(e, h(I, e)), Re && m(H, e, Ma).call(e, h(I, e)), ze && m(H, e, Aa).call(e, h(I, e)), i || h(I, e).play(), Be && m(H, e, Ba).call(e, h(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2530
2557
|
bubbles: !0,
|
|
2531
2558
|
composed: !0,
|
|
2532
|
-
detail: h(
|
|
2533
|
-
})),
|
|
2559
|
+
detail: h(I, e)
|
|
2560
|
+
})), Ve && (m(H, e, Da).call(e), Re && m(H, e, Na).call(e));
|
|
2534
2561
|
})();
|
|
2535
2562
|
}
|
|
2536
|
-
function
|
|
2537
|
-
h(
|
|
2563
|
+
function wa() {
|
|
2564
|
+
h(I, this) && (h(I, this).on("rendition levels", h(Hi, this)), h(I, this).on("rendition level", h(Ui, this)), h(I, this).on("playback state", h(Ki, this)), h(I, this).on("volume state", h(qi, this)), h(I, this).on("channel switch failed", h(Ji, this)), h(I, this).on("channel switch", h(Yi, this)), h(I, this).on("channels", h(Xi, this)), h(I, this).on("languages", h(Zi, this)), h(I, this).on("text tracks", h(Qi, this)), h(I, this).on("needs user input", h($i, this)), h(I, this).on("is live", h(ea, this)), h(I, this).on("timeshift info", h(ta, this)));
|
|
2538
2565
|
}
|
|
2539
|
-
function
|
|
2540
|
-
h(
|
|
2566
|
+
function Ta() {
|
|
2567
|
+
h(I, this) && (h(I, this).off("playback state", h(Ki, this)), h(I, this).off("volume state", h(qi, this)), h(I, this).off("channel switch failed", h(Ji, this)), h(I, this).off("channel switch", h(Yi, this)), h(I, this).off("channels", h(Xi, this)), h(I, this).off("languages", h(Zi, this)), h(I, this).off("text tracks", h(Qi, this)), h(I, this).off("needs user input", h($i, this)), h(I, this).off("is live", h(ea, this)), h(I, this).off("timeshift info", h(ta, this)));
|
|
2541
2568
|
}
|
|
2542
|
-
function
|
|
2543
|
-
h(
|
|
2569
|
+
function Ea() {
|
|
2570
|
+
h(R, this) && (h(R, this).addEventListener("playing", h(na, this)), h(R, this).addEventListener("pause", h(ra, this)), h(R, this).addEventListener("ended", h(ia, this)), h(R, this).addEventListener("timeupdate", h(oa, this)), h(R, this).addEventListener("volumechange", h(sa, this)), h(R, this).addEventListener("hlsbuffering", h(ca, this)), h(R, this).addEventListener("hlsnotbuffering", h(la, this)), h(R, this).addEventListener("timeshiftready", h(ua, this)));
|
|
2544
2571
|
}
|
|
2545
|
-
function
|
|
2572
|
+
function Da() {
|
|
2546
2573
|
var e, t, n, r;
|
|
2547
|
-
let i = Ce(this.getAttribute(g.VOLUME)), a = i === void 0 ? (e = (t = h(
|
|
2548
|
-
m(
|
|
2574
|
+
let i = Ce(this.getAttribute(g.VOLUME)), a = i === void 0 ? (e = (t = h(L, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = x(this.getAttribute(g.MUTED), (n = (r = h(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2575
|
+
m(H, this, Oa).call(this), p(R, this, new Xr(h(Ti, this), {
|
|
2549
2576
|
volume: a,
|
|
2550
2577
|
muted: o,
|
|
2551
|
-
maxVideoBitRate: h(
|
|
2552
|
-
})), h(
|
|
2578
|
+
maxVideoBitRate: h(Ai, this) ? parseInt(h(Ai, this), 10) : void 0
|
|
2579
|
+
})), h(R, this).addEventListener("durationchange", h(aa, this));
|
|
2553
2580
|
}
|
|
2554
|
-
function
|
|
2555
|
-
h(
|
|
2581
|
+
function Oa() {
|
|
2582
|
+
h(R, this) && (m(H, this, ka).call(this), h(R, this).removeEventListener("durationchange", h(aa, this)), h(R, this).cleanup(), h(L, this) === h(R, this) && p(L, this, void 0), p(R, this, void 0));
|
|
2556
2583
|
}
|
|
2557
|
-
function
|
|
2558
|
-
h(
|
|
2584
|
+
function ka() {
|
|
2585
|
+
h(R, this) && (h(R, this).removeEventListener("playing", h(na, this)), h(R, this).removeEventListener("pause", h(ra, this)), h(R, this).removeEventListener("ended", h(ia, this)), h(R, this).removeEventListener("timeupdate", h(oa, this)), h(R, this).removeEventListener("volumechange", h(sa, this)), h(R, this).removeEventListener("hlsbuffering", h(ca, this)), h(R, this).removeEventListener("hlsnotbuffering", h(la, this)), h(R, this).removeEventListener("timeshiftready", h(ua, this)));
|
|
2559
2586
|
}
|
|
2560
|
-
function
|
|
2561
|
-
e.mediaElement instanceof HTMLVideoElement && (p(
|
|
2587
|
+
function Aa(e) {
|
|
2588
|
+
e.mediaElement instanceof HTMLVideoElement && (p(z, this, new ar(e.mediaElement)), h(z, this).isSupported() && (h(V, this).debug("PIP is supported"), m(H, this, U).call(this, g.PIP_AVAILABLE, "")), h(z, this).on("on picture in picture change", (e) => {
|
|
2562
2589
|
var t;
|
|
2563
|
-
e ? m(
|
|
2590
|
+
e ? m(H, this, U).call(this, g.IS_PIP, "") : m(H, this, W).call(this, g.IS_PIP), h(Vi, this).setEnabled(!((t = h(z, this)) != null && t.isWebkitPresentationModeActive()));
|
|
2564
2591
|
}));
|
|
2565
2592
|
}
|
|
2566
|
-
function
|
|
2593
|
+
function ja() {
|
|
2567
2594
|
var e;
|
|
2568
|
-
if (!h(
|
|
2595
|
+
if (!h(z, this)) return;
|
|
2569
2596
|
let t = null;
|
|
2570
|
-
h(
|
|
2597
|
+
h(L, this) === h(R, this) && h(R, this) ? t = h(R, this).videoElement : ((e = h(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = h(I, this).mediaElement), t && t !== h(z, this).videoElement && (h(V, this).debug("Updating PIP target to", h(L, this) === h(R, this) ? "HLS" : "Vindral"), h(z, this).unload(), p(z, this, new ar(t)), h(z, this).on("on picture in picture change", (e) => {
|
|
2571
2598
|
var t;
|
|
2572
|
-
e ? m(
|
|
2599
|
+
e ? m(H, this, U).call(this, g.IS_PIP, "") : m(H, this, W).call(this, g.IS_PIP), h(Vi, this).setEnabled(!((t = h(z, this)) != null && t.isWebkitPresentationModeActive()));
|
|
2573
2600
|
}));
|
|
2574
2601
|
}
|
|
2575
|
-
function
|
|
2576
|
-
let t = !
|
|
2577
|
-
p(
|
|
2578
|
-
e ? m(
|
|
2602
|
+
function Ma(e) {
|
|
2603
|
+
let t = !Xn.isFullscreenApiSupported(this) && Xn.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2604
|
+
p(Mi, this, new Xn(t)), h(Mi, this).on("on fullscreen change", (e) => {
|
|
2605
|
+
e ? m(H, this, U).call(this, g.FULLSCREEN, "") : m(H, this, W).call(this, g.FULLSCREEN);
|
|
2579
2606
|
});
|
|
2580
2607
|
}
|
|
2581
|
-
function
|
|
2608
|
+
function Na() {
|
|
2582
2609
|
var e;
|
|
2583
|
-
h(
|
|
2584
|
-
e ? m(
|
|
2610
|
+
h(R, this) && (p(Ni, this, !Xn.isFullscreenApiSupported(this) && Xn.isFullscreenApiSupported((e = h(R, this)) == null ? void 0 : e.videoElement) ? new Xn(h(R, this).videoElement) : new Xn(this)), h(Ni, this).on("on fullscreen change", (e) => {
|
|
2611
|
+
e ? m(H, this, U).call(this, g.FULLSCREEN, "") : m(H, this, W).call(this, g.FULLSCREEN);
|
|
2585
2612
|
}));
|
|
2586
2613
|
}
|
|
2587
|
-
function
|
|
2588
|
-
return this.hasAttribute(g.TIMESHIFT_POSITION) ? h(
|
|
2614
|
+
function Pa() {
|
|
2615
|
+
return this.hasAttribute(g.TIMESHIFT_POSITION) ? h(Ni, this) : h(Mi, this);
|
|
2589
2616
|
}
|
|
2590
|
-
function
|
|
2591
|
-
p(
|
|
2592
|
-
background: h(
|
|
2593
|
-
receiverApplicationId: h(
|
|
2617
|
+
function Fa(e) {
|
|
2618
|
+
p(Fi, this, new Oe({
|
|
2619
|
+
background: h(Li, this),
|
|
2620
|
+
receiverApplicationId: h(Ii, this),
|
|
2594
2621
|
options: e.getCastOptions()
|
|
2595
|
-
})), h(
|
|
2596
|
-
h(
|
|
2622
|
+
})), h(Fi, this).on("devices available", m(H, this, Ia).bind(this)), h(Fi, this).on("connected", m(H, this, La).bind(this)), h(Fi, this).on("resumed", m(H, this, La).bind(this)), h(Fi, this).on("disconnected", m(H, this, Ra).bind(this)), h(Fi, this).init().catch((e) => {
|
|
2623
|
+
h(V, this).warn("Failed to initialize CastSender", e);
|
|
2597
2624
|
});
|
|
2598
2625
|
}
|
|
2599
|
-
function
|
|
2600
|
-
e ? m(
|
|
2626
|
+
function Ia(e) {
|
|
2627
|
+
e ? m(H, this, U).call(this, g.CAST_AVAILABLE, "") : m(H, this, W).call(this, g.CAST_AVAILABLE);
|
|
2601
2628
|
}
|
|
2602
|
-
function
|
|
2629
|
+
function La() {
|
|
2603
2630
|
var e, t;
|
|
2604
|
-
m(
|
|
2605
|
-
let n = (e = (t = h(
|
|
2606
|
-
m(
|
|
2631
|
+
m(H, this, U).call(this, g.IS_CASTING, "");
|
|
2632
|
+
let n = (e = (t = h(Fi, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2633
|
+
m(H, this, U).call(this, g.CAST_RECEIVER_NAME, n);
|
|
2607
2634
|
}
|
|
2608
|
-
function
|
|
2609
|
-
m(
|
|
2635
|
+
function Ra() {
|
|
2636
|
+
m(H, this, W).call(this, g.IS_CASTING), m(H, this, W).call(this, g.CAST_RECEIVER_NAME);
|
|
2610
2637
|
}
|
|
2611
|
-
function
|
|
2638
|
+
function za(e) {
|
|
2612
2639
|
var t;
|
|
2613
|
-
(t = h(
|
|
2640
|
+
(t = h(Pi, this)) == null || t.unload();
|
|
2614
2641
|
let n = e.getCastOptions();
|
|
2615
|
-
p(
|
|
2642
|
+
p(Pi, this, new zn({
|
|
2616
2643
|
url: n.url,
|
|
2617
2644
|
channelId: n.channelId,
|
|
2618
2645
|
authenticationToken: n.authenticationToken,
|
|
2619
2646
|
container: this
|
|
2620
|
-
})), h(
|
|
2621
|
-
m(
|
|
2622
|
-
}), h(
|
|
2623
|
-
m(
|
|
2624
|
-
}), h(
|
|
2625
|
-
m(
|
|
2647
|
+
})), h(Pi, this).once("available", () => {
|
|
2648
|
+
m(H, this, U).call(this, g.AIRPLAY_AVAILABLE, "");
|
|
2649
|
+
}), h(Pi, this).on("connected", () => {
|
|
2650
|
+
m(H, this, U).call(this, g.IS_AIRPLAYING, "");
|
|
2651
|
+
}), h(Pi, this).on("disconnected", () => {
|
|
2652
|
+
m(H, this, W).call(this, g.IS_AIRPLAYING);
|
|
2626
2653
|
});
|
|
2627
2654
|
}
|
|
2628
|
-
function
|
|
2655
|
+
function Ba(e) {
|
|
2629
2656
|
var t;
|
|
2630
|
-
if ((t = h(
|
|
2631
|
-
if (e.audioNode) p(
|
|
2632
|
-
else if (e.mediaElement instanceof HTMLMediaElement) p(
|
|
2657
|
+
if ((t = h(B, this)) == null || t.unload(), !n()) {
|
|
2658
|
+
if (e.audioNode) p(B, this, new Ir(e.audioNode));
|
|
2659
|
+
else if (e.mediaElement instanceof HTMLMediaElement) p(B, this, new Ir(e.mediaElement));
|
|
2633
2660
|
else return;
|
|
2634
|
-
h(
|
|
2635
|
-
m(
|
|
2636
|
-
}), m(
|
|
2661
|
+
h(B, this).on("on decibel change", (e) => {
|
|
2662
|
+
m(H, this, U).call(this, g.VOLUME_LEVEL, JSON.stringify(e));
|
|
2663
|
+
}), m(H, this, U).call(this, g.VOLUME_LEVEL, JSON.stringify({
|
|
2637
2664
|
left: null,
|
|
2638
2665
|
right: null
|
|
2639
|
-
})), (!h(
|
|
2666
|
+
})), (!h(B, this).isMediaElementSource || !this.hasAttribute(g.MUTED)) && h(B, this).start();
|
|
2640
2667
|
}
|
|
2641
2668
|
}
|
|
2642
|
-
function
|
|
2643
|
-
let e = () => (customElements.get("vindral-debug-panel") || import("./DbdwBdhd.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(g.DEBUG_PANEL_OPEN, ""), h(
|
|
2644
|
-
window._vindralDebug = e, p(
|
|
2669
|
+
function Va() {
|
|
2670
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./DbdwBdhd.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(g.DEBUG_PANEL_OPEN, ""), h(I, this));
|
|
2671
|
+
window._vindralDebug = e, p(Bi, this, e);
|
|
2645
2672
|
}
|
|
2646
|
-
function
|
|
2673
|
+
function Ha() {
|
|
2647
2674
|
let e = window;
|
|
2648
|
-
h(
|
|
2675
|
+
h(Bi, this) && e._vindralDebug === h(Bi, this) && delete e._vindralDebug, p(Bi, this, null);
|
|
2649
2676
|
}
|
|
2650
|
-
function
|
|
2651
|
-
e.pointerType !== "mouse" && e.timeStamp - h(
|
|
2677
|
+
function Ua(e) {
|
|
2678
|
+
e.pointerType !== "mouse" && e.timeStamp - h(da, this) < 250 || (m(H, this, Za).call(this), h(Si, this) && clearTimeout(h(Si, this)), e.target instanceof HTMLElement && ([this, h(wi, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && m(H, this, Qa).call(this));
|
|
2652
2679
|
}
|
|
2653
|
-
function
|
|
2680
|
+
function Wa(e) {
|
|
2654
2681
|
let t = this.hasAttribute(g.USER_INTERACTING);
|
|
2655
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, h(
|
|
2682
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, h(wi, this)].includes(e.target) && t ? m(H, this, Xa).call(this) : m(H, this, Qa).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && m(H, this, Qa).call(this);
|
|
2656
2683
|
}
|
|
2657
|
-
function
|
|
2684
|
+
function Ga(e) {
|
|
2658
2685
|
switch (e) {
|
|
2659
2686
|
case "dblclick-fullscreen": return x(this.getAttribute(g.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2660
2687
|
default: return !0;
|
|
2661
2688
|
}
|
|
2662
2689
|
}
|
|
2663
|
-
function
|
|
2664
|
-
m(
|
|
2690
|
+
function Ka(e) {
|
|
2691
|
+
m(H, this, Ga).call(this, "dblclick-fullscreen") && (!h(Mi, this) || e.target instanceof y || e.target instanceof Be || e.target instanceof _i || (this.hasAttribute(g.FULLSCREEN) ? this.removeAttribute(g.FULLSCREEN) : this.setAttribute(g.FULLSCREEN, "")));
|
|
2665
2692
|
}
|
|
2666
|
-
function
|
|
2667
|
-
this.hasAttribute(g.USER_INTERACTING) || m(
|
|
2693
|
+
function qa(e) {
|
|
2694
|
+
this.hasAttribute(g.USER_INTERACTING) || m(H, this, Qa).call(this);
|
|
2668
2695
|
}
|
|
2669
|
-
function
|
|
2696
|
+
function Ja(e) {
|
|
2670
2697
|
var t;
|
|
2671
2698
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2672
|
-
if (n || r || !
|
|
2699
|
+
if (n || r || !yi.includes(i)) return;
|
|
2673
2700
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2674
2701
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2675
2702
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2687,28 +2714,28 @@ function Ga(e) {
|
|
|
2687
2714
|
break;
|
|
2688
2715
|
}
|
|
2689
2716
|
}
|
|
2690
|
-
function
|
|
2717
|
+
function Ya() {
|
|
2691
2718
|
var e = this;
|
|
2692
2719
|
return t(function* () {
|
|
2693
|
-
if (!h(
|
|
2720
|
+
if (!h(I, e) || !h(ki, e)) return;
|
|
2694
2721
|
let t = Date.now();
|
|
2695
|
-
if (h(
|
|
2722
|
+
if (h(va, e) && t - h(va, e) < 1e4) h(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2696
2723
|
else {
|
|
2697
|
-
p(
|
|
2698
|
-
let n = yield h(
|
|
2699
|
-
m(
|
|
2724
|
+
p(va, e, t);
|
|
2725
|
+
let n = yield h(I, e).getApiClient().getChannels(h(ki, e));
|
|
2726
|
+
m(H, e, U).call(e, g.CHANNELS, JSON.stringify(n));
|
|
2700
2727
|
}
|
|
2701
|
-
p(
|
|
2728
|
+
p(Ri, e, window.setTimeout(() => void m(H, e, Ya).call(e), 1e4));
|
|
2702
2729
|
})();
|
|
2703
2730
|
}
|
|
2704
|
-
function
|
|
2731
|
+
function Xa() {
|
|
2705
2732
|
!this.hasAttribute(g.USER_INTERACTING) || this.hasAttribute(g.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2706
2733
|
bubbles: !0,
|
|
2707
2734
|
composed: !0,
|
|
2708
2735
|
detail: { active: !1 }
|
|
2709
2736
|
})), this.removeAttribute(g.USER_INTERACTING));
|
|
2710
2737
|
}
|
|
2711
|
-
function
|
|
2738
|
+
function Za() {
|
|
2712
2739
|
this.hasAttribute(g.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2713
2740
|
this.setAttribute(g.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2714
2741
|
bubbles: !0,
|
|
@@ -2717,86 +2744,86 @@ function Ja() {
|
|
|
2717
2744
|
}));
|
|
2718
2745
|
});
|
|
2719
2746
|
}
|
|
2720
|
-
function
|
|
2721
|
-
m(
|
|
2722
|
-
m(
|
|
2723
|
-
}, h(
|
|
2747
|
+
function Qa() {
|
|
2748
|
+
m(H, this, Za).call(this), h(Si, this) && clearTimeout(h(Si, this)), h(xi, this) && p(Si, this, self.setTimeout(() => {
|
|
2749
|
+
m(H, this, Xa).call(this);
|
|
2750
|
+
}, h(xi, this)));
|
|
2724
2751
|
}
|
|
2725
|
-
function
|
|
2752
|
+
function $a() {
|
|
2726
2753
|
var e;
|
|
2727
2754
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2728
|
-
(e = h(
|
|
2755
|
+
(e = h(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2729
2756
|
}
|
|
2730
|
-
function
|
|
2757
|
+
function eo() {
|
|
2731
2758
|
var e;
|
|
2732
|
-
m(
|
|
2733
|
-
h(
|
|
2759
|
+
m(H, this, ja).call(this), m(H, this, io).call(this), (e = h(z, this)) == null || e.request().catch((e) => {
|
|
2760
|
+
h(V, this).warn("Failed to enter picture in picture:", e);
|
|
2734
2761
|
});
|
|
2735
2762
|
}
|
|
2736
|
-
function
|
|
2763
|
+
function to() {
|
|
2737
2764
|
var e;
|
|
2738
|
-
(e = h(
|
|
2739
|
-
h(
|
|
2765
|
+
(e = h(z, this)) == null || e.exit().catch((e) => {
|
|
2766
|
+
h(V, this).warn("Failed to exit picture in picture:", e);
|
|
2740
2767
|
});
|
|
2741
2768
|
}
|
|
2742
|
-
function
|
|
2743
|
-
let e = m(
|
|
2769
|
+
function no() {
|
|
2770
|
+
let e = m(H, this, Pa).call(this);
|
|
2744
2771
|
if (!e) {
|
|
2745
|
-
console.warn("No fullscreen target available"), this.setAttribute(g.FULLSCREEN_FALLBACK, ""), m(
|
|
2772
|
+
console.warn("No fullscreen target available"), this.setAttribute(g.FULLSCREEN_FALLBACK, ""), m(H, this, U).call(this, g.FULLSCREEN, "");
|
|
2746
2773
|
return;
|
|
2747
2774
|
}
|
|
2748
|
-
e != null && e.isFullscreenApiSupported() ? (m(
|
|
2749
|
-
h(
|
|
2775
|
+
e != null && e.isFullscreenApiSupported() ? (m(H, this, io).call(this), e == null || e.request().then(() => {
|
|
2776
|
+
h(ya, this).call(this);
|
|
2750
2777
|
}).catch((e) => {
|
|
2751
|
-
h(
|
|
2752
|
-
})) : (this.setAttribute(g.FULLSCREEN_FALLBACK, ""), m(
|
|
2778
|
+
h(V, this).warn("Failed to enter fullscreen:", e);
|
|
2779
|
+
})) : (this.setAttribute(g.FULLSCREEN_FALLBACK, ""), m(H, this, U).call(this, g.FULLSCREEN, ""));
|
|
2753
2780
|
}
|
|
2754
|
-
function
|
|
2755
|
-
let e = m(
|
|
2781
|
+
function ro() {
|
|
2782
|
+
let e = m(H, this, Pa).call(this);
|
|
2756
2783
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2757
|
-
h(
|
|
2784
|
+
h(ba, this).call(this);
|
|
2758
2785
|
}).catch((e) => {
|
|
2759
|
-
h(
|
|
2760
|
-
}) : (this.removeAttribute(g.FULLSCREEN_FALLBACK), m(
|
|
2786
|
+
h(V, this).warn("Failed to exit fullscreen:", e);
|
|
2787
|
+
}) : (this.removeAttribute(g.FULLSCREEN_FALLBACK), m(H, this, W).call(this, g.FULLSCREEN));
|
|
2761
2788
|
}
|
|
2762
|
-
function
|
|
2763
|
-
h(
|
|
2789
|
+
function io() {
|
|
2790
|
+
h(I, this) && h(I, this).emitter.emit("ios-hack: reset size");
|
|
2764
2791
|
}
|
|
2765
|
-
function
|
|
2792
|
+
function ao() {
|
|
2766
2793
|
return this.hasAttribute(g.DEBUG_PANEL_OPEN);
|
|
2767
2794
|
}
|
|
2768
|
-
function
|
|
2769
|
-
m(
|
|
2795
|
+
function oo() {
|
|
2796
|
+
m(H, this, ao).call(this) ? m(H, this, so).call(this) : m(H, this, co).call(this);
|
|
2770
2797
|
}
|
|
2771
|
-
function
|
|
2772
|
-
h(
|
|
2798
|
+
function so() {
|
|
2799
|
+
h(xa, this) === null && (m(H, this, lo).call(this), p(xa, this, window.setInterval(() => m(H, this, lo).call(this), 1e3)));
|
|
2773
2800
|
}
|
|
2774
|
-
function
|
|
2775
|
-
h(
|
|
2801
|
+
function co() {
|
|
2802
|
+
h(xa, this) && (clearInterval(h(xa, this)), p(xa, this, null)), this.removeAttribute(g.DRIFT), m(H, this, W).call(this, g.DRIFT), m(H, this, W).call(this, g.PLAYBACK_LATENCY), m(H, this, W).call(this, g.CONNECTION_STATE);
|
|
2776
2803
|
}
|
|
2777
|
-
function
|
|
2778
|
-
if (!h(
|
|
2804
|
+
function lo() {
|
|
2805
|
+
if (!h(I, this)) return;
|
|
2779
2806
|
try {
|
|
2780
|
-
let e = h(
|
|
2807
|
+
let e = h(I, this).getStatistics().drift;
|
|
2781
2808
|
if (typeof e == "number") {
|
|
2782
2809
|
let t = Math.round(e * 10) / 10;
|
|
2783
|
-
m(
|
|
2810
|
+
m(H, this, U).call(this, g.DRIFT, String(t));
|
|
2784
2811
|
}
|
|
2785
2812
|
} catch (e) {}
|
|
2786
|
-
let e = h(
|
|
2787
|
-
typeof e == "number" && m(
|
|
2788
|
-
let t = h(
|
|
2789
|
-
typeof t == "number" ? m(
|
|
2813
|
+
let e = h(I, this).targetBufferTime;
|
|
2814
|
+
typeof e == "number" && m(H, this, U).call(this, g.TARGET_BUFFER_TIME, String(e));
|
|
2815
|
+
let t = h(I, this).playbackLatency;
|
|
2816
|
+
typeof t == "number" ? m(H, this, U).call(this, g.PLAYBACK_LATENCY, String(t)) : m(H, this, W).call(this, g.PLAYBACK_LATENCY), m(H, this, U).call(this, g.CONNECTION_STATE, h(I, this).connectionState);
|
|
2790
2817
|
}
|
|
2791
|
-
function
|
|
2818
|
+
function U(e, t) {
|
|
2792
2819
|
var n;
|
|
2793
|
-
(n = h(
|
|
2820
|
+
(n = h(bi, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2794
2821
|
}
|
|
2795
|
-
function
|
|
2822
|
+
function W(e) {
|
|
2796
2823
|
var t;
|
|
2797
|
-
(t = h(
|
|
2824
|
+
(t = h(bi, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2798
2825
|
}
|
|
2799
|
-
e(
|
|
2826
|
+
e(Sa, "observedAttributes", [
|
|
2800
2827
|
...Ee,
|
|
2801
2828
|
"url",
|
|
2802
2829
|
"edge-url",
|
|
@@ -2814,6 +2841,7 @@ e(ya, "observedAttributes", [
|
|
|
2814
2841
|
"mse-opus-enabled",
|
|
2815
2842
|
"background-play-enabled",
|
|
2816
2843
|
"ios-background-play-enabled",
|
|
2844
|
+
"media-session-enabled",
|
|
2817
2845
|
"ios-wake-lock-enabled",
|
|
2818
2846
|
"stream-to-media-element-enabled",
|
|
2819
2847
|
"ios-media-element-enabled",
|
|
@@ -2839,8 +2867,8 @@ e(ya, "observedAttributes", [
|
|
|
2839
2867
|
]);
|
|
2840
2868
|
//#endregion
|
|
2841
2869
|
//#region ../../libs/player-next/src/components/FullscreenButton.ts
|
|
2842
|
-
var
|
|
2843
|
-
|
|
2870
|
+
var uo, fo = document.createElement("template");
|
|
2871
|
+
fo.innerHTML = `
|
|
2844
2872
|
<style>
|
|
2845
2873
|
:host {
|
|
2846
2874
|
display: var(--fullscreen-button-display);
|
|
@@ -2864,10 +2892,10 @@ co.innerHTML = `
|
|
|
2864
2892
|
</slot>
|
|
2865
2893
|
</slot>
|
|
2866
2894
|
`;
|
|
2867
|
-
var
|
|
2895
|
+
var po = class extends y {
|
|
2868
2896
|
constructor() {
|
|
2869
2897
|
var e;
|
|
2870
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2898
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(fo.content.cloneNode(!0));
|
|
2871
2899
|
}
|
|
2872
2900
|
connectedCallback() {
|
|
2873
2901
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2892,48 +2920,48 @@ var lo = class extends y {
|
|
|
2892
2920
|
}));
|
|
2893
2921
|
}
|
|
2894
2922
|
};
|
|
2895
|
-
|
|
2923
|
+
uo = po, e(po, "observedAttributes", [...b(uo, "observedAttributes", uo), g.FULLSCREEN]);
|
|
2896
2924
|
//#endregion
|
|
2897
2925
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2898
|
-
var
|
|
2899
|
-
|
|
2926
|
+
var mo, ho = "\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", go = document.createElement("template");
|
|
2927
|
+
go.innerHTML = `
|
|
2900
2928
|
<style>
|
|
2901
2929
|
:host(:not([hidden])) {
|
|
2902
2930
|
display: var(--language-menu-display);
|
|
2903
2931
|
}
|
|
2904
2932
|
</style>
|
|
2905
2933
|
|
|
2906
|
-
<slot name="button">${
|
|
2934
|
+
<slot name="button">${ho}</slot>
|
|
2907
2935
|
<slot name="listbox" hidden>
|
|
2908
2936
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2909
2937
|
</slot>
|
|
2910
2938
|
`;
|
|
2911
|
-
var
|
|
2939
|
+
var _o = /* @__PURE__ */ new WeakSet(), vo = class extends Be {
|
|
2912
2940
|
constructor() {
|
|
2913
2941
|
var e, t, n, r;
|
|
2914
|
-
super(), S(this,
|
|
2942
|
+
super(), S(this, _o), (e = this.shadowRoot) == null || e.appendChild(go.content.cloneNode(!0)), this.button = (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"), this.listbox = (n = this.shadowRoot) == null ? void 0 : n.querySelector("[part=listbox]"), this.listboxSlot = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot[name=listbox]");
|
|
2915
2943
|
}
|
|
2916
2944
|
connectedCallback() {
|
|
2917
|
-
super.connectedCallback(), m(
|
|
2945
|
+
super.connectedCallback(), m(_o, this, yo).call(this), this.setAttribute("aria-label", "Languages");
|
|
2918
2946
|
}
|
|
2919
2947
|
attributeChangedCallback(e, t, n) {
|
|
2920
|
-
super.attributeChangedCallback(e, t, n), (e === g.LANGUAGES || e === g.TEXT_TRACKS) && m(
|
|
2948
|
+
super.attributeChangedCallback(e, t, n), (e === g.LANGUAGES || e === g.TEXT_TRACKS) && m(_o, this, yo).call(this);
|
|
2921
2949
|
}
|
|
2922
2950
|
};
|
|
2923
|
-
|
|
2924
|
-
function
|
|
2951
|
+
mo = vo;
|
|
2952
|
+
function yo() {
|
|
2925
2953
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(g.LANGUAGES)), n = e(this.getAttribute(g.TEXT_TRACKS));
|
|
2926
2954
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2927
2955
|
}
|
|
2928
|
-
e(
|
|
2929
|
-
...b(
|
|
2956
|
+
e(vo, "observedAttributes", [
|
|
2957
|
+
...b(mo, "observedAttributes", mo),
|
|
2930
2958
|
g.LANGUAGES,
|
|
2931
2959
|
g.TEXT_TRACKS
|
|
2932
2960
|
]);
|
|
2933
2961
|
//#endregion
|
|
2934
2962
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2935
|
-
var
|
|
2936
|
-
|
|
2963
|
+
var bo = document.createElement("template");
|
|
2964
|
+
bo.innerHTML = `
|
|
2937
2965
|
<style>
|
|
2938
2966
|
:host {
|
|
2939
2967
|
font: inherit;
|
|
@@ -3047,21 +3075,21 @@ _o.innerHTML = `
|
|
|
3047
3075
|
<div class="menu"></div>
|
|
3048
3076
|
</div>
|
|
3049
3077
|
`;
|
|
3050
|
-
var
|
|
3078
|
+
var xo = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), To = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), Ao = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), Mo = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), No = class extends HTMLElement {
|
|
3051
3079
|
constructor() {
|
|
3052
|
-
super(), S(this,
|
|
3080
|
+
super(), S(this, G), f(this, xo, []), f(this, So, []), f(this, Co, void 0), f(this, wo, void 0), f(this, To, []), f(this, Eo, []), f(this, Do, null), f(this, Oo, null), f(this, ko, null), f(this, Ao, null), f(this, jo, null), f(this, Mo, null), e(this, "handleEvent", (e) => {
|
|
3053
3081
|
switch (e.type) {
|
|
3054
3082
|
case "keydown":
|
|
3055
|
-
m(
|
|
3083
|
+
m(G, this, Ho).call(this, e);
|
|
3056
3084
|
break;
|
|
3057
3085
|
}
|
|
3058
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3086
|
+
}), this.attachShadow({ mode: "open" }).appendChild(bo.content.cloneNode(!0));
|
|
3059
3087
|
}
|
|
3060
3088
|
connectedCallback() {
|
|
3061
3089
|
let e = this.getRootNode();
|
|
3062
3090
|
if (e instanceof ShadowRoot) {
|
|
3063
3091
|
var t, n, r;
|
|
3064
|
-
p(
|
|
3092
|
+
p(ko, this, e.host.closest("vindral-controller")), (t = h(ko, this)) == null || t.connectListener(this), p(Do, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), p(Oo, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), m(G, this, Po).call(this), m(G, this, Fo).call(this), p(Ao, this, e.host), this.addEventListener("keydown", this);
|
|
3065
3093
|
}
|
|
3066
3094
|
}
|
|
3067
3095
|
disconnectedCallback() {
|
|
@@ -3071,16 +3099,16 @@ var vo = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), bo =
|
|
|
3071
3099
|
t !== n && (e === g.LANGUAGES && n && (this.languages = JSON.parse(n)), e === g.TEXT_TRACKS && n && (this.textTracks = JSON.parse(n)), e === g.LANGUAGE && (this.language = n), e === g.TEXT_TRACK && (this.textTrack = n));
|
|
3072
3100
|
}
|
|
3073
3101
|
set languages(e) {
|
|
3074
|
-
p(
|
|
3102
|
+
p(xo, this, e), m(G, this, Lo).call(this), m(G, this, zo).call(this);
|
|
3075
3103
|
}
|
|
3076
3104
|
set textTracks(e) {
|
|
3077
|
-
p(
|
|
3105
|
+
p(So, this, e), m(G, this, Io).call(this), m(G, this, Bo).call(this);
|
|
3078
3106
|
}
|
|
3079
3107
|
set language(e) {
|
|
3080
|
-
p(
|
|
3108
|
+
p(Co, this, e), m(G, this, zo).call(this);
|
|
3081
3109
|
}
|
|
3082
3110
|
set textTrack(e) {
|
|
3083
|
-
p(
|
|
3111
|
+
p(wo, this, e), m(G, this, Bo).call(this);
|
|
3084
3112
|
}
|
|
3085
3113
|
get keysUsed() {
|
|
3086
3114
|
return [
|
|
@@ -3097,10 +3125,10 @@ var vo = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), bo =
|
|
|
3097
3125
|
];
|
|
3098
3126
|
}
|
|
3099
3127
|
focus() {
|
|
3100
|
-
h(
|
|
3128
|
+
h(jo, this) ? h(jo, this).focus() : h(Mo, this) && h(Mo, this).focus();
|
|
3101
3129
|
}
|
|
3102
3130
|
};
|
|
3103
|
-
function
|
|
3131
|
+
function Po() {
|
|
3104
3132
|
new IntersectionObserver((e) => {
|
|
3105
3133
|
e.forEach((e) => {
|
|
3106
3134
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3109,55 +3137,55 @@ function jo() {
|
|
|
3109
3137
|
} else this.style.height = "auto";
|
|
3110
3138
|
});
|
|
3111
3139
|
}, {
|
|
3112
|
-
root: h(
|
|
3140
|
+
root: h(ko, this),
|
|
3113
3141
|
threshold: 0
|
|
3114
3142
|
}).observe(this);
|
|
3115
3143
|
}
|
|
3116
|
-
function
|
|
3117
|
-
h(
|
|
3144
|
+
function Fo() {
|
|
3145
|
+
h(Do, this) && (m(G, this, Lo).call(this), m(G, this, zo).call(this)), h(Oo, this) && (m(G, this, Io).call(this), m(G, this, Bo).call(this));
|
|
3118
3146
|
}
|
|
3119
|
-
function
|
|
3120
|
-
h(
|
|
3121
|
-
let e = m(
|
|
3122
|
-
h(
|
|
3147
|
+
function Io() {
|
|
3148
|
+
h(Oo, this).innerHTML = "", p(Eo, this, []);
|
|
3149
|
+
let e = m(G, this, Ro).call(this, "Off", "textTrack", void 0);
|
|
3150
|
+
h(Oo, this).appendChild(e), h(Eo, this).push({
|
|
3123
3151
|
element: e,
|
|
3124
3152
|
value: void 0
|
|
3125
|
-
}), h(
|
|
3126
|
-
let t = m(
|
|
3127
|
-
h(
|
|
3153
|
+
}), h(So, this).forEach((e) => {
|
|
3154
|
+
let t = m(G, this, Ro).call(this, e, "textTrack", e);
|
|
3155
|
+
h(Oo, this).appendChild(t), h(Eo, this).push({
|
|
3128
3156
|
element: t,
|
|
3129
3157
|
value: e
|
|
3130
3158
|
});
|
|
3131
|
-
}), m(
|
|
3159
|
+
}), m(G, this, Bo).call(this);
|
|
3132
3160
|
}
|
|
3133
|
-
function
|
|
3134
|
-
h(
|
|
3135
|
-
let t = m(
|
|
3136
|
-
h(
|
|
3161
|
+
function Lo() {
|
|
3162
|
+
h(Do, this).innerHTML = "", p(To, this, []), h(xo, this).forEach((e) => {
|
|
3163
|
+
let t = m(G, this, Ro).call(this, e, "language", e);
|
|
3164
|
+
h(Do, this).appendChild(t), h(To, this).push({
|
|
3137
3165
|
element: t,
|
|
3138
3166
|
value: e
|
|
3139
3167
|
});
|
|
3140
|
-
}), m(
|
|
3168
|
+
}), m(G, this, zo).call(this);
|
|
3141
3169
|
}
|
|
3142
|
-
function
|
|
3170
|
+
function Ro(e, t, n) {
|
|
3143
3171
|
let r = document.createElement("div");
|
|
3144
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => m(
|
|
3172
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => m(G, this, Vo).call(this, n, t)), r;
|
|
3145
3173
|
}
|
|
3146
|
-
function
|
|
3147
|
-
h(
|
|
3148
|
-
let e = h(
|
|
3149
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(
|
|
3174
|
+
function zo() {
|
|
3175
|
+
h(jo, this) && (h(jo, this).removeAttribute("aria-selected"), h(jo, this).tabIndex = -1);
|
|
3176
|
+
let e = h(To, this).find((e) => e.value === h(Co, this));
|
|
3177
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(jo, this, e.element));
|
|
3150
3178
|
}
|
|
3151
|
-
function
|
|
3152
|
-
h(
|
|
3153
|
-
let e = h(
|
|
3154
|
-
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(
|
|
3179
|
+
function Bo() {
|
|
3180
|
+
h(Mo, this) && (h(Mo, this).removeAttribute("aria-selected"), h(Mo, this).tabIndex = -1);
|
|
3181
|
+
let e = h(Eo, this).find((e) => e.value === h(wo, this));
|
|
3182
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(Mo, this, e.element);
|
|
3155
3183
|
else {
|
|
3156
|
-
let e = h(
|
|
3157
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(
|
|
3184
|
+
let e = h(Eo, this).find((e) => e.value === void 0);
|
|
3185
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(Mo, this, e.element));
|
|
3158
3186
|
}
|
|
3159
3187
|
}
|
|
3160
|
-
function
|
|
3188
|
+
function Vo(e, t) {
|
|
3161
3189
|
this.dispatchEvent(new Event("change", {
|
|
3162
3190
|
bubbles: !0,
|
|
3163
3191
|
composed: !0
|
|
@@ -3169,36 +3197,36 @@ function Ro(e, t) {
|
|
|
3169
3197
|
detail: e
|
|
3170
3198
|
}));
|
|
3171
3199
|
}
|
|
3172
|
-
function
|
|
3200
|
+
function Ho(e) {
|
|
3173
3201
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3174
3202
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3175
3203
|
var a;
|
|
3176
|
-
(a = h(
|
|
3204
|
+
(a = h(Ao, this)) == null || a.hide();
|
|
3177
3205
|
} else if (t === "Enter" || t === " ") {
|
|
3178
3206
|
var o;
|
|
3179
|
-
(o = m(
|
|
3180
|
-
} else m(
|
|
3207
|
+
(o = m(G, this, Go).call(this)) == null || (o = o.element) == null || o.click();
|
|
3208
|
+
} else m(G, this, Uo).call(this, e);
|
|
3181
3209
|
}
|
|
3182
|
-
function
|
|
3210
|
+
function Uo(e) {
|
|
3183
3211
|
var t;
|
|
3184
|
-
let { key: n } = e, r = [...h(
|
|
3212
|
+
let { key: n } = e, r = [...h(To, this), ...h(Eo, this)], i = (t = m(G, this, Go).call(this)) == null ? r[0] : t;
|
|
3185
3213
|
if (!i) return;
|
|
3186
3214
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3187
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = m(
|
|
3215
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = m(G, this, Wo).call(this, a, "left") : n === "ArrowRight" ? o = m(G, this, Wo).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);
|
|
3188
3216
|
let s = r[o];
|
|
3189
|
-
s && (m(
|
|
3217
|
+
s && (m(G, this, Ko).call(this, s.value), s.element.focus());
|
|
3190
3218
|
}
|
|
3191
|
-
function
|
|
3192
|
-
let n = h(
|
|
3219
|
+
function Wo(e, t) {
|
|
3220
|
+
let n = h(To, this).length, r = h(Eo, this).length;
|
|
3193
3221
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3194
3222
|
}
|
|
3195
|
-
function
|
|
3196
|
-
return [...h(
|
|
3223
|
+
function Go() {
|
|
3224
|
+
return [...h(To, this), ...h(Eo, this)].find((e) => e.element.tabIndex === 0);
|
|
3197
3225
|
}
|
|
3198
|
-
function
|
|
3199
|
-
for (let t of [...h(
|
|
3226
|
+
function Ko(e) {
|
|
3227
|
+
for (let t of [...h(To, this), ...h(Eo, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3200
3228
|
}
|
|
3201
|
-
e(
|
|
3229
|
+
e(No, "observedAttributes", [
|
|
3202
3230
|
g.LANGUAGES,
|
|
3203
3231
|
g.TEXT_TRACKS,
|
|
3204
3232
|
g.LANGUAGE,
|
|
@@ -3206,12 +3234,12 @@ e(Ao, "observedAttributes", [
|
|
|
3206
3234
|
]);
|
|
3207
3235
|
//#endregion
|
|
3208
3236
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3209
|
-
var
|
|
3210
|
-
|
|
3211
|
-
var
|
|
3237
|
+
var qo, Jo = document.createElement("template");
|
|
3238
|
+
Jo.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";
|
|
3239
|
+
var Yo = class extends y {
|
|
3212
3240
|
constructor() {
|
|
3213
3241
|
var e;
|
|
3214
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3242
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Jo.content.cloneNode(!0));
|
|
3215
3243
|
}
|
|
3216
3244
|
connectedCallback() {
|
|
3217
3245
|
super.connectedCallback(), this.updateState();
|
|
@@ -3242,15 +3270,15 @@ var Ko = class extends y {
|
|
|
3242
3270
|
}));
|
|
3243
3271
|
}
|
|
3244
3272
|
};
|
|
3245
|
-
|
|
3246
|
-
...b(
|
|
3273
|
+
qo = Yo, e(Yo, "observedAttributes", [
|
|
3274
|
+
...b(qo, "observedAttributes", qo),
|
|
3247
3275
|
g.TIMESHIFT_POSITION,
|
|
3248
3276
|
g.DURATION
|
|
3249
3277
|
]);
|
|
3250
3278
|
//#endregion
|
|
3251
3279
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3252
|
-
var
|
|
3253
|
-
|
|
3280
|
+
var Xo, Zo = document.createElement("template");
|
|
3281
|
+
Zo.innerHTML = `
|
|
3254
3282
|
<style>
|
|
3255
3283
|
:host {
|
|
3256
3284
|
display: var(--mute-button-display);
|
|
@@ -3278,10 +3306,10 @@ Jo.innerHTML = `
|
|
|
3278
3306
|
</slot>
|
|
3279
3307
|
</slot>
|
|
3280
3308
|
`;
|
|
3281
|
-
var
|
|
3309
|
+
var Qo = class extends y {
|
|
3282
3310
|
constructor() {
|
|
3283
3311
|
var e;
|
|
3284
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3312
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Zo.content.cloneNode(!0));
|
|
3285
3313
|
}
|
|
3286
3314
|
connectedCallback() {
|
|
3287
3315
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3306,11 +3334,11 @@ var Yo = class extends y {
|
|
|
3306
3334
|
}));
|
|
3307
3335
|
}
|
|
3308
3336
|
};
|
|
3309
|
-
|
|
3337
|
+
Xo = Qo, e(Qo, "observedAttributes", [...b(Xo, "observedAttributes", Xo), g.MUTED]);
|
|
3310
3338
|
//#endregion
|
|
3311
3339
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3312
|
-
var
|
|
3313
|
-
|
|
3340
|
+
var $o, es = document.createElement("template");
|
|
3341
|
+
es.innerHTML = `
|
|
3314
3342
|
<style>
|
|
3315
3343
|
:host {
|
|
3316
3344
|
display: var(--pip-button-display);
|
|
@@ -3324,10 +3352,10 @@ Zo.innerHTML = `
|
|
|
3324
3352
|
<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>
|
|
3325
3353
|
</slot>
|
|
3326
3354
|
`;
|
|
3327
|
-
var
|
|
3355
|
+
var ts = class extends y {
|
|
3328
3356
|
constructor() {
|
|
3329
3357
|
var e;
|
|
3330
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3358
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(es.content.cloneNode(!0));
|
|
3331
3359
|
}
|
|
3332
3360
|
connectedCallback() {
|
|
3333
3361
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture");
|
|
@@ -3352,15 +3380,15 @@ var Qo = class extends y {
|
|
|
3352
3380
|
}));
|
|
3353
3381
|
}
|
|
3354
3382
|
};
|
|
3355
|
-
|
|
3356
|
-
...b(
|
|
3383
|
+
$o = ts, e(ts, "observedAttributes", [
|
|
3384
|
+
...b($o, "observedAttributes", $o),
|
|
3357
3385
|
g.IS_PIP,
|
|
3358
3386
|
g.PIP_AVAILABLE
|
|
3359
3387
|
]);
|
|
3360
3388
|
//#endregion
|
|
3361
3389
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3362
|
-
var
|
|
3363
|
-
|
|
3390
|
+
var ns, rs = document.createElement("template");
|
|
3391
|
+
rs.innerHTML = `
|
|
3364
3392
|
<style>
|
|
3365
3393
|
:host {
|
|
3366
3394
|
display: var(--play-button-display);
|
|
@@ -3384,10 +3412,10 @@ es.innerHTML = `
|
|
|
3384
3412
|
</slot>
|
|
3385
3413
|
</slot>
|
|
3386
3414
|
`;
|
|
3387
|
-
var
|
|
3415
|
+
var is = class extends y {
|
|
3388
3416
|
constructor() {
|
|
3389
3417
|
var e;
|
|
3390
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3418
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(rs.content.cloneNode(!0));
|
|
3391
3419
|
}
|
|
3392
3420
|
connectedCallback() {
|
|
3393
3421
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3412,64 +3440,64 @@ var ts = class extends y {
|
|
|
3412
3440
|
}));
|
|
3413
3441
|
}
|
|
3414
3442
|
};
|
|
3415
|
-
|
|
3443
|
+
ns = is, e(is, "observedAttributes", [...b(ns, "observedAttributes", ns), g.PAUSED]);
|
|
3416
3444
|
//#endregion
|
|
3417
3445
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3418
|
-
var
|
|
3446
|
+
var K = {
|
|
3419
3447
|
TITLE: "title",
|
|
3420
3448
|
OFFLINE: "offline",
|
|
3421
3449
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3422
3450
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3423
3451
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3424
|
-
},
|
|
3452
|
+
}, as = Object.values(K), os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(), ps = /* @__PURE__ */ new WeakSet(), ms = class extends pe {
|
|
3425
3453
|
constructor(e) {
|
|
3426
|
-
super(), S(this,
|
|
3454
|
+
super(), S(this, ps), f(this, os, void 0), f(this, ss, void 0), f(this, cs, !1), f(this, ls, !1), f(this, us, !0), f(this, ds, null), f(this, fs, null), p(ss, this, e), p(os, this, new de({
|
|
3427
3455
|
publicEndpoint: e.url,
|
|
3428
3456
|
tokenFactory: () => e.authenticationToken
|
|
3429
3457
|
}));
|
|
3430
3458
|
}
|
|
3431
3459
|
start(e = 5e3) {
|
|
3432
|
-
h(
|
|
3433
|
-
!h(
|
|
3460
|
+
h(fs, this) && clearInterval(h(fs, this)), p(cs, this, !1), p(ls, this, !1), m(ps, this, vs).call(this), m(ps, this, hs).call(this), p(fs, this, window.setInterval(() => {
|
|
3461
|
+
!h(ls, this) && !h(ss, this).infiniteReconnect && !h(ds, this) && h(us, this) && p(ds, this, window.setTimeout(() => m(ps, this, gs).call(this), 300 * 1e3)), !h(ls, this) && h(us, this) && m(ps, this, hs).call(this);
|
|
3434
3462
|
}, e));
|
|
3435
3463
|
}
|
|
3436
3464
|
stop() {
|
|
3437
|
-
m(
|
|
3465
|
+
m(ps, this, _s).call(this), h(fs, this) && (window.clearInterval(h(fs, this)), p(fs, this, null));
|
|
3438
3466
|
}
|
|
3439
3467
|
};
|
|
3440
|
-
function
|
|
3468
|
+
function hs() {
|
|
3441
3469
|
var e = this;
|
|
3442
3470
|
return t(function* () {
|
|
3443
|
-
if (h(
|
|
3444
|
-
p(
|
|
3471
|
+
if (h(cs, e)) return;
|
|
3472
|
+
p(cs, e, !0);
|
|
3445
3473
|
let t = "Stream is offline", n = "Please stand by";
|
|
3446
3474
|
try {
|
|
3447
|
-
let t = yield h(
|
|
3475
|
+
let t = yield h(os, e).getChannel(h(ss, e).channelId);
|
|
3448
3476
|
if (t.isLive) {
|
|
3449
|
-
p(
|
|
3477
|
+
p(ls, e, !0), m(ps, e, vs).call(e), e.emit("live", t), p(cs, e, !1);
|
|
3450
3478
|
return;
|
|
3451
3479
|
}
|
|
3452
3480
|
} catch (e) {
|
|
3453
3481
|
ue(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3454
3482
|
}
|
|
3455
|
-
h(
|
|
3483
|
+
h(us, e) && e.emit("error", {
|
|
3456
3484
|
title: t,
|
|
3457
3485
|
message: n
|
|
3458
|
-
}), p(
|
|
3486
|
+
}), p(cs, e, !1);
|
|
3459
3487
|
})();
|
|
3460
3488
|
}
|
|
3461
|
-
function
|
|
3462
|
-
this.stop(), p(
|
|
3489
|
+
function gs() {
|
|
3490
|
+
this.stop(), p(us, this, !1), this.emit("timeout");
|
|
3463
3491
|
}
|
|
3464
|
-
function
|
|
3465
|
-
h(
|
|
3492
|
+
function _s() {
|
|
3493
|
+
h(ds, this) && (window.clearTimeout(h(ds, this)), p(ds, this, null));
|
|
3466
3494
|
}
|
|
3467
|
-
function
|
|
3468
|
-
m(
|
|
3495
|
+
function vs() {
|
|
3496
|
+
m(ps, this, _s).call(this), p(us, this, !0);
|
|
3469
3497
|
}
|
|
3470
3498
|
//#endregion
|
|
3471
3499
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3472
|
-
var
|
|
3500
|
+
var ys = /\/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(), xs = ys.test(bs), Ss = (e) => Sa.observedAttributes.includes(e), Cs = `
|
|
3473
3501
|
<style>
|
|
3474
3502
|
:host {
|
|
3475
3503
|
container-type: inline-size;
|
|
@@ -3479,7 +3507,7 @@ var gs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3479
3507
|
display: flex;
|
|
3480
3508
|
justify-content: center;
|
|
3481
3509
|
|
|
3482
|
-
--vindral-volume-range-display: ${
|
|
3510
|
+
--vindral-volume-range-display: ${xs ? "none" : "flex"};
|
|
3483
3511
|
--vindral-airplay-button-display: none;
|
|
3484
3512
|
--vindral-play-overlay-display: none;
|
|
3485
3513
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3515,7 +3543,7 @@ var gs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3515
3543
|
// needs to be higher than bottom bar/UI
|
|
3516
3544
|
}
|
|
3517
3545
|
|
|
3518
|
-
:host([${
|
|
3546
|
+
:host([${K.OFFLINE}]) {
|
|
3519
3547
|
aspect-ratio: 16 / 9;
|
|
3520
3548
|
vindral-controller {
|
|
3521
3549
|
--vindral-ui-display: none;
|
|
@@ -3560,10 +3588,10 @@ var gs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3560
3588
|
--vindral-subtitle-offset: -48px;
|
|
3561
3589
|
}
|
|
3562
3590
|
</style>
|
|
3563
|
-
`,
|
|
3591
|
+
`, ws = (e) => {
|
|
3564
3592
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3565
3593
|
return `
|
|
3566
|
-
${
|
|
3594
|
+
${Cs}
|
|
3567
3595
|
|
|
3568
3596
|
<vindral-controller>
|
|
3569
3597
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3601,8 +3629,8 @@ var gs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3601
3629
|
</vindral-center-overlay>
|
|
3602
3630
|
</vindral-controller>
|
|
3603
3631
|
`;
|
|
3604
|
-
},
|
|
3605
|
-
${
|
|
3632
|
+
}, Ts = `
|
|
3633
|
+
${Cs}
|
|
3606
3634
|
|
|
3607
3635
|
<style>
|
|
3608
3636
|
#control-bar {
|
|
@@ -3626,126 +3654,124 @@ var gs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3626
3654
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3627
3655
|
</vindral-center-overlay>
|
|
3628
3656
|
</vindral-controller>
|
|
3629
|
-
`,
|
|
3657
|
+
`, Es = document.createElement("template"), Ds = /* @__PURE__ */ new WeakMap(), q = /* @__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 WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakSet(), Fs = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap(), Ls = /* @__PURE__ */ new WeakMap(), Rs = class extends HTMLElement {
|
|
3630
3658
|
constructor() {
|
|
3631
|
-
super(), S(this,
|
|
3659
|
+
super(), S(this, J), f(this, Ds, void 0), f(this, q, void 0), f(this, Os, void 0), f(this, ks, void 0), f(this, As, void 0), f(this, js, void 0), f(this, Ms, /* @__PURE__ */ new Set()), f(this, Ns, () => {
|
|
3632
3660
|
Array.from(this.attributes).forEach((e) => {
|
|
3633
|
-
h(
|
|
3661
|
+
h(Ps, this).call(this, e.name, e.value);
|
|
3634
3662
|
});
|
|
3635
|
-
}), f(this,
|
|
3636
|
-
|
|
3637
|
-
}), f(this,
|
|
3663
|
+
}), f(this, Ps, (e, t) => {
|
|
3664
|
+
Ss(e) && (_(t) ? h(q, this).setAttribute(e, t) : h(q, this).removeAttribute(e));
|
|
3665
|
+
}), f(this, Fs, () => {
|
|
3638
3666
|
Array.from(this.children).forEach((e) => {
|
|
3639
|
-
h(
|
|
3667
|
+
h(Ms, this).add(e);
|
|
3640
3668
|
});
|
|
3641
|
-
}), f(this,
|
|
3642
|
-
let e = h(
|
|
3669
|
+
}), f(this, Is, () => {
|
|
3670
|
+
let e = h(q, this).instance;
|
|
3643
3671
|
e && (e.on("is live", (e) => {
|
|
3644
|
-
e ? (this.removeAttribute(
|
|
3672
|
+
e ? (this.removeAttribute(K.OFFLINE), m(J, this, Gs).call(this)) : (this.setAttribute(K.OFFLINE, ""), m(J, this, Ws).call(this, "Stream is offline", "Please stand by"));
|
|
3645
3673
|
}), e.on("channels", (e) => {
|
|
3646
|
-
let t = h(
|
|
3647
|
-
n && m(
|
|
3674
|
+
let t = h(q, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3675
|
+
n && m(J, this, Hs).call(this, n);
|
|
3648
3676
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3649
3677
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3650
|
-
n && m(
|
|
3678
|
+
n && m(J, this, Hs).call(this, n);
|
|
3651
3679
|
}), e.on("error", (e) => {
|
|
3652
3680
|
if (e.code() === "connection_failed") {
|
|
3653
|
-
m(
|
|
3681
|
+
m(J, this, Ws).call(this, "Stream is offline", "Please stand by");
|
|
3654
3682
|
return;
|
|
3655
3683
|
}
|
|
3656
|
-
e.isFatal() && (e.code() === "access_forbidden" ? m(
|
|
3684
|
+
e.isFatal() && (e.code() === "access_forbidden" ? m(J, this, Ws).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? m(J, this, Ws).call(this, "Stream is offline", "Please stand by") : m(J, this, Ws).call(this, "An error occurred", e.message), h(ks, this).removeAttribute("hidden"), this.setAttribute(K.OFFLINE, ""), h(q, this).dispatchEvent(new CustomEvent(v.EXIT_FULLSCREEN)), h(q, this).dispatchEvent(new CustomEvent(v.EXIT_PIP)));
|
|
3657
3685
|
}));
|
|
3658
|
-
}), f(this,
|
|
3659
|
-
h(
|
|
3660
|
-
}), p(
|
|
3686
|
+
}), f(this, Ls, () => {
|
|
3687
|
+
h(q, this).connect(), h(ks, this).setAttribute("hidden", ""), m(J, this, Gs).call(this), h(q, this).focus();
|
|
3688
|
+
}), p(Ds, this, this.attachShadow({ mode: "open" })), m(J, this, Bs).call(this), p(q, this, h(Ds, this).querySelector("vindral-controller")), p(Os, this, h(Ds, this).querySelector("#vindral-message")), p(ks, this, h(Ds, this).querySelector("#play-overlay")), p(As, this, h(Ds, this).querySelector("#center-overlay"));
|
|
3661
3689
|
}
|
|
3662
3690
|
connectedCallback() {
|
|
3663
|
-
this.setAttribute(
|
|
3691
|
+
this.setAttribute(K.OFFLINE, ""), h(q, this).addEventListener("vindral-instance-ready", h(Is, this)), m(J, this, Vs).call(this);
|
|
3664
3692
|
}
|
|
3665
3693
|
disconnectedCallback() {
|
|
3666
3694
|
var e;
|
|
3667
|
-
h(
|
|
3695
|
+
h(q, this).removeEventListener("vindral-instance-ready", h(Is, this)), h(ks, this).removeEventListener("click", h(Ls, this)), (e = h(js, this)) == null || e.stop();
|
|
3668
3696
|
}
|
|
3669
3697
|
attributeChangedCallback(e, t, n) {
|
|
3670
|
-
if (t !== n) if (e === g.MEDIA || e ===
|
|
3671
|
-
else if (e ===
|
|
3672
|
-
let e = h(
|
|
3673
|
-
e && (e.disabled = x(this.getAttribute(
|
|
3674
|
-
} else h(
|
|
3698
|
+
if (t !== n) if (e === g.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) m(J, this, Bs).call(this);
|
|
3699
|
+
else if (e === K.REFRESH_POSTER_ENABLED) {
|
|
3700
|
+
let e = h(Ds, this).querySelector("vindral-poster-overlay");
|
|
3701
|
+
e && (e.disabled = x(this.getAttribute(K.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3702
|
+
} else h(Ps, this).call(this, e, n);
|
|
3675
3703
|
}
|
|
3676
3704
|
get instance() {
|
|
3677
|
-
return h(
|
|
3705
|
+
return h(q, this).instance;
|
|
3678
3706
|
}
|
|
3679
3707
|
get airPlay() {
|
|
3680
|
-
return h(
|
|
3708
|
+
return h(q, this).airPlay;
|
|
3681
3709
|
}
|
|
3682
3710
|
get timelineMarkers() {
|
|
3683
|
-
return h(
|
|
3711
|
+
return h(q, this).timelineMarkers;
|
|
3684
3712
|
}
|
|
3685
3713
|
set timelineMarkers(e) {
|
|
3686
|
-
h(
|
|
3714
|
+
h(q, this).timelineMarkers = e;
|
|
3687
3715
|
}
|
|
3688
3716
|
};
|
|
3689
|
-
function
|
|
3690
|
-
let e = _e(this.getAttribute(g.MEDIA)), t = x(this.getAttribute(
|
|
3691
|
-
return e === "audio" ?
|
|
3692
|
-
}
|
|
3693
|
-
function
|
|
3694
|
-
let e = h(
|
|
3695
|
-
this.isConnected && t && t.removeEventListener("vindral-instance-ready", h(
|
|
3696
|
-
let r =
|
|
3697
|
-
p(
|
|
3698
|
-
h(
|
|
3699
|
-
}), h(
|
|
3700
|
-
}
|
|
3701
|
-
function
|
|
3717
|
+
function zs() {
|
|
3718
|
+
let e = _e(this.getAttribute(g.MEDIA)), t = x(this.getAttribute(K.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3719
|
+
return e === "audio" ? Ts : ws(t);
|
|
3720
|
+
}
|
|
3721
|
+
function Bs() {
|
|
3722
|
+
let e = h(Ds, this).hasChildNodes(), t = e ? h(q, this) : void 0, n = e ? h(ks, this) : void 0;
|
|
3723
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", h(Is, this)), this.isConnected && n && h(js, this) && n.removeEventListener("click", h(Ls, this)), Es.innerHTML = m(J, this, zs).call(this);
|
|
3724
|
+
let r = Es.content.cloneNode(!0);
|
|
3725
|
+
p(q, this, r.querySelector("vindral-controller")), p(Os, this, r.querySelector("#vindral-message")), p(ks, this, r.querySelector("#play-overlay")), p(As, this, r.querySelector("#center-overlay")), h(Fs, this).call(this), h(Ms, this).forEach((e) => {
|
|
3726
|
+
h(q, this).appendChild(e);
|
|
3727
|
+
}), h(Ns, this).call(this), h(Ds, this).innerHTML = "", h(Ds, this).appendChild(r), this.isConnected && (h(q, this).addEventListener("vindral-instance-ready", h(Is, this)), h(js, this) && h(ks, this).addEventListener("click", h(Ls, this)));
|
|
3728
|
+
}
|
|
3729
|
+
function Vs() {
|
|
3702
3730
|
var e;
|
|
3703
|
-
if (x(this.getAttribute(
|
|
3731
|
+
if (x(this.getAttribute(K.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3704
3732
|
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");
|
|
3705
3733
|
if (!n) {
|
|
3706
|
-
this.setAttribute(
|
|
3734
|
+
this.setAttribute(K.OFFLINE, ""), m(J, this, Ws).call(this, "Invalid options", "Please enter a channel id to start the stream");
|
|
3707
3735
|
return;
|
|
3708
3736
|
}
|
|
3709
|
-
p(
|
|
3737
|
+
p(js, this, new ms({
|
|
3710
3738
|
url: t,
|
|
3711
3739
|
channelId: n,
|
|
3712
3740
|
authenticationToken: r,
|
|
3713
3741
|
infiniteReconnect: i
|
|
3714
|
-
})), h(
|
|
3715
|
-
h(
|
|
3716
|
-
}), h(
|
|
3717
|
-
m(
|
|
3718
|
-
}), h(
|
|
3719
|
-
this.setAttribute(
|
|
3720
|
-
}), h(
|
|
3721
|
-
}
|
|
3722
|
-
function
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
var a, o;
|
|
3729
|
-
i = (a = (o = this.instance) == null ? void 0 : o.getThumbnailUrl()) == null ? e.thumbnailUrls.length ? e.thumbnailUrls[0] : void 0 : a;
|
|
3730
|
-
}
|
|
3731
|
-
ke({
|
|
3732
|
-
title: r,
|
|
3733
|
-
poster: i
|
|
3742
|
+
})), h(js, this).on("live", (e) => {
|
|
3743
|
+
h(q, this).connect(), this.removeAttribute("offline"), m(J, this, Gs).call(this), m(J, this, Hs).call(this, e);
|
|
3744
|
+
}), h(js, this).on("timeout", () => {
|
|
3745
|
+
m(J, this, Gs).call(this), h(ks, this).removeAttribute("hidden");
|
|
3746
|
+
}), h(js, this).on("error", (e) => {
|
|
3747
|
+
this.setAttribute(K.OFFLINE, ""), m(J, this, Ws).call(this, e.title, e.message);
|
|
3748
|
+
}), h(ks, this).addEventListener("click", h(Ls, this)), this.hasAttribute("paused") && h(js, this).start();
|
|
3749
|
+
}
|
|
3750
|
+
function Hs(e) {
|
|
3751
|
+
var t, n, r;
|
|
3752
|
+
let i = he(this.getAttribute("title"), !1);
|
|
3753
|
+
i && ke({
|
|
3754
|
+
title: typeof i == "string" ? i : e.name,
|
|
3755
|
+
poster: (t = (n = m(J, this, Us).call(this)) == null ? (r = this.instance) == null ? void 0 : r.getThumbnailUrl() : n) == null ? e.thumbnailUrls[0] : t
|
|
3734
3756
|
});
|
|
3735
3757
|
}
|
|
3736
|
-
function
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
n ? h(Ds, this).setAttribute("poster", n) : h(Ds, this).removeAttribute("poster"), h(Ds, this).setAttribute("backdrop", "");
|
|
3758
|
+
function Us() {
|
|
3759
|
+
let e = he(this.getAttribute("poster"));
|
|
3760
|
+
return _(e) ? e : void 0;
|
|
3740
3761
|
}
|
|
3741
|
-
function
|
|
3742
|
-
h(
|
|
3762
|
+
function Ws(e, t) {
|
|
3763
|
+
h(Os, this).setAttribute("title", e), h(Os, this).setAttribute("description", t), h(Os, this).removeAttribute("hidden");
|
|
3764
|
+
let n = m(J, this, Us).call(this);
|
|
3765
|
+
n ? h(As, this).setAttribute("poster", n) : h(As, this).removeAttribute("poster"), h(As, this).setAttribute("backdrop", "");
|
|
3743
3766
|
}
|
|
3744
|
-
|
|
3767
|
+
function Gs() {
|
|
3768
|
+
h(Os, this).setAttribute("hidden", ""), h(As, this).removeAttribute("backdrop");
|
|
3769
|
+
}
|
|
3770
|
+
e(Rs, "observedAttributes", [...Sa.observedAttributes, ...as]);
|
|
3745
3771
|
//#endregion
|
|
3746
3772
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3747
|
-
var
|
|
3748
|
-
|
|
3773
|
+
var Ks = document.createElement("template");
|
|
3774
|
+
Ks.innerHTML = `
|
|
3749
3775
|
<style>
|
|
3750
3776
|
:host {
|
|
3751
3777
|
display: var(--poster-overlay-display);
|
|
@@ -3780,26 +3806,26 @@ Hs.innerHTML = `
|
|
|
3780
3806
|
}
|
|
3781
3807
|
</style>
|
|
3782
3808
|
`;
|
|
3783
|
-
var
|
|
3809
|
+
var qs = 6e3, Js = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakSet(), $s = /* @__PURE__ */ new WeakMap(), ec = class extends HTMLElement {
|
|
3784
3810
|
constructor() {
|
|
3785
|
-
super(), S(this,
|
|
3786
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? m(
|
|
3787
|
-
}), f(this,
|
|
3811
|
+
super(), S(this, Qs), f(this, Js, null), f(this, Ys, null), f(this, Xs, null), f(this, Zs, () => {
|
|
3812
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? m(Qs, this, tc).call(this) : m(Qs, this, nc).call(this);
|
|
3813
|
+
}), f(this, $s, (e) => {
|
|
3788
3814
|
e.forEach((e) => {
|
|
3789
3815
|
e.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3790
3816
|
});
|
|
3791
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3817
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Ks.content.cloneNode(!0));
|
|
3792
3818
|
}
|
|
3793
3819
|
connectedCallback() {
|
|
3794
3820
|
var e;
|
|
3795
|
-
p(
|
|
3821
|
+
p(Js, this, this.closest("vindral-controller")), (e = h(Js, this)) == null || e.connectListener(this), document.addEventListener("visibilitychange", h(Zs, this)), p(Xs, this, new IntersectionObserver(h($s, this))), h(Xs, this).observe(this);
|
|
3796
3822
|
}
|
|
3797
3823
|
disconnectedCallback() {
|
|
3798
3824
|
var e, t;
|
|
3799
|
-
(e = h(
|
|
3825
|
+
(e = h(Js, this)) == null || e.disconnectListener(this), document.removeEventListener("visibilitychange", h(Zs, this)), (t = h(Xs, this)) == null || t.disconnect(), p(Xs, this, null), m(Qs, this, nc).call(this);
|
|
3800
3826
|
}
|
|
3801
3827
|
attributeChangedCallback(e, t, n) {
|
|
3802
|
-
t !== n && (e === g.POSTER_SRC && this.paused && !this.disabled && m(
|
|
3828
|
+
t !== n && (e === g.POSTER_SRC && this.paused && !this.disabled && m(Qs, this, rc).call(this), (e === g.PAUSED || e === "disabled" || e === "intersecting") && h(Zs, this).call(this));
|
|
3803
3829
|
}
|
|
3804
3830
|
get disabled() {
|
|
3805
3831
|
return this.hasAttribute("disabled");
|
|
@@ -3814,18 +3840,18 @@ var Us = 6e3, Ws = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakM
|
|
|
3814
3840
|
return this.hasAttribute(g.PAUSED);
|
|
3815
3841
|
}
|
|
3816
3842
|
};
|
|
3817
|
-
function
|
|
3818
|
-
h(
|
|
3843
|
+
function tc() {
|
|
3844
|
+
h(Ys, this) === null && (m(Qs, this, nc).call(this), p(Ys, this, window.setInterval(() => m(Qs, this, rc).call(this), qs)));
|
|
3819
3845
|
}
|
|
3820
|
-
function
|
|
3821
|
-
h(
|
|
3846
|
+
function nc() {
|
|
3847
|
+
h(Ys, this) !== null && (clearInterval(h(Ys, this)), p(Ys, this, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3822
3848
|
}
|
|
3823
|
-
function
|
|
3849
|
+
function rc() {
|
|
3824
3850
|
if (!this.posterSrc) return;
|
|
3825
3851
|
let e = new URL(this.posterSrc), t = new Image();
|
|
3826
3852
|
e.searchParams.set("t", Date.now().toString()), t.src = e.toString(), t.onload = () => this.style.backgroundImage = `url(${e.toString()})`;
|
|
3827
3853
|
}
|
|
3828
|
-
e(
|
|
3854
|
+
e(ec, "observedAttributes", [
|
|
3829
3855
|
g.POSTER_SRC,
|
|
3830
3856
|
g.PAUSED,
|
|
3831
3857
|
"disabled",
|
|
@@ -3833,70 +3859,70 @@ e(Xs, "observedAttributes", [
|
|
|
3833
3859
|
]);
|
|
3834
3860
|
//#endregion
|
|
3835
3861
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenu.ts
|
|
3836
|
-
var
|
|
3837
|
-
|
|
3862
|
+
var ic, ac = "\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");
|
|
3863
|
+
oc.innerHTML = `
|
|
3838
3864
|
<style>
|
|
3839
3865
|
:host {
|
|
3840
3866
|
display: var(--rendition-menu-display);
|
|
3841
3867
|
}
|
|
3842
3868
|
</style>
|
|
3843
3869
|
|
|
3844
|
-
<slot name="button">${
|
|
3870
|
+
<slot name="button">${ac}</slot>
|
|
3845
3871
|
<slot name="listbox" hidden>
|
|
3846
3872
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3847
3873
|
</slot>
|
|
3848
3874
|
`;
|
|
3849
|
-
var
|
|
3875
|
+
var sc = /* @__PURE__ */ new WeakSet(), cc = class extends Be {
|
|
3850
3876
|
constructor() {
|
|
3851
3877
|
var e, t, n, r;
|
|
3852
|
-
super(), S(this,
|
|
3878
|
+
super(), S(this, sc), (e = this.shadowRoot) == null || e.appendChild(oc.content.cloneNode(!0)), this.button = (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"), this.listbox = (n = this.shadowRoot) == null ? void 0 : n.querySelector("[part=listbox]"), this.listboxSlot = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot[name=listbox]");
|
|
3853
3879
|
}
|
|
3854
3880
|
connectedCallback() {
|
|
3855
|
-
super.connectedCallback(), m(
|
|
3881
|
+
super.connectedCallback(), m(sc, this, lc).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
3856
3882
|
}
|
|
3857
3883
|
attributeChangedCallback(e, t, n) {
|
|
3858
|
-
super.attributeChangedCallback(e, t, n), e === g.RENDITION_LEVELS && m(
|
|
3884
|
+
super.attributeChangedCallback(e, t, n), e === g.RENDITION_LEVELS && m(sc, this, lc).call(this);
|
|
3859
3885
|
}
|
|
3860
3886
|
};
|
|
3861
|
-
|
|
3862
|
-
function
|
|
3887
|
+
ic = cc;
|
|
3888
|
+
function lc() {
|
|
3863
3889
|
let e = this.getAttribute(g.RENDITION_LEVELS);
|
|
3864
3890
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3865
3891
|
}
|
|
3866
|
-
e(
|
|
3892
|
+
e(cc, "observedAttributes", [...b(ic, "observedAttributes", ic), g.RENDITION_LEVELS]);
|
|
3867
3893
|
//#endregion
|
|
3868
3894
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3869
|
-
var
|
|
3870
|
-
|
|
3871
|
-
var
|
|
3895
|
+
var uc = document.createElement("template");
|
|
3896
|
+
uc.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";
|
|
3897
|
+
var dc = /* @__PURE__ */ new WeakMap(), fc = /* @__PURE__ */ new WeakMap(), pc = /* @__PURE__ */ new WeakMap(), mc = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakMap(), gc = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), _c = class extends HTMLElement {
|
|
3872
3898
|
constructor() {
|
|
3873
|
-
super(), S(this,
|
|
3899
|
+
super(), S(this, Y), f(this, dc, []), f(this, fc, 2 ** 53 - 1), f(this, pc, null), f(this, mc, []), f(this, hc, null), f(this, gc, null), e(this, "handleEvent", (e) => {
|
|
3874
3900
|
switch (e.type) {
|
|
3875
3901
|
case "keydown":
|
|
3876
|
-
m(
|
|
3902
|
+
m(Y, this, Cc).call(this, e);
|
|
3877
3903
|
break;
|
|
3878
3904
|
}
|
|
3879
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3905
|
+
}), this.attachShadow({ mode: "open" }).appendChild(uc.content.cloneNode(!0));
|
|
3880
3906
|
}
|
|
3881
3907
|
connectedCallback() {
|
|
3882
3908
|
let e = this.getRootNode();
|
|
3883
3909
|
if (e instanceof ShadowRoot) {
|
|
3884
3910
|
var t;
|
|
3885
|
-
p(
|
|
3911
|
+
p(hc, this, e.host.closest("vindral-controller")), (t = h(hc, this)) == null || t.connectListener(this), m(Y, this, vc).call(this), m(Y, this, yc).call(this), p(gc, this, e.host), this.addEventListener("keydown", this);
|
|
3886
3912
|
}
|
|
3887
3913
|
}
|
|
3888
3914
|
disconnectedCallback() {
|
|
3889
3915
|
var e;
|
|
3890
|
-
(e = h(
|
|
3916
|
+
(e = h(hc, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3891
3917
|
}
|
|
3892
3918
|
attributeChangedCallback(e, t, n) {
|
|
3893
3919
|
t !== n && (e === g.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === g.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1));
|
|
3894
3920
|
}
|
|
3895
3921
|
set list(e) {
|
|
3896
|
-
p(
|
|
3922
|
+
p(dc, this, e), m(Y, this, yc).call(this);
|
|
3897
3923
|
}
|
|
3898
3924
|
set maxVideoBitrate(e) {
|
|
3899
|
-
p(
|
|
3925
|
+
p(fc, this, e), m(Y, this, xc).call(this);
|
|
3900
3926
|
}
|
|
3901
3927
|
get keysUsed() {
|
|
3902
3928
|
return [
|
|
@@ -3912,10 +3938,10 @@ var sc = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), lc =
|
|
|
3912
3938
|
}
|
|
3913
3939
|
focus() {
|
|
3914
3940
|
var e;
|
|
3915
|
-
(e = h(
|
|
3941
|
+
(e = h(pc, this)) == null || e.focus();
|
|
3916
3942
|
}
|
|
3917
3943
|
};
|
|
3918
|
-
function
|
|
3944
|
+
function vc() {
|
|
3919
3945
|
new IntersectionObserver((e) => {
|
|
3920
3946
|
e.forEach((e) => {
|
|
3921
3947
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3924,50 +3950,50 @@ function mc() {
|
|
|
3924
3950
|
} else this.style.height = "auto";
|
|
3925
3951
|
});
|
|
3926
3952
|
}, {
|
|
3927
|
-
root: h(
|
|
3953
|
+
root: h(hc, this),
|
|
3928
3954
|
threshold: 0
|
|
3929
3955
|
}).observe(this);
|
|
3930
3956
|
}
|
|
3931
|
-
function
|
|
3957
|
+
function yc() {
|
|
3932
3958
|
var e;
|
|
3933
3959
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
3934
|
-
t && (p(
|
|
3960
|
+
t && (p(mc, this, []), t.innerHTML = "", h(dc, this).sort((e, t) => {
|
|
3935
3961
|
var n, r;
|
|
3936
3962
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3937
3963
|
}).forEach((e) => {
|
|
3938
3964
|
var n, r, i, a, o, s, c, l;
|
|
3939
3965
|
let u = document.createElement("div");
|
|
3940
3966
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
3941
|
-
let ee = m(
|
|
3967
|
+
let ee = m(Y, this, bc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3942
3968
|
u.textContent = e.video ? me(e.video) : "";
|
|
3943
3969
|
let d = document.createElement("span");
|
|
3944
|
-
d.classList.add("menu-item-subtitle"), d.textContent = `${De(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ee}p`, u.appendChild(d), u.addEventListener("click", () => m(
|
|
3970
|
+
d.classList.add("menu-item-subtitle"), d.textContent = `${De(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ee}p`, u.appendChild(d), u.addEventListener("click", () => m(Y, this, Sc).call(this, e)), h(mc, this).push({
|
|
3945
3971
|
el: u,
|
|
3946
3972
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
3947
3973
|
}), t.appendChild(u);
|
|
3948
|
-
}), m(
|
|
3974
|
+
}), m(Y, this, xc).call(this));
|
|
3949
3975
|
}
|
|
3950
|
-
function
|
|
3976
|
+
function bc(e) {
|
|
3951
3977
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
3952
3978
|
}
|
|
3953
|
-
function
|
|
3954
|
-
h(
|
|
3955
|
-
let e = h(
|
|
3979
|
+
function xc() {
|
|
3980
|
+
h(pc, this) && (h(pc, this).removeAttribute("aria-selected"), h(pc, this).tabIndex = -1);
|
|
3981
|
+
let e = h(dc, this).sort((e, t) => {
|
|
3956
3982
|
var n, r;
|
|
3957
3983
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3958
|
-
}), t = h(
|
|
3984
|
+
}), t = h(dc, this).filter((e) => {
|
|
3959
3985
|
var t;
|
|
3960
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= h(
|
|
3986
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= h(fc, this);
|
|
3961
3987
|
})[0] || e[e.length - 1];
|
|
3962
3988
|
if (t) {
|
|
3963
|
-
let e = h(
|
|
3989
|
+
let e = h(mc, this).find((e) => {
|
|
3964
3990
|
var n;
|
|
3965
3991
|
return e.id === ((n = t.video) == null ? void 0 : n.id);
|
|
3966
3992
|
});
|
|
3967
|
-
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), p(
|
|
3993
|
+
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), p(pc, this, e.el));
|
|
3968
3994
|
}
|
|
3969
3995
|
}
|
|
3970
|
-
function
|
|
3996
|
+
function Sc(e) {
|
|
3971
3997
|
this.dispatchEvent(new Event("change", {
|
|
3972
3998
|
bubbles: !0,
|
|
3973
3999
|
composed: !0
|
|
@@ -3977,36 +4003,36 @@ function vc(e) {
|
|
|
3977
4003
|
detail: e
|
|
3978
4004
|
}));
|
|
3979
4005
|
}
|
|
3980
|
-
function
|
|
4006
|
+
function Cc(e) {
|
|
3981
4007
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3982
4008
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3983
4009
|
var a;
|
|
3984
|
-
(a = h(
|
|
4010
|
+
(a = h(gc, this)) == null || a.hide();
|
|
3985
4011
|
} else if (t === "Enter" || t === " ") {
|
|
3986
4012
|
var o;
|
|
3987
|
-
(o = m(
|
|
3988
|
-
} else m(
|
|
4013
|
+
(o = m(Y, this, Tc).call(this)) == null || (o = o.el) == null || o.click();
|
|
4014
|
+
} else m(Y, this, wc).call(this, e);
|
|
3989
4015
|
}
|
|
3990
|
-
function
|
|
4016
|
+
function wc(e) {
|
|
3991
4017
|
var t;
|
|
3992
|
-
let { key: n } = e, r = h(
|
|
4018
|
+
let { key: n } = e, r = h(mc, this), i = (t = m(Y, this, Tc).call(this)) == null ? r[0] : t;
|
|
3993
4019
|
if (!i) return;
|
|
3994
4020
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3995
4021
|
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);
|
|
3996
4022
|
let s = r[o];
|
|
3997
|
-
s && (m(
|
|
4023
|
+
s && (m(Y, this, Ec).call(this, s.id), s.el.focus());
|
|
3998
4024
|
}
|
|
3999
|
-
function
|
|
4000
|
-
return h(
|
|
4025
|
+
function Tc() {
|
|
4026
|
+
return h(mc, this).find((e) => e.el.tabIndex === 0);
|
|
4001
4027
|
}
|
|
4002
|
-
function
|
|
4003
|
-
for (let t of h(
|
|
4028
|
+
function Ec(e) {
|
|
4029
|
+
for (let t of h(mc, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
4004
4030
|
}
|
|
4005
|
-
e(
|
|
4031
|
+
e(_c, "observedAttributes", [g.RENDITION_LEVELS, g.MAX_VIDEO_BITRATE]);
|
|
4006
4032
|
//#endregion
|
|
4007
4033
|
//#region ../../libs/player-next/src/components/ScrollOverlay.ts
|
|
4008
|
-
var
|
|
4009
|
-
|
|
4034
|
+
var Dc = document.createElement("template");
|
|
4035
|
+
Dc.innerHTML = `
|
|
4010
4036
|
<style>
|
|
4011
4037
|
:host {
|
|
4012
4038
|
--scroll-overlay-offset: var(--vindral-scroll-overlay-offset, 0px);
|
|
@@ -4074,71 +4100,71 @@ Cc.innerHTML = `
|
|
|
4074
4100
|
<div id="scroll-area"></div>
|
|
4075
4101
|
<slot id="content"></slot>
|
|
4076
4102
|
`;
|
|
4077
|
-
var
|
|
4103
|
+
var X = /* @__PURE__ */ new WeakMap(), Oc = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Ac = /* @__PURE__ */ new WeakMap(), jc = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), Nc = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakSet(), Pc = /* @__PURE__ */ new WeakMap(), Fc = class extends HTMLElement {
|
|
4078
4104
|
constructor() {
|
|
4079
|
-
super(), S(this, Z), f(this,
|
|
4105
|
+
super(), S(this, Z), f(this, X, null), f(this, Oc, null), f(this, kc, !1), f(this, Ac, !1), f(this, jc, !1), f(this, Mc, () => {
|
|
4080
4106
|
this.open && (this.open = !1);
|
|
4081
|
-
}), f(this,
|
|
4107
|
+
}), f(this, Nc, null), e(this, "handleEvent", (e) => {
|
|
4082
4108
|
switch (e.type) {
|
|
4083
4109
|
case "touchstart":
|
|
4084
|
-
m(Z, this,
|
|
4110
|
+
m(Z, this, Lc).call(this, e);
|
|
4085
4111
|
break;
|
|
4086
4112
|
case "touchmove":
|
|
4087
|
-
m(Z, this,
|
|
4113
|
+
m(Z, this, Rc).call(this, e);
|
|
4088
4114
|
break;
|
|
4089
4115
|
case "touchend":
|
|
4090
|
-
m(Z, this,
|
|
4116
|
+
m(Z, this, zc).call(this, e);
|
|
4091
4117
|
break;
|
|
4092
4118
|
}
|
|
4093
|
-
}), f(this,
|
|
4094
|
-
let e = h(
|
|
4119
|
+
}), f(this, Pc, () => {
|
|
4120
|
+
let e = h(jc, this);
|
|
4095
4121
|
if (this.scrollTop === 0) {
|
|
4096
|
-
m(Z, this,
|
|
4122
|
+
m(Z, this, qc).call(this, e);
|
|
4097
4123
|
return;
|
|
4098
4124
|
}
|
|
4099
|
-
if (!e && !m(Z, this,
|
|
4100
|
-
m(Z, this,
|
|
4125
|
+
if (!e && !m(Z, this, Bc).call(this)) {
|
|
4126
|
+
m(Z, this, Gc).call(this), m(Z, this, qc).call(this);
|
|
4101
4127
|
return;
|
|
4102
4128
|
}
|
|
4103
|
-
!this.visible && this.scrollTop > 0 && !h(
|
|
4104
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4129
|
+
!this.visible && this.scrollTop > 0 && !h(kc, this) ? m(Z, this, Jc).call(this) : !h(kc, this) && m(Z, this, Hc).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4130
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Dc.content.cloneNode(!0));
|
|
4105
4131
|
}
|
|
4106
4132
|
connectedCallback() {
|
|
4107
4133
|
let e = this.getRootNode();
|
|
4108
4134
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4109
4135
|
var t, n, r;
|
|
4110
|
-
p(
|
|
4136
|
+
p(X, this, e.querySelector("vindral-controller")), (t = h(X, this)) == null || t.connectListener(this), p(Oc, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area")), (r = h(Oc, this)) == null || r.addEventListener("click", h(Mc, this));
|
|
4111
4137
|
let s = this.hasAttribute("touch-enabled");
|
|
4112
|
-
if (p(
|
|
4138
|
+
if (p(jc, this, se() && s), !h(jc, this)) this.setAttribute("snap", "");
|
|
4113
4139
|
else {
|
|
4114
4140
|
var i, a, o;
|
|
4115
|
-
(i = h(
|
|
4141
|
+
(i = h(X, this)) == null || i.addEventListener("touchstart", this, { passive: !0 }), (a = h(X, this)) == null || a.addEventListener("touchmove", this, { passive: !1 }), (o = h(X, this)) == null || o.addEventListener("touchend", this, { passive: !0 });
|
|
4116
4142
|
}
|
|
4117
|
-
this.addEventListener("scroll", h(
|
|
4143
|
+
this.addEventListener("scroll", h(Pc, this));
|
|
4118
4144
|
}
|
|
4119
4145
|
}
|
|
4120
4146
|
disconnectedCallback() {
|
|
4121
4147
|
var e, t, n, r, i;
|
|
4122
|
-
(e = h(
|
|
4148
|
+
(e = h(Oc, this)) == null || e.removeEventListener("click", h(Mc, this)), this.removeEventListener("scroll", h(Pc, this)), (t = h(X, this)) == null || t.removeEventListener("touchstart", this), (n = h(X, this)) == null || n.removeEventListener("touchmove", this), (r = h(X, this)) == null || r.removeEventListener("touchend", this), (i = h(X, this)) == null || i.disconnectListener(this);
|
|
4123
4149
|
}
|
|
4124
4150
|
attributeChangedCallback(e, t, n) {
|
|
4125
|
-
if (t !== n && (e === g.USER_INTERACTING && n === null && m(Z, this,
|
|
4151
|
+
if (t !== n && (e === g.USER_INTERACTING && n === null && m(Z, this, Vc).call(this) && setTimeout(() => {
|
|
4126
4152
|
this.open = !1;
|
|
4127
4153
|
}, 300), e === "open")) if (n !== null) {
|
|
4128
4154
|
var r;
|
|
4129
|
-
p(
|
|
4130
|
-
top: (r = h(
|
|
4155
|
+
p(kc, this, !1), this.scrollTop > 0 && m(Z, this, Jc).call(this), this.scrollTo({
|
|
4156
|
+
top: (r = h(Oc, this)) == null ? void 0 : r.clientHeight,
|
|
4131
4157
|
behavior: "smooth"
|
|
4132
4158
|
});
|
|
4133
|
-
} else m(Z, this,
|
|
4159
|
+
} else m(Z, this, Kc).call(this);
|
|
4134
4160
|
}
|
|
4135
4161
|
set open(e) {
|
|
4136
4162
|
if (e) {
|
|
4137
4163
|
this.setAttribute("open", "");
|
|
4138
4164
|
return;
|
|
4139
4165
|
}
|
|
4140
|
-
let t = this.hasAttribute("open"), n = this.visible || m(Z, this,
|
|
4141
|
-
t ? this.removeAttribute("open") : n ? m(Z, this,
|
|
4166
|
+
let t = this.hasAttribute("open"), n = this.visible || m(Z, this, Vc).call(this);
|
|
4167
|
+
t ? this.removeAttribute("open") : n ? m(Z, this, Kc).call(this) : (p(kc, this, !1), this.removeAttribute("snap-touch"));
|
|
4142
4168
|
}
|
|
4143
4169
|
get open() {
|
|
4144
4170
|
return this.hasAttribute("open");
|
|
@@ -4150,125 +4176,125 @@ var wc = /* @__PURE__ */ new WeakMap(), Tc = /* @__PURE__ */ new WeakMap(), Ec =
|
|
|
4150
4176
|
return this.hasAttribute("visible");
|
|
4151
4177
|
}
|
|
4152
4178
|
};
|
|
4153
|
-
function
|
|
4154
|
-
return m(Z, this,
|
|
4179
|
+
function Ic() {
|
|
4180
|
+
return m(Z, this, Bc).call(this) || m(Z, this, Wc).call(this) || m(Z, this, Vc).call(this);
|
|
4155
4181
|
}
|
|
4156
|
-
function
|
|
4182
|
+
function Lc(e) {
|
|
4157
4183
|
let t = e.touches[0];
|
|
4158
|
-
t && (p(
|
|
4184
|
+
t && (p(Ac, this, m(Z, this, Ic).call(this)), h(Ac, this) && (p(kc, this, !1), p(Nc, this, t.clientY)));
|
|
4159
4185
|
}
|
|
4160
|
-
function
|
|
4161
|
-
if (!(!h(
|
|
4162
|
-
let t = e.touches[0].clientY, n = h(
|
|
4186
|
+
function Rc(e) {
|
|
4187
|
+
if (!(!h(Ac, this) || h(Nc, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4188
|
+
let t = e.touches[0].clientY, n = h(Nc, this) - t;
|
|
4163
4189
|
this.scrollTop = Math.max(0, n);
|
|
4164
4190
|
}
|
|
4165
4191
|
}
|
|
4166
|
-
function
|
|
4167
|
-
h(
|
|
4192
|
+
function zc(e) {
|
|
4193
|
+
h(Ac, this) && !h(kc, this) && m(Z, this, Vc).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), p(Nc, this, null), p(Ac, this, !1);
|
|
4168
4194
|
}
|
|
4169
|
-
function
|
|
4195
|
+
function Bc() {
|
|
4170
4196
|
return this.hasAttribute(g.USER_INTERACTING);
|
|
4171
4197
|
}
|
|
4172
|
-
function
|
|
4198
|
+
function Vc() {
|
|
4173
4199
|
return this.scrollTop > 0;
|
|
4174
4200
|
}
|
|
4175
|
-
function
|
|
4201
|
+
function Hc() {
|
|
4176
4202
|
var e;
|
|
4177
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = h(
|
|
4203
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = h(Oc, this)) == null ? void 0 : e.clientHeight);
|
|
4178
4204
|
}
|
|
4179
|
-
function
|
|
4205
|
+
function Uc() {
|
|
4180
4206
|
var e;
|
|
4181
|
-
let t = (e = h(
|
|
4207
|
+
let t = (e = h(Oc, this)) == null ? void 0 : e.clientHeight;
|
|
4182
4208
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4183
4209
|
}
|
|
4184
|
-
function
|
|
4210
|
+
function Wc() {
|
|
4185
4211
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4186
|
-
return Number.isNaN(t) ? m(Z, this,
|
|
4212
|
+
return Number.isNaN(t) ? m(Z, this, Uc).call(this) > 0 : t > 0;
|
|
4187
4213
|
}
|
|
4188
|
-
function
|
|
4214
|
+
function Gc() {
|
|
4189
4215
|
let e = this.style.scrollBehavior;
|
|
4190
4216
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4191
4217
|
top: 0,
|
|
4192
4218
|
behavior: "auto"
|
|
4193
4219
|
}), this.style.scrollBehavior = e;
|
|
4194
4220
|
}
|
|
4195
|
-
function
|
|
4196
|
-
p(
|
|
4221
|
+
function Kc() {
|
|
4222
|
+
p(kc, this, !0), this.removeAttribute("snap-touch"), m(Z, this, Yc).call(this), this.scrollTo({
|
|
4197
4223
|
top: 0,
|
|
4198
4224
|
behavior: "smooth"
|
|
4199
4225
|
});
|
|
4200
4226
|
}
|
|
4201
|
-
function
|
|
4202
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), p(
|
|
4227
|
+
function qc(e = !1) {
|
|
4228
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), p(kc, this, !1), m(Z, this, Yc).call(this);
|
|
4203
4229
|
}
|
|
4204
|
-
function
|
|
4230
|
+
function Jc() {
|
|
4205
4231
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(v.LOCK_UI, {
|
|
4206
4232
|
bubbles: !0,
|
|
4207
4233
|
composed: !0
|
|
4208
4234
|
})));
|
|
4209
4235
|
}
|
|
4210
|
-
function
|
|
4236
|
+
function Yc() {
|
|
4211
4237
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(v.UNLOCK_UI, {
|
|
4212
4238
|
bubbles: !0,
|
|
4213
4239
|
composed: !0
|
|
4214
4240
|
})));
|
|
4215
4241
|
}
|
|
4216
|
-
e(
|
|
4242
|
+
e(Fc, "observedAttributes", [
|
|
4217
4243
|
g.USER_INTERACTING,
|
|
4218
4244
|
"open",
|
|
4219
4245
|
"touch-enabled"
|
|
4220
4246
|
]);
|
|
4221
4247
|
//#endregion
|
|
4222
4248
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4223
|
-
var
|
|
4224
|
-
|
|
4225
|
-
var Q = /* @__PURE__ */ new WeakMap(),
|
|
4249
|
+
var Xc = 1e3, Zc = 8, Qc = document.createElement("template");
|
|
4250
|
+
Qc.innerHTML = "\n <style>\n :host {\n --buffered: 0;\n --vindral-range-thickness: 3px;\n --vindral-range-hover-thickness: 5px;\n --vindral-range-thumb-size: 10px;\n --vindral-range-thumb-hover-size: 15px;\n --vindral-range-fill-color: linear-gradient(\n 90deg,\n #03a9f4 0%,\n #03a9f4 calc(100% - min(20%, 150px)),\n #b3e5fc 100%\n );\n --vindral-range-thumb-color: #03a9f4;\n display: var(--seek-bar-display);\n position: relative;\n }\n\n :host([data-no-duration]) {\n display: none;\n }\n\n #hover-preview {\n position: absolute;\n background-color: rgba(255, 255, 255, 0.6);\n opacity: 0;\n pointer-events: none;\n z-index: 1;\n }\n\n #time-tooltip {\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%) translateY(-8px);\n background: rgba(0, 0, 0, 0.8);\n color: white;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s;\n z-index: 10;\n }\n\n @media (hover: none) {\n #time-tooltip {\n display: none;\n }\n }\n\n #markers {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 2;\n }\n\n .marker {\n position: absolute;\n top: calc(50% - var(--vindral-seek-bar-marker-size, 6px) / 2);\n width: var(--vindral-seek-bar-marker-size, 6px);\n height: var(--vindral-seek-bar-marker-size, 6px);\n border-radius: 50%;\n transform: translateX(-50%);\n background: var(--vindral-seek-bar-marker-color, #ffffff);\n }\n </style>\n\n <div id=\"buffered-track\"></div>\n <div id=\"hover-preview\"></div>\n <div id=\"markers\"></div>\n <div id=\"time-tooltip\"></div>\n";
|
|
4251
|
+
var Q = /* @__PURE__ */ new WeakMap(), $c = /* @__PURE__ */ new WeakMap(), el = /* @__PURE__ */ new WeakMap(), tl = /* @__PURE__ */ new WeakMap(), nl = /* @__PURE__ */ new WeakMap(), rl = /* @__PURE__ */ new WeakMap(), il = /* @__PURE__ */ new WeakMap(), al = /* @__PURE__ */ new WeakMap(), ol = /* @__PURE__ */ new WeakMap(), sl = /* @__PURE__ */ new WeakMap(), cl = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), ll = /* @__PURE__ */ new WeakMap(), ul = /* @__PURE__ */ new WeakMap(), dl = /* @__PURE__ */ new WeakMap(), fl = /* @__PURE__ */ new WeakMap(), pl = /* @__PURE__ */ new WeakMap(), ml = /* @__PURE__ */ new WeakMap(), hl = class extends _i {
|
|
4226
4252
|
constructor() {
|
|
4227
4253
|
var e, t, n, r;
|
|
4228
|
-
super(), S(this, $), f(this, Q, void 0), f(this,
|
|
4229
|
-
if (!m($, this,
|
|
4254
|
+
super(), S(this, $), f(this, Q, void 0), f(this, $c, void 0), f(this, el, void 0), f(this, tl, void 0), f(this, nl, []), f(this, rl, null), f(this, il, !1), f(this, al, null), f(this, ol, null), f(this, sl, !1), f(this, cl, !1), f(this, ll, (e) => {
|
|
4255
|
+
if (!m($, this, vl).call(this) || m($, this, yl).call(this)) {
|
|
4230
4256
|
e.preventDefault();
|
|
4231
4257
|
return;
|
|
4232
4258
|
}
|
|
4233
|
-
p(
|
|
4259
|
+
p(il, this, !0), p(ol, this, e.pointerId);
|
|
4234
4260
|
try {
|
|
4235
4261
|
this.setPointerCapture(e.pointerId);
|
|
4236
4262
|
} catch (e) {}
|
|
4237
|
-
m($, this,
|
|
4238
|
-
}), f(this,
|
|
4239
|
-
if (!(!m($, this,
|
|
4240
|
-
if (h(
|
|
4241
|
-
e.preventDefault(), m($, this,
|
|
4263
|
+
m($, this, Dl).call(this, e);
|
|
4264
|
+
}), f(this, ul, (e) => {
|
|
4265
|
+
if (!(!m($, this, vl).call(this) || m($, this, yl).call(this))) {
|
|
4266
|
+
if (h(al, this) && (cancelAnimationFrame(h(al, this)), p(al, this, null)), h(il, this) && e.pointerId === h(ol, this)) {
|
|
4267
|
+
e.preventDefault(), m($, this, Dl).call(this, e);
|
|
4242
4268
|
return;
|
|
4243
4269
|
}
|
|
4244
|
-
p(
|
|
4270
|
+
p(al, this, requestAnimationFrame(() => {
|
|
4245
4271
|
var t;
|
|
4246
|
-
if (e.pointerType !== "mouse" || h(
|
|
4247
|
-
h(
|
|
4272
|
+
if (e.pointerType !== "mouse" || h(il, this) || !this.duration) {
|
|
4273
|
+
h(el, this).style.opacity = "0", p(al, this, null);
|
|
4248
4274
|
return;
|
|
4249
4275
|
}
|
|
4250
|
-
let n = m($, this,
|
|
4251
|
-
if (m($, this,
|
|
4276
|
+
let n = m($, this, El).call(this, e.clientX), r = m($, this, wl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4277
|
+
if (m($, this, kl).call(this, i, r), i > this.range.valueAsNumber) {
|
|
4252
4278
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4253
|
-
h(
|
|
4254
|
-
} else h(
|
|
4255
|
-
p(
|
|
4279
|
+
h(el, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, h(el, this).style.opacity = "1";
|
|
4280
|
+
} else h(el, this).style.opacity = "0";
|
|
4281
|
+
p(al, this, null);
|
|
4256
4282
|
}));
|
|
4257
4283
|
}
|
|
4258
|
-
}), f(this,
|
|
4259
|
-
if (e.pointerId === h(
|
|
4284
|
+
}), f(this, dl, (e) => {
|
|
4285
|
+
if (e.pointerId === h(ol, this)) {
|
|
4260
4286
|
try {
|
|
4261
4287
|
this.releasePointerCapture(e.pointerId);
|
|
4262
4288
|
} catch (e) {}
|
|
4263
|
-
p(
|
|
4289
|
+
p(il, this, !1), p(ol, this, null), e.pointerType !== "mouse" && (h($c, this).style.opacity = "0"), h(cl, this) && m($, this, Ml).call(this) && (p(sl, this, !1), p(cl, this, !1));
|
|
4264
4290
|
}
|
|
4265
|
-
}), f(this,
|
|
4266
|
-
this.duration && !m($, this,
|
|
4267
|
-
}), f(this,
|
|
4268
|
-
h(
|
|
4269
|
-
}), f(this,
|
|
4270
|
-
if (m($, this,
|
|
4271
|
-
let t = m($, this,
|
|
4291
|
+
}), f(this, fl, () => {
|
|
4292
|
+
this.duration && !m($, this, yl).call(this) && (h($c, this).style.opacity = "1");
|
|
4293
|
+
}), f(this, pl, () => {
|
|
4294
|
+
h($c, this).style.opacity = "0", h(el, this).style.opacity = "0";
|
|
4295
|
+
}), f(this, ml, (e) => {
|
|
4296
|
+
if (m($, this, yl).call(this) || !h(Q, this) || h(Q, this) <= 0 || !Number.isFinite(h(Q, this))) return;
|
|
4297
|
+
let t = m($, this, gl).call(this);
|
|
4272
4298
|
if (t <= 0) return;
|
|
4273
4299
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4274
4300
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4276,46 +4302,46 @@ var Q = /* @__PURE__ */ new WeakMap(), Xc = /* @__PURE__ */ new WeakMap(), Zc =
|
|
|
4276
4302
|
r = Math.max(0, n - 5);
|
|
4277
4303
|
break;
|
|
4278
4304
|
case "ArrowRight":
|
|
4279
|
-
if (m($, this,
|
|
4305
|
+
if (m($, this, Ml).call(this)) return;
|
|
4280
4306
|
r = Math.min(t, n + 5);
|
|
4281
4307
|
break;
|
|
4282
4308
|
case "Home":
|
|
4283
4309
|
r = 0;
|
|
4284
4310
|
break;
|
|
4285
4311
|
case "End":
|
|
4286
|
-
if (m($, this,
|
|
4312
|
+
if (m($, this, Ml).call(this)) return;
|
|
4287
4313
|
r = t;
|
|
4288
4314
|
break;
|
|
4289
4315
|
default: return;
|
|
4290
4316
|
}
|
|
4291
4317
|
let i = Math.min(r / t, 1);
|
|
4292
|
-
m($, this,
|
|
4293
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4318
|
+
m($, this, Ol).call(this, i);
|
|
4319
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Qc.content.cloneNode(!0)), p($c, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), p(el, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), p(tl, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), this.addEventListener("pointerdown", h(ll, this)), this.addEventListener("pointermove", h(ul, this)), this.addEventListener("pointerup", h(dl, this)), this.addEventListener("pointercancel", h(dl, this)), this.addEventListener("mouseenter", h(fl, this)), this.addEventListener("mouseleave", h(pl, this));
|
|
4294
4320
|
}
|
|
4295
4321
|
connectedCallback() {
|
|
4296
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), m($, this,
|
|
4322
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), m($, this, Tl).call(this), this.addEventListener("keydown", h(ml, this)), m($, this, Ml).call(this) && (this.range.value = "1", m($, this, Tl).call(this)), m($, this, bl).call(this), m($, this, Sl).call(this);
|
|
4297
4323
|
}
|
|
4298
4324
|
disconnectedCallback() {
|
|
4299
|
-
super.disconnectedCallback(), m($, this,
|
|
4325
|
+
super.disconnectedCallback(), m($, this, Cl).call(this), this.removeEventListener("pointerdown", h(ll, this)), this.removeEventListener("pointermove", h(ul, this)), this.removeEventListener("pointerup", h(dl, this)), this.removeEventListener("pointercancel", h(dl, this)), this.removeEventListener("mouseenter", h(fl, this)), this.removeEventListener("mouseleave", h(pl, this)), this.removeEventListener("keydown", h(ml, this)), p(ol, this, null);
|
|
4300
4326
|
}
|
|
4301
4327
|
attributeChangedCallback(e, t, n) {
|
|
4302
4328
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4303
4329
|
case g.TIMESHIFT_POSITION:
|
|
4304
|
-
if (m($, this,
|
|
4305
|
-
h(
|
|
4330
|
+
if (m($, this, Ml).call(this)) {
|
|
4331
|
+
h(il, this) ? p(cl, this, !0) : (p(sl, this, !1), p(cl, this, !1)), this.range.value = "1", m($, this, Tl).call(this);
|
|
4306
4332
|
return;
|
|
4307
4333
|
}
|
|
4308
4334
|
if (h(Q, this)) {
|
|
4309
|
-
p(
|
|
4335
|
+
p(cl, this, !1);
|
|
4310
4336
|
let e = Math.max(parseFloat(n) / h(Q, this), 0);
|
|
4311
|
-
this.range.value = e.toString(), m($, this,
|
|
4337
|
+
this.range.value = e.toString(), m($, this, Tl).call(this);
|
|
4312
4338
|
}
|
|
4313
4339
|
break;
|
|
4314
4340
|
case g.DURATION:
|
|
4315
|
-
p(Q, this, parseFloat(n) || 0), m($, this,
|
|
4341
|
+
p(Q, this, parseFloat(n) || 0), m($, this, Tl).call(this), m($, this, bl).call(this), m($, this, Sl).call(this);
|
|
4316
4342
|
break;
|
|
4317
4343
|
case g.TIMELINE_MARKERS:
|
|
4318
|
-
p(
|
|
4344
|
+
p(nl, this, Pr(n)), m($, this, bl).call(this), m($, this, Sl).call(this);
|
|
4319
4345
|
break;
|
|
4320
4346
|
}
|
|
4321
4347
|
}
|
|
@@ -4333,54 +4359,54 @@ var Q = /* @__PURE__ */ new WeakMap(), Xc = /* @__PURE__ */ new WeakMap(), Zc =
|
|
|
4333
4359
|
this.setAttribute(g.DURATION, e.toString());
|
|
4334
4360
|
}
|
|
4335
4361
|
};
|
|
4336
|
-
function
|
|
4362
|
+
function gl() {
|
|
4337
4363
|
return h(Q, this) ? h(Q, this) : 1;
|
|
4338
4364
|
}
|
|
4339
|
-
function
|
|
4365
|
+
function _l() {
|
|
4340
4366
|
let e = h(Q, this);
|
|
4341
4367
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4342
4368
|
}
|
|
4343
|
-
function
|
|
4344
|
-
return m($, this,
|
|
4369
|
+
function vl() {
|
|
4370
|
+
return m($, this, _l).call(this) !== void 0;
|
|
4345
4371
|
}
|
|
4346
|
-
function
|
|
4347
|
-
return h(
|
|
4372
|
+
function yl() {
|
|
4373
|
+
return h(sl, this);
|
|
4348
4374
|
}
|
|
4349
|
-
function
|
|
4375
|
+
function bl() {
|
|
4350
4376
|
var e;
|
|
4351
|
-
let t = Date.now(), n = (e = h(Q, this)) == null ? 0 : e, r = h(
|
|
4352
|
-
for (let e of h(
|
|
4353
|
-
let a =
|
|
4377
|
+
let t = Date.now(), n = (e = h(Q, this)) == null ? 0 : e, r = h(tl, this).children, i = 0;
|
|
4378
|
+
for (let e of h(nl, this)) {
|
|
4379
|
+
let a = Fr(e.time, t, n);
|
|
4354
4380
|
if (a === null) continue;
|
|
4355
4381
|
let o = r[i];
|
|
4356
|
-
o || (o = document.createElement("div"), o.className = "marker", h(
|
|
4382
|
+
o || (o = document.createElement("div"), o.className = "marker", h(tl, 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++;
|
|
4357
4383
|
}
|
|
4358
|
-
for (; h(
|
|
4384
|
+
for (; h(tl, this).children.length > i;) {
|
|
4359
4385
|
var a;
|
|
4360
|
-
(a = h(
|
|
4386
|
+
(a = h(tl, this).lastElementChild) == null || a.remove();
|
|
4361
4387
|
}
|
|
4362
4388
|
}
|
|
4363
|
-
function
|
|
4364
|
-
let e = m($, this,
|
|
4389
|
+
function xl() {
|
|
4390
|
+
let e = m($, this, _l).call(this);
|
|
4365
4391
|
if (e === void 0) return !1;
|
|
4366
4392
|
let t = Date.now() - e * 1e3;
|
|
4367
|
-
return h(
|
|
4393
|
+
return h(nl, this).some((e) => e.time >= t);
|
|
4368
4394
|
}
|
|
4369
|
-
function
|
|
4370
|
-
this.isConnected && m($, this,
|
|
4371
|
-
m($, this,
|
|
4372
|
-
},
|
|
4395
|
+
function Sl() {
|
|
4396
|
+
this.isConnected && m($, this, xl).call(this) ? h(rl, this) === null && p(rl, this, window.setInterval(() => {
|
|
4397
|
+
m($, this, bl).call(this), m($, this, Sl).call(this);
|
|
4398
|
+
}, Xc)) : m($, this, Cl).call(this);
|
|
4373
4399
|
}
|
|
4374
|
-
function
|
|
4375
|
-
h(
|
|
4400
|
+
function Cl() {
|
|
4401
|
+
h(rl, this) !== null && (window.clearInterval(h(rl, this)), p(rl, this, null));
|
|
4376
4402
|
}
|
|
4377
|
-
function
|
|
4378
|
-
if (h(
|
|
4403
|
+
function wl(e) {
|
|
4404
|
+
if (h(nl, this).length === 0 || !h(Q, this)) return null;
|
|
4379
4405
|
let t = this.getBoundingClientRect().width;
|
|
4380
4406
|
if (!t) return null;
|
|
4381
|
-
let n =
|
|
4382
|
-
for (let t of h(
|
|
4383
|
-
let a =
|
|
4407
|
+
let n = Zc / t, r = Date.now(), i = null;
|
|
4408
|
+
for (let t of h(nl, this)) {
|
|
4409
|
+
let a = Fr(t.time, r, h(Q, this));
|
|
4384
4410
|
if (a === null) continue;
|
|
4385
4411
|
let o = Math.abs(a - e);
|
|
4386
4412
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4390,59 +4416,59 @@ function xl(e) {
|
|
|
4390
4416
|
}
|
|
4391
4417
|
return i;
|
|
4392
4418
|
}
|
|
4393
|
-
function
|
|
4394
|
-
let e = m($, this,
|
|
4395
|
-
!h(Q, this) || h(Q, this) <= 0 || !Number.isFinite(h(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), h(
|
|
4419
|
+
function Tl() {
|
|
4420
|
+
let e = m($, this, gl).call(this);
|
|
4421
|
+
!h(Q, this) || h(Q, this) <= 0 || !Number.isFinite(h(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), h(il, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${m($, this, Nl).call(this, this.range.valueAsNumber * e)} of ${m($, this, Nl).call(this, e)}`), !h(il, this) && !m($, this, yl).call(this) && m($, this, jl).call(this, this.range.valueAsNumber));
|
|
4396
4422
|
}
|
|
4397
|
-
function
|
|
4423
|
+
function El(e) {
|
|
4398
4424
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4399
4425
|
return Math.max(0, Math.min(1, n));
|
|
4400
4426
|
}
|
|
4401
|
-
function
|
|
4427
|
+
function Dl(e) {
|
|
4402
4428
|
var t;
|
|
4403
|
-
let n = m($, this,
|
|
4404
|
-
m($, this,
|
|
4429
|
+
let n = m($, this, El).call(this, e.clientX), r = m($, this, wl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4430
|
+
m($, this, kl).call(this, i, r), h(il, this) || (h($c, this).style.opacity = "1"), m($, this, Ol).call(this, i);
|
|
4405
4431
|
}
|
|
4406
|
-
function
|
|
4407
|
-
if (m($, this,
|
|
4408
|
-
let t = e * m($, this,
|
|
4409
|
-
this.range.value = e.toString(), this.updateBar(), m($, this,
|
|
4432
|
+
function Ol(e) {
|
|
4433
|
+
if (m($, this, yl).call(this) || m($, this, jl).call(this, e)) return;
|
|
4434
|
+
let t = e * m($, this, gl).call(this);
|
|
4435
|
+
this.range.value = e.toString(), this.updateBar(), m($, this, Al).call(this, t);
|
|
4410
4436
|
}
|
|
4411
|
-
function
|
|
4437
|
+
function kl(e, t) {
|
|
4412
4438
|
if (!h(Q, this) || !Number.isFinite(h(Q, this))) return;
|
|
4413
|
-
let n = e * h(Q, this), r = h(Q, this) - n, i = `-${m($, this,
|
|
4414
|
-
h(
|
|
4439
|
+
let n = e * h(Q, this), r = h(Q, this) - n, i = `-${m($, this, Nl).call(this, r)}`;
|
|
4440
|
+
h($c, this).textContent = t ? `${t.marker.label}: ${i}` : i, h($c, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4415
4441
|
}
|
|
4416
|
-
function
|
|
4442
|
+
function Al(e) {
|
|
4417
4443
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4418
4444
|
bubbles: !0,
|
|
4419
4445
|
composed: !0,
|
|
4420
4446
|
detail: e
|
|
4421
4447
|
}));
|
|
4422
4448
|
}
|
|
4423
|
-
function
|
|
4424
|
-
return h(
|
|
4449
|
+
function jl(e) {
|
|
4450
|
+
return h(sl, this) || m($, this, Ml).call(this) || e < .999 ? !1 : (p(sl, this, !0), p(cl, this, !1), this.dispatchEvent(new CustomEvent(v.GO_LIVE, {
|
|
4425
4451
|
bubbles: !0,
|
|
4426
4452
|
composed: !0
|
|
4427
4453
|
})), !0);
|
|
4428
4454
|
}
|
|
4429
|
-
function
|
|
4455
|
+
function Ml() {
|
|
4430
4456
|
return !this.hasAttribute(g.TIMESHIFT_POSITION);
|
|
4431
4457
|
}
|
|
4432
|
-
function
|
|
4458
|
+
function Nl(e) {
|
|
4433
4459
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4434
4460
|
return h(Q, this) && h(Q, this) >= 3600 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
|
|
4435
4461
|
}
|
|
4436
|
-
e(
|
|
4437
|
-
...
|
|
4462
|
+
e(hl, "observedAttributes", [
|
|
4463
|
+
..._i.observedAttributes,
|
|
4438
4464
|
g.TIMESHIFT_POSITION,
|
|
4439
4465
|
g.DURATION,
|
|
4440
4466
|
g.TIMELINE_MARKERS
|
|
4441
4467
|
]);
|
|
4442
4468
|
//#endregion
|
|
4443
4469
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4444
|
-
var
|
|
4445
|
-
|
|
4470
|
+
var Pl = document.createElement("template");
|
|
4471
|
+
Pl.innerHTML = `
|
|
4446
4472
|
<style>
|
|
4447
4473
|
:host {
|
|
4448
4474
|
display: var(--play-overlay-display);
|
|
@@ -4502,51 +4528,51 @@ jl.innerHTML = `
|
|
|
4502
4528
|
</slot>
|
|
4503
4529
|
</slot>
|
|
4504
4530
|
`;
|
|
4505
|
-
var
|
|
4531
|
+
var Fl = /* @__PURE__ */ new WeakMap(), Il = /* @__PURE__ */ new WeakMap(), Ll = /* @__PURE__ */ new WeakMap(), Rl = /* @__PURE__ */ new WeakMap(), zl = class extends HTMLElement {
|
|
4506
4532
|
constructor() {
|
|
4507
|
-
super(), f(this,
|
|
4533
|
+
super(), f(this, Fl, null), f(this, Il, () => {
|
|
4508
4534
|
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4509
4535
|
bubbles: !0,
|
|
4510
4536
|
composed: !0
|
|
4511
4537
|
}));
|
|
4512
|
-
}), f(this,
|
|
4538
|
+
}), f(this, Ll, (e) => {
|
|
4513
4539
|
let { key: t } = e;
|
|
4514
4540
|
if (!this.keysUsed.includes(t)) {
|
|
4515
|
-
this.removeEventListener("keyup", h(
|
|
4541
|
+
this.removeEventListener("keyup", h(Ll, this));
|
|
4516
4542
|
return;
|
|
4517
4543
|
}
|
|
4518
4544
|
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4519
4545
|
bubbles: !0,
|
|
4520
4546
|
composed: !0
|
|
4521
4547
|
}));
|
|
4522
|
-
}), f(this,
|
|
4548
|
+
}), f(this, Rl, (e) => {
|
|
4523
4549
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4524
4550
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4525
|
-
this.removeEventListener("keyup", h(
|
|
4551
|
+
this.removeEventListener("keyup", h(Ll, this));
|
|
4526
4552
|
return;
|
|
4527
4553
|
}
|
|
4528
|
-
this.addEventListener("keyup", h(
|
|
4529
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4554
|
+
this.addEventListener("keyup", h(Ll, this), { once: !0 });
|
|
4555
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Pl.content.cloneNode(!0));
|
|
4530
4556
|
}
|
|
4531
4557
|
get keysUsed() {
|
|
4532
4558
|
return ["Enter", " "];
|
|
4533
4559
|
}
|
|
4534
4560
|
connectedCallback() {
|
|
4535
4561
|
var e;
|
|
4536
|
-
p(
|
|
4562
|
+
p(Fl, this, this.closest("vindral-controller")), (e = h(Fl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4537
4563
|
}
|
|
4538
4564
|
enable() {
|
|
4539
|
-
this.addEventListener("click", h(
|
|
4565
|
+
this.addEventListener("click", h(Il, this)), this.addEventListener("keydown", h(Rl, this)), this.tabIndex = 0;
|
|
4540
4566
|
}
|
|
4541
4567
|
disable() {
|
|
4542
|
-
this.removeEventListener("click", h(
|
|
4568
|
+
this.removeEventListener("click", h(Il, this)), this.removeEventListener("keydown", h(Rl, this)), this.removeEventListener("keyup", h(Ll, this)), this.tabIndex = -1;
|
|
4543
4569
|
}
|
|
4544
4570
|
disconnectedCallback() {
|
|
4545
4571
|
var e;
|
|
4546
|
-
(e = h(
|
|
4572
|
+
(e = h(Fl, this)) == null || e.disconnectListener(this), this.disable();
|
|
4547
4573
|
}
|
|
4548
4574
|
};
|
|
4549
|
-
e(
|
|
4575
|
+
e(zl, "observedAttributes", [
|
|
4550
4576
|
"hidden",
|
|
4551
4577
|
g.NEEDS_USER_INPUT_VIDEO,
|
|
4552
4578
|
g.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4554,88 +4580,88 @@ e(Il, "observedAttributes", [
|
|
|
4554
4580
|
]);
|
|
4555
4581
|
//#endregion
|
|
4556
4582
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4557
|
-
var
|
|
4558
|
-
|
|
4559
|
-
var
|
|
4583
|
+
var Bl = document.createElement("template");
|
|
4584
|
+
Bl.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";
|
|
4585
|
+
var Vl = class extends HTMLElement {
|
|
4560
4586
|
constructor() {
|
|
4561
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4587
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Bl.content.cloneNode(!0));
|
|
4562
4588
|
}
|
|
4563
4589
|
attributeChangedCallback(e, t, n) {
|
|
4564
4590
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4565
4591
|
}
|
|
4566
4592
|
};
|
|
4567
|
-
e(
|
|
4593
|
+
e(Vl, "observedAttributes", [
|
|
4568
4594
|
"backdrop",
|
|
4569
4595
|
"poster",
|
|
4570
4596
|
"disable-backdrop"
|
|
4571
4597
|
]);
|
|
4572
4598
|
//#endregion
|
|
4573
4599
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4574
|
-
var
|
|
4575
|
-
|
|
4576
|
-
var
|
|
4600
|
+
var Hl = document.createElement("template");
|
|
4601
|
+
Hl.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";
|
|
4602
|
+
var Ul = /* @__PURE__ */ new WeakMap(), Wl = /* @__PURE__ */ new WeakMap(), Gl = class extends HTMLElement {
|
|
4577
4603
|
constructor() {
|
|
4578
|
-
super(), f(this,
|
|
4604
|
+
super(), f(this, Ul, void 0), f(this, Wl, void 0);
|
|
4579
4605
|
let e = this.attachShadow({ mode: "open" });
|
|
4580
|
-
e.appendChild(
|
|
4606
|
+
e.appendChild(Hl.content.cloneNode(!0)), p(Ul, this, e.querySelector("#title")), p(Wl, this, e.querySelector("#description"));
|
|
4581
4607
|
}
|
|
4582
4608
|
connectedCallback() {
|
|
4583
4609
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4584
4610
|
}
|
|
4585
4611
|
attributeChangedCallback(e, t, n) {
|
|
4586
|
-
t !== n && (e === "title" ? h(
|
|
4612
|
+
t !== n && (e === "title" ? h(Ul, this).textContent = n : e === "description" && (h(Wl, this).textContent = n));
|
|
4587
4613
|
}
|
|
4588
4614
|
};
|
|
4589
|
-
e(
|
|
4615
|
+
e(Gl, "observedAttributes", [
|
|
4590
4616
|
"title",
|
|
4591
4617
|
"description",
|
|
4592
4618
|
"hidden"
|
|
4593
4619
|
]);
|
|
4594
4620
|
//#endregion
|
|
4595
4621
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4596
|
-
var
|
|
4597
|
-
|
|
4598
|
-
var
|
|
4622
|
+
var Kl = document.createElement("template");
|
|
4623
|
+
Kl.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";
|
|
4624
|
+
var ql = /* @__PURE__ */ new WeakMap(), Jl = class extends HTMLElement {
|
|
4599
4625
|
constructor() {
|
|
4600
|
-
super(), f(this,
|
|
4626
|
+
super(), f(this, ql, null), this.attachShadow({ mode: "open" }).appendChild(Kl.content.cloneNode(!0));
|
|
4601
4627
|
}
|
|
4602
4628
|
connectedCallback() {
|
|
4603
4629
|
var e;
|
|
4604
|
-
p(
|
|
4630
|
+
p(ql, this, this.closest("vindral-controller")), (e = h(ql, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
4605
4631
|
}
|
|
4606
4632
|
disconnectedCallback() {
|
|
4607
4633
|
var e;
|
|
4608
|
-
(e = h(
|
|
4634
|
+
(e = h(ql, this)) == null || e.disconnectListener(this);
|
|
4609
4635
|
}
|
|
4610
4636
|
attributeChangedCallback(e, t, n) {
|
|
4611
4637
|
t !== n && e === "hidden" && !_(n) && this.focus();
|
|
4612
4638
|
}
|
|
4613
4639
|
};
|
|
4614
|
-
e(
|
|
4640
|
+
e(Jl, "observedAttributes", ["hidden"]);
|
|
4615
4641
|
//#endregion
|
|
4616
4642
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
4617
|
-
var
|
|
4618
|
-
|
|
4619
|
-
var
|
|
4643
|
+
var Yl, Xl = document.createElement("template");
|
|
4644
|
+
Xl.innerHTML = "\n <style>\n :host {\n display: var(--volume-range-display);\n width: 80px;\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) {\n background: rgba(255, 255, 255, 0.15);\n }\n }\n\n :host(:active) {\n background: rgba(255, 255, 255, 0.25);\n }\n </style>\n";
|
|
4645
|
+
var Zl = (e) => `${Math.round(e * 100)}%`, Ql = /* @__PURE__ */ new WeakMap(), $l = class extends _i {
|
|
4620
4646
|
constructor() {
|
|
4621
4647
|
var e;
|
|
4622
|
-
super(), f(this,
|
|
4648
|
+
super(), f(this, Ql, () => {
|
|
4623
4649
|
let e = this.range.valueAsNumber;
|
|
4624
4650
|
this.dispatchEvent(new CustomEvent(v.SET_VOLUME, {
|
|
4625
4651
|
bubbles: !0,
|
|
4626
4652
|
composed: !0,
|
|
4627
4653
|
detail: e
|
|
4628
4654
|
}));
|
|
4629
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4655
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Xl.content.cloneNode(!0));
|
|
4630
4656
|
}
|
|
4631
4657
|
connectedCallback() {
|
|
4632
|
-
super.connectedCallback(), this.range.addEventListener("input", h(
|
|
4658
|
+
super.connectedCallback(), this.range.addEventListener("input", h(Ql, this)), this.range.setAttribute("aria-label", "volume");
|
|
4633
4659
|
}
|
|
4634
4660
|
disconnectedCallback() {
|
|
4635
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", h(
|
|
4661
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", h(Ql, this));
|
|
4636
4662
|
}
|
|
4637
4663
|
attributeChangedCallback(e, t, n) {
|
|
4638
|
-
super.attributeChangedCallback(e, t, n), (e === g.MUTED || e === g.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
4664
|
+
super.attributeChangedCallback(e, t, n), (e === g.MUTED || e === g.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Zl(this.range.valueAsNumber)), this.updateBar());
|
|
4639
4665
|
}
|
|
4640
4666
|
get volume() {
|
|
4641
4667
|
var e;
|
|
@@ -4645,15 +4671,15 @@ var Jl = (e) => `${Math.round(e * 100)}%`, Yl = /* @__PURE__ */ new WeakMap(), X
|
|
|
4645
4671
|
return this.hasAttribute(g.MUTED);
|
|
4646
4672
|
}
|
|
4647
4673
|
};
|
|
4648
|
-
|
|
4649
|
-
...b(
|
|
4674
|
+
Yl = $l, e($l, "observedAttributes", [
|
|
4675
|
+
...b(Yl, "observedAttributes", Yl),
|
|
4650
4676
|
g.MUTED,
|
|
4651
4677
|
g.VOLUME
|
|
4652
4678
|
]);
|
|
4653
4679
|
//#endregion
|
|
4654
4680
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4655
|
-
function
|
|
4656
|
-
customElements.define("vindral-controller",
|
|
4681
|
+
function eu() {
|
|
4682
|
+
customElements.define("vindral-controller", Sa), customElements.define("vindral-control-bar", Rn), customElements.define("vindral-advanced-rendition-menu", qe), customElements.define("vindral-advanced-rendition-menu-list", ot), customElements.define("vindral-play-button", is), customElements.define("vindral-mute-button", Qo), customElements.define("vindral-buffering-overlay", Nt), customElements.define("vindral-scroll-overlay", Fc), customElements.define("vindral-play-overlay", Jl), customElements.define("vindral-user-input-play-overlay", zl), customElements.define("vindral-fullscreen-button", po), customElements.define("vindral-rendition-levels-menu", cc), customElements.define("vindral-rendition-levels-menu-list", _c), customElements.define("vindral-channel-grid-button", jn), customElements.define("vindral-channel-grid", rn), customElements.define("vindral-channel-grid-item", qt), customElements.define("vindral-pip-button", ts), customElements.define("vindral-airplay-button", Et), customElements.define("vindral-cast-button", Lt), customElements.define("vindral-cast-overlay", Ut), customElements.define("vindral-buffering-icon", At), customElements.define("vindral-language-menu", vo), customElements.define("vindral-language-menu-list", No), customElements.define("vindral-center-overlay", Vl), customElements.define("vindral-message", Gl), customElements.define("vindral-volume-range", $l), customElements.define("vindral-poster-overlay", ec), customElements.define("vindral-player", Rs), customElements.define("vindral-seek-bar", hl), customElements.define("vindral-live-button", Yo);
|
|
4657
4683
|
}
|
|
4658
4684
|
//#endregion
|
|
4659
|
-
export {
|
|
4685
|
+
export { eu as t };
|