@vindral/web-sdk 4.8.1 → 4.8.2-1-gaf59eb9e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{BaDhuUsA.js → Bg5VLlmK.js} +13 -4
- package/{ClhqVgMJ.js → Bo90C4i_.js} +1073 -1033
- package/{DQ5kuB8C.js → CLvW8aae.js} +1 -1
- package/{ZUbKTiOB.js → DyoeX7Rz.js} +211 -212
- package/{DlCbtbuA.js → UL5Z8kzc.js} +2689 -2642
- package/cast-sender.d.ts +8 -2
- package/cast-sender.js +1 -1
- package/core.d.ts +9 -2
- package/core.js +1 -1
- package/legacy.d.ts +9 -2
- package/legacy.es.js +2813 -2757
- package/legacy.umd.js +16 -16
- package/package.json +1 -1
- package/player.d.ts +9 -2
- package/player.js +3 -3
- package/react.d.ts +9 -2
- package/vindral-player-component.js +2 -2
|
@@ -68,15 +68,15 @@ var re = "Adaptive around current target", v = [
|
|
|
68
68
|
value: 3e3,
|
|
69
69
|
description: "Maximum stability"
|
|
70
70
|
}
|
|
71
|
-
], ie = (e) => e <= 350 ? v[0] : e <= 800 ? v[1] : e <= 2e3 ? v[2] : v[3], ae = "vindral:debug-panel-layout:v1",
|
|
71
|
+
], ie = (e) => e <= 350 ? v[0] : e <= 800 ? v[1] : e <= 2e3 ? v[2] : v[3], ae = "vindral:debug-panel-layout:v1", y = [
|
|
72
72
|
"latency-section",
|
|
73
73
|
"quality-section",
|
|
74
74
|
"playback-section",
|
|
75
75
|
"network-section",
|
|
76
76
|
"stats-section",
|
|
77
77
|
"events-section"
|
|
78
|
-
],
|
|
79
|
-
|
|
78
|
+
], oe = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M18 6 6 18\"/>\n <path d=\"m6 6 12 12\"/>\n</svg>\n", se = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m9 18 6-6-6-6\"/>\n</svg>\n", ce = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m15 18-6-6 6-6\"/>\n</svg>\n", le = document.createElement("template");
|
|
79
|
+
le.innerHTML = `
|
|
80
80
|
<style>
|
|
81
81
|
:host {
|
|
82
82
|
--debug-overlay-controls-reserved-space: var(
|
|
@@ -815,8 +815,8 @@ ue.innerHTML = `
|
|
|
815
815
|
</button>
|
|
816
816
|
</div>
|
|
817
817
|
</div>
|
|
818
|
-
<button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${
|
|
819
|
-
<button class="close-btn" type="button" aria-label="Close debug panel">${
|
|
818
|
+
<button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${se}</button>
|
|
819
|
+
<button class="close-btn" type="button" aria-label="Close debug panel">${oe}</button>
|
|
820
820
|
</div>
|
|
821
821
|
|
|
822
822
|
<!-- Latency Section -->
|
|
@@ -1017,111 +1017,111 @@ ue.innerHTML = `
|
|
|
1017
1017
|
</div>
|
|
1018
1018
|
</div>
|
|
1019
1019
|
`;
|
|
1020
|
-
var
|
|
1020
|
+
var ue = le, b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), pe = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), be = class extends HTMLElement {
|
|
1021
1021
|
constructor() {
|
|
1022
|
-
super(), p(this,
|
|
1022
|
+
super(), p(this, K), n(this, b, null), n(this, x, []), n(this, S, 2 ** 53 - 1), n(this, C, !0), n(this, w, !0), n(this, T, null), n(this, E, 1500), n(this, D, 0), n(this, O, null), n(this, de, !1), n(this, k, []), n(this, A, 0), n(this, j, !1), n(this, M, null), n(this, N, /* @__PURE__ */ new Map()), n(this, P, []), n(this, F, []), n(this, I, []), n(this, fe, []), n(this, L, null), n(this, R, null), n(this, z, null), n(this, B, null), n(this, V, null), n(this, H, !1), n(this, U, null), n(this, W, null), n(this, G, null), n(this, pe, (e) => {
|
|
1023
1023
|
let t = e === "disconnected" ? "warn" : "info";
|
|
1024
|
-
i(
|
|
1024
|
+
i(K, this, $).call(this, "Connection", `State: ${e}`, t);
|
|
1025
|
+
}), n(this, me, (e) => {
|
|
1026
|
+
i(K, this, $).call(this, "Playback", `State: ${e}`);
|
|
1025
1027
|
}), n(this, he, (e) => {
|
|
1026
|
-
i(
|
|
1028
|
+
i(K, this, $).call(this, "Buffer", `${e}`, "warn");
|
|
1027
1029
|
}), n(this, ge, (e) => {
|
|
1028
|
-
i(G, this, $).call(this, "Buffer", `${e}`, "warn");
|
|
1029
|
-
}), n(this, _e, (e) => {
|
|
1030
1030
|
let t = e.isFatal() ? "Fatal" : "Non-fatal";
|
|
1031
|
-
i(
|
|
1032
|
-
}), n(this,
|
|
1031
|
+
i(K, this, $).call(this, "Error", `${t}: ${e.message} (${e.code()})`, e.isFatal() ? "error" : "warn");
|
|
1032
|
+
}), n(this, _e, (e) => {
|
|
1033
1033
|
let t = e.video;
|
|
1034
1034
|
if (t != null && t.width && t.height) {
|
|
1035
|
-
let e = i(
|
|
1036
|
-
i(
|
|
1035
|
+
let e = i(K, this, et).call(this, t.frameRate), n = e ? ` @ ${e}fps` : "";
|
|
1036
|
+
i(K, this, $).call(this, "Quality", `Rendition: ${t.width}x${t.height}${n}`);
|
|
1037
1037
|
}
|
|
1038
|
+
}), n(this, ve, (e) => {
|
|
1039
|
+
i(K, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
|
|
1038
1040
|
}), n(this, ye, (e) => {
|
|
1039
|
-
i(G, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
|
|
1040
|
-
}), n(this, be, (e) => {
|
|
1041
1041
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
1042
1042
|
n || r || i || t === "Escape" && (e.preventDefault(), e.stopPropagation(), this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
|
|
1043
1043
|
bubbles: !0,
|
|
1044
1044
|
composed: !0
|
|
1045
1045
|
})));
|
|
1046
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
1046
|
+
}), this.attachShadow({ mode: "open" }).appendChild(ue.content.cloneNode(!0));
|
|
1047
1047
|
}
|
|
1048
1048
|
connectedCallback() {
|
|
1049
1049
|
var e;
|
|
1050
|
-
r(
|
|
1050
|
+
r(b, this, this.closest("vindral-controller")), (e = a(b, this)) == null || e.connectListener(this), this.tabIndex = -1, i(K, this, we).call(this), i(K, this, Te).call(this), i(K, this, Ee).call(this), i(K, this, Re).call(this), i(K, this, Ye).call(this), i(K, this, Ot).call(this), i(K, this, St).call(this), i(K, this, qe).call(this), this.setAttribute("data-density", "compact"), i(K, this, je).call(this), i(K, this, Ie).call(this), i(K, this, Le).call(this), i(K, this, Et).call(this), i(K, this, ot).call(this), this.addEventListener("keydown", a(ye, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
|
|
1051
1051
|
}
|
|
1052
1052
|
disconnectedCallback() {
|
|
1053
1053
|
var e;
|
|
1054
|
-
(e = a(
|
|
1054
|
+
(e = a(b, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", a(ye, this)), i(K, this, it).call(this), i(K, this, st).call(this), i(K, this, Fe).call(this), a(N, this).clear();
|
|
1055
1055
|
}
|
|
1056
1056
|
attributeChangedCallback(e, t, n) {
|
|
1057
1057
|
if (t !== n) switch (e) {
|
|
1058
1058
|
case l.DEBUG_PANEL_OPEN:
|
|
1059
|
-
n === null ? i(
|
|
1059
|
+
n === null ? i(K, this, it).call(this) : (i(K, this, rt).call(this), this.focus({ preventScroll: !0 }));
|
|
1060
1060
|
break;
|
|
1061
1061
|
case l.TARGET_BUFFER_TIME:
|
|
1062
1062
|
if (n) {
|
|
1063
1063
|
let e = parseInt(n, 10);
|
|
1064
|
-
Number.isNaN(e) || (e !== a(
|
|
1064
|
+
Number.isNaN(e) || (e !== a(E, this) && i(K, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), r(E, this, e), i(K, this, Z).call(this));
|
|
1065
1065
|
}
|
|
1066
1066
|
break;
|
|
1067
1067
|
case l.DRIFT:
|
|
1068
1068
|
if (n) {
|
|
1069
1069
|
let e = parseFloat(n);
|
|
1070
|
-
Number.isNaN(e) || (r(
|
|
1070
|
+
Number.isNaN(e) || (r(D, this, e), i(K, this, Je).call(this));
|
|
1071
1071
|
}
|
|
1072
1072
|
break;
|
|
1073
1073
|
case l.RENDITION_LEVELS:
|
|
1074
1074
|
if (n) try {
|
|
1075
1075
|
let e = JSON.parse(n);
|
|
1076
|
-
Array.isArray(e) && (r(
|
|
1076
|
+
Array.isArray(e) && (r(x, this, e), i(K, this, $e).call(this));
|
|
1077
1077
|
} catch (e) {}
|
|
1078
1078
|
break;
|
|
1079
1079
|
case l.MAX_VIDEO_BITRATE:
|
|
1080
|
-
r(
|
|
1080
|
+
r(S, this, n ? parseInt(n, 10) : 2 ** 53 - 1), Number.isNaN(a(S, this)) && r(S, this, 2 ** 53 - 1), i(K, this, tt).call(this);
|
|
1081
1081
|
break;
|
|
1082
1082
|
case l.ABR_ENABLED:
|
|
1083
|
-
r(
|
|
1083
|
+
r(C, this, n !== null && n !== "false"), i(K, this, Ze).call(this), i(K, this, Qe).call(this);
|
|
1084
1084
|
break;
|
|
1085
1085
|
case l.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
1086
|
-
r(
|
|
1086
|
+
r(w, this, n !== null && n !== "false"), i(K, this, Qe).call(this);
|
|
1087
1087
|
break;
|
|
1088
1088
|
case l.RENDITION_LEVEL:
|
|
1089
1089
|
if (n) try {
|
|
1090
1090
|
var o;
|
|
1091
|
-
let e = JSON.parse(n), t = a(
|
|
1092
|
-
if (r(
|
|
1091
|
+
let e = JSON.parse(n), t = a(T, this);
|
|
1092
|
+
if (r(T, this, e), i(K, this, tt).call(this), t && (o = e.video) != null && o.width && e.video.height) {
|
|
1093
1093
|
let n = t.video ? `${t.video.width}x${t.video.height}` : "?", r = `${e.video.width}x${e.video.height}`;
|
|
1094
|
-
n !== r && i(
|
|
1094
|
+
n !== r && i(K, this, $).call(this, "Quality", `Switched: ${n} → ${r}`);
|
|
1095
1095
|
}
|
|
1096
1096
|
} catch (e) {}
|
|
1097
1097
|
break;
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
};
|
|
1101
|
-
function
|
|
1101
|
+
function q(e) {
|
|
1102
1102
|
if (!this.shadowRoot) return null;
|
|
1103
1103
|
if (a(N, this).has(e)) return a(N, this).get(e);
|
|
1104
1104
|
let t = this.shadowRoot.querySelector(e);
|
|
1105
1105
|
return a(N, this).set(e, t), t;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function J(e, t) {
|
|
1108
1108
|
!e || e.textContent === t || (e.textContent = t);
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1110
|
+
function xe() {
|
|
1111
1111
|
var e, t, n, i, o, s, c;
|
|
1112
|
-
r(P, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), r(F, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), r(
|
|
1112
|
+
r(P, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), r(F, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), r(I, this, Array.from(((n = this.shadowRoot) == null ? void 0 : n.querySelectorAll("#latency-strip-increase")) || [])), r(fe, this, Array.from(((i = this.shadowRoot) == null ? void 0 : i.querySelectorAll(".preset-btn[data-value]")) || [])), r(L, this, ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), r(R, this, ((s = a(L, this)) == null ? void 0 : s.querySelector(".dynamic-subtitle")) || null), r(z, this, ((c = a(L, this)) == null ? void 0 : c.querySelector(".dynamic-value")) || null);
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function Se(e) {
|
|
1115
1115
|
var t;
|
|
1116
1116
|
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
|
|
1117
1117
|
return !!n && !n.hidden;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function Ce() {
|
|
1120
1120
|
let e = `${a(k, this).length} event${a(k, this).length === 1 ? "" : "s"}`;
|
|
1121
|
-
i(
|
|
1121
|
+
i(K, this, J).call(this, a(V, this), e), i(K, this, Y).call(this, "events-section", String(a(k, this).length));
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1124
|
-
let e = i(
|
|
1123
|
+
function we() {
|
|
1124
|
+
let e = i(K, this, q).call(this, ".close-btn");
|
|
1125
1125
|
e == null || e.addEventListener("click", (e) => {
|
|
1126
1126
|
e.stopPropagation(), this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
|
|
1127
1127
|
bubbles: !0,
|
|
@@ -1129,87 +1129,86 @@ function Te() {
|
|
|
1129
1129
|
}));
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function Te() {
|
|
1133
1133
|
var e;
|
|
1134
1134
|
let t = Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []);
|
|
1135
1135
|
t.length !== 0 && t.forEach((e) => {
|
|
1136
1136
|
e.addEventListener("click", (t) => {
|
|
1137
1137
|
t.stopPropagation();
|
|
1138
1138
|
let n = e.getAttribute("data-target");
|
|
1139
|
-
n && i(
|
|
1139
|
+
n && i(K, this, X).call(this, n) && i(K, this, Oe).call(this, n);
|
|
1140
1140
|
});
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1144
|
-
r(
|
|
1145
|
-
if (e.stopPropagation(), !a(
|
|
1146
|
-
let { scrollLeft: t, scrollWidth: n, clientWidth: r } = a(
|
|
1147
|
-
a(
|
|
1143
|
+
function Ee() {
|
|
1144
|
+
r(U, this, i(K, this, q).call(this, ".scroll-tabs-btn")), r(W, this, i(K, this, q).call(this, ".section-tabs-wrap")), r(G, this, i(K, this, q).call(this, ".section-tabs")), !(!a(U, this) || !a(G, this) || !a(W, this)) && (a(G, this).addEventListener("scroll", () => i(K, this, De).call(this), { passive: !0 }), a(U, this).addEventListener("click", (e) => {
|
|
1145
|
+
if (e.stopPropagation(), !a(G, this)) return;
|
|
1146
|
+
let { scrollLeft: t, scrollWidth: n, clientWidth: r } = a(G, this), i = t + r >= n - 4;
|
|
1147
|
+
a(G, this).scrollTo({
|
|
1148
1148
|
left: i ? 0 : n,
|
|
1149
1149
|
behavior: "smooth"
|
|
1150
1150
|
});
|
|
1151
|
-
}), i(
|
|
1151
|
+
}), i(K, this, De).call(this));
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
if (!a(
|
|
1155
|
-
let { scrollLeft: e, scrollWidth: t, clientWidth: n } = a(
|
|
1156
|
-
a(
|
|
1153
|
+
function De() {
|
|
1154
|
+
if (!a(U, this) || !a(G, this) || !a(W, this)) return;
|
|
1155
|
+
let { scrollLeft: e, scrollWidth: t, clientWidth: n } = a(G, this), r = t > n + 4, i = e + n >= t - 4;
|
|
1156
|
+
a(U, this).setAttribute("data-visible", String(r)), a(U, this).innerHTML = i ? ce : se, r && !i ? a(W, this).setAttribute("data-can-scroll-right", "") : a(W, this).removeAttribute("data-can-scroll-right");
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1159
|
-
|
|
1160
|
-
t && i(G, this, Ae).call(this, e, t.hidden);
|
|
1158
|
+
function Oe(e) {
|
|
1159
|
+
i(K, this, ke).call(this, e, !i(K, this, Se).call(this, e));
|
|
1161
1160
|
}
|
|
1162
|
-
function
|
|
1163
|
-
let n = i(
|
|
1161
|
+
function ke(e, t) {
|
|
1162
|
+
let n = i(K, this, q).call(this, `.section#${e}`);
|
|
1164
1163
|
if (!n) return;
|
|
1165
1164
|
let r = !n.hidden;
|
|
1166
1165
|
n.hidden = !t;
|
|
1167
|
-
let o = i(
|
|
1168
|
-
o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !a(
|
|
1166
|
+
let o = i(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
|
|
1167
|
+
o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !a(de, this) && r !== t && i(K, this, Fe).call(this), e === "events-section" && t && a(H, this) && i(K, this, Et).call(this, !0), i(K, this, Ae).call(this));
|
|
1169
1168
|
}
|
|
1170
|
-
function
|
|
1171
|
-
i(
|
|
1169
|
+
function Ae() {
|
|
1170
|
+
i(K, this, Me).call(this).length === 0 ? this.setAttribute("data-collapsed", "") : this.removeAttribute("data-collapsed");
|
|
1172
1171
|
}
|
|
1173
|
-
function
|
|
1172
|
+
function je() {
|
|
1174
1173
|
var e;
|
|
1175
1174
|
Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).forEach((e) => {
|
|
1176
|
-
i(
|
|
1175
|
+
i(K, this, X).call(this, e.id) && i(K, this, ke).call(this, e.id, !e.hidden);
|
|
1177
1176
|
});
|
|
1178
1177
|
}
|
|
1179
|
-
function
|
|
1180
|
-
let n = i(
|
|
1178
|
+
function Y(e, t) {
|
|
1179
|
+
let n = i(K, this, q).call(this, `.section-badge[data-badge-for="${e}"]`);
|
|
1181
1180
|
if (!n) return;
|
|
1182
|
-
i(
|
|
1183
|
-
let r = i(
|
|
1181
|
+
i(K, this, J).call(this, n, t);
|
|
1182
|
+
let r = i(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
|
|
1184
1183
|
if (!r) return;
|
|
1185
1184
|
let a = `${r.getAttribute("title") || e} section (${t})`;
|
|
1186
1185
|
r.getAttribute("aria-label") !== a && r.setAttribute("aria-label", a);
|
|
1187
1186
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return
|
|
1187
|
+
function X(e) {
|
|
1188
|
+
return y.includes(e);
|
|
1190
1189
|
}
|
|
1191
|
-
function
|
|
1190
|
+
function Me() {
|
|
1192
1191
|
var e;
|
|
1193
|
-
return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => i(
|
|
1192
|
+
return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => i(K, this, X).call(this, e.id) && !e.hidden).map((e) => e.id);
|
|
1194
1193
|
}
|
|
1195
|
-
function
|
|
1194
|
+
function Ne() {
|
|
1196
1195
|
var e;
|
|
1197
|
-
return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && i(
|
|
1196
|
+
return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && i(K, this, X).call(this, e));
|
|
1198
1197
|
}
|
|
1199
|
-
function
|
|
1198
|
+
function Pe(e) {
|
|
1200
1199
|
var t;
|
|
1201
1200
|
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".section-tabs");
|
|
1202
1201
|
if (!n || !this.shadowRoot) return;
|
|
1203
1202
|
let r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
1204
1203
|
Array.from(n.querySelectorAll(".section-tab[data-target]")).forEach((e) => {
|
|
1205
1204
|
let t = e.getAttribute("data-target");
|
|
1206
|
-
t && i(
|
|
1207
|
-
}),
|
|
1205
|
+
t && i(K, this, X).call(this, t) && r.set(t, e);
|
|
1206
|
+
}), y.forEach((e) => {
|
|
1208
1207
|
var t;
|
|
1209
1208
|
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
|
|
1210
1209
|
n && a.set(e, n);
|
|
1211
1210
|
});
|
|
1212
|
-
let o = [...e, ...
|
|
1211
|
+
let o = [...e, ...y.filter((t) => !e.includes(t))];
|
|
1213
1212
|
o.forEach((e) => {
|
|
1214
1213
|
let t = r.get(e);
|
|
1215
1214
|
t && n.appendChild(t);
|
|
@@ -1221,18 +1220,18 @@ function Fe(e) {
|
|
|
1221
1220
|
}
|
|
1222
1221
|
});
|
|
1223
1222
|
}
|
|
1224
|
-
function
|
|
1223
|
+
function Fe() {
|
|
1225
1224
|
if (!this.shadowRoot) return;
|
|
1226
1225
|
let e = {
|
|
1227
1226
|
version: 1,
|
|
1228
|
-
openSections: i(
|
|
1229
|
-
sectionOrder: i(
|
|
1227
|
+
openSections: i(K, this, Me).call(this),
|
|
1228
|
+
sectionOrder: i(K, this, Ne).call(this)
|
|
1230
1229
|
};
|
|
1231
1230
|
try {
|
|
1232
1231
|
sessionStorage.setItem(ae, JSON.stringify(e));
|
|
1233
1232
|
} catch (e) {}
|
|
1234
1233
|
}
|
|
1235
|
-
function
|
|
1234
|
+
function Ie() {
|
|
1236
1235
|
let e = null;
|
|
1237
1236
|
try {
|
|
1238
1237
|
e = sessionStorage.getItem(ae);
|
|
@@ -1247,51 +1246,51 @@ function Le() {
|
|
|
1247
1246
|
return;
|
|
1248
1247
|
}
|
|
1249
1248
|
if (!t || typeof t != "object") return;
|
|
1250
|
-
let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && i(
|
|
1251
|
-
r(
|
|
1249
|
+
let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && i(K, this, X).call(this, e)) : [], a = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && i(K, this, X).call(this, e)) : [];
|
|
1250
|
+
r(de, this, !0);
|
|
1252
1251
|
try {
|
|
1253
|
-
if (a.length > 0 && i(
|
|
1252
|
+
if (a.length > 0 && i(K, this, Pe).call(this, a), Array.isArray(t.openSections)) {
|
|
1254
1253
|
let e = new Set(n);
|
|
1255
|
-
|
|
1256
|
-
i(
|
|
1254
|
+
y.forEach((t) => {
|
|
1255
|
+
i(K, this, ke).call(this, t, e.has(t));
|
|
1257
1256
|
});
|
|
1258
1257
|
}
|
|
1259
|
-
i(
|
|
1258
|
+
i(K, this, je).call(this);
|
|
1260
1259
|
} finally {
|
|
1261
|
-
r(
|
|
1260
|
+
r(de, this, !1);
|
|
1262
1261
|
}
|
|
1263
|
-
i(
|
|
1262
|
+
i(K, this, Fe).call(this);
|
|
1264
1263
|
}
|
|
1265
|
-
function
|
|
1266
|
-
i(
|
|
1264
|
+
function Le() {
|
|
1265
|
+
i(K, this, Y).call(this, "latency-section", "Drift -"), i(K, this, Y).call(this, "quality-section", "Auto"), i(K, this, Y).call(this, "playback-section", "Buffer -"), i(K, this, Y).call(this, "network-section", "RTT -"), i(K, this, Y).call(this, "stats-section", "Up -"), i(K, this, Y).call(this, "events-section", `${a(k, this).length}`);
|
|
1267
1266
|
}
|
|
1268
|
-
function
|
|
1269
|
-
i(
|
|
1267
|
+
function Re() {
|
|
1268
|
+
i(K, this, xe).call(this), a(F, this).forEach((e) => {
|
|
1270
1269
|
e.addEventListener("click", (e) => {
|
|
1271
|
-
e.stopPropagation(), i(
|
|
1270
|
+
e.stopPropagation(), i(K, this, Be).call(this, -i(K, this, ze).call(this, !1));
|
|
1272
1271
|
});
|
|
1273
|
-
}), a(
|
|
1272
|
+
}), a(I, this).forEach((e) => {
|
|
1274
1273
|
e.addEventListener("click", (e) => {
|
|
1275
|
-
e.stopPropagation(), i(
|
|
1274
|
+
e.stopPropagation(), i(K, this, Be).call(this, i(K, this, ze).call(this, !0));
|
|
1276
1275
|
});
|
|
1277
1276
|
});
|
|
1278
1277
|
}
|
|
1279
|
-
function
|
|
1280
|
-
let t = a(
|
|
1278
|
+
function ze(e) {
|
|
1279
|
+
let t = a(E, this);
|
|
1281
1280
|
return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
|
|
1282
1281
|
}
|
|
1283
|
-
function
|
|
1284
|
-
let t = Math.max(50, Math.min(d, a(
|
|
1285
|
-
t !== a(
|
|
1282
|
+
function Be(e) {
|
|
1283
|
+
let t = Math.max(50, Math.min(d, a(E, this) + e));
|
|
1284
|
+
t !== a(E, this) && (r(E, this, t), i(K, this, Ve).call(this, t), i(K, this, Ue).call(this), i(K, this, Z).call(this));
|
|
1286
1285
|
}
|
|
1287
|
-
function
|
|
1288
|
-
if (!a(
|
|
1289
|
-
let { isDynamic: t, minBuffer: n, maxBuffer: r } = i(
|
|
1290
|
-
t && (e < n ? a(
|
|
1286
|
+
function Ve(e) {
|
|
1287
|
+
if (!a(b, this)) return;
|
|
1288
|
+
let { isDynamic: t, minBuffer: n, maxBuffer: r } = i(K, this, He).call(this);
|
|
1289
|
+
t && (e < n ? a(b, this).setAttribute("min-buffer-time", String(e)) : e > r && a(b, this).setAttribute("max-buffer-time", String(e)));
|
|
1291
1290
|
}
|
|
1292
|
-
function
|
|
1291
|
+
function He() {
|
|
1293
1292
|
var e, t;
|
|
1294
|
-
let n = (e = a(
|
|
1293
|
+
let n = (e = a(b, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = a(b, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
|
|
1295
1294
|
if (!n || !r) return {
|
|
1296
1295
|
isDynamic: !1,
|
|
1297
1296
|
minBuffer: 0,
|
|
@@ -1312,30 +1311,30 @@ function Ue() {
|
|
|
1312
1311
|
this.dispatchEvent(new CustomEvent(f.SET_TARGET_BUFFER_TIME, {
|
|
1313
1312
|
bubbles: !0,
|
|
1314
1313
|
composed: !0,
|
|
1315
|
-
detail: a(
|
|
1314
|
+
detail: a(E, this)
|
|
1316
1315
|
}));
|
|
1317
1316
|
}
|
|
1318
1317
|
function We(e) {
|
|
1319
|
-
if (i(
|
|
1320
|
-
i(
|
|
1318
|
+
if (i(K, this, He).call(this).isDynamic) {
|
|
1319
|
+
i(K, this, Ke).call(this, e), i(K, this, Z).call(this);
|
|
1321
1320
|
return;
|
|
1322
1321
|
}
|
|
1323
|
-
r(
|
|
1322
|
+
r(E, this, e), i(K, this, Ue).call(this), i(K, this, Z).call(this);
|
|
1324
1323
|
}
|
|
1325
1324
|
function Ge() {
|
|
1326
|
-
if (i(
|
|
1327
|
-
let e = Math.max(50, Math.min(d, a(
|
|
1328
|
-
t === n && n < 5e3 ? n = Math.min(d, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), a(
|
|
1325
|
+
if (i(K, this, He).call(this).isDynamic || !a(b, this)) return;
|
|
1326
|
+
let e = Math.max(50, Math.min(d, a(E, this))), t = Math.max(50, e - 100), n = Math.min(d, e + 100);
|
|
1327
|
+
t === n && n < 5e3 ? n = Math.min(d, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), a(b, this).setAttribute("min-buffer-time", String(t)), a(b, this).setAttribute("max-buffer-time", String(n)), i(K, this, Ue).call(this), i(K, this, Z).call(this);
|
|
1329
1328
|
}
|
|
1330
1329
|
function Ke(e) {
|
|
1331
|
-
if (!a(
|
|
1330
|
+
if (!a(b, this)) return;
|
|
1332
1331
|
let t = Math.max(50, Math.min(d, e));
|
|
1333
|
-
r(
|
|
1332
|
+
r(E, this, t);
|
|
1334
1333
|
let n = String(t);
|
|
1335
|
-
a(
|
|
1334
|
+
a(b, this).setAttribute("min-buffer-time", n), a(b, this).setAttribute("max-buffer-time", n), i(K, this, Ue).call(this);
|
|
1336
1335
|
}
|
|
1337
1336
|
function qe() {
|
|
1338
|
-
let e = i(
|
|
1337
|
+
let e = i(K, this, q).call(this, "#latency-presets");
|
|
1339
1338
|
if (!e) return;
|
|
1340
1339
|
e.innerHTML = "", v.forEach((t) => {
|
|
1341
1340
|
let n = document.createElement("button");
|
|
@@ -1346,7 +1345,7 @@ function qe() {
|
|
|
1346
1345
|
a.className = "preset-subtitle", a.textContent = t.description, n.appendChild(a);
|
|
1347
1346
|
let o = document.createElement("span");
|
|
1348
1347
|
o.className = "preset-value", o.textContent = `${t.value}ms`, n.appendChild(o), n.addEventListener("click", (e) => {
|
|
1349
|
-
e.stopPropagation(), i(
|
|
1348
|
+
e.stopPropagation(), i(K, this, We).call(this, t.value);
|
|
1350
1349
|
}), e.appendChild(n);
|
|
1351
1350
|
});
|
|
1352
1351
|
let t = document.createElement("button");
|
|
@@ -1357,91 +1356,91 @@ function qe() {
|
|
|
1357
1356
|
r.className = "preset-subtitle dynamic-subtitle", t.appendChild(r);
|
|
1358
1357
|
let a = document.createElement("span");
|
|
1359
1358
|
a.className = "preset-value dynamic-value", t.appendChild(a), t.addEventListener("click", (e) => {
|
|
1360
|
-
e.stopPropagation(), i(
|
|
1361
|
-
}), e.appendChild(t), i(
|
|
1359
|
+
e.stopPropagation(), i(K, this, Ge).call(this);
|
|
1360
|
+
}), e.appendChild(t), i(K, this, xe).call(this), i(K, this, Z).call(this);
|
|
1362
1361
|
}
|
|
1363
1362
|
function Z() {
|
|
1364
|
-
a(P, this).length === 0 && i(
|
|
1365
|
-
let { isDynamic: e, minBuffer: t, maxBuffer: n } = i(
|
|
1363
|
+
a(P, this).length === 0 && i(K, this, xe).call(this);
|
|
1364
|
+
let { isDynamic: e, minBuffer: t, maxBuffer: n } = i(K, this, He).call(this);
|
|
1366
1365
|
if (a(P, this).forEach((e) => {
|
|
1367
|
-
i(
|
|
1366
|
+
i(K, this, J).call(this, e, `${a(E, this)}ms`);
|
|
1368
1367
|
}), a(F, this).forEach((e) => {
|
|
1369
|
-
e.disabled = a(
|
|
1370
|
-
}), a(
|
|
1371
|
-
e.disabled = a(
|
|
1372
|
-
}), a(
|
|
1368
|
+
e.disabled = a(E, this) <= 50;
|
|
1369
|
+
}), a(I, this).forEach((e) => {
|
|
1370
|
+
e.disabled = a(E, this) >= d;
|
|
1371
|
+
}), a(L, this) && a(L, this).setAttribute("data-active", String(e)), a(R, this) && i(K, this, J).call(this, a(R, this), e ? `${t}ms - ${n}ms` : re), a(z, this) && i(K, this, J).call(this, a(z, this), e ? "range" : ""), a(fe, this).length === 0) return;
|
|
1373
1372
|
let r = null;
|
|
1374
1373
|
if (!e) {
|
|
1375
|
-
let e = v.find((e) => e.value === a(
|
|
1374
|
+
let e = v.find((e) => e.value === a(E, this)), t = ie(a(E, this)), n = v.reduce((e, t) => Math.abs(t.value - a(E, this)) < Math.abs(e.value - a(E, this)) ? t : e);
|
|
1376
1375
|
r = e || t || n;
|
|
1377
1376
|
}
|
|
1378
|
-
a(
|
|
1377
|
+
a(fe, this).forEach((t) => {
|
|
1379
1378
|
let n = parseInt(t.getAttribute("data-value") || "0", 10), i = !e && (r == null ? void 0 : r.value) === n;
|
|
1380
1379
|
t.setAttribute("data-active", String(i));
|
|
1381
1380
|
});
|
|
1382
1381
|
}
|
|
1383
1382
|
function Je() {
|
|
1384
|
-
let e = i(
|
|
1383
|
+
let e = i(K, this, q).call(this, "#current-drift"), t = `${a(D, this).toFixed(1)}ms`;
|
|
1385
1384
|
if (e) {
|
|
1386
|
-
i(
|
|
1387
|
-
let n = Math.abs(a(
|
|
1385
|
+
i(K, this, J).call(this, e, t);
|
|
1386
|
+
let n = Math.abs(a(D, this));
|
|
1388
1387
|
n > 200 ? e.setAttribute("data-status", "error") : n > 100 ? e.setAttribute("data-status", "warning") : e.setAttribute("data-status", "good");
|
|
1389
1388
|
}
|
|
1390
|
-
let n = a(
|
|
1391
|
-
i(
|
|
1389
|
+
let n = a(D, this) > 0 ? `+${t}` : t;
|
|
1390
|
+
i(K, this, Y).call(this, "latency-section", `Drift ${n}`);
|
|
1392
1391
|
}
|
|
1393
1392
|
function Ye() {
|
|
1394
|
-
let e = i(
|
|
1393
|
+
let e = i(K, this, q).call(this, "#abr-auto-btn"), t = i(K, this, q).call(this, "#abr-fixed-btn");
|
|
1395
1394
|
e == null || e.addEventListener("click", (e) => {
|
|
1396
|
-
e.stopPropagation(), r(
|
|
1395
|
+
e.stopPropagation(), r(C, this, !0), i(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(f.SET_ABR_MODE, {
|
|
1397
1396
|
bubbles: !0,
|
|
1398
1397
|
composed: !0,
|
|
1399
1398
|
detail: !0
|
|
1400
|
-
})), i(
|
|
1399
|
+
})), i(K, this, $).call(this, "Quality", "ABR mode: Auto");
|
|
1401
1400
|
}), t == null || t.addEventListener("click", (e) => {
|
|
1402
1401
|
e.stopPropagation();
|
|
1403
|
-
let t = i(
|
|
1402
|
+
let t = i(K, this, Xe).call(this);
|
|
1404
1403
|
t && this.dispatchEvent(new CustomEvent(f.SET_RENDITION, {
|
|
1405
1404
|
bubbles: !0,
|
|
1406
1405
|
composed: !0,
|
|
1407
1406
|
detail: t
|
|
1408
|
-
})), r(
|
|
1407
|
+
})), r(C, this, !1), i(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(f.SET_ABR_MODE, {
|
|
1409
1408
|
bubbles: !0,
|
|
1410
1409
|
composed: !0,
|
|
1411
1410
|
detail: !1
|
|
1412
|
-
})), i(
|
|
1411
|
+
})), i(K, this, $).call(this, "Quality", "ABR mode: Fixed");
|
|
1413
1412
|
});
|
|
1414
|
-
let n = i(
|
|
1413
|
+
let n = i(K, this, q).call(this, "#size-cap-toggle");
|
|
1415
1414
|
n == null || n.addEventListener("click", (e) => {
|
|
1416
|
-
e.stopPropagation(), r(
|
|
1415
|
+
e.stopPropagation(), r(w, this, !a(w, this)), i(K, this, Qe).call(this), this.dispatchEvent(new CustomEvent(f.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
1417
1416
|
bubbles: !0,
|
|
1418
1417
|
composed: !0,
|
|
1419
|
-
detail: a(
|
|
1420
|
-
})), i(
|
|
1418
|
+
detail: a(w, this)
|
|
1419
|
+
})), i(K, this, $).call(this, "Quality", `Size cap: ${a(w, this) ? "On" : "Off"}`);
|
|
1421
1420
|
});
|
|
1422
1421
|
}
|
|
1423
1422
|
function Xe() {
|
|
1424
|
-
let e = [...a(
|
|
1423
|
+
let e = [...a(x, this)].sort((e, t) => {
|
|
1425
1424
|
var n, r;
|
|
1426
1425
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
1427
1426
|
});
|
|
1428
1427
|
return e.find((e) => {
|
|
1429
1428
|
var t;
|
|
1430
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= a(
|
|
1429
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= a(S, this);
|
|
1431
1430
|
}) || e[e.length - 1] || null;
|
|
1432
1431
|
}
|
|
1433
1432
|
function Ze() {
|
|
1434
|
-
let e = i(
|
|
1435
|
-
e == null || e.setAttribute("data-active", String(a(
|
|
1433
|
+
let e = i(K, this, q).call(this, "#abr-auto-btn"), t = i(K, this, q).call(this, "#abr-fixed-btn"), n = i(K, this, q).call(this, "#quality-status-text");
|
|
1434
|
+
e == null || e.setAttribute("data-active", String(a(C, this))), t == null || t.setAttribute("data-active", String(!a(C, this))), n && i(K, this, J).call(this, n, a(C, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), i(K, this, tt).call(this);
|
|
1436
1435
|
}
|
|
1437
1436
|
function Qe() {
|
|
1438
|
-
let e = i(
|
|
1439
|
-
e && (e.textContent = a(
|
|
1437
|
+
let e = i(K, this, q).call(this, "#size-cap-toggle");
|
|
1438
|
+
e && (e.textContent = a(w, this) ? "On" : "Off", e.setAttribute("data-active", String(a(w, this))), e.disabled = !a(C, this));
|
|
1440
1439
|
}
|
|
1441
1440
|
function $e() {
|
|
1442
1441
|
var e;
|
|
1443
1442
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#quality-menu");
|
|
1444
|
-
t && (t.innerHTML = "", a(
|
|
1443
|
+
t && (t.innerHTML = "", a(x, this).sort((e, t) => {
|
|
1445
1444
|
var n, r;
|
|
1446
1445
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
1447
1446
|
}).forEach((e) => {
|
|
@@ -1454,7 +1453,7 @@ function $e() {
|
|
|
1454
1453
|
m.className = "quality-item-title", m.textContent = e.video ? s(e.video) : "";
|
|
1455
1454
|
let h = document.createElement("span");
|
|
1456
1455
|
h.className = "quality-item-subtitle";
|
|
1457
|
-
let g = i(
|
|
1456
|
+
let g = i(K, this, et).call(this, (a = e.video) == null ? void 0 : a.frameRate), te = g ? `, ${g}fps` : "";
|
|
1458
1457
|
h.textContent = `${c(((o = (l = e.video) == null ? void 0 : l.bitRate) == null ? 0 : o) + ((u = (ee = e.audio) == null ? void 0 : ee.bitRate) == null ? 0 : u))}${te}`, p.appendChild(m), p.appendChild(h), d.appendChild(p);
|
|
1459
1458
|
let _ = document.createElement("span");
|
|
1460
1459
|
_.className = "quality-current-label", _.textContent = "Current", d.appendChild(_), d.addEventListener("click", (t) => {
|
|
@@ -1464,32 +1463,32 @@ function $e() {
|
|
|
1464
1463
|
detail: e
|
|
1465
1464
|
}));
|
|
1466
1465
|
let n = e.video ? s(e.video) : "unknown";
|
|
1467
|
-
i(
|
|
1466
|
+
i(K, this, $).call(this, "Quality", `Selected: ${n}`);
|
|
1468
1467
|
}), t.appendChild(d);
|
|
1469
|
-
}), i(
|
|
1468
|
+
}), i(K, this, tt).call(this));
|
|
1470
1469
|
}
|
|
1471
1470
|
function et(e) {
|
|
1472
1471
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
1473
1472
|
}
|
|
1474
1473
|
function tt() {
|
|
1475
1474
|
var e, t, n;
|
|
1476
|
-
let r = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = a(
|
|
1475
|
+
let r = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = a(T, this)) == null || (t = t.video) == null ? void 0 : t.id, s = a(S, this), l = i(K, this, nt).call(this, r, s);
|
|
1477
1476
|
r == null || r.forEach((e) => {
|
|
1478
1477
|
let t = parseInt(e.getAttribute("data-id") || "0", 10), n = parseInt(e.getAttribute("data-bitrate") || "0", 10);
|
|
1479
1478
|
e.setAttribute("data-playing", String(t === o));
|
|
1480
1479
|
let r = l !== null && n === l;
|
|
1481
|
-
e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), a(
|
|
1480
|
+
e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), a(C, this) ? e.setAttribute("data-capped", String(n > s)) : e.removeAttribute("data-capped");
|
|
1482
1481
|
});
|
|
1483
|
-
let u = (n = a(
|
|
1482
|
+
let u = (n = a(T, this)) == null ? void 0 : n.video;
|
|
1484
1483
|
if (u != null && u.width && u.height) {
|
|
1485
|
-
i(
|
|
1484
|
+
i(K, this, Y).call(this, "quality-section", `${u.width}x${u.height}`);
|
|
1486
1485
|
return;
|
|
1487
1486
|
}
|
|
1488
1487
|
if (typeof l == "number" && l > 0) {
|
|
1489
|
-
i(
|
|
1488
|
+
i(K, this, Y).call(this, "quality-section", c(l, 1));
|
|
1490
1489
|
return;
|
|
1491
1490
|
}
|
|
1492
|
-
i(
|
|
1491
|
+
i(K, this, Y).call(this, "quality-section", a(C, this) ? "Auto" : "Fixed");
|
|
1493
1492
|
}
|
|
1494
1493
|
function nt(e, t) {
|
|
1495
1494
|
var n;
|
|
@@ -1501,46 +1500,46 @@ function nt(e, t) {
|
|
|
1501
1500
|
}), (n = r) == null ? i : n;
|
|
1502
1501
|
}
|
|
1503
1502
|
function rt() {
|
|
1504
|
-
i(
|
|
1503
|
+
i(K, this, it).call(this), i(K, this, ot).call(this), i(K, this, at).call(this), r(O, this, window.setInterval(() => i(K, this, at).call(this), 1e3));
|
|
1505
1504
|
}
|
|
1506
1505
|
function it() {
|
|
1507
|
-
a(
|
|
1506
|
+
a(O, this) !== null && (clearInterval(a(O, this)), r(O, this, null));
|
|
1508
1507
|
}
|
|
1509
1508
|
function at() {
|
|
1510
1509
|
var e;
|
|
1511
|
-
let t = (e = a(
|
|
1510
|
+
let t = (e = a(b, this)) == null ? void 0 : e.instance;
|
|
1512
1511
|
if (t) try {
|
|
1513
1512
|
let e = t.getStatistics();
|
|
1514
|
-
i(
|
|
1513
|
+
i(K, this, Z).call(this), i(K, this, Q).call(this, "#sdk-version", e.version || "-"), i(K, this, Q).call(this, "#session-id", e.sessionId || "-"), i(K, this, Q).call(this, "#client-id", e.clientId || "-"), i(K, this, Q).call(this, "#channel-id", e.channelId || "-"), i(K, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), i(K, this, Q).call(this, "#uptime", i(K, this, ct).call(this, e.uptime)), i(K, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), i(K, this, Q).call(this, "#connection-state", t.connectionState || "-"), i(K, this, Q).call(this, "#playback-state", t.playbackState || "-");
|
|
1515
1514
|
let n = typeof t.playbackLatency == "number" ? `${Math.round(t.playbackLatency)}ms` : "-";
|
|
1516
|
-
i(
|
|
1515
|
+
i(K, this, Q).call(this, "#playback-latency", n), i(K, this, Q).call(this, "#average-drift", i(K, this, lt).call(this, e.averageDrift, 1));
|
|
1517
1516
|
let o = `${Math.max(0, t.bufferFullness * 100).toFixed(0)}%`;
|
|
1518
|
-
if (i(
|
|
1519
|
-
i(
|
|
1517
|
+
if (i(K, this, Q).call(this, "#playback-buffer-fullness", o), i(K, this, Y).call(this, "playback-section", `Buffer ${o}`), i(K, this, Q).call(this, "#playback-last-buffer-event", t.lastBufferEvent || "-"), i(K, this, Q).call(this, "#playback-buffering-events", typeof e.bufferingEventsCount == "number" ? e.bufferingEventsCount.toString() : "-"), i(K, this, Q).call(this, "#playback-buffering-ratio", i(K, this, ut).call(this, e.bufferingRatio)), i(K, this, Q).call(this, "#playback-time-spent-buffering", i(K, this, ct).call(this, t.timeSpentBuffering)), i(K, this, Q).call(this, "#playback-rendition-changes", i(K, this, pt).call(this, e.renditionLevelChangeCount, e.renditionChangesPerMinute)), i(K, this, Q).call(this, "#playback-seek-adjustments-rate", i(K, this, ft).call(this, e.seekAdjustmentsPerMinute, "min")), i(K, this, Q).call(this, "#playback-timeshift-adjustments-rate", i(K, this, ft).call(this, e.timeshiftAdjustmentsPerMinute, "min")), i(K, this, Q).call(this, "#playback-current-rendition", i(K, this, yt).call(this, e)), i(K, this, Q).call(this, "#playback-codecs", i(K, this, bt).call(this, e)), i(K, this, Q).call(this, "#playback-frame-drops", i(K, this, xt).call(this, e)), e.edgeUrl) try {
|
|
1518
|
+
i(K, this, Q).call(this, "#network-edge-url", new URL(e.edgeUrl).hostname);
|
|
1520
1519
|
} catch (t) {
|
|
1521
|
-
i(
|
|
1520
|
+
i(K, this, Q).call(this, "#network-edge-url", e.edgeUrl);
|
|
1522
1521
|
}
|
|
1523
|
-
else i(
|
|
1524
|
-
i(
|
|
1525
|
-
let s = i(
|
|
1526
|
-
i(
|
|
1527
|
-
let c = i(
|
|
1528
|
-
i(
|
|
1522
|
+
else i(K, this, Q).call(this, "#network-edge-url", "-");
|
|
1523
|
+
i(K, this, Q).call(this, "#network-protocol", i(K, this, mt).call(this, e.connectionProtocol));
|
|
1524
|
+
let s = i(K, this, ht).call(this, e.rtt);
|
|
1525
|
+
i(K, this, Q).call(this, "#network-rtt", s), i(K, this, Q).call(this, "#network-estimated-bandwidth", i(K, this, dt).call(this, e.estimatedBandwidth)), i(K, this, Q).call(this, "#network-video-bitrate", i(K, this, dt).call(this, e.videoBitRate)), i(K, this, Q).call(this, "#network-audio-bitrate", i(K, this, dt).call(this, e.audioBitRate)), i(K, this, Q).call(this, "#network-bitrate", i(K, this, dt).call(this, e.averageBitRate)), i(K, this, Q).call(this, "#network-audio-jitter", i(K, this, _t).call(this, e.audioJitter)), i(K, this, Q).call(this, "#network-video-jitter", i(K, this, _t).call(this, e.videoJitter)), i(K, this, Q).call(this, "#network-connect-success", i(K, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), i(K, this, Q).call(this, "#network-reconnects-per-hour", i(K, this, ft).call(this, e.reconnectsPerHour, "h")), i(K, this, Y).call(this, "network-section", i(K, this, gt).call(this, e.rtt));
|
|
1526
|
+
let c = i(K, this, ct).call(this, e.uptime);
|
|
1527
|
+
i(K, this, Y).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), a(j, this) && (r(j, this, !1), i(K, this, $).call(this, "System", "Statistics stream recovered"));
|
|
1529
1528
|
} catch (e) {
|
|
1530
|
-
a(j, this) || (r(j, this, !0), i(
|
|
1529
|
+
a(j, this) || (r(j, this, !0), i(K, this, $).call(this, "System", "Failed to read statistics", "error"));
|
|
1531
1530
|
}
|
|
1532
1531
|
}
|
|
1533
1532
|
function ot() {
|
|
1534
1533
|
var e;
|
|
1535
|
-
let t = (e = a(
|
|
1536
|
-
!t || a(M, this) === t || (i(
|
|
1534
|
+
let t = (e = a(b, this)) == null ? void 0 : e.instance;
|
|
1535
|
+
!t || a(M, this) === t || (i(K, this, st).call(this), r(M, this, t), t.on("connection state", a(pe, this)), t.on("playback state", a(me, this)), t.on("buffer state event", a(he, this)), t.on("error", a(ge, this)), t.on("rendition level", a(_e, this)), t.on("is live", a(ve, this)));
|
|
1537
1536
|
}
|
|
1538
1537
|
function st() {
|
|
1539
1538
|
let e = a(M, this);
|
|
1540
|
-
e && (e.off("connection state", a(
|
|
1539
|
+
e && (e.off("connection state", a(pe, this)), e.off("playback state", a(me, this)), e.off("buffer state event", a(he, this)), e.off("error", a(ge, this)), e.off("rendition level", a(_e, this)), e.off("is live", a(ve, this)), r(M, this, null));
|
|
1541
1540
|
}
|
|
1542
1541
|
function Q(e, t) {
|
|
1543
|
-
i(
|
|
1542
|
+
i(K, this, J).call(this, i(K, this, q).call(this, e), t);
|
|
1544
1543
|
}
|
|
1545
1544
|
function ct(e) {
|
|
1546
1545
|
if (!e) return "-";
|
|
@@ -1584,7 +1583,7 @@ function vt(e, t, n) {
|
|
|
1584
1583
|
}
|
|
1585
1584
|
function yt(e) {
|
|
1586
1585
|
if (!(typeof e.videoWidth == "number" && typeof e.videoHeight == "number")) return e.audioCodec ? "Audio only" : "-";
|
|
1587
|
-
let t = i(
|
|
1586
|
+
let t = i(K, this, et).call(this, e.frameRate), n = t ? ` @ ${t}fps` : "";
|
|
1588
1587
|
return `${e.videoWidth}x${e.videoHeight}${n}`;
|
|
1589
1588
|
}
|
|
1590
1589
|
function bt(e) {
|
|
@@ -1596,9 +1595,9 @@ function xt(e) {
|
|
|
1596
1595
|
}
|
|
1597
1596
|
function St() {
|
|
1598
1597
|
var e = this;
|
|
1599
|
-
let n = i(
|
|
1600
|
-
r(
|
|
1601
|
-
e.stopPropagation(), r(k, this, []), i(
|
|
1598
|
+
let n = i(K, this, q).call(this, "#events-clear"), s = i(K, this, q).call(this, "#copy-events");
|
|
1599
|
+
r(B, this, i(K, this, q).call(this, "#events-list")), r(V, this, i(K, this, q).call(this, "#events-count")), n == null || n.addEventListener("click", (e) => {
|
|
1600
|
+
e.stopPropagation(), r(k, this, []), i(K, this, Et).call(this, !0);
|
|
1602
1601
|
}), s == null || s.addEventListener("click", function() {
|
|
1603
1602
|
var n = t(function* (t) {
|
|
1604
1603
|
t.stopPropagation();
|
|
@@ -1627,54 +1626,54 @@ function $(e, t, n = "info") {
|
|
|
1627
1626
|
message: t,
|
|
1628
1627
|
level: n
|
|
1629
1628
|
};
|
|
1630
|
-
if (a(k, this).push(o), a(k, this).length > 250 && a(k, this).splice(0, a(k, this).length - 250), i(
|
|
1631
|
-
i(
|
|
1629
|
+
if (a(k, this).push(o), a(k, this).length > 250 && a(k, this).splice(0, a(k, this).length - 250), i(K, this, Ce).call(this), i(K, this, Se).call(this, "events-section")) {
|
|
1630
|
+
i(K, this, wt).call(this, o), i(K, this, Tt).call(this);
|
|
1632
1631
|
return;
|
|
1633
1632
|
}
|
|
1634
|
-
r(
|
|
1633
|
+
r(H, this, !0);
|
|
1635
1634
|
}
|
|
1636
1635
|
function Ct(e) {
|
|
1637
1636
|
let t = document.createElement("div");
|
|
1638
1637
|
t.className = "event-row", t.setAttribute("data-level", e.level);
|
|
1639
1638
|
let n = document.createElement("span");
|
|
1640
|
-
n.className = "event-time", n.textContent = i(
|
|
1639
|
+
n.className = "event-time", n.textContent = i(K, this, Dt).call(this, e.timestamp);
|
|
1641
1640
|
let r = document.createElement("span");
|
|
1642
1641
|
r.className = "event-category", r.textContent = e.category;
|
|
1643
1642
|
let a = document.createElement("span");
|
|
1644
1643
|
return a.className = "event-message", a.textContent = e.message, t.appendChild(n), t.appendChild(r), t.appendChild(a), t;
|
|
1645
1644
|
}
|
|
1646
1645
|
function wt(e) {
|
|
1647
|
-
if (!a(
|
|
1648
|
-
let t = a(
|
|
1646
|
+
if (!a(B, this)) return;
|
|
1647
|
+
let t = a(B, this).querySelector(".events-empty");
|
|
1649
1648
|
t && t.remove();
|
|
1650
|
-
let n = i(
|
|
1651
|
-
a(
|
|
1649
|
+
let n = i(K, this, Ct).call(this, e);
|
|
1650
|
+
a(B, this).prepend(n);
|
|
1652
1651
|
}
|
|
1653
1652
|
function Tt() {
|
|
1654
|
-
if (!a(
|
|
1655
|
-
let e = a(
|
|
1653
|
+
if (!a(B, this)) return;
|
|
1654
|
+
let e = a(B, this).querySelectorAll(".event-row");
|
|
1656
1655
|
for (let n = e.length - 1; n >= 250; n--) {
|
|
1657
1656
|
var t;
|
|
1658
1657
|
(t = e[n]) == null || t.remove();
|
|
1659
1658
|
}
|
|
1660
1659
|
}
|
|
1661
1660
|
function Et(e = !1) {
|
|
1662
|
-
if (!a(
|
|
1663
|
-
if (i(
|
|
1664
|
-
r(
|
|
1661
|
+
if (!a(B, this) || !a(V, this)) return;
|
|
1662
|
+
if (i(K, this, Ce).call(this), !e && !i(K, this, Se).call(this, "events-section")) {
|
|
1663
|
+
r(H, this, !0);
|
|
1665
1664
|
return;
|
|
1666
1665
|
}
|
|
1667
|
-
if (r(
|
|
1668
|
-
a(
|
|
1666
|
+
if (r(H, this, !1), a(k, this).length === 0) {
|
|
1667
|
+
a(B, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
|
|
1669
1668
|
return;
|
|
1670
1669
|
}
|
|
1671
|
-
a(
|
|
1670
|
+
a(B, this).innerHTML = "";
|
|
1672
1671
|
let t = document.createDocumentFragment();
|
|
1673
1672
|
for (let e = a(k, this).length - 1; e >= 0; e--) {
|
|
1674
1673
|
let n = a(k, this)[e];
|
|
1675
|
-
n && t.appendChild(i(
|
|
1674
|
+
n && t.appendChild(i(K, this, Ct).call(this, n));
|
|
1676
1675
|
}
|
|
1677
|
-
a(
|
|
1676
|
+
a(B, this).appendChild(t);
|
|
1678
1677
|
}
|
|
1679
1678
|
function Dt(e) {
|
|
1680
1679
|
return new Date(e).toLocaleTimeString([], {
|
|
@@ -1686,11 +1685,11 @@ function Dt(e) {
|
|
|
1686
1685
|
}
|
|
1687
1686
|
function Ot() {
|
|
1688
1687
|
var e = this;
|
|
1689
|
-
let n = i(
|
|
1688
|
+
let n = i(K, this, q).call(this, "#copy-stats");
|
|
1690
1689
|
n == null || n.addEventListener("click", function() {
|
|
1691
1690
|
var r = t(function* (t) {
|
|
1692
1691
|
t.stopPropagation();
|
|
1693
|
-
let r = i(
|
|
1692
|
+
let r = i(K, e, kt).call(e);
|
|
1694
1693
|
try {
|
|
1695
1694
|
yield navigator.clipboard.writeText(JSON.stringify(r, null, 2)), n.setAttribute("data-copied", "true"), n.textContent = "Copied!", setTimeout(() => {
|
|
1696
1695
|
n.setAttribute("data-copied", "false"), n.textContent = "Copy Stats to Clipboard";
|
|
@@ -1708,7 +1707,7 @@ function Ot() {
|
|
|
1708
1707
|
}
|
|
1709
1708
|
function kt() {
|
|
1710
1709
|
var e;
|
|
1711
|
-
let t = (e = a(
|
|
1710
|
+
let t = (e = a(b, this)) == null ? void 0 : e.instance;
|
|
1712
1711
|
if (!t) return {
|
|
1713
1712
|
error: "Vindral instance not available",
|
|
1714
1713
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1721,13 +1720,13 @@ function kt() {
|
|
|
1721
1720
|
bufferFullness: t.bufferFullness,
|
|
1722
1721
|
lastBufferEvent: t.lastBufferEvent,
|
|
1723
1722
|
timeSpentBuffering: t.timeSpentBuffering,
|
|
1724
|
-
currentRendition: a(
|
|
1725
|
-
targetBufferTime: a(
|
|
1726
|
-
drift: a(
|
|
1727
|
-
abrEnabled: a(
|
|
1723
|
+
currentRendition: a(T, this),
|
|
1724
|
+
targetBufferTime: a(E, this),
|
|
1725
|
+
drift: a(D, this),
|
|
1726
|
+
abrEnabled: a(C, this),
|
|
1728
1727
|
debugLayout: {
|
|
1729
|
-
openSections: i(
|
|
1730
|
-
sectionOrder: i(
|
|
1728
|
+
openSections: i(K, this, Me).call(this),
|
|
1729
|
+
sectionOrder: i(K, this, Ne).call(this)
|
|
1731
1730
|
},
|
|
1732
1731
|
debugEvents: a(k, this).map((e) => o(o({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
|
|
1733
1732
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1739,7 +1738,7 @@ function kt() {
|
|
|
1739
1738
|
};
|
|
1740
1739
|
}
|
|
1741
1740
|
}
|
|
1742
|
-
e(
|
|
1741
|
+
e(be, "observedAttributes", [
|
|
1743
1742
|
l.DEBUG_PANEL_OPEN,
|
|
1744
1743
|
l.TARGET_BUFFER_TIME,
|
|
1745
1744
|
l.DRIFT,
|
|
@@ -1753,7 +1752,7 @@ e(xe, "observedAttributes", [
|
|
|
1753
1752
|
//#region ../../libs/player-next/src/registerDebugComponents.ts
|
|
1754
1753
|
var At = /* @__PURE__ */ h({ registerDebugComponents: () => jt });
|
|
1755
1754
|
function jt() {
|
|
1756
|
-
customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ne), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel",
|
|
1755
|
+
customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ne), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", be);
|
|
1757
1756
|
}
|
|
1758
1757
|
//#endregion
|
|
1759
1758
|
export { At as n, jt as t };
|