@vindral/web-sdk 4.6.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{CN8w7_en.js → 5u5UZABw.js} +3589 -3422
- package/{BZPrVRbb.js → 6fUfml-Z.js} +8 -2
- package/{BT3QQVZE.js → BEFbWAJ5.js} +16 -16
- package/BdMchGeH.js +169 -0
- package/{DbdwBdhd.js → Bo-fEHbb.js} +170 -173
- package/Ctk0PAlI.js +375 -0
- package/CuYn2z5X.js +4 -0
- package/{BOdyvABa.js → D40eQS8l.js} +1 -1
- package/{xYchr7Lz.js → DQ5kuB8C.js} +1 -1
- package/{BV8nX-0b.js → DYgG1Gmb.js} +1279 -1184
- package/README.md +1 -1
- package/{BddIq5-p.js → Z7yt7Imj.js} +12 -12
- package/api-client.js +1 -1
- package/cast-sender.d.ts +6 -1
- package/cast-sender.js +1 -1
- package/core.d.ts +29 -7
- package/core.js +2 -3
- package/legacy.d.ts +29 -7
- package/legacy.es.js +3891 -3725
- package/legacy.umd.js +60 -52
- package/package.json +1 -1
- package/player.d.ts +31 -9
- package/player.js +3 -3
- package/react.d.ts +30 -9
- package/vindral-player-component.js +2 -2
- package/BBVSf5AB.js +0 -123
- package/CbyVl6wP.js +0 -59
- package/DTs-C-0Z.js +0 -225
- /package/{B1PhBNUa.js → BaDhuUsA.js} +0 -0
- /package/{BKeRxR4O.js → D1kpe8tT.js} +0 -0
- /package/{94-sTJd8.js → Tj9xPXja.js} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
2
|
import { i as n, n as r, r as i, t as a } from "./DSw1XhvD.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as d } from "./
|
|
5
|
-
import { t as
|
|
3
|
+
import { t as o } from "./D1kpe8tT.js";
|
|
4
|
+
import { C as s, S as c, b as l, i as u, r as ee, t as d, y as f } from "./Ctk0PAlI.js";
|
|
5
|
+
import { t as p } from "./Tj9xPXja.js";
|
|
6
6
|
//#region \0rolldown/runtime.js
|
|
7
|
-
var
|
|
7
|
+
var m = Object.defineProperty, h = (e, t) => {
|
|
8
8
|
let n = {};
|
|
9
|
-
for (var r in e)
|
|
9
|
+
for (var r in e) m(n, r, {
|
|
10
10
|
get: e[r],
|
|
11
11
|
enumerable: !0
|
|
12
12
|
});
|
|
13
|
-
return t ||
|
|
14
|
-
},
|
|
15
|
-
|
|
13
|
+
return t || m(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
14
|
+
}, g, te = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m8 2 1.88 1.88\"/>\n <path d=\"M14.12 3.88 16 2\"/>\n <path d=\"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1\"/>\n <path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6\"/>\n <path d=\"M12 20v-9\"/>\n <path d=\"M6.53 9C4.6 8.8 3 7.1 3 5\"/>\n <path d=\"M6 13H2\"/>\n <path d=\"M3 21c0-2.1 1.7-3.9 3.8-4\"/>\n <path d=\"M20.97 5c0 2.1-1.6 3.8-3.5 4\"/>\n <path d=\"M22 13h-4\"/>\n <path d=\"M17.2 17c2.1.1 3.8 1.9 3.8 4\"/>\n</svg>\n", _ = document.createElement("template");
|
|
15
|
+
_.innerHTML = `
|
|
16
16
|
<style>
|
|
17
17
|
:host {
|
|
18
18
|
display: var(--debug-button-display);
|
|
@@ -20,37 +20,34 @@ g.innerHTML = `
|
|
|
20
20
|
justify-content: center;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
:host([${
|
|
23
|
+
:host([${l.DEBUG_PANEL_OPEN}]) {
|
|
24
24
|
background: rgba(255, 255, 255, 0.15);
|
|
25
25
|
}
|
|
26
26
|
</style>
|
|
27
27
|
|
|
28
28
|
<span id="icon">
|
|
29
|
-
<slot name="icon">${
|
|
29
|
+
<slot name="icon">${te}</slot>
|
|
30
30
|
</span>
|
|
31
31
|
`;
|
|
32
|
-
var
|
|
32
|
+
var ne = class extends u {
|
|
33
33
|
constructor() {
|
|
34
34
|
var e;
|
|
35
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
35
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(_.content.cloneNode(!0));
|
|
36
36
|
}
|
|
37
37
|
connectedCallback() {
|
|
38
38
|
super.connectedCallback(), this.setAttribute("aria-label", "Toggle debug panel");
|
|
39
39
|
}
|
|
40
|
-
attributeChangedCallback(e, t, n) {
|
|
41
|
-
t !== n && e === "disabled" && (n === null ? this.enable() : this.disable());
|
|
42
|
-
}
|
|
43
40
|
handleClick(e) {
|
|
44
|
-
this.dispatchEvent(new CustomEvent(
|
|
41
|
+
this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
|
|
45
42
|
bubbles: !0,
|
|
46
43
|
composed: !0
|
|
47
44
|
}));
|
|
48
45
|
}
|
|
49
46
|
};
|
|
50
|
-
|
|
47
|
+
g = ne, e(ne, "observedAttributes", [...ee(g, "observedAttributes", g), l.DEBUG_PANEL_OPEN]);
|
|
51
48
|
//#endregion
|
|
52
49
|
//#region ../../libs/player-next/src/components/DebugPanel.constants.ts
|
|
53
|
-
var
|
|
50
|
+
var re = "Adaptive around current target", v = [
|
|
54
51
|
{
|
|
55
52
|
label: "Ultra-Low",
|
|
56
53
|
value: 200,
|
|
@@ -71,15 +68,15 @@ var ie = "Adaptive around current target", _ = [
|
|
|
71
68
|
value: 3e3,
|
|
72
69
|
description: "Maximum stability"
|
|
73
70
|
}
|
|
74
|
-
],
|
|
71
|
+
], ie = (e) => e <= 350 ? v[0] : e <= 800 ? v[1] : e <= 2e3 ? v[2] : v[3], ae = "vindral:debug-panel-layout:v1", oe = [
|
|
75
72
|
"latency-section",
|
|
76
73
|
"quality-section",
|
|
77
74
|
"playback-section",
|
|
78
75
|
"network-section",
|
|
79
76
|
"stats-section",
|
|
80
77
|
"events-section"
|
|
81
|
-
],
|
|
82
|
-
|
|
78
|
+
], 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");
|
|
79
|
+
ue.innerHTML = `
|
|
83
80
|
<style>
|
|
84
81
|
:host {
|
|
85
82
|
--debug-overlay-controls-reserved-space: var(
|
|
@@ -106,7 +103,7 @@ de.innerHTML = `
|
|
|
106
103
|
padding-bottom: env(safe-area-inset-bottom);
|
|
107
104
|
}
|
|
108
105
|
|
|
109
|
-
:host([${
|
|
106
|
+
:host([${l.DEBUG_PANEL_OPEN}]) {
|
|
110
107
|
display: block;
|
|
111
108
|
}
|
|
112
109
|
|
|
@@ -818,8 +815,8 @@ de.innerHTML = `
|
|
|
818
815
|
</button>
|
|
819
816
|
</div>
|
|
820
817
|
</div>
|
|
821
|
-
<button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${
|
|
822
|
-
<button class="close-btn" type="button" aria-label="Close debug panel">${
|
|
818
|
+
<button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${ce}</button>
|
|
819
|
+
<button class="close-btn" type="button" aria-label="Close debug panel">${se}</button>
|
|
823
820
|
</div>
|
|
824
821
|
|
|
825
822
|
<!-- Latency Section -->
|
|
@@ -1020,9 +1017,9 @@ de.innerHTML = `
|
|
|
1020
1017
|
</div>
|
|
1021
1018
|
</div>
|
|
1022
1019
|
`;
|
|
1023
|
-
var
|
|
1020
|
+
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(), F = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = /* @__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 {
|
|
1024
1021
|
constructor() {
|
|
1025
|
-
super(),
|
|
1022
|
+
super(), p(this, G), n(this, y, null), n(this, b, []), n(this, x, 2 ** 53 - 1), n(this, S, !0), n(this, C, !0), n(this, w, null), n(this, T, 1500), n(this, E, 0), n(this, D, null), n(this, O, !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, fe, []), n(this, pe, []), n(this, I, null), n(this, L, null), n(this, R, null), n(this, z, null), n(this, B, null), n(this, V, !1), n(this, H, null), n(this, U, null), n(this, W, null), n(this, me, (e) => {
|
|
1026
1023
|
let t = e === "disconnected" ? "warn" : "info";
|
|
1027
1024
|
i(G, this, $).call(this, "Connection", `State: ${e}`, t);
|
|
1028
1025
|
}), n(this, he, (e) => {
|
|
@@ -1042,57 +1039,57 @@ var fe = de, v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(
|
|
|
1042
1039
|
i(G, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
|
|
1043
1040
|
}), n(this, be, (e) => {
|
|
1044
1041
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
1045
|
-
n || r || i || t === "Escape" && (e.preventDefault(), e.stopPropagation(), this.dispatchEvent(new CustomEvent(
|
|
1042
|
+
n || r || i || t === "Escape" && (e.preventDefault(), e.stopPropagation(), this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
|
|
1046
1043
|
bubbles: !0,
|
|
1047
1044
|
composed: !0
|
|
1048
1045
|
})));
|
|
1049
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
1046
|
+
}), this.attachShadow({ mode: "open" }).appendChild(de.content.cloneNode(!0));
|
|
1050
1047
|
}
|
|
1051
1048
|
connectedCallback() {
|
|
1052
1049
|
var e;
|
|
1053
|
-
r(
|
|
1050
|
+
r(y, this, this.closest("vindral-controller")), (e = a(y, this)) == null || e.connectListener(this), this.tabIndex = -1, i(G, this, Te).call(this), i(G, this, Ee).call(this), i(G, this, De).call(this), i(G, this, ze).call(this), i(G, this, Ye).call(this), i(G, this, Ot).call(this), i(G, this, St).call(this), i(G, this, qe).call(this), this.setAttribute("data-density", "compact"), i(G, this, Me).call(this), i(G, this, Le).call(this), i(G, this, Re).call(this), i(G, this, Et).call(this), i(G, this, ot).call(this), this.addEventListener("keydown", a(be, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
|
|
1054
1051
|
}
|
|
1055
1052
|
disconnectedCallback() {
|
|
1056
1053
|
var e;
|
|
1057
|
-
(e = a(
|
|
1054
|
+
(e = a(y, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", a(be, this)), i(G, this, it).call(this), i(G, this, st).call(this), i(G, this, Ie).call(this), a(N, this).clear();
|
|
1058
1055
|
}
|
|
1059
1056
|
attributeChangedCallback(e, t, n) {
|
|
1060
1057
|
if (t !== n) switch (e) {
|
|
1061
|
-
case
|
|
1058
|
+
case l.DEBUG_PANEL_OPEN:
|
|
1062
1059
|
n === null ? i(G, this, it).call(this) : (i(G, this, rt).call(this), this.focus({ preventScroll: !0 }));
|
|
1063
1060
|
break;
|
|
1064
|
-
case
|
|
1061
|
+
case l.TARGET_BUFFER_TIME:
|
|
1065
1062
|
if (n) {
|
|
1066
1063
|
let e = parseInt(n, 10);
|
|
1067
|
-
Number.isNaN(e) || (e !== a(
|
|
1064
|
+
Number.isNaN(e) || (e !== a(T, this) && i(G, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), r(T, this, e), i(G, this, Z).call(this));
|
|
1068
1065
|
}
|
|
1069
1066
|
break;
|
|
1070
|
-
case
|
|
1067
|
+
case l.DRIFT:
|
|
1071
1068
|
if (n) {
|
|
1072
1069
|
let e = parseFloat(n);
|
|
1073
|
-
Number.isNaN(e) || (r(
|
|
1070
|
+
Number.isNaN(e) || (r(E, this, e), i(G, this, Je).call(this));
|
|
1074
1071
|
}
|
|
1075
1072
|
break;
|
|
1076
|
-
case
|
|
1073
|
+
case l.RENDITION_LEVELS:
|
|
1077
1074
|
if (n) try {
|
|
1078
1075
|
let e = JSON.parse(n);
|
|
1079
|
-
Array.isArray(e) && (r(
|
|
1076
|
+
Array.isArray(e) && (r(b, this, e), i(G, this, $e).call(this));
|
|
1080
1077
|
} catch (e) {}
|
|
1081
1078
|
break;
|
|
1082
|
-
case
|
|
1083
|
-
r(
|
|
1079
|
+
case l.MAX_VIDEO_BITRATE:
|
|
1080
|
+
r(x, this, n ? parseInt(n, 10) : 2 ** 53 - 1), Number.isNaN(a(x, this)) && r(x, this, 2 ** 53 - 1), i(G, this, tt).call(this);
|
|
1084
1081
|
break;
|
|
1085
|
-
case
|
|
1086
|
-
r(
|
|
1082
|
+
case l.ABR_ENABLED:
|
|
1083
|
+
r(S, this, n !== null && n !== "false"), i(G, this, Ze).call(this), i(G, this, Qe).call(this);
|
|
1087
1084
|
break;
|
|
1088
|
-
case
|
|
1089
|
-
r(
|
|
1085
|
+
case l.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
1086
|
+
r(C, this, n !== null && n !== "false"), i(G, this, Qe).call(this);
|
|
1090
1087
|
break;
|
|
1091
|
-
case
|
|
1088
|
+
case l.RENDITION_LEVEL:
|
|
1092
1089
|
if (n) try {
|
|
1093
|
-
var
|
|
1094
|
-
let e = JSON.parse(n), t = a(
|
|
1095
|
-
if (r(
|
|
1090
|
+
var o;
|
|
1091
|
+
let e = JSON.parse(n), t = a(w, this);
|
|
1092
|
+
if (r(w, this, e), i(G, this, tt).call(this), t && (o = e.video) != null && o.width && e.video.height) {
|
|
1096
1093
|
let n = t.video ? `${t.video.width}x${t.video.height}` : "?", r = `${e.video.width}x${e.video.height}`;
|
|
1097
1094
|
n !== r && i(G, this, $).call(this, "Quality", `Switched: ${n} → ${r}`);
|
|
1098
1095
|
}
|
|
@@ -1103,16 +1100,16 @@ var fe = de, v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(
|
|
|
1103
1100
|
};
|
|
1104
1101
|
function K(e) {
|
|
1105
1102
|
if (!this.shadowRoot) return null;
|
|
1106
|
-
if (a(
|
|
1103
|
+
if (a(N, this).has(e)) return a(N, this).get(e);
|
|
1107
1104
|
let t = this.shadowRoot.querySelector(e);
|
|
1108
|
-
return a(
|
|
1105
|
+
return a(N, this).set(e, t), t;
|
|
1109
1106
|
}
|
|
1110
1107
|
function q(e, t) {
|
|
1111
1108
|
!e || e.textContent === t || (e.textContent = t);
|
|
1112
1109
|
}
|
|
1113
1110
|
function Se() {
|
|
1114
1111
|
var e, t, n, i, o, s, c;
|
|
1115
|
-
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(fe, this, Array.from(((n = this.shadowRoot) == null ? void 0 : n.querySelectorAll("#latency-strip-increase")) || [])), r(pe, this, Array.from(((i = this.shadowRoot) == null ? void 0 : i.querySelectorAll(".preset-btn[data-value]")) || [])), r(I, this, ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), r(L, this, ((s = a(I, this)) == null ? void 0 : s.querySelector(".dynamic-subtitle")) || null), r(R, this, ((c = a(I, this)) == null ? void 0 : c.querySelector(".dynamic-value")) || null);
|
|
1116
1113
|
}
|
|
1117
1114
|
function Ce(e) {
|
|
1118
1115
|
var t;
|
|
@@ -1120,13 +1117,13 @@ function Ce(e) {
|
|
|
1120
1117
|
return !!n && !n.hidden;
|
|
1121
1118
|
}
|
|
1122
1119
|
function we() {
|
|
1123
|
-
let e = `${a(
|
|
1124
|
-
i(G, this, q).call(this, a(B, this), e), i(G, this, J).call(this, "events-section", String(a(
|
|
1120
|
+
let e = `${a(k, this).length} event${a(k, this).length === 1 ? "" : "s"}`;
|
|
1121
|
+
i(G, this, q).call(this, a(B, this), e), i(G, this, J).call(this, "events-section", String(a(k, this).length));
|
|
1125
1122
|
}
|
|
1126
1123
|
function Te() {
|
|
1127
1124
|
let e = i(G, this, K).call(this, ".close-btn");
|
|
1128
1125
|
e == null || e.addEventListener("click", (e) => {
|
|
1129
|
-
e.stopPropagation(), this.dispatchEvent(new CustomEvent(
|
|
1126
|
+
e.stopPropagation(), this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
|
|
1130
1127
|
bubbles: !0,
|
|
1131
1128
|
composed: !0
|
|
1132
1129
|
}));
|
|
@@ -1156,7 +1153,7 @@ function De() {
|
|
|
1156
1153
|
function Oe() {
|
|
1157
1154
|
if (!a(H, this) || !a(W, this) || !a(U, this)) return;
|
|
1158
1155
|
let { scrollLeft: e, scrollWidth: t, clientWidth: n } = a(W, this), r = t > n + 4, i = e + n >= t - 4;
|
|
1159
|
-
a(H, this).setAttribute("data-visible", String(r)), a(H, this).innerHTML = i ?
|
|
1156
|
+
a(H, this).setAttribute("data-visible", String(r)), a(H, this).innerHTML = i ? le : ce, a(U, this).toggleAttribute("data-can-scroll-right", r && !i);
|
|
1160
1157
|
}
|
|
1161
1158
|
function ke(e) {
|
|
1162
1159
|
let t = i(G, this, K).call(this, `.section#${e}`);
|
|
@@ -1168,7 +1165,7 @@ function Ae(e, t) {
|
|
|
1168
1165
|
let r = !n.hidden;
|
|
1169
1166
|
n.hidden = !t;
|
|
1170
1167
|
let o = i(G, this, K).call(this, `.section-tab[data-target="${e}"]`);
|
|
1171
|
-
o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !a(
|
|
1168
|
+
o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !a(O, this) && r !== t && i(G, this, Ie).call(this), e === "events-section" && t && a(V, this) && i(G, this, Et).call(this, !0), i(G, this, je).call(this));
|
|
1172
1169
|
}
|
|
1173
1170
|
function je() {
|
|
1174
1171
|
this.toggleAttribute("data-collapsed", i(G, this, Ne).call(this).length === 0);
|
|
@@ -1189,7 +1186,7 @@ function J(e, t) {
|
|
|
1189
1186
|
r.getAttribute("aria-label") !== a && r.setAttribute("aria-label", a);
|
|
1190
1187
|
}
|
|
1191
1188
|
function Y(e) {
|
|
1192
|
-
return
|
|
1189
|
+
return oe.includes(e);
|
|
1193
1190
|
}
|
|
1194
1191
|
function Ne() {
|
|
1195
1192
|
var e;
|
|
@@ -1207,12 +1204,12 @@ function Fe(e) {
|
|
|
1207
1204
|
Array.from(n.querySelectorAll(".section-tab[data-target]")).forEach((e) => {
|
|
1208
1205
|
let t = e.getAttribute("data-target");
|
|
1209
1206
|
t && i(G, this, Y).call(this, t) && r.set(t, e);
|
|
1210
|
-
}),
|
|
1207
|
+
}), oe.forEach((e) => {
|
|
1211
1208
|
var t;
|
|
1212
1209
|
let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
|
|
1213
1210
|
n && a.set(e, n);
|
|
1214
1211
|
});
|
|
1215
|
-
let o = [...e, ...
|
|
1212
|
+
let o = [...e, ...oe.filter((t) => !e.includes(t))];
|
|
1216
1213
|
o.forEach((e) => {
|
|
1217
1214
|
let t = r.get(e);
|
|
1218
1215
|
t && n.appendChild(t);
|
|
@@ -1232,13 +1229,13 @@ function Ie() {
|
|
|
1232
1229
|
sectionOrder: i(G, this, Pe).call(this)
|
|
1233
1230
|
};
|
|
1234
1231
|
try {
|
|
1235
|
-
sessionStorage.setItem(
|
|
1232
|
+
sessionStorage.setItem(ae, JSON.stringify(e));
|
|
1236
1233
|
} catch (e) {}
|
|
1237
1234
|
}
|
|
1238
1235
|
function Le() {
|
|
1239
1236
|
let e = null;
|
|
1240
1237
|
try {
|
|
1241
|
-
e = sessionStorage.getItem(
|
|
1238
|
+
e = sessionStorage.getItem(ae);
|
|
1242
1239
|
} catch (e) {
|
|
1243
1240
|
return;
|
|
1244
1241
|
}
|
|
@@ -1251,50 +1248,50 @@ function Le() {
|
|
|
1251
1248
|
}
|
|
1252
1249
|
if (!t || typeof t != "object") return;
|
|
1253
1250
|
let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && i(G, this, Y).call(this, e)) : [], a = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && i(G, this, Y).call(this, e)) : [];
|
|
1254
|
-
r(
|
|
1251
|
+
r(O, this, !0);
|
|
1255
1252
|
try {
|
|
1256
1253
|
if (a.length > 0 && i(G, this, Fe).call(this, a), Array.isArray(t.openSections)) {
|
|
1257
1254
|
let e = new Set(n);
|
|
1258
|
-
|
|
1255
|
+
oe.forEach((t) => {
|
|
1259
1256
|
i(G, this, Ae).call(this, t, e.has(t));
|
|
1260
1257
|
});
|
|
1261
1258
|
}
|
|
1262
1259
|
i(G, this, Me).call(this);
|
|
1263
1260
|
} finally {
|
|
1264
|
-
r(
|
|
1261
|
+
r(O, this, !1);
|
|
1265
1262
|
}
|
|
1266
1263
|
i(G, this, Ie).call(this);
|
|
1267
1264
|
}
|
|
1268
1265
|
function Re() {
|
|
1269
|
-
i(G, this, J).call(this, "latency-section", "Drift -"), i(G, this, J).call(this, "quality-section", "Auto"), i(G, this, J).call(this, "playback-section", "Buffer -"), i(G, this, J).call(this, "network-section", "RTT -"), i(G, this, J).call(this, "stats-section", "Up -"), i(G, this, J).call(this, "events-section", `${a(
|
|
1266
|
+
i(G, this, J).call(this, "latency-section", "Drift -"), i(G, this, J).call(this, "quality-section", "Auto"), i(G, this, J).call(this, "playback-section", "Buffer -"), i(G, this, J).call(this, "network-section", "RTT -"), i(G, this, J).call(this, "stats-section", "Up -"), i(G, this, J).call(this, "events-section", `${a(k, this).length}`);
|
|
1270
1267
|
}
|
|
1271
1268
|
function ze() {
|
|
1272
|
-
i(G, this, Se).call(this), a(
|
|
1269
|
+
i(G, this, Se).call(this), a(F, this).forEach((e) => {
|
|
1273
1270
|
e.addEventListener("click", (e) => {
|
|
1274
1271
|
e.stopPropagation(), i(G, this, Ve).call(this, -i(G, this, Be).call(this, !1));
|
|
1275
1272
|
});
|
|
1276
|
-
}), a(
|
|
1273
|
+
}), a(fe, this).forEach((e) => {
|
|
1277
1274
|
e.addEventListener("click", (e) => {
|
|
1278
1275
|
e.stopPropagation(), i(G, this, Ve).call(this, i(G, this, Be).call(this, !0));
|
|
1279
1276
|
});
|
|
1280
1277
|
});
|
|
1281
1278
|
}
|
|
1282
1279
|
function Be(e) {
|
|
1283
|
-
let t = a(
|
|
1280
|
+
let t = a(T, this);
|
|
1284
1281
|
return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
|
|
1285
1282
|
}
|
|
1286
1283
|
function Ve(e) {
|
|
1287
|
-
let t = Math.max(50, Math.min(
|
|
1288
|
-
t !== a(
|
|
1284
|
+
let t = Math.max(50, Math.min(d, a(T, this) + e));
|
|
1285
|
+
t !== a(T, this) && (r(T, this, t), i(G, this, He).call(this, t), i(G, this, Ue).call(this), i(G, this, Z).call(this));
|
|
1289
1286
|
}
|
|
1290
1287
|
function He(e) {
|
|
1291
|
-
if (!a(
|
|
1292
|
-
let { isDynamic: t, minBuffer: n, maxBuffer: r } = i(G, this,
|
|
1293
|
-
t && (e < n ? a(
|
|
1288
|
+
if (!a(y, this)) return;
|
|
1289
|
+
let { isDynamic: t, minBuffer: n, maxBuffer: r } = i(G, this, X).call(this);
|
|
1290
|
+
t && (e < n ? a(y, this).setAttribute("min-buffer-time", String(e)) : e > r && a(y, this).setAttribute("max-buffer-time", String(e)));
|
|
1294
1291
|
}
|
|
1295
|
-
function
|
|
1292
|
+
function X() {
|
|
1296
1293
|
var e, t;
|
|
1297
|
-
let n = (e = a(
|
|
1294
|
+
let n = (e = a(y, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = a(y, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
|
|
1298
1295
|
if (!n || !r) return {
|
|
1299
1296
|
isDynamic: !1,
|
|
1300
1297
|
minBuffer: 0,
|
|
@@ -1311,36 +1308,36 @@ function Ue() {
|
|
|
1311
1308
|
maxBuffer: o
|
|
1312
1309
|
};
|
|
1313
1310
|
}
|
|
1314
|
-
function
|
|
1315
|
-
this.dispatchEvent(new CustomEvent(
|
|
1311
|
+
function Ue() {
|
|
1312
|
+
this.dispatchEvent(new CustomEvent(f.SET_TARGET_BUFFER_TIME, {
|
|
1316
1313
|
bubbles: !0,
|
|
1317
1314
|
composed: !0,
|
|
1318
|
-
detail: a(
|
|
1315
|
+
detail: a(T, this)
|
|
1319
1316
|
}));
|
|
1320
1317
|
}
|
|
1321
1318
|
function We(e) {
|
|
1322
|
-
if (i(G, this,
|
|
1319
|
+
if (i(G, this, X).call(this).isDynamic) {
|
|
1323
1320
|
i(G, this, Ke).call(this, e), i(G, this, Z).call(this);
|
|
1324
1321
|
return;
|
|
1325
1322
|
}
|
|
1326
|
-
r(
|
|
1323
|
+
r(T, this, e), i(G, this, Ue).call(this), i(G, this, Z).call(this);
|
|
1327
1324
|
}
|
|
1328
1325
|
function Ge() {
|
|
1329
|
-
if (i(G, this,
|
|
1330
|
-
let e = Math.max(50, Math.min(
|
|
1331
|
-
t === n && n < 5e3 ? n = Math.min(
|
|
1326
|
+
if (i(G, this, X).call(this).isDynamic || !a(y, this)) return;
|
|
1327
|
+
let e = Math.max(50, Math.min(d, a(T, this))), t = Math.max(50, e - 100), n = Math.min(d, e + 100);
|
|
1328
|
+
t === n && n < 5e3 ? n = Math.min(d, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), a(y, this).setAttribute("min-buffer-time", String(t)), a(y, this).setAttribute("max-buffer-time", String(n)), i(G, this, Ue).call(this), i(G, this, Z).call(this);
|
|
1332
1329
|
}
|
|
1333
1330
|
function Ke(e) {
|
|
1334
|
-
if (!a(
|
|
1335
|
-
let t = Math.max(50, Math.min(
|
|
1336
|
-
r(
|
|
1331
|
+
if (!a(y, this)) return;
|
|
1332
|
+
let t = Math.max(50, Math.min(d, e));
|
|
1333
|
+
r(T, this, t);
|
|
1337
1334
|
let n = String(t);
|
|
1338
|
-
a(
|
|
1335
|
+
a(y, this).setAttribute("min-buffer-time", n), a(y, this).setAttribute("max-buffer-time", n), i(G, this, Ue).call(this);
|
|
1339
1336
|
}
|
|
1340
1337
|
function qe() {
|
|
1341
1338
|
let e = i(G, this, K).call(this, "#latency-presets");
|
|
1342
1339
|
if (!e) return;
|
|
1343
|
-
e.innerHTML = "",
|
|
1340
|
+
e.innerHTML = "", v.forEach((t) => {
|
|
1344
1341
|
let n = document.createElement("button");
|
|
1345
1342
|
n.className = "preset-btn", n.type = "button", n.setAttribute("data-value", String(t.value)), n.setAttribute("aria-label", `${t.label} preset (${t.value}ms)`);
|
|
1346
1343
|
let r = document.createElement("span");
|
|
@@ -1364,39 +1361,39 @@ function qe() {
|
|
|
1364
1361
|
}), e.appendChild(t), i(G, this, Se).call(this), i(G, this, Z).call(this);
|
|
1365
1362
|
}
|
|
1366
1363
|
function Z() {
|
|
1367
|
-
a(
|
|
1368
|
-
let { isDynamic: e, minBuffer: t, maxBuffer: n } = i(G, this,
|
|
1369
|
-
if (a(
|
|
1370
|
-
i(G, this, q).call(this, e, `${a(
|
|
1371
|
-
}), a(
|
|
1372
|
-
e.disabled = a(
|
|
1373
|
-
}), a(
|
|
1374
|
-
e.disabled = a(
|
|
1375
|
-
}), a(I, this) && a(I, this).setAttribute("data-active", String(e)), a(L, this) && i(G, this, q).call(this, a(L, this), e ? `${t}ms - ${n}ms` :
|
|
1364
|
+
a(P, this).length === 0 && i(G, this, Se).call(this);
|
|
1365
|
+
let { isDynamic: e, minBuffer: t, maxBuffer: n } = i(G, this, X).call(this);
|
|
1366
|
+
if (a(P, this).forEach((e) => {
|
|
1367
|
+
i(G, this, q).call(this, e, `${a(T, this)}ms`);
|
|
1368
|
+
}), a(F, this).forEach((e) => {
|
|
1369
|
+
e.disabled = a(T, this) <= 50;
|
|
1370
|
+
}), a(fe, this).forEach((e) => {
|
|
1371
|
+
e.disabled = a(T, this) >= d;
|
|
1372
|
+
}), a(I, this) && a(I, this).setAttribute("data-active", String(e)), a(L, this) && i(G, this, q).call(this, a(L, this), e ? `${t}ms - ${n}ms` : re), a(R, this) && i(G, this, q).call(this, a(R, this), e ? "range" : ""), a(pe, this).length === 0) return;
|
|
1376
1373
|
let r = null;
|
|
1377
1374
|
if (!e) {
|
|
1378
|
-
let e =
|
|
1375
|
+
let e = v.find((e) => e.value === a(T, this)), t = ie(a(T, this)), n = v.reduce((e, t) => Math.abs(t.value - a(T, this)) < Math.abs(e.value - a(T, this)) ? t : e);
|
|
1379
1376
|
r = e || t || n;
|
|
1380
1377
|
}
|
|
1381
|
-
a(
|
|
1378
|
+
a(pe, this).forEach((t) => {
|
|
1382
1379
|
let n = parseInt(t.getAttribute("data-value") || "0", 10), i = !e && (r == null ? void 0 : r.value) === n;
|
|
1383
1380
|
t.setAttribute("data-active", String(i));
|
|
1384
1381
|
});
|
|
1385
1382
|
}
|
|
1386
1383
|
function Je() {
|
|
1387
|
-
let e = i(G, this, K).call(this, "#current-drift"), t = `${a(
|
|
1384
|
+
let e = i(G, this, K).call(this, "#current-drift"), t = `${a(E, this).toFixed(1)}ms`;
|
|
1388
1385
|
if (e) {
|
|
1389
1386
|
i(G, this, q).call(this, e, t);
|
|
1390
|
-
let n = Math.abs(a(
|
|
1387
|
+
let n = Math.abs(a(E, this));
|
|
1391
1388
|
n > 200 ? e.setAttribute("data-status", "error") : n > 100 ? e.setAttribute("data-status", "warning") : e.setAttribute("data-status", "good");
|
|
1392
1389
|
}
|
|
1393
|
-
let n = a(
|
|
1390
|
+
let n = a(E, this) > 0 ? `+${t}` : t;
|
|
1394
1391
|
i(G, this, J).call(this, "latency-section", `Drift ${n}`);
|
|
1395
1392
|
}
|
|
1396
1393
|
function Ye() {
|
|
1397
1394
|
let e = i(G, this, K).call(this, "#abr-auto-btn"), t = i(G, this, K).call(this, "#abr-fixed-btn");
|
|
1398
1395
|
e == null || e.addEventListener("click", (e) => {
|
|
1399
|
-
e.stopPropagation(), r(
|
|
1396
|
+
e.stopPropagation(), r(S, this, !0), i(G, this, Ze).call(this), this.dispatchEvent(new CustomEvent(f.SET_ABR_MODE, {
|
|
1400
1397
|
bubbles: !0,
|
|
1401
1398
|
composed: !0,
|
|
1402
1399
|
detail: !0
|
|
@@ -1404,11 +1401,11 @@ function Ye() {
|
|
|
1404
1401
|
}), t == null || t.addEventListener("click", (e) => {
|
|
1405
1402
|
e.stopPropagation();
|
|
1406
1403
|
let t = i(G, this, Xe).call(this);
|
|
1407
|
-
t && this.dispatchEvent(new CustomEvent(
|
|
1404
|
+
t && this.dispatchEvent(new CustomEvent(f.SET_RENDITION, {
|
|
1408
1405
|
bubbles: !0,
|
|
1409
1406
|
composed: !0,
|
|
1410
1407
|
detail: t
|
|
1411
|
-
})), r(
|
|
1408
|
+
})), r(S, this, !1), i(G, this, Ze).call(this), this.dispatchEvent(new CustomEvent(f.SET_ABR_MODE, {
|
|
1412
1409
|
bubbles: !0,
|
|
1413
1410
|
composed: !0,
|
|
1414
1411
|
detail: !1
|
|
@@ -1416,52 +1413,52 @@ function Ye() {
|
|
|
1416
1413
|
});
|
|
1417
1414
|
let n = i(G, this, K).call(this, "#size-cap-toggle");
|
|
1418
1415
|
n == null || n.addEventListener("click", (e) => {
|
|
1419
|
-
e.stopPropagation(), r(
|
|
1416
|
+
e.stopPropagation(), r(C, this, !a(C, this)), i(G, this, Qe).call(this), this.dispatchEvent(new CustomEvent(f.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
1420
1417
|
bubbles: !0,
|
|
1421
1418
|
composed: !0,
|
|
1422
|
-
detail: a(
|
|
1423
|
-
})), i(G, this, $).call(this, "Quality", `Size cap: ${a(
|
|
1419
|
+
detail: a(C, this)
|
|
1420
|
+
})), i(G, this, $).call(this, "Quality", `Size cap: ${a(C, this) ? "On" : "Off"}`);
|
|
1424
1421
|
});
|
|
1425
1422
|
}
|
|
1426
1423
|
function Xe() {
|
|
1427
|
-
let e = [...a(
|
|
1424
|
+
let e = [...a(b, this)].sort((e, t) => {
|
|
1428
1425
|
var n, r;
|
|
1429
1426
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
1430
1427
|
});
|
|
1431
1428
|
return e.find((e) => {
|
|
1432
1429
|
var t;
|
|
1433
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= a(
|
|
1430
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= a(x, this);
|
|
1434
1431
|
}) || e[e.length - 1] || null;
|
|
1435
1432
|
}
|
|
1436
1433
|
function Ze() {
|
|
1437
1434
|
let e = i(G, this, K).call(this, "#abr-auto-btn"), t = i(G, this, K).call(this, "#abr-fixed-btn"), n = i(G, this, K).call(this, "#quality-status-text");
|
|
1438
|
-
e == null || e.setAttribute("data-active", String(a(
|
|
1435
|
+
e == null || e.setAttribute("data-active", String(a(S, this))), t == null || t.setAttribute("data-active", String(!a(S, this))), n && i(G, this, q).call(this, n, a(S, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), i(G, this, tt).call(this);
|
|
1439
1436
|
}
|
|
1440
1437
|
function Qe() {
|
|
1441
1438
|
let e = i(G, this, K).call(this, "#size-cap-toggle");
|
|
1442
|
-
e && (e.textContent = a(
|
|
1439
|
+
e && (e.textContent = a(C, this) ? "On" : "Off", e.setAttribute("data-active", String(a(C, this))), e.disabled = !a(S, this));
|
|
1443
1440
|
}
|
|
1444
1441
|
function $e() {
|
|
1445
1442
|
var e;
|
|
1446
1443
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#quality-menu");
|
|
1447
|
-
t && (t.innerHTML = "", a(
|
|
1444
|
+
t && (t.innerHTML = "", a(b, this).sort((e, t) => {
|
|
1448
1445
|
var n, r;
|
|
1449
1446
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
1450
1447
|
}).forEach((e) => {
|
|
1451
|
-
var n, r, a, o, l,
|
|
1448
|
+
var n, r, a, o, l, u, ee;
|
|
1452
1449
|
let d = document.createElement("button");
|
|
1453
1450
|
d.className = "quality-item", d.type = "button", d.setAttribute("data-id", String(((n = e.video) == null ? void 0 : n.id) || 0)), d.setAttribute("data-bitrate", String(((r = e.video) == null ? void 0 : r.bitRate) || 0)), d.setAttribute("aria-label", e.video ? `Set quality to ${s(e.video)}` : "Set quality");
|
|
1454
|
-
let
|
|
1455
|
-
|
|
1456
|
-
let p = document.createElement("span");
|
|
1457
|
-
p.className = "quality-item-title", p.textContent = e.video ? s(e.video) : "";
|
|
1451
|
+
let p = document.createElement("div");
|
|
1452
|
+
p.className = "quality-item-info";
|
|
1458
1453
|
let m = document.createElement("span");
|
|
1459
|
-
m.className = "quality-item-
|
|
1460
|
-
let h =
|
|
1461
|
-
|
|
1462
|
-
let g =
|
|
1463
|
-
|
|
1464
|
-
|
|
1454
|
+
m.className = "quality-item-title", m.textContent = e.video ? s(e.video) : "";
|
|
1455
|
+
let h = document.createElement("span");
|
|
1456
|
+
h.className = "quality-item-subtitle";
|
|
1457
|
+
let g = i(G, this, et).call(this, (a = e.video) == null ? void 0 : a.frameRate), te = g ? `, ${g}fps` : "";
|
|
1458
|
+
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
|
+
let _ = document.createElement("span");
|
|
1460
|
+
_.className = "quality-current-label", _.textContent = "Current", d.appendChild(_), d.addEventListener("click", (t) => {
|
|
1461
|
+
t.stopPropagation(), this.dispatchEvent(new CustomEvent(f.SET_RENDITION, {
|
|
1465
1462
|
bubbles: !0,
|
|
1466
1463
|
composed: !0,
|
|
1467
1464
|
detail: e
|
|
@@ -1476,23 +1473,23 @@ function et(e) {
|
|
|
1476
1473
|
}
|
|
1477
1474
|
function tt() {
|
|
1478
1475
|
var e, t, n;
|
|
1479
|
-
let r = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = a(
|
|
1476
|
+
let r = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = a(w, this)) == null || (t = t.video) == null ? void 0 : t.id, s = a(x, this), l = i(G, this, nt).call(this, r, s);
|
|
1480
1477
|
r == null || r.forEach((e) => {
|
|
1481
1478
|
let t = parseInt(e.getAttribute("data-id") || "0", 10), n = parseInt(e.getAttribute("data-bitrate") || "0", 10);
|
|
1482
1479
|
e.setAttribute("data-playing", String(t === o));
|
|
1483
|
-
let r =
|
|
1484
|
-
e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), a(
|
|
1480
|
+
let r = l !== null && n === l;
|
|
1481
|
+
e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), a(S, this) ? e.setAttribute("data-capped", String(n > s)) : e.removeAttribute("data-capped");
|
|
1485
1482
|
});
|
|
1486
|
-
let
|
|
1487
|
-
if (
|
|
1488
|
-
i(G, this, J).call(this, "quality-section", `${
|
|
1483
|
+
let u = (n = a(w, this)) == null ? void 0 : n.video;
|
|
1484
|
+
if (u != null && u.width && u.height) {
|
|
1485
|
+
i(G, this, J).call(this, "quality-section", `${u.width}x${u.height}`);
|
|
1489
1486
|
return;
|
|
1490
1487
|
}
|
|
1491
|
-
if (typeof
|
|
1492
|
-
i(G, this, J).call(this, "quality-section",
|
|
1488
|
+
if (typeof l == "number" && l > 0) {
|
|
1489
|
+
i(G, this, J).call(this, "quality-section", c(l, 1));
|
|
1493
1490
|
return;
|
|
1494
1491
|
}
|
|
1495
|
-
i(G, this, J).call(this, "quality-section", a(
|
|
1492
|
+
i(G, this, J).call(this, "quality-section", a(S, this) ? "Auto" : "Fixed");
|
|
1496
1493
|
}
|
|
1497
1494
|
function nt(e, t) {
|
|
1498
1495
|
var n;
|
|
@@ -1504,14 +1501,14 @@ function nt(e, t) {
|
|
|
1504
1501
|
}), (n = r) == null ? i : n;
|
|
1505
1502
|
}
|
|
1506
1503
|
function rt() {
|
|
1507
|
-
i(G, this, it).call(this), i(G, this, ot).call(this), i(G, this, at).call(this), r(
|
|
1504
|
+
i(G, this, it).call(this), i(G, this, ot).call(this), i(G, this, at).call(this), r(D, this, window.setInterval(() => i(G, this, at).call(this), 1e3));
|
|
1508
1505
|
}
|
|
1509
1506
|
function it() {
|
|
1510
|
-
a(
|
|
1507
|
+
a(D, this) !== null && (clearInterval(a(D, this)), r(D, this, null));
|
|
1511
1508
|
}
|
|
1512
1509
|
function at() {
|
|
1513
1510
|
var e;
|
|
1514
|
-
let t = (e = a(
|
|
1511
|
+
let t = (e = a(y, this)) == null ? void 0 : e.instance;
|
|
1515
1512
|
if (t) try {
|
|
1516
1513
|
let e = t.getStatistics();
|
|
1517
1514
|
i(G, this, Z).call(this), i(G, this, Q).call(this, "#sdk-version", e.version || "-"), i(G, this, Q).call(this, "#session-id", e.sessionId || "-"), i(G, this, Q).call(this, "#client-id", e.clientId || "-"), i(G, this, Q).call(this, "#channel-id", e.channelId || "-"), i(G, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), i(G, this, Q).call(this, "#uptime", i(G, this, ct).call(this, e.uptime)), i(G, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), i(G, this, Q).call(this, "#connection-state", t.connectionState || "-"), i(G, this, Q).call(this, "#playback-state", t.playbackState || "-");
|
|
@@ -1528,19 +1525,19 @@ function at() {
|
|
|
1528
1525
|
let s = i(G, this, ht).call(this, e.rtt);
|
|
1529
1526
|
i(G, this, Q).call(this, "#network-rtt", s), i(G, this, Q).call(this, "#network-estimated-bandwidth", i(G, this, dt).call(this, e.estimatedBandwidth)), i(G, this, Q).call(this, "#network-video-bitrate", i(G, this, dt).call(this, e.videoBitRate)), i(G, this, Q).call(this, "#network-audio-bitrate", i(G, this, dt).call(this, e.audioBitRate)), i(G, this, Q).call(this, "#network-bitrate", i(G, this, dt).call(this, e.averageBitRate)), i(G, this, Q).call(this, "#network-audio-jitter", i(G, this, _t).call(this, e.audioJitter)), i(G, this, Q).call(this, "#network-video-jitter", i(G, this, _t).call(this, e.videoJitter)), i(G, this, Q).call(this, "#network-connect-success", i(G, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), i(G, this, Q).call(this, "#network-reconnects-per-hour", i(G, this, ft).call(this, e.reconnectsPerHour, "h")), i(G, this, J).call(this, "network-section", i(G, this, gt).call(this, e.rtt));
|
|
1530
1527
|
let c = i(G, this, ct).call(this, e.uptime);
|
|
1531
|
-
i(G, this, J).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), a(
|
|
1528
|
+
i(G, this, J).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), a(j, this) && (r(j, this, !1), i(G, this, $).call(this, "System", "Statistics stream recovered"));
|
|
1532
1529
|
} catch (e) {
|
|
1533
|
-
a(
|
|
1530
|
+
a(j, this) || (r(j, this, !0), i(G, this, $).call(this, "System", "Failed to read statistics", "error"));
|
|
1534
1531
|
}
|
|
1535
1532
|
}
|
|
1536
1533
|
function ot() {
|
|
1537
1534
|
var e;
|
|
1538
|
-
let t = (e = a(
|
|
1539
|
-
!t || a(
|
|
1535
|
+
let t = (e = a(y, this)) == null ? void 0 : e.instance;
|
|
1536
|
+
!t || a(M, this) === t || (i(G, this, st).call(this), r(M, this, t), t.on("connection state", a(me, this)), t.on("playback state", a(he, this)), t.on("buffer state event", a(ge, this)), t.on("error", a(_e, this)), t.on("rendition level", a(ve, this)), t.on("is live", a(ye, this)));
|
|
1540
1537
|
}
|
|
1541
1538
|
function st() {
|
|
1542
|
-
let e = a(
|
|
1543
|
-
e && (e.off("connection state", a(me, this)), e.off("playback state", a(he, this)), e.off("buffer state event", a(ge, this)), e.off("error", a(_e, this)), e.off("rendition level", a(ve, this)), e.off("is live", a(ye, this)), r(
|
|
1539
|
+
let e = a(M, this);
|
|
1540
|
+
e && (e.off("connection state", a(me, this)), e.off("playback state", a(he, this)), e.off("buffer state event", a(ge, this)), e.off("error", a(_e, this)), e.off("rendition level", a(ve, this)), e.off("is live", a(ye, this)), r(M, this, null));
|
|
1544
1541
|
}
|
|
1545
1542
|
function Q(e, t) {
|
|
1546
1543
|
i(G, this, q).call(this, i(G, this, K).call(this, e), t);
|
|
@@ -1557,7 +1554,7 @@ function ut(e, t = 1) {
|
|
|
1557
1554
|
return typeof e != "number" || Number.isNaN(e) ? "-" : `${(e * 100).toFixed(t)}%`;
|
|
1558
1555
|
}
|
|
1559
1556
|
function dt(e) {
|
|
1560
|
-
return typeof e != "number" || e <= 0 || Number.isNaN(e) ? "-" :
|
|
1557
|
+
return typeof e != "number" || e <= 0 || Number.isNaN(e) ? "-" : c(e, 2);
|
|
1561
1558
|
}
|
|
1562
1559
|
function ft(e, t) {
|
|
1563
1560
|
return typeof e != "number" || Number.isNaN(e) ? "-" : `${e.toFixed(2)}/${t}`;
|
|
@@ -1599,20 +1596,20 @@ function xt(e) {
|
|
|
1599
1596
|
}
|
|
1600
1597
|
function St() {
|
|
1601
1598
|
var e = this;
|
|
1602
|
-
let n = i(G, this, K).call(this, "#events-clear"),
|
|
1599
|
+
let n = i(G, this, K).call(this, "#events-clear"), s = i(G, this, K).call(this, "#copy-events");
|
|
1603
1600
|
r(z, this, i(G, this, K).call(this, "#events-list")), r(B, this, i(G, this, K).call(this, "#events-count")), n == null || n.addEventListener("click", (e) => {
|
|
1604
|
-
e.stopPropagation(), r(
|
|
1605
|
-
}),
|
|
1601
|
+
e.stopPropagation(), r(k, this, []), i(G, this, Et).call(this, !0);
|
|
1602
|
+
}), s == null || s.addEventListener("click", function() {
|
|
1606
1603
|
var n = t(function* (t) {
|
|
1607
1604
|
t.stopPropagation();
|
|
1608
|
-
let n = JSON.stringify(a(
|
|
1605
|
+
let n = JSON.stringify(a(k, e).map((e) => o(o({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })), null, 2);
|
|
1609
1606
|
try {
|
|
1610
|
-
yield navigator.clipboard.writeText(n),
|
|
1611
|
-
|
|
1607
|
+
yield navigator.clipboard.writeText(n), s.textContent = "Copied", setTimeout(() => {
|
|
1608
|
+
s.textContent = "Copy";
|
|
1612
1609
|
}, 2e3);
|
|
1613
1610
|
} catch (e) {
|
|
1614
|
-
|
|
1615
|
-
|
|
1611
|
+
s.textContent = "Copy unavailable", setTimeout(() => {
|
|
1612
|
+
s.textContent = "Copy";
|
|
1616
1613
|
}, 2e3);
|
|
1617
1614
|
}
|
|
1618
1615
|
});
|
|
@@ -1622,15 +1619,15 @@ function St() {
|
|
|
1622
1619
|
}());
|
|
1623
1620
|
}
|
|
1624
1621
|
function $(e, t, n = "info") {
|
|
1625
|
-
r(
|
|
1622
|
+
r(A, this, a(A, this) + 1);
|
|
1626
1623
|
let o = {
|
|
1627
|
-
id: a(
|
|
1624
|
+
id: a(A, this),
|
|
1628
1625
|
timestamp: Date.now(),
|
|
1629
1626
|
category: e,
|
|
1630
1627
|
message: t,
|
|
1631
1628
|
level: n
|
|
1632
1629
|
};
|
|
1633
|
-
if (a(
|
|
1630
|
+
if (a(k, this).push(o), a(k, this).length > 250 && a(k, this).splice(0, a(k, this).length - 250), i(G, this, we).call(this), i(G, this, Ce).call(this, "events-section")) {
|
|
1634
1631
|
i(G, this, wt).call(this, o), i(G, this, Tt).call(this);
|
|
1635
1632
|
return;
|
|
1636
1633
|
}
|
|
@@ -1667,14 +1664,14 @@ function Et(e = !1) {
|
|
|
1667
1664
|
r(V, this, !0);
|
|
1668
1665
|
return;
|
|
1669
1666
|
}
|
|
1670
|
-
if (r(V, this, !1), a(
|
|
1667
|
+
if (r(V, this, !1), a(k, this).length === 0) {
|
|
1671
1668
|
a(z, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
|
|
1672
1669
|
return;
|
|
1673
1670
|
}
|
|
1674
1671
|
a(z, this).innerHTML = "";
|
|
1675
1672
|
let t = document.createDocumentFragment();
|
|
1676
|
-
for (let e = a(
|
|
1677
|
-
let n = a(
|
|
1673
|
+
for (let e = a(k, this).length - 1; e >= 0; e--) {
|
|
1674
|
+
let n = a(k, this)[e];
|
|
1678
1675
|
n && t.appendChild(i(G, this, Ct).call(this, n));
|
|
1679
1676
|
}
|
|
1680
1677
|
a(z, this).appendChild(t);
|
|
@@ -1711,28 +1708,28 @@ function Ot() {
|
|
|
1711
1708
|
}
|
|
1712
1709
|
function kt() {
|
|
1713
1710
|
var e;
|
|
1714
|
-
let t = (e = a(
|
|
1711
|
+
let t = (e = a(y, this)) == null ? void 0 : e.instance;
|
|
1715
1712
|
if (!t) return {
|
|
1716
1713
|
error: "Vindral instance not available",
|
|
1717
1714
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1718
1715
|
};
|
|
1719
1716
|
try {
|
|
1720
|
-
return
|
|
1717
|
+
return o(o({}, t.getStatistics()), {}, {
|
|
1721
1718
|
connectionState: t.connectionState,
|
|
1722
1719
|
playbackState: t.playbackState,
|
|
1723
1720
|
playbackLatency: t.playbackLatency,
|
|
1724
1721
|
bufferFullness: t.bufferFullness,
|
|
1725
1722
|
lastBufferEvent: t.lastBufferEvent,
|
|
1726
1723
|
timeSpentBuffering: t.timeSpentBuffering,
|
|
1727
|
-
currentRendition: a(
|
|
1728
|
-
targetBufferTime: a(
|
|
1729
|
-
drift: a(
|
|
1730
|
-
abrEnabled: a(
|
|
1724
|
+
currentRendition: a(w, this),
|
|
1725
|
+
targetBufferTime: a(T, this),
|
|
1726
|
+
drift: a(E, this),
|
|
1727
|
+
abrEnabled: a(S, this),
|
|
1731
1728
|
debugLayout: {
|
|
1732
1729
|
openSections: i(G, this, Ne).call(this),
|
|
1733
1730
|
sectionOrder: i(G, this, Pe).call(this)
|
|
1734
1731
|
},
|
|
1735
|
-
debugEvents: a(
|
|
1732
|
+
debugEvents: a(k, this).map((e) => o(o({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
|
|
1736
1733
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1737
1734
|
});
|
|
1738
1735
|
} catch (e) {
|
|
@@ -1743,20 +1740,20 @@ function kt() {
|
|
|
1743
1740
|
}
|
|
1744
1741
|
}
|
|
1745
1742
|
e(xe, "observedAttributes", [
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1743
|
+
l.DEBUG_PANEL_OPEN,
|
|
1744
|
+
l.TARGET_BUFFER_TIME,
|
|
1745
|
+
l.DRIFT,
|
|
1746
|
+
l.RENDITION_LEVELS,
|
|
1747
|
+
l.MAX_VIDEO_BITRATE,
|
|
1748
|
+
l.ABR_ENABLED,
|
|
1749
|
+
l.SIZE_BASED_RESOLUTION_CAP_ENABLED,
|
|
1750
|
+
l.RENDITION_LEVEL
|
|
1754
1751
|
]);
|
|
1755
1752
|
//#endregion
|
|
1756
1753
|
//#region ../../libs/player-next/src/registerDebugComponents.ts
|
|
1757
|
-
var At = /* @__PURE__ */
|
|
1754
|
+
var At = /* @__PURE__ */ h({ registerDebugComponents: () => jt });
|
|
1758
1755
|
function jt() {
|
|
1759
|
-
customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button",
|
|
1756
|
+
customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ne), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", xe);
|
|
1760
1757
|
}
|
|
1761
1758
|
//#endregion
|
|
1762
1759
|
export { At as n, jt as t };
|