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