@camstack/addon-pipeline 1.2.70 → 1.2.72
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/dist/audio-analyzer/index.js +1 -1
- package/dist/audio-analyzer/index.mjs +1 -1
- package/dist/detection-pipeline/index.js +2 -2
- package/dist/detection-pipeline/index.mjs +2 -2
- package/dist/{dist-BPaa4_z6.mjs → dist-CNYUiN27.mjs} +158 -43
- package/dist/{dist-cR-pvD_z.js → dist-DwBdGpkx.js} +158 -43
- package/dist/{event-loop-stall-monitor-STRdnQWm.js → event-loop-stall-monitor-1o85rEbu.js} +1 -1
- package/dist/{event-loop-stall-monitor-B79REtL2.mjs → event-loop-stall-monitor-EvJwrf2f.mjs} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +95 -28
- package/dist/pipeline-runner/index.mjs +95 -28
- package/dist/recorder/index.js +365 -73
- package/dist/recorder/index.mjs +365 -73
- package/dist/session-decode/decode-worker-child.js +483 -52
- package/dist/session-decode/decode-worker-child.mjs +483 -52
- package/dist/stream-broker/_stub.js +660 -556
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B-HGBNad.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BEBWZAKQ.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DkUf57A0.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CExO0piw.mjs +26 -0
- package/dist/stream-broker/{hostInit-B12DHOv7.mjs → hostInit-aSIXKJAL.mjs} +3 -3
- package/dist/stream-broker/index.js +1 -1
- package/dist/stream-broker/index.mjs +1 -1
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-CBO8nwQj.mjs → worker-protocol-C_sGeitR.mjs} +26 -19
- package/dist/{worker-protocol-C7V1qIIA.js → worker-protocol-D0H-aG2_.js} +26 -19
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D1CqbPrT.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-NjvjJWz-.mjs +0 -26
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as e, c as t, d as n,
|
|
2
|
-
import { a as
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CExO0piw.mjs";
|
|
2
|
+
import { a as p, i as m, n as h, o as g, r as _, t as v } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
3
|
+
import { n as y, r as b, t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
|
+
import { t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DkUf57A0.mjs";
|
|
5
|
+
import { n as C, t as w } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
7
|
-
var
|
|
8
|
-
let t =
|
|
7
|
+
var T = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), E = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), D = (e) => {
|
|
8
|
+
let t = E(e);
|
|
9
9
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
10
|
-
},
|
|
10
|
+
}, O = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), k = (e) => {
|
|
11
11
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
12
|
-
},
|
|
12
|
+
}, A = {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: 24,
|
|
15
15
|
height: 24,
|
|
@@ -19,34 +19,34 @@ var C = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), w = (e) =
|
|
|
19
19
|
strokeWidth: 2,
|
|
20
20
|
strokeLinecap: "round",
|
|
21
21
|
strokeLinejoin: "round"
|
|
22
|
-
},
|
|
22
|
+
}, j = h(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => v("svg", {
|
|
23
23
|
ref: c,
|
|
24
|
-
...
|
|
24
|
+
...A,
|
|
25
25
|
width: t,
|
|
26
26
|
height: t,
|
|
27
27
|
stroke: e,
|
|
28
28
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
29
|
-
className:
|
|
30
|
-
...!a && !
|
|
29
|
+
className: O("lucide", i),
|
|
30
|
+
...!a && !k(s) && { "aria-hidden": "true" },
|
|
31
31
|
...s
|
|
32
|
-
}, [...o.map(([e, t]) =>
|
|
33
|
-
let n =
|
|
32
|
+
}, [...o.map(([e, t]) => v(e, t)), ...Array.isArray(a) ? a : [a]])), M = (e, t) => {
|
|
33
|
+
let n = h(({ className: n, ...r }, i) => v(j, {
|
|
34
34
|
ref: i,
|
|
35
35
|
iconNode: t,
|
|
36
|
-
className:
|
|
36
|
+
className: O(`lucide-${T(D(e))}`, `lucide-${e}`, n),
|
|
37
37
|
...r
|
|
38
38
|
}));
|
|
39
|
-
return n.displayName =
|
|
40
|
-
},
|
|
39
|
+
return n.displayName = D(e), n;
|
|
40
|
+
}, N = M("check", [["path", {
|
|
41
41
|
d: "M20 6 9 17l-5-5",
|
|
42
42
|
key: "1gmf2c"
|
|
43
|
-
}]]),
|
|
43
|
+
}]]), P = M("chevron-down", [["path", {
|
|
44
44
|
d: "m6 9 6 6 6-6",
|
|
45
45
|
key: "qrunsl"
|
|
46
|
-
}]]),
|
|
46
|
+
}]]), F = M("chevron-right", [["path", {
|
|
47
47
|
d: "m9 18 6-6-6-6",
|
|
48
48
|
key: "mthhwq"
|
|
49
|
-
}]]), ee =
|
|
49
|
+
}]]), ee = M("circle-alert", [
|
|
50
50
|
["circle", {
|
|
51
51
|
cx: "12",
|
|
52
52
|
cy: "12",
|
|
@@ -67,16 +67,16 @@ var C = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), w = (e) =
|
|
|
67
67
|
y2: "16",
|
|
68
68
|
key: "4dfq90"
|
|
69
69
|
}]
|
|
70
|
-
]), te =
|
|
70
|
+
]), te = M("loader-circle", [["path", {
|
|
71
71
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
72
72
|
key: "13zald"
|
|
73
|
-
}]]), ne =
|
|
73
|
+
}]]), ne = M("plus", [["path", {
|
|
74
74
|
d: "M5 12h14",
|
|
75
75
|
key: "1ays0h"
|
|
76
76
|
}], ["path", {
|
|
77
77
|
d: "M12 5v14",
|
|
78
78
|
key: "s699le"
|
|
79
|
-
}]]),
|
|
79
|
+
}]]), I = M("radio", [
|
|
80
80
|
["path", {
|
|
81
81
|
d: "M4.9 19.1C1 15.2 1 8.8 4.9 4.9",
|
|
82
82
|
key: "1vaf9d"
|
|
@@ -99,7 +99,39 @@ var C = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), w = (e) =
|
|
|
99
99
|
d: "M19.1 4.9C23 8.8 23 15.1 19.1 19",
|
|
100
100
|
key: "10b0cb"
|
|
101
101
|
}]
|
|
102
|
-
]), re =
|
|
102
|
+
]), re = M("volume-2", [
|
|
103
|
+
["path", {
|
|
104
|
+
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
105
|
+
key: "uqj9uw"
|
|
106
|
+
}],
|
|
107
|
+
["path", {
|
|
108
|
+
d: "M16 9a5 5 0 0 1 0 6",
|
|
109
|
+
key: "1q6k2b"
|
|
110
|
+
}],
|
|
111
|
+
["path", {
|
|
112
|
+
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
113
|
+
key: "ijwkga"
|
|
114
|
+
}]
|
|
115
|
+
]), ie = M("volume-x", [
|
|
116
|
+
["path", {
|
|
117
|
+
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
118
|
+
key: "uqj9uw"
|
|
119
|
+
}],
|
|
120
|
+
["line", {
|
|
121
|
+
x1: "22",
|
|
122
|
+
x2: "16",
|
|
123
|
+
y1: "9",
|
|
124
|
+
y2: "15",
|
|
125
|
+
key: "1ewh16"
|
|
126
|
+
}],
|
|
127
|
+
["line", {
|
|
128
|
+
x1: "16",
|
|
129
|
+
x2: "22",
|
|
130
|
+
y1: "9",
|
|
131
|
+
y2: "15",
|
|
132
|
+
key: "5ykzw1"
|
|
133
|
+
}]
|
|
134
|
+
]), ae = M("x", [["path", {
|
|
103
135
|
d: "M18 6 6 18",
|
|
104
136
|
key: "1bl5f8"
|
|
105
137
|
}], ["path", {
|
|
@@ -108,7 +140,7 @@ var C = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), w = (e) =
|
|
|
108
140
|
}]]);
|
|
109
141
|
//#endregion
|
|
110
142
|
//#region src/stream-broker/widgets/GeometryBuilder.tsx
|
|
111
|
-
function
|
|
143
|
+
function oe(e) {
|
|
112
144
|
let t = [];
|
|
113
145
|
if (e.crop && t.push(`crop=${e.crop.w}:${e.crop.h}:${e.crop.x}:${e.crop.y}`), e.targetAspect && e.width !== void 0 && e.height !== void 0) {
|
|
114
146
|
let n = e.targetAspect.replace(":", "/");
|
|
@@ -116,7 +148,7 @@ function ie(e) {
|
|
|
116
148
|
}
|
|
117
149
|
return e.rotate === 90 ? t.push("transpose=1") : e.rotate === 270 ? t.push("transpose=2") : e.rotate === 180 && t.push("hflip", "vflip"), e.hflip && e.rotate !== 180 && t.push("hflip"), e.vflip && e.rotate !== 180 && t.push("vflip"), t.join(",");
|
|
118
150
|
}
|
|
119
|
-
function
|
|
151
|
+
function se(e, t) {
|
|
120
152
|
let n = [];
|
|
121
153
|
for (let t = 0; t < e.length; t++) {
|
|
122
154
|
if (e[t] === "-vf") {
|
|
@@ -128,9 +160,9 @@ function ae(e, t) {
|
|
|
128
160
|
}
|
|
129
161
|
return t.length > 0 && n.push("-vf", t), n;
|
|
130
162
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
-
let [n, r] =
|
|
163
|
+
var L = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium";
|
|
164
|
+
function ce({ outputArgs: e, onChange: t }) {
|
|
165
|
+
let [n, r] = g(""), [i, a] = g("pad"), [o, s] = g("1920"), [c, l] = g("1080"), [u, d] = g(!1), [f, p] = g("0"), [m, h] = g("0"), [_, v] = g("0"), [S, C] = g("0"), [w, T] = g(0), [E, D] = g(!1), [O, k] = g(!1), A = oe((() => {
|
|
134
166
|
let e = {
|
|
135
167
|
rotate: w,
|
|
136
168
|
hflip: E,
|
|
@@ -138,87 +170,87 @@ function oe({ outputArgs: e, onChange: t }) {
|
|
|
138
170
|
};
|
|
139
171
|
return n !== "" && (e.targetAspect = n, e.mode = i, e.width = Number(o), e.height = Number(c)), u && (e.crop = {
|
|
140
172
|
x: Number(f),
|
|
141
|
-
y: Number(
|
|
142
|
-
w: Number(
|
|
173
|
+
y: Number(m),
|
|
174
|
+
w: Number(_),
|
|
143
175
|
h: Number(S)
|
|
144
176
|
}), e;
|
|
145
177
|
})());
|
|
146
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ b("div", {
|
|
147
179
|
className: "space-y-2 rounded border border-border/50 bg-surface-2/30 px-3 py-2",
|
|
148
180
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ b("div", {
|
|
150
182
|
className: "flex items-center justify-between",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
-
className:
|
|
153
|
-
children: ["Geometry / zoom", /* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ b("span", {
|
|
184
|
+
className: L,
|
|
185
|
+
children: ["Geometry / zoom", /* @__PURE__ */ y("span", {
|
|
154
186
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
155
187
|
children: "composes a single -vf into output args"
|
|
156
188
|
})]
|
|
157
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ y("button", {
|
|
158
190
|
type: "button",
|
|
159
|
-
onClick: () => t(
|
|
191
|
+
onClick: () => t(se(e, A)),
|
|
160
192
|
className: "rounded-md border border-border bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
161
193
|
children: "Apply geometry"
|
|
162
194
|
})]
|
|
163
195
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ b("div", {
|
|
165
197
|
className: "flex flex-wrap items-center gap-2",
|
|
166
198
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
className:
|
|
199
|
+
/* @__PURE__ */ y("label", {
|
|
200
|
+
className: L,
|
|
169
201
|
htmlFor: "geom-aspect",
|
|
170
202
|
children: "Aspect"
|
|
171
203
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ b("select", {
|
|
173
205
|
id: "geom-aspect",
|
|
174
206
|
value: n,
|
|
175
207
|
onChange: (e) => r(e.target.value),
|
|
176
208
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[90px]",
|
|
177
209
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ y("option", {
|
|
179
211
|
value: "",
|
|
180
212
|
children: "none"
|
|
181
213
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ y("option", {
|
|
183
215
|
value: "16:9",
|
|
184
216
|
children: "16:9"
|
|
185
217
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ y("option", {
|
|
187
219
|
value: "4:3",
|
|
188
220
|
children: "4:3"
|
|
189
221
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ y("option", {
|
|
191
223
|
value: "1:1",
|
|
192
224
|
children: "1:1"
|
|
193
225
|
})
|
|
194
226
|
]
|
|
195
227
|
}),
|
|
196
|
-
n !== "" && /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
228
|
+
n !== "" && /* @__PURE__ */ b(x, { children: [
|
|
229
|
+
/* @__PURE__ */ b("select", {
|
|
198
230
|
"aria-label": "Aspect mode",
|
|
199
231
|
value: i,
|
|
200
232
|
onChange: (e) => a(e.target.value),
|
|
201
233
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[80px]",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ y("option", {
|
|
203
235
|
value: "pad",
|
|
204
236
|
children: "pad"
|
|
205
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ y("option", {
|
|
206
238
|
value: "crop",
|
|
207
239
|
children: "crop"
|
|
208
240
|
})]
|
|
209
241
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ y("input", {
|
|
211
243
|
type: "number",
|
|
212
244
|
"aria-label": "Aspect width",
|
|
213
245
|
value: o,
|
|
214
246
|
onChange: (e) => s(e.target.value),
|
|
215
247
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right"
|
|
216
248
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ y("span", {
|
|
218
250
|
className: "text-[11px] text-foreground-subtle",
|
|
219
251
|
children: "×"
|
|
220
252
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ y("input", {
|
|
222
254
|
type: "number",
|
|
223
255
|
"aria-label": "Aspect height",
|
|
224
256
|
value: c,
|
|
@@ -228,17 +260,17 @@ function oe({ outputArgs: e, onChange: t }) {
|
|
|
228
260
|
] })
|
|
229
261
|
]
|
|
230
262
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ b("div", {
|
|
232
264
|
className: "flex flex-wrap items-center gap-2",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ b("label", {
|
|
234
266
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ y("input", {
|
|
236
268
|
type: "checkbox",
|
|
237
269
|
checked: u,
|
|
238
270
|
onChange: (e) => d(e.target.checked)
|
|
239
271
|
}), "Crop / zoom"]
|
|
240
|
-
}), u && /* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
272
|
+
}), u && /* @__PURE__ */ b(x, { children: [
|
|
273
|
+
/* @__PURE__ */ y("input", {
|
|
242
274
|
type: "number",
|
|
243
275
|
"aria-label": "Crop x",
|
|
244
276
|
value: f,
|
|
@@ -246,23 +278,23 @@ function oe({ outputArgs: e, onChange: t }) {
|
|
|
246
278
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-16 text-right",
|
|
247
279
|
placeholder: "x"
|
|
248
280
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ y("input", {
|
|
250
282
|
type: "number",
|
|
251
283
|
"aria-label": "Crop y",
|
|
252
|
-
value:
|
|
253
|
-
onChange: (e) =>
|
|
284
|
+
value: m,
|
|
285
|
+
onChange: (e) => h(e.target.value),
|
|
254
286
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-16 text-right",
|
|
255
287
|
placeholder: "y"
|
|
256
288
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ y("input", {
|
|
258
290
|
type: "number",
|
|
259
291
|
"aria-label": "Crop width",
|
|
260
|
-
value:
|
|
261
|
-
onChange: (e) =>
|
|
292
|
+
value: _,
|
|
293
|
+
onChange: (e) => v(e.target.value),
|
|
262
294
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right",
|
|
263
295
|
placeholder: "w"
|
|
264
296
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ y("input", {
|
|
266
298
|
type: "number",
|
|
267
299
|
"aria-label": "Crop height",
|
|
268
300
|
value: S,
|
|
@@ -272,49 +304,49 @@ function oe({ outputArgs: e, onChange: t }) {
|
|
|
272
304
|
})
|
|
273
305
|
] })]
|
|
274
306
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ b("div", {
|
|
276
308
|
className: "flex flex-wrap items-center gap-2",
|
|
277
309
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
className:
|
|
310
|
+
/* @__PURE__ */ y("label", {
|
|
311
|
+
className: L,
|
|
280
312
|
htmlFor: "geom-rotate",
|
|
281
313
|
children: "Rotate"
|
|
282
314
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ b("select", {
|
|
284
316
|
id: "geom-rotate",
|
|
285
317
|
value: String(w),
|
|
286
318
|
onChange: (e) => T(Number(e.target.value)),
|
|
287
319
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[80px]",
|
|
288
320
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ y("option", {
|
|
290
322
|
value: "0",
|
|
291
323
|
children: "0°"
|
|
292
324
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ y("option", {
|
|
294
326
|
value: "90",
|
|
295
327
|
children: "90°"
|
|
296
328
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ y("option", {
|
|
298
330
|
value: "180",
|
|
299
331
|
children: "180°"
|
|
300
332
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ y("option", {
|
|
302
334
|
value: "270",
|
|
303
335
|
children: "270°"
|
|
304
336
|
})
|
|
305
337
|
]
|
|
306
338
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ b("label", {
|
|
308
340
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ y("input", {
|
|
310
342
|
type: "checkbox",
|
|
311
343
|
checked: E,
|
|
312
344
|
onChange: (e) => D(e.target.checked)
|
|
313
345
|
}), "hflip"]
|
|
314
346
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ b("label", {
|
|
316
348
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ y("input", {
|
|
318
350
|
type: "checkbox",
|
|
319
351
|
checked: O,
|
|
320
352
|
onChange: (e) => k(e.target.checked)
|
|
@@ -322,9 +354,9 @@ function oe({ outputArgs: e, onChange: t }) {
|
|
|
322
354
|
})
|
|
323
355
|
]
|
|
324
356
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ b("div", {
|
|
326
358
|
className: "font-mono text-[10px] text-foreground-subtle break-all",
|
|
327
|
-
children: ["-vf ", A.length > 0 ? A : /* @__PURE__ */
|
|
359
|
+
children: ["-vf ", A.length > 0 ? A : /* @__PURE__ */ y("span", {
|
|
328
360
|
className: "italic",
|
|
329
361
|
children: "(empty)"
|
|
330
362
|
})]
|
|
@@ -334,7 +366,7 @@ function oe({ outputArgs: e, onChange: t }) {
|
|
|
334
366
|
}
|
|
335
367
|
//#endregion
|
|
336
368
|
//#region src/stream-broker/widgets/FfmpegParamsField.tsx
|
|
337
|
-
var
|
|
369
|
+
var le = [
|
|
338
370
|
{
|
|
339
371
|
group: "Demuxer",
|
|
340
372
|
label: "-thread_queue_size 1024",
|
|
@@ -389,7 +421,7 @@ var se = [
|
|
|
389
421
|
args: ["-fflags", "+genpts+igndts"],
|
|
390
422
|
description: "Generate PTS + ignore DTS"
|
|
391
423
|
}
|
|
392
|
-
],
|
|
424
|
+
], ue = [
|
|
393
425
|
{
|
|
394
426
|
group: "Muxer",
|
|
395
427
|
label: "-flush_packets 1",
|
|
@@ -480,31 +512,31 @@ var se = [
|
|
|
480
512
|
args: ["-muxdelay", "0"],
|
|
481
513
|
description: "No mux buffering delay"
|
|
482
514
|
}
|
|
483
|
-
],
|
|
515
|
+
], de = {
|
|
484
516
|
video: { codec: "copy" },
|
|
485
517
|
audio: "passthrough"
|
|
486
|
-
},
|
|
487
|
-
function
|
|
488
|
-
let [i, a] =
|
|
489
|
-
|
|
490
|
-
let
|
|
518
|
+
}, R = "w-full rounded border border-border bg-surface-2 px-2 py-1.5 text-[11px] font-mono text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 read-only:opacity-60 min-h-[60px] resize-y", z = "flex items-center justify-between gap-3 py-1.5", B = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium", V = "rounded-lg border border-border bg-surface overflow-hidden", H = "border-b border-border px-3 py-1.5 flex items-center justify-between bg-surface-hover/30", U = "text-[11px] font-semibold text-foreground uppercase tracking-wider";
|
|
519
|
+
function fe({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
520
|
+
let [i, a] = g(!1), o = e.argsOnly === !0, s = t ?? de, [c, l] = g(() => (s.inputArgs ?? []).join("\n")), [u, d] = g(() => (s.outputArgs ?? []).join("\n")), f = p(s);
|
|
521
|
+
f.current !== s && (f.current = s, l((s.inputArgs ?? []).join("\n")), d((s.outputArgs ?? []).join("\n")));
|
|
522
|
+
let m = (e) => {
|
|
491
523
|
n(e(s));
|
|
492
|
-
},
|
|
524
|
+
}, h = (e) => m((t) => ({
|
|
493
525
|
...t,
|
|
494
526
|
video: {
|
|
495
527
|
...t.video,
|
|
496
528
|
codec: e
|
|
497
529
|
}
|
|
498
|
-
})),
|
|
499
|
-
!Number.isFinite(e) || e <= 0 ||
|
|
530
|
+
})), _ = (e) => {
|
|
531
|
+
!Number.isFinite(e) || e <= 0 || m((t) => ({
|
|
500
532
|
...t,
|
|
501
533
|
video: {
|
|
502
534
|
...t.video,
|
|
503
535
|
width: e
|
|
504
536
|
}
|
|
505
537
|
}));
|
|
506
|
-
},
|
|
507
|
-
!Number.isFinite(e) || e <= 0 ||
|
|
538
|
+
}, v = (e) => {
|
|
539
|
+
!Number.isFinite(e) || e <= 0 || m((t) => ({
|
|
508
540
|
...t,
|
|
509
541
|
video: {
|
|
510
542
|
...t.video,
|
|
@@ -512,7 +544,7 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
512
544
|
}
|
|
513
545
|
}));
|
|
514
546
|
}, S = (e) => {
|
|
515
|
-
!Number.isFinite(e) || e <= 0 ||
|
|
547
|
+
!Number.isFinite(e) || e <= 0 || m((t) => ({
|
|
516
548
|
...t,
|
|
517
549
|
video: {
|
|
518
550
|
...t.video,
|
|
@@ -520,24 +552,24 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
520
552
|
}
|
|
521
553
|
}));
|
|
522
554
|
}, C = (e) => {
|
|
523
|
-
!Number.isFinite(e) || e <= 0 ||
|
|
555
|
+
!Number.isFinite(e) || e <= 0 || m((t) => ({
|
|
524
556
|
...t,
|
|
525
557
|
video: {
|
|
526
558
|
...t.video,
|
|
527
559
|
bitrateKbps: e
|
|
528
560
|
}
|
|
529
561
|
}));
|
|
530
|
-
}, w = () =>
|
|
562
|
+
}, w = () => m((e) => ({
|
|
531
563
|
...e,
|
|
532
564
|
audio: "passthrough"
|
|
533
|
-
})), T = (e) =>
|
|
565
|
+
})), T = (e) => m((t) => ({
|
|
534
566
|
...t,
|
|
535
567
|
audio: typeof t.audio == "object" ? {
|
|
536
568
|
...t.audio,
|
|
537
569
|
codec: e
|
|
538
570
|
} : { codec: e }
|
|
539
571
|
})), E = (e) => {
|
|
540
|
-
!Number.isFinite(e) || e <= 0 ||
|
|
572
|
+
!Number.isFinite(e) || e <= 0 || m((t) => ({
|
|
541
573
|
...t,
|
|
542
574
|
audio: typeof t.audio == "object" ? {
|
|
543
575
|
...t.audio,
|
|
@@ -547,10 +579,10 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
547
579
|
bitrateKbps: e
|
|
548
580
|
}
|
|
549
581
|
}));
|
|
550
|
-
}, D = (e) =>
|
|
582
|
+
}, D = (e) => m((t) => ({
|
|
551
583
|
...t,
|
|
552
584
|
inputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
553
|
-
})), O = (e) =>
|
|
585
|
+
})), O = (e) => m((t) => ({
|
|
554
586
|
...t,
|
|
555
587
|
outputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
556
588
|
})), k = (e, t) => {
|
|
@@ -560,159 +592,159 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
560
592
|
l(e), D(e);
|
|
561
593
|
} else {
|
|
562
594
|
let e = u.length === 0 ? n : `${u}\n${n}`;
|
|
563
|
-
|
|
595
|
+
d(e), O(e);
|
|
564
596
|
}
|
|
565
|
-
}, A = /* @__PURE__ */
|
|
597
|
+
}, A = /* @__PURE__ */ b("div", {
|
|
566
598
|
className: "space-y-1.5",
|
|
567
|
-
children: [/* @__PURE__ */
|
|
599
|
+
children: [/* @__PURE__ */ b("div", {
|
|
568
600
|
className: "flex items-center justify-between",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
601
|
+
children: [/* @__PURE__ */ b("label", {
|
|
570
602
|
htmlFor: `${e.fieldKey}-input-args`,
|
|
571
|
-
className:
|
|
572
|
-
children: ["Input args", /* @__PURE__ */
|
|
603
|
+
className: B,
|
|
604
|
+
children: ["Input args", /* @__PURE__ */ y("span", {
|
|
573
605
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
574
606
|
children: "one per line · inserted between globals and -i"
|
|
575
607
|
})]
|
|
576
|
-
}), /* @__PURE__ */
|
|
608
|
+
}), /* @__PURE__ */ y(W, {
|
|
577
609
|
id: `${e.fieldKey}-input-picker`,
|
|
578
610
|
disabled: !1,
|
|
579
|
-
catalogue:
|
|
611
|
+
catalogue: le,
|
|
580
612
|
onPick: (e) => k("input", e)
|
|
581
613
|
})]
|
|
582
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
583
615
|
id: `${e.fieldKey}-input-args`,
|
|
584
616
|
value: c,
|
|
585
617
|
onChange: (e) => l(e.target.value),
|
|
586
618
|
onBlur: (e) => D(e.target.value),
|
|
587
619
|
placeholder: "-thread_queue_size 1024",
|
|
588
|
-
className:
|
|
620
|
+
className: R
|
|
589
621
|
})]
|
|
590
|
-
}), j = /* @__PURE__ */
|
|
622
|
+
}), j = /* @__PURE__ */ b("div", {
|
|
591
623
|
className: "space-y-1.5",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ b("div", {
|
|
593
625
|
className: "flex items-center justify-between",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ b("label", {
|
|
595
627
|
htmlFor: `${e.fieldKey}-output-args`,
|
|
596
|
-
className:
|
|
597
|
-
children: ["Output args", /* @__PURE__ */
|
|
628
|
+
className: B,
|
|
629
|
+
children: ["Output args", /* @__PURE__ */ y("span", {
|
|
598
630
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
599
631
|
children: "one per line · inserted before the final muxer"
|
|
600
632
|
})]
|
|
601
|
-
}), /* @__PURE__ */
|
|
633
|
+
}), /* @__PURE__ */ y(W, {
|
|
602
634
|
id: `${e.fieldKey}-output-picker`,
|
|
603
635
|
disabled: !1,
|
|
604
|
-
catalogue:
|
|
636
|
+
catalogue: ue,
|
|
605
637
|
onPick: (e) => k("output", e)
|
|
606
638
|
})]
|
|
607
|
-
}), /* @__PURE__ */
|
|
639
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
608
640
|
id: `${e.fieldKey}-output-args`,
|
|
609
641
|
value: u,
|
|
610
|
-
onChange: (e) =>
|
|
642
|
+
onChange: (e) => d(e.target.value),
|
|
611
643
|
onBlur: (e) => O(e.target.value),
|
|
612
644
|
placeholder: "-bsf:v h264_mp4toannexb",
|
|
613
|
-
className:
|
|
645
|
+
className: R
|
|
614
646
|
})]
|
|
615
647
|
});
|
|
616
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ b("div", {
|
|
617
649
|
className: "space-y-3",
|
|
618
650
|
children: [
|
|
619
|
-
r !== void 0 && /* @__PURE__ */
|
|
651
|
+
r !== void 0 && /* @__PURE__ */ y("div", {
|
|
620
652
|
className: "flex items-center justify-end",
|
|
621
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ y(pe, { status: r })
|
|
622
654
|
}),
|
|
623
|
-
e.sourceParams !== void 0 && /* @__PURE__ */
|
|
624
|
-
className:
|
|
625
|
-
children: [/* @__PURE__ */
|
|
626
|
-
className:
|
|
627
|
-
children: [/* @__PURE__ */
|
|
628
|
-
className:
|
|
655
|
+
e.sourceParams !== void 0 && /* @__PURE__ */ b("div", {
|
|
656
|
+
className: V,
|
|
657
|
+
children: [/* @__PURE__ */ b("div", {
|
|
658
|
+
className: H,
|
|
659
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
660
|
+
className: U,
|
|
629
661
|
children: "Source (probed)"
|
|
630
|
-
}), /* @__PURE__ */
|
|
662
|
+
}), /* @__PURE__ */ y("span", {
|
|
631
663
|
className: "text-[10px] text-foreground-subtle italic",
|
|
632
664
|
children: "From the publisher"
|
|
633
665
|
})]
|
|
634
|
-
}), /* @__PURE__ */
|
|
666
|
+
}), /* @__PURE__ */ y("div", {
|
|
635
667
|
className: "px-3 py-2 flex flex-wrap gap-1.5",
|
|
636
|
-
children: /* @__PURE__ */
|
|
668
|
+
children: /* @__PURE__ */ y(me, { profile: e.sourceParams })
|
|
637
669
|
})]
|
|
638
670
|
}),
|
|
639
|
-
!o && /* @__PURE__ */
|
|
671
|
+
!o && /* @__PURE__ */ y("div", {
|
|
640
672
|
className: "@container",
|
|
641
|
-
children: /* @__PURE__ */
|
|
673
|
+
children: /* @__PURE__ */ b("div", {
|
|
642
674
|
className: "grid grid-cols-1 @[480px]:grid-cols-2 gap-3",
|
|
643
|
-
children: [/* @__PURE__ */
|
|
644
|
-
className:
|
|
645
|
-
children: [/* @__PURE__ */
|
|
646
|
-
className:
|
|
647
|
-
children: /* @__PURE__ */
|
|
648
|
-
className:
|
|
675
|
+
children: [/* @__PURE__ */ b("div", {
|
|
676
|
+
className: V,
|
|
677
|
+
children: [/* @__PURE__ */ y("div", {
|
|
678
|
+
className: H,
|
|
679
|
+
children: /* @__PURE__ */ y("h3", {
|
|
680
|
+
className: U,
|
|
649
681
|
children: "Video"
|
|
650
682
|
})
|
|
651
|
-
}), /* @__PURE__ */
|
|
683
|
+
}), /* @__PURE__ */ b("div", {
|
|
652
684
|
className: "px-3 py-2 divide-y divide-border/30",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
654
|
-
className:
|
|
655
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ b("div", {
|
|
686
|
+
className: z,
|
|
687
|
+
children: [/* @__PURE__ */ y("label", {
|
|
656
688
|
htmlFor: `${e.fieldKey}-video-codec`,
|
|
657
|
-
className:
|
|
689
|
+
className: B,
|
|
658
690
|
children: "Codec"
|
|
659
|
-
}), /* @__PURE__ */
|
|
691
|
+
}), /* @__PURE__ */ b("select", {
|
|
660
692
|
id: `${e.fieldKey}-video-codec`,
|
|
661
693
|
value: s.video.codec,
|
|
662
|
-
onChange: (e) =>
|
|
694
|
+
onChange: (e) => h(e.target.value),
|
|
663
695
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed appearance-none pr-6 min-w-[120px]",
|
|
664
696
|
children: [
|
|
665
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ y("option", {
|
|
666
698
|
value: "h264",
|
|
667
699
|
children: "h264"
|
|
668
700
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ y("option", {
|
|
670
702
|
value: "h265",
|
|
671
703
|
children: "h265"
|
|
672
704
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ y("option", {
|
|
674
706
|
value: "copy",
|
|
675
707
|
children: "copy (passthrough)"
|
|
676
708
|
})
|
|
677
709
|
]
|
|
678
710
|
})]
|
|
679
|
-
}), s.video.codec !== "copy" && /* @__PURE__ */
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
className:
|
|
682
|
-
children: [/* @__PURE__ */
|
|
711
|
+
}), s.video.codec !== "copy" && /* @__PURE__ */ b(x, { children: [
|
|
712
|
+
/* @__PURE__ */ b("div", {
|
|
713
|
+
className: z,
|
|
714
|
+
children: [/* @__PURE__ */ y("label", {
|
|
683
715
|
htmlFor: `${e.fieldKey}-video-width`,
|
|
684
|
-
className:
|
|
716
|
+
className: B,
|
|
685
717
|
children: "Width"
|
|
686
|
-
}), /* @__PURE__ */
|
|
718
|
+
}), /* @__PURE__ */ y("input", {
|
|
687
719
|
id: `${e.fieldKey}-video-width`,
|
|
688
720
|
type: "number",
|
|
689
721
|
"aria-label": "Width",
|
|
690
722
|
value: s.video.width ?? "",
|
|
691
|
-
onChange: (e) =>
|
|
723
|
+
onChange: (e) => _(Number(e.target.value)),
|
|
692
724
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
693
725
|
})]
|
|
694
726
|
}),
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
className:
|
|
697
|
-
children: [/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ b("div", {
|
|
728
|
+
className: z,
|
|
729
|
+
children: [/* @__PURE__ */ y("label", {
|
|
698
730
|
htmlFor: `${e.fieldKey}-video-height`,
|
|
699
|
-
className:
|
|
731
|
+
className: B,
|
|
700
732
|
children: "Height"
|
|
701
|
-
}), /* @__PURE__ */
|
|
733
|
+
}), /* @__PURE__ */ y("input", {
|
|
702
734
|
id: `${e.fieldKey}-video-height`,
|
|
703
735
|
type: "number",
|
|
704
736
|
value: s.video.height ?? "",
|
|
705
|
-
onChange: (e) =>
|
|
737
|
+
onChange: (e) => v(Number(e.target.value)),
|
|
706
738
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
707
739
|
})]
|
|
708
740
|
}),
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
className:
|
|
711
|
-
children: [/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ b("div", {
|
|
742
|
+
className: z,
|
|
743
|
+
children: [/* @__PURE__ */ y("label", {
|
|
712
744
|
htmlFor: `${e.fieldKey}-video-fps`,
|
|
713
|
-
className:
|
|
745
|
+
className: B,
|
|
714
746
|
children: "FPS"
|
|
715
|
-
}), /* @__PURE__ */
|
|
747
|
+
}), /* @__PURE__ */ y("input", {
|
|
716
748
|
id: `${e.fieldKey}-video-fps`,
|
|
717
749
|
type: "number",
|
|
718
750
|
value: s.video.fps ?? "",
|
|
@@ -720,13 +752,13 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
720
752
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
721
753
|
})]
|
|
722
754
|
}),
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
className:
|
|
725
|
-
children: [/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ b("div", {
|
|
756
|
+
className: z,
|
|
757
|
+
children: [/* @__PURE__ */ y("label", {
|
|
726
758
|
htmlFor: `${e.fieldKey}-video-bitrate`,
|
|
727
|
-
className:
|
|
759
|
+
className: B,
|
|
728
760
|
children: "Bitrate (kbps)"
|
|
729
|
-
}), /* @__PURE__ */
|
|
761
|
+
}), /* @__PURE__ */ y("input", {
|
|
730
762
|
id: `${e.fieldKey}-video-bitrate`,
|
|
731
763
|
type: "number",
|
|
732
764
|
value: s.video.bitrateKbps ?? "",
|
|
@@ -736,72 +768,72 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
736
768
|
})
|
|
737
769
|
] })]
|
|
738
770
|
})]
|
|
739
|
-
}), /* @__PURE__ */
|
|
740
|
-
className:
|
|
741
|
-
children: [/* @__PURE__ */
|
|
742
|
-
className:
|
|
743
|
-
children: /* @__PURE__ */
|
|
744
|
-
className:
|
|
771
|
+
}), /* @__PURE__ */ b("div", {
|
|
772
|
+
className: V,
|
|
773
|
+
children: [/* @__PURE__ */ y("div", {
|
|
774
|
+
className: H,
|
|
775
|
+
children: /* @__PURE__ */ y("h3", {
|
|
776
|
+
className: U,
|
|
745
777
|
children: "Audio"
|
|
746
778
|
})
|
|
747
|
-
}), /* @__PURE__ */
|
|
779
|
+
}), /* @__PURE__ */ y("div", {
|
|
748
780
|
className: "px-3 py-2",
|
|
749
|
-
children: s.audio === "passthrough" ? /* @__PURE__ */
|
|
781
|
+
children: s.audio === "passthrough" ? /* @__PURE__ */ b("div", {
|
|
750
782
|
className: "flex items-center justify-between gap-3",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
783
|
+
children: [/* @__PURE__ */ y("span", {
|
|
752
784
|
className: "text-[11px] text-foreground-subtle italic",
|
|
753
785
|
children: "Source audio forwarded without re-encode."
|
|
754
|
-
}), /* @__PURE__ */
|
|
786
|
+
}), /* @__PURE__ */ y("button", {
|
|
755
787
|
type: "button",
|
|
756
788
|
onClick: () => T("opus"),
|
|
757
789
|
className: "rounded-md border border-border bg-surface-hover px-2 py-1 text-[11px] text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
758
790
|
children: "Switch to custom encode"
|
|
759
791
|
})]
|
|
760
|
-
}) : /* @__PURE__ */
|
|
792
|
+
}) : /* @__PURE__ */ b("div", {
|
|
761
793
|
className: "divide-y divide-border/30",
|
|
762
794
|
children: [
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
className:
|
|
765
|
-
children: [/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ b("div", {
|
|
796
|
+
className: z,
|
|
797
|
+
children: [/* @__PURE__ */ y("label", {
|
|
766
798
|
htmlFor: `${e.fieldKey}-audio-codec`,
|
|
767
|
-
className:
|
|
799
|
+
className: B,
|
|
768
800
|
children: "Codec"
|
|
769
|
-
}), /* @__PURE__ */
|
|
801
|
+
}), /* @__PURE__ */ b("select", {
|
|
770
802
|
id: `${e.fieldKey}-audio-codec`,
|
|
771
803
|
value: s.audio.codec,
|
|
772
804
|
onChange: (e) => T(e.target.value),
|
|
773
805
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed appearance-none pr-6 min-w-[120px]",
|
|
774
806
|
children: [
|
|
775
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ y("option", {
|
|
776
808
|
value: "opus",
|
|
777
809
|
children: "opus"
|
|
778
810
|
}),
|
|
779
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ y("option", {
|
|
780
812
|
value: "aac",
|
|
781
813
|
children: "aac"
|
|
782
814
|
}),
|
|
783
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ y("option", {
|
|
784
816
|
value: "pcmu",
|
|
785
817
|
children: "pcmu"
|
|
786
818
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
819
|
+
/* @__PURE__ */ y("option", {
|
|
788
820
|
value: "pcma",
|
|
789
821
|
children: "pcma"
|
|
790
822
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ y("option", {
|
|
792
824
|
value: "copy",
|
|
793
825
|
children: "copy (passthrough)"
|
|
794
826
|
})
|
|
795
827
|
]
|
|
796
828
|
})]
|
|
797
829
|
}),
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
className:
|
|
800
|
-
children: [/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ b("div", {
|
|
831
|
+
className: z,
|
|
832
|
+
children: [/* @__PURE__ */ y("label", {
|
|
801
833
|
htmlFor: `${e.fieldKey}-audio-bitrate`,
|
|
802
|
-
className:
|
|
834
|
+
className: B,
|
|
803
835
|
children: "Bitrate (kbps)"
|
|
804
|
-
}), /* @__PURE__ */
|
|
836
|
+
}), /* @__PURE__ */ y("input", {
|
|
805
837
|
id: `${e.fieldKey}-audio-bitrate`,
|
|
806
838
|
type: "number",
|
|
807
839
|
value: s.audio.bitrateKbps ?? "",
|
|
@@ -809,9 +841,9 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
809
841
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
810
842
|
})]
|
|
811
843
|
}),
|
|
812
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ y("div", {
|
|
813
845
|
className: "pt-2",
|
|
814
|
-
children: /* @__PURE__ */
|
|
846
|
+
children: /* @__PURE__ */ y("button", {
|
|
815
847
|
type: "button",
|
|
816
848
|
onClick: w,
|
|
817
849
|
className: "text-[11px] text-foreground-subtle hover:text-foreground underline-offset-2 hover:underline",
|
|
@@ -824,51 +856,51 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
824
856
|
})]
|
|
825
857
|
})
|
|
826
858
|
}),
|
|
827
|
-
o ? /* @__PURE__ */
|
|
828
|
-
className:
|
|
829
|
-
children: [/* @__PURE__ */
|
|
830
|
-
className:
|
|
831
|
-
children: /* @__PURE__ */
|
|
832
|
-
className:
|
|
859
|
+
o ? /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ b("div", {
|
|
860
|
+
className: V,
|
|
861
|
+
children: [/* @__PURE__ */ y("div", {
|
|
862
|
+
className: H,
|
|
863
|
+
children: /* @__PURE__ */ y("h3", {
|
|
864
|
+
className: U,
|
|
833
865
|
children: "Input args"
|
|
834
866
|
})
|
|
835
|
-
}), /* @__PURE__ */
|
|
867
|
+
}), /* @__PURE__ */ y("div", {
|
|
836
868
|
className: "px-3 py-2",
|
|
837
869
|
children: A
|
|
838
870
|
})]
|
|
839
|
-
}), /* @__PURE__ */
|
|
840
|
-
className:
|
|
841
|
-
children: [/* @__PURE__ */
|
|
842
|
-
className:
|
|
843
|
-
children: /* @__PURE__ */
|
|
844
|
-
className:
|
|
871
|
+
}), /* @__PURE__ */ b("div", {
|
|
872
|
+
className: V,
|
|
873
|
+
children: [/* @__PURE__ */ y("div", {
|
|
874
|
+
className: H,
|
|
875
|
+
children: /* @__PURE__ */ y("h3", {
|
|
876
|
+
className: U,
|
|
845
877
|
children: "Output args"
|
|
846
878
|
})
|
|
847
|
-
}), /* @__PURE__ */
|
|
879
|
+
}), /* @__PURE__ */ y("div", {
|
|
848
880
|
className: "px-3 py-2",
|
|
849
881
|
children: j
|
|
850
882
|
})]
|
|
851
|
-
})] }) : /* @__PURE__ */
|
|
852
|
-
className:
|
|
853
|
-
children: [/* @__PURE__ */
|
|
883
|
+
})] }) : /* @__PURE__ */ b("div", {
|
|
884
|
+
className: V,
|
|
885
|
+
children: [/* @__PURE__ */ b("button", {
|
|
854
886
|
type: "button",
|
|
855
887
|
onClick: () => a((e) => !e),
|
|
856
888
|
className: "w-full px-3 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
857
|
-
children: [/* @__PURE__ */
|
|
889
|
+
children: [/* @__PURE__ */ b("span", {
|
|
858
890
|
className: "inline-flex items-center gap-1.5 text-[11px] font-semibold text-foreground uppercase tracking-wider",
|
|
859
|
-
children: [
|
|
860
|
-
}), /* @__PURE__ */
|
|
891
|
+
children: [y(i ? P : F, { className: "h-3 w-3" }), "Advanced — raw ffmpeg args"]
|
|
892
|
+
}), /* @__PURE__ */ b("span", {
|
|
861
893
|
className: "text-[10px] text-foreground-subtle italic",
|
|
862
894
|
children: [(s.inputArgs?.length ?? 0) + (s.outputArgs?.length ?? 0), " args"]
|
|
863
895
|
})]
|
|
864
|
-
}), i && /* @__PURE__ */
|
|
896
|
+
}), i && /* @__PURE__ */ b("div", {
|
|
865
897
|
className: "px-3 py-2 space-y-3 border-t border-border/50",
|
|
866
898
|
children: [
|
|
867
899
|
A,
|
|
868
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ y(ce, {
|
|
869
901
|
outputArgs: s.outputArgs ?? [],
|
|
870
902
|
onChange: (e) => {
|
|
871
|
-
|
|
903
|
+
d(e.join("\n")), O(e.join("\n"));
|
|
872
904
|
}
|
|
873
905
|
}),
|
|
874
906
|
j
|
|
@@ -878,50 +910,50 @@ function ue({ config: e, value: t, onSave: n, saveStatus: r }) {
|
|
|
878
910
|
]
|
|
879
911
|
});
|
|
880
912
|
}
|
|
881
|
-
function
|
|
913
|
+
function pe({ status: e }) {
|
|
882
914
|
let t = "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium border";
|
|
883
|
-
return e === "saving" ? /* @__PURE__ */
|
|
915
|
+
return e === "saving" ? /* @__PURE__ */ b("span", {
|
|
884
916
|
className: `${t} bg-accent/10 text-accent border-accent/30`,
|
|
885
|
-
children: [/* @__PURE__ */
|
|
886
|
-
}) : e === "saved" ? /* @__PURE__ */
|
|
917
|
+
children: [/* @__PURE__ */ y(te, { className: "h-2.5 w-2.5 animate-spin" }), "Saving…"]
|
|
918
|
+
}) : e === "saved" ? /* @__PURE__ */ b("span", {
|
|
887
919
|
className: `${t} bg-success/10 text-success border-success/30`,
|
|
888
|
-
children: [/* @__PURE__ */
|
|
889
|
-
}) : e === "error" ? /* @__PURE__ */
|
|
920
|
+
children: [/* @__PURE__ */ y(N, { className: "h-2.5 w-2.5" }), "Saved"]
|
|
921
|
+
}) : e === "error" ? /* @__PURE__ */ b("span", {
|
|
890
922
|
className: `${t} bg-red-500/10 text-red-400 border-red-500/30`,
|
|
891
|
-
children: [/* @__PURE__ */
|
|
892
|
-
}) : /* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ y(ee, { className: "h-2.5 w-2.5" }), "Save failed"]
|
|
924
|
+
}) : /* @__PURE__ */ y("span", {
|
|
893
925
|
className: `${t} bg-foreground-subtle/10 text-foreground-subtle border-border`,
|
|
894
926
|
children: "Autosaves"
|
|
895
927
|
});
|
|
896
928
|
}
|
|
897
|
-
function
|
|
929
|
+
function me({ profile: e }) {
|
|
898
930
|
let t = "inline-flex items-center gap-1 rounded-full bg-foreground-subtle/10 border border-border px-2 py-0.5 text-[11px] font-mono text-foreground-subtle", { video: n, audio: r } = e, i = n.width !== void 0 && n.height !== void 0 ? `${n.width}×${n.height}` : void 0;
|
|
899
|
-
return /* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ b(x, { children: [
|
|
932
|
+
/* @__PURE__ */ b("span", {
|
|
901
933
|
className: t,
|
|
902
|
-
children: [/* @__PURE__ */
|
|
934
|
+
children: [/* @__PURE__ */ y("span", {
|
|
903
935
|
className: "opacity-60",
|
|
904
936
|
children: "codec"
|
|
905
937
|
}), n.codec]
|
|
906
938
|
}),
|
|
907
|
-
i !== void 0 && /* @__PURE__ */
|
|
939
|
+
i !== void 0 && /* @__PURE__ */ b("span", {
|
|
908
940
|
className: t,
|
|
909
|
-
children: [/* @__PURE__ */
|
|
941
|
+
children: [/* @__PURE__ */ y("span", {
|
|
910
942
|
className: "opacity-60",
|
|
911
943
|
children: "res"
|
|
912
944
|
}), i]
|
|
913
945
|
}),
|
|
914
|
-
n.fps !== void 0 && /* @__PURE__ */
|
|
946
|
+
n.fps !== void 0 && /* @__PURE__ */ b("span", {
|
|
915
947
|
className: t,
|
|
916
|
-
children: [/* @__PURE__ */
|
|
948
|
+
children: [/* @__PURE__ */ y("span", {
|
|
917
949
|
className: "opacity-60",
|
|
918
950
|
children: "fps"
|
|
919
951
|
}), n.fps]
|
|
920
952
|
}),
|
|
921
|
-
n.bitrateKbps !== void 0 && /* @__PURE__ */
|
|
953
|
+
n.bitrateKbps !== void 0 && /* @__PURE__ */ b("span", {
|
|
922
954
|
className: t,
|
|
923
955
|
children: [
|
|
924
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ y("span", {
|
|
925
957
|
className: "opacity-60",
|
|
926
958
|
children: "bitrate"
|
|
927
959
|
}),
|
|
@@ -929,24 +961,24 @@ function fe({ profile: e }) {
|
|
|
929
961
|
"k"
|
|
930
962
|
]
|
|
931
963
|
}),
|
|
932
|
-
r === "passthrough" ? /* @__PURE__ */
|
|
964
|
+
r === "passthrough" ? /* @__PURE__ */ b("span", {
|
|
933
965
|
className: t,
|
|
934
|
-
children: [/* @__PURE__ */
|
|
966
|
+
children: [/* @__PURE__ */ y("span", {
|
|
935
967
|
className: "opacity-60",
|
|
936
968
|
children: "audio"
|
|
937
969
|
}), "passthrough"]
|
|
938
|
-
}) : /* @__PURE__ */
|
|
939
|
-
/* @__PURE__ */
|
|
970
|
+
}) : /* @__PURE__ */ b(x, { children: [
|
|
971
|
+
/* @__PURE__ */ b("span", {
|
|
940
972
|
className: t,
|
|
941
|
-
children: [/* @__PURE__ */
|
|
973
|
+
children: [/* @__PURE__ */ y("span", {
|
|
942
974
|
className: "opacity-60",
|
|
943
975
|
children: "audio"
|
|
944
976
|
}), r.codec]
|
|
945
977
|
}),
|
|
946
|
-
r.bitrateKbps !== void 0 && /* @__PURE__ */
|
|
978
|
+
r.bitrateKbps !== void 0 && /* @__PURE__ */ b("span", {
|
|
947
979
|
className: t,
|
|
948
980
|
children: [
|
|
949
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ y("span", {
|
|
950
982
|
className: "opacity-60",
|
|
951
983
|
children: "a-bitrate"
|
|
952
984
|
}),
|
|
@@ -954,10 +986,10 @@ function fe({ profile: e }) {
|
|
|
954
986
|
"k"
|
|
955
987
|
]
|
|
956
988
|
}),
|
|
957
|
-
r.sampleRateHz !== void 0 && /* @__PURE__ */
|
|
989
|
+
r.sampleRateHz !== void 0 && /* @__PURE__ */ b("span", {
|
|
958
990
|
className: t,
|
|
959
991
|
children: [
|
|
960
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ y("span", {
|
|
961
993
|
className: "opacity-60",
|
|
962
994
|
children: "a-sr"
|
|
963
995
|
}),
|
|
@@ -965,9 +997,9 @@ function fe({ profile: e }) {
|
|
|
965
997
|
"Hz"
|
|
966
998
|
]
|
|
967
999
|
}),
|
|
968
|
-
r.channels !== void 0 && /* @__PURE__ */
|
|
1000
|
+
r.channels !== void 0 && /* @__PURE__ */ b("span", {
|
|
969
1001
|
className: t,
|
|
970
|
-
children: [/* @__PURE__ */
|
|
1002
|
+
children: [/* @__PURE__ */ y("span", {
|
|
971
1003
|
className: "opacity-60",
|
|
972
1004
|
children: "a-ch"
|
|
973
1005
|
}), r.channels]
|
|
@@ -975,8 +1007,8 @@ function fe({ profile: e }) {
|
|
|
975
1007
|
] })
|
|
976
1008
|
] });
|
|
977
1009
|
}
|
|
978
|
-
function
|
|
979
|
-
let t = e.config ?? {}, n =
|
|
1010
|
+
function he(e) {
|
|
1011
|
+
let t = e.config ?? {}, n = a(), [r, i] = g(() => t.initialValue), o = _((r) => {
|
|
980
1012
|
if (i(r), e.deviceId === void 0) return;
|
|
981
1013
|
let a = t.writerCapName, o = t.writerAddonId, s = t.fieldKey;
|
|
982
1014
|
if (a === void 0 || o === void 0 || s === void 0) {
|
|
@@ -997,28 +1029,28 @@ function pe(e) {
|
|
|
997
1029
|
t.writerAddonId,
|
|
998
1030
|
n
|
|
999
1031
|
]);
|
|
1000
|
-
if (e.deviceId === void 0) return /* @__PURE__ */
|
|
1032
|
+
if (e.deviceId === void 0) return /* @__PURE__ */ y("div", {
|
|
1001
1033
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
1002
1034
|
children: "ffmpeg-params: no deviceId in widget context — this widget only renders inside a device tab."
|
|
1003
1035
|
});
|
|
1004
|
-
let
|
|
1005
|
-
if (
|
|
1036
|
+
let s = t.fieldKey;
|
|
1037
|
+
if (s === void 0 || s.length === 0) return /* @__PURE__ */ y("div", {
|
|
1006
1038
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
1007
1039
|
children: "ffmpeg-params: widgetConfig.fieldKey is required — fix the contribution builder."
|
|
1008
1040
|
});
|
|
1009
|
-
let
|
|
1010
|
-
return /* @__PURE__ */
|
|
1041
|
+
let c = n.isPending ? "saving" : n.isError ? "error" : n.isSuccess ? "saved" : "idle";
|
|
1042
|
+
return /* @__PURE__ */ y(fe, {
|
|
1011
1043
|
config: {
|
|
1012
1044
|
...t,
|
|
1013
|
-
fieldKey:
|
|
1045
|
+
fieldKey: s
|
|
1014
1046
|
},
|
|
1015
1047
|
value: r,
|
|
1016
|
-
onSave:
|
|
1017
|
-
saveStatus:
|
|
1048
|
+
onSave: o,
|
|
1049
|
+
saveStatus: c
|
|
1018
1050
|
});
|
|
1019
1051
|
}
|
|
1020
|
-
function
|
|
1021
|
-
let [i, a] =
|
|
1052
|
+
function W({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
1053
|
+
let [i, a] = g(!1), o = m(() => {
|
|
1022
1054
|
let e = /* @__PURE__ */ new Map();
|
|
1023
1055
|
for (let t of n) {
|
|
1024
1056
|
let n = e.get(t.group) ?? [];
|
|
@@ -1026,37 +1058,37 @@ function H({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
|
1026
1058
|
}
|
|
1027
1059
|
return e;
|
|
1028
1060
|
}, [n]);
|
|
1029
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ b("div", {
|
|
1030
1062
|
className: "relative",
|
|
1031
|
-
children: [/* @__PURE__ */
|
|
1063
|
+
children: [/* @__PURE__ */ b("button", {
|
|
1032
1064
|
id: e,
|
|
1033
1065
|
type: "button",
|
|
1034
1066
|
disabled: t,
|
|
1035
1067
|
onClick: () => a((e) => !e),
|
|
1036
1068
|
className: "inline-flex items-center gap-1 rounded-md border border-border bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground-subtle hover:bg-surface-hover/70 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
1037
|
-
children: [/* @__PURE__ */
|
|
1038
|
-
}), i && !t && /* @__PURE__ */
|
|
1069
|
+
children: [/* @__PURE__ */ y(ne, { className: "h-3 w-3" }), "Add flag…"]
|
|
1070
|
+
}), i && !t && /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y("div", {
|
|
1039
1071
|
className: "fixed inset-0 z-40",
|
|
1040
1072
|
onClick: () => a(!1),
|
|
1041
1073
|
"aria-hidden": "true"
|
|
1042
|
-
}), /* @__PURE__ */
|
|
1074
|
+
}), /* @__PURE__ */ y("div", {
|
|
1043
1075
|
className: "absolute right-0 top-full z-50 mt-1 max-h-72 w-72 overflow-y-auto rounded-lg border border-border bg-surface shadow-lg",
|
|
1044
1076
|
role: "menu",
|
|
1045
|
-
children: Array.from(o.entries()).map(([e, t]) => /* @__PURE__ */
|
|
1077
|
+
children: Array.from(o.entries()).map(([e, t]) => /* @__PURE__ */ b("div", {
|
|
1046
1078
|
className: "border-b border-border/30 last:border-b-0",
|
|
1047
|
-
children: [/* @__PURE__ */
|
|
1079
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1048
1080
|
className: "sticky top-0 bg-surface-hover/80 backdrop-blur px-2 py-1 text-[9px] font-semibold uppercase tracking-wider text-foreground-subtle",
|
|
1049
1081
|
children: e
|
|
1050
|
-
}), t.map((e) => /* @__PURE__ */
|
|
1082
|
+
}), t.map((e) => /* @__PURE__ */ b("button", {
|
|
1051
1083
|
type: "button",
|
|
1052
1084
|
onClick: () => {
|
|
1053
1085
|
r(e), a(!1);
|
|
1054
1086
|
},
|
|
1055
1087
|
className: "w-full text-left px-2 py-1.5 hover:bg-surface-hover transition-colors group",
|
|
1056
|
-
children: [/* @__PURE__ */
|
|
1088
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1057
1089
|
className: "font-mono text-[11px] text-foreground",
|
|
1058
1090
|
children: e.label
|
|
1059
|
-
}), e.description !== void 0 && /* @__PURE__ */
|
|
1091
|
+
}), e.description !== void 0 && /* @__PURE__ */ y("div", {
|
|
1060
1092
|
className: "text-[10px] text-foreground-subtle leading-snug mt-0.5",
|
|
1061
1093
|
children: e.description
|
|
1062
1094
|
})]
|
|
@@ -1066,37 +1098,62 @@ function H({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
|
1066
1098
|
});
|
|
1067
1099
|
}
|
|
1068
1100
|
//#endregion
|
|
1101
|
+
//#region src/stream-broker/widgets/broker-audio-switch.ts
|
|
1102
|
+
var ge = "Audio", _e = "This node distributes no audio for the camera — live subscribers and new recordings are silent. The camera itself keeps capturing sound.";
|
|
1103
|
+
function ve(e) {
|
|
1104
|
+
let t = e.sourceNodeId !== null && e.sourceNodeId !== "", n = t && e.muted !== null ? !e.muted : null, r = e.pendingOn ?? null;
|
|
1105
|
+
return {
|
|
1106
|
+
label: ge,
|
|
1107
|
+
on: n === null ? null : r ?? n,
|
|
1108
|
+
available: n !== null,
|
|
1109
|
+
costWhenOff: _e,
|
|
1110
|
+
nodeId: t ? e.sourceNodeId : null
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
function ye(e, t) {
|
|
1114
|
+
return !e.available || e.on === null || e.nodeId === null ? null : {
|
|
1115
|
+
deviceId: t,
|
|
1116
|
+
muted: e.on,
|
|
1117
|
+
nodeId: e.nodeId
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
//#endregion
|
|
1069
1121
|
//#region src/stream-broker/widgets/format-ua.ts
|
|
1070
|
-
var
|
|
1071
|
-
function
|
|
1122
|
+
var G = 24;
|
|
1123
|
+
function be(e) {
|
|
1072
1124
|
return /\bEdg\b|\bEdgA\b|\bEdgiOS\b|Edge\//.test(e) ? "Edge" : /\bOPR\b|Opera/.test(e) ? "Opera" : /Firefox\/|\bFxiOS\b/.test(e) ? "Firefox" : /Chrome\/|\bCriOS\b/.test(e) ? "Chrome" : /Safari\//.test(e) ? "Safari" : null;
|
|
1073
1125
|
}
|
|
1074
|
-
function
|
|
1126
|
+
function xe(e) {
|
|
1075
1127
|
return /iPhone|iPad|iPod|\biOS\b|CriOS|FxiOS/.test(e) ? "iOS" : /Mac OS X|Macintosh/.test(e) ? "macOS" : /Windows/.test(e) ? "Windows" : /Android/.test(e) ? "Android" : /Linux/.test(e) ? "Linux" : null;
|
|
1076
1128
|
}
|
|
1077
|
-
function
|
|
1129
|
+
function K(e) {
|
|
1078
1130
|
let t = e.trim();
|
|
1079
1131
|
if (t.length === 0) return "";
|
|
1080
|
-
let n =
|
|
1081
|
-
return n && r ? `${n}/${r}` : n || r || (t.length >
|
|
1132
|
+
let n = be(t), r = xe(t);
|
|
1133
|
+
return n && r ? `${n}/${r}` : n || r || (t.length > G ? `${t.slice(0, G)}…` : t);
|
|
1082
1134
|
}
|
|
1083
1135
|
//#endregion
|
|
1084
1136
|
//#region src/stream-broker/widgets/StreamBrokerPanel.tsx
|
|
1085
|
-
function
|
|
1137
|
+
function Se(e) {
|
|
1138
|
+
if (typeof e != "object" || !e) return null;
|
|
1139
|
+
let t = { ...e }.muted;
|
|
1140
|
+
return typeof t == "boolean" ? t : null;
|
|
1141
|
+
}
|
|
1142
|
+
function Ce(e) {
|
|
1086
1143
|
let t = Math.floor(e / 1e3);
|
|
1087
1144
|
if (t < 60) return `${t}s`;
|
|
1088
1145
|
let n = Math.floor(t / 60);
|
|
1089
1146
|
return n < 60 ? `${n}m` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
1090
1147
|
}
|
|
1091
|
-
var
|
|
1148
|
+
var q = {
|
|
1092
1149
|
high: "High",
|
|
1093
1150
|
mid: "Mid",
|
|
1094
1151
|
low: "Low"
|
|
1095
|
-
},
|
|
1152
|
+
}, J = [
|
|
1096
1153
|
"high",
|
|
1097
1154
|
"mid",
|
|
1098
1155
|
"low"
|
|
1099
|
-
],
|
|
1156
|
+
], we = {
|
|
1100
1157
|
alexa: "bg-blue-500/15 text-blue-400",
|
|
1101
1158
|
homekit: "bg-purple-500/15 text-purple-400",
|
|
1102
1159
|
"webrtc-browser": "bg-emerald-500/15 text-emerald-400",
|
|
@@ -1109,7 +1166,7 @@ var G = {
|
|
|
1109
1166
|
snapshot: "bg-cyan-500/15 text-cyan-400",
|
|
1110
1167
|
warmup: "bg-foreground-subtle/10 text-foreground-subtle",
|
|
1111
1168
|
unknown: "bg-foreground-subtle/10 text-foreground-subtle"
|
|
1112
|
-
},
|
|
1169
|
+
}, Y = {
|
|
1113
1170
|
alexa: "ALEXA",
|
|
1114
1171
|
homekit: "HOMEKIT",
|
|
1115
1172
|
"webrtc-browser": "BROWSER",
|
|
@@ -1123,116 +1180,163 @@ var G = {
|
|
|
1123
1180
|
warmup: "WARMUP",
|
|
1124
1181
|
unknown: "—"
|
|
1125
1182
|
};
|
|
1126
|
-
function
|
|
1127
|
-
return
|
|
1183
|
+
function Te(e) {
|
|
1184
|
+
return Y[e] ?? e.toUpperCase().slice(0, 8);
|
|
1128
1185
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return
|
|
1186
|
+
function Ee(e) {
|
|
1187
|
+
return Y[e] ?? e;
|
|
1131
1188
|
}
|
|
1132
|
-
function
|
|
1189
|
+
function De(e) {
|
|
1133
1190
|
let t = e.config ?? {};
|
|
1134
|
-
return e.deviceId === void 0 ? /* @__PURE__ */
|
|
1191
|
+
return e.deviceId === void 0 ? /* @__PURE__ */ y("div", {
|
|
1135
1192
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
1136
1193
|
children: "StreamBrokerPanel requires a deviceId"
|
|
1137
|
-
}) : /* @__PURE__ */
|
|
1194
|
+
}) : /* @__PURE__ */ y(Oe, {
|
|
1138
1195
|
deviceId: e.deviceId,
|
|
1139
1196
|
title: t.title,
|
|
1140
1197
|
variant: t.variant,
|
|
1141
1198
|
hideEmpty: t.hideEmpty
|
|
1142
1199
|
});
|
|
1143
1200
|
}
|
|
1144
|
-
function
|
|
1145
|
-
|
|
1201
|
+
function Oe({ deviceId: r, title: i = "Stream Brokers", variant: a = "full", hideEmpty: s = !1 }) {
|
|
1202
|
+
n(["streamBroker", "listAllProfileSlots"], [
|
|
1146
1203
|
"device.streams-registered",
|
|
1147
1204
|
"device.streams-unregistered",
|
|
1148
1205
|
"device.registered",
|
|
1149
1206
|
"device.unregistered"
|
|
1150
1207
|
]);
|
|
1151
|
-
let { data: l } =
|
|
1208
|
+
let { data: l } = e(void 0, { staleTime: 3e4 }), d = (l ?? []).filter((e) => e.deviceId === r && e.sourceCamStreamId !== null).slice().toSorted((e, t) => J.indexOf(e.profile) - J.indexOf(t.profile)), p = f(t().trpcClient, r), { data: m } = w({
|
|
1152
1209
|
queryKey: [
|
|
1153
1210
|
"device",
|
|
1154
|
-
|
|
1211
|
+
r,
|
|
1155
1212
|
"cameraStreams.getCameraStreams"
|
|
1156
1213
|
],
|
|
1157
|
-
queryFn: () =>
|
|
1158
|
-
enabled: !!
|
|
1214
|
+
queryFn: () => p?.cameraStreams?.getCameraStreams({}) ?? [],
|
|
1215
|
+
enabled: !!p,
|
|
1159
1216
|
staleTime: 3e4
|
|
1160
|
-
}),
|
|
1161
|
-
for (let e of
|
|
1162
|
-
let { data:
|
|
1163
|
-
|
|
1217
|
+
}), h = /* @__PURE__ */ new Map();
|
|
1218
|
+
for (let e of m ?? []) h.set(e.camStreamId, e);
|
|
1219
|
+
let { data: v } = c({ deviceId: r }, { staleTime: 3e4 }), x = v?.assignment.sourceNodeId ?? null, S = C(), [T, E] = g(null), [D, O] = g(null), k = ve({
|
|
1220
|
+
muted: Se(o({
|
|
1221
|
+
deviceId: r,
|
|
1222
|
+
nodeId: x ?? void 0
|
|
1223
|
+
}, {
|
|
1224
|
+
enabled: x !== null,
|
|
1225
|
+
staleTime: 3e4
|
|
1226
|
+
}).data),
|
|
1227
|
+
sourceNodeId: x,
|
|
1228
|
+
pendingOn: T
|
|
1229
|
+
}), A = u({
|
|
1230
|
+
onError: (e) => {
|
|
1231
|
+
console.error("[StreamBrokerPanel] audio mute write failed — reverting", {
|
|
1232
|
+
tags: { deviceId: r },
|
|
1233
|
+
meta: {
|
|
1234
|
+
nodeId: x,
|
|
1235
|
+
error: e instanceof Error ? e.message : String(e)
|
|
1236
|
+
}
|
|
1237
|
+
}), E(null), O(e instanceof Error ? e.message : String(e)), S.invalidateQueries({ queryKey: [["streamBroker", "getDeviceAudioMute"]] });
|
|
1238
|
+
},
|
|
1239
|
+
onSuccess: () => {
|
|
1240
|
+
O(null), E(null), S.invalidateQueries({ queryKey: [["streamBroker"]] }), S.invalidateQueries({ queryKey: [["pipelineOrchestrator"]] });
|
|
1241
|
+
}
|
|
1242
|
+
}), j = _(() => {
|
|
1243
|
+
let e = ye(k, r);
|
|
1244
|
+
e !== null && (E(!e.muted), O(null), A.mutate(e));
|
|
1245
|
+
}, [
|
|
1246
|
+
k,
|
|
1247
|
+
r,
|
|
1248
|
+
A
|
|
1249
|
+
]), M = new Set(d.map((e) => e.sourceCamStreamId).filter((e) => e !== null)), N = (m ?? []).filter((e) => !M.has(e.camStreamId)), P = d.length > 0, F = N.length > 0;
|
|
1250
|
+
return s && !P && !F ? null : a === "compact" ? P ? /* @__PURE__ */ y("div", {
|
|
1164
1251
|
className: "divide-y divide-border/30",
|
|
1165
|
-
children:
|
|
1252
|
+
children: d.map((e) => /* @__PURE__ */ y(je, {
|
|
1166
1253
|
slot: e,
|
|
1167
|
-
camStreams:
|
|
1254
|
+
camStreams: h,
|
|
1168
1255
|
compact: !0
|
|
1169
1256
|
}, e.brokerId))
|
|
1170
|
-
}) : /* @__PURE__ */
|
|
1257
|
+
}) : /* @__PURE__ */ y("div", {
|
|
1171
1258
|
className: "text-[11px] text-foreground-subtle italic px-2 py-1",
|
|
1172
1259
|
children: "No active profile slots"
|
|
1173
|
-
}) : /* @__PURE__ */
|
|
1260
|
+
}) : /* @__PURE__ */ b("div", {
|
|
1174
1261
|
className: "rounded-lg border border-border bg-surface overflow-hidden",
|
|
1175
1262
|
children: [
|
|
1176
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ b("div", {
|
|
1177
1264
|
className: "border-b border-border px-4 py-2 flex flex-wrap items-center justify-between gap-x-2 gap-y-1",
|
|
1178
|
-
children: [/* @__PURE__ */
|
|
1265
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
1179
1266
|
className: "text-xs font-semibold text-foreground uppercase tracking-wider shrink-0",
|
|
1180
|
-
children:
|
|
1181
|
-
}), /* @__PURE__ */
|
|
1267
|
+
children: i
|
|
1268
|
+
}), /* @__PURE__ */ b("div", {
|
|
1182
1269
|
className: "flex items-center gap-1.5 min-w-0",
|
|
1183
|
-
children: [
|
|
1184
|
-
title: `Cluster node dialing this camera's source: ${
|
|
1270
|
+
children: [x !== null && /* @__PURE__ */ b("span", {
|
|
1271
|
+
title: `Cluster node dialing this camera's source: ${x}`,
|
|
1185
1272
|
className: "inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium bg-accent/10 text-accent border border-accent/30 min-w-0 max-w-full",
|
|
1186
|
-
children: [/* @__PURE__ */
|
|
1273
|
+
children: [/* @__PURE__ */ y(I, { className: "h-2.5 w-2.5 shrink-0" }), /* @__PURE__ */ y("span", {
|
|
1187
1274
|
className: "truncate",
|
|
1188
|
-
children:
|
|
1275
|
+
children: x
|
|
1189
1276
|
})]
|
|
1190
|
-
}),
|
|
1277
|
+
}), P && /* @__PURE__ */ b("span", {
|
|
1191
1278
|
className: "inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border shrink-0 whitespace-nowrap",
|
|
1192
|
-
children: [
|
|
1279
|
+
children: [d.length, " assigned"]
|
|
1193
1280
|
})]
|
|
1194
1281
|
})]
|
|
1195
1282
|
}),
|
|
1196
|
-
|
|
1283
|
+
/* @__PURE__ */ b("div", {
|
|
1284
|
+
className: "border-b border-border px-4 py-2 flex items-center gap-3",
|
|
1285
|
+
children: [/* @__PURE__ */ b("button", {
|
|
1286
|
+
type: "button",
|
|
1287
|
+
role: "switch",
|
|
1288
|
+
"aria-label": k.label,
|
|
1289
|
+
"aria-checked": k.on === !0,
|
|
1290
|
+
disabled: !k.available || A.isPending,
|
|
1291
|
+
onClick: j,
|
|
1292
|
+
title: k.on === null ? "Audio distribution — unknown: the node that serves this camera did not answer." : k.on ? `Audio is distributed by ${k.nodeId ?? "this node"}. Muting it: ${k.costWhenOff}` : `Muted on ${k.nodeId ?? "this node"}. ${k.costWhenOff}`,
|
|
1293
|
+
className: `inline-flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[11px] font-medium transition-colors disabled:cursor-not-allowed shrink-0 ${D === null ? k.on === null ? "border-dashed border-border text-foreground-subtle/50" : k.on === !1 ? "border-warning/40 text-warning hover:bg-warning/10" : "border-success/30 text-success hover:bg-success/10" : "border-danger/50 text-danger bg-danger/5"}`,
|
|
1294
|
+
children: [k.on === !1 ? /* @__PURE__ */ y(ie, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ y(re, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ y("span", { children: k.on === null ? "Audio unknown" : k.on ? "Audio on" : "Audio muted" })]
|
|
1295
|
+
}), /* @__PURE__ */ y("p", {
|
|
1296
|
+
className: "min-w-0 flex-1 text-[10px] leading-relaxed text-foreground-subtle",
|
|
1297
|
+
children: D === null ? k.on === null ? "The node that serves this camera did not answer, so its audio policy is unknown." : k.costWhenOff : `Write failed: ${D}`
|
|
1298
|
+
})]
|
|
1299
|
+
}),
|
|
1300
|
+
P ? /* @__PURE__ */ y("div", {
|
|
1197
1301
|
className: "divide-y divide-border/30",
|
|
1198
|
-
children:
|
|
1302
|
+
children: d.map((e) => /* @__PURE__ */ y(je, {
|
|
1199
1303
|
slot: e,
|
|
1200
|
-
camStreams:
|
|
1304
|
+
camStreams: h,
|
|
1201
1305
|
compact: !1
|
|
1202
1306
|
}, e.brokerId))
|
|
1203
|
-
}) : /* @__PURE__ */
|
|
1307
|
+
}) : /* @__PURE__ */ b("div", {
|
|
1204
1308
|
className: "px-4 py-6 flex flex-col items-center text-center text-foreground-subtle",
|
|
1205
|
-
children: [/* @__PURE__ */
|
|
1309
|
+
children: [/* @__PURE__ */ y(I, { className: "h-5 w-5 mb-2 opacity-30" }), /* @__PURE__ */ y("p", {
|
|
1206
1310
|
className: "text-xs",
|
|
1207
1311
|
children: "No profile slots assigned for this device"
|
|
1208
1312
|
})]
|
|
1209
1313
|
}),
|
|
1210
|
-
|
|
1211
|
-
deviceId:
|
|
1212
|
-
camStreamIds:
|
|
1213
|
-
camStreams:
|
|
1314
|
+
F && /* @__PURE__ */ y(ke, {
|
|
1315
|
+
deviceId: r,
|
|
1316
|
+
camStreamIds: N.map((e) => e.camStreamId),
|
|
1317
|
+
camStreams: h
|
|
1214
1318
|
})
|
|
1215
1319
|
]
|
|
1216
1320
|
});
|
|
1217
1321
|
}
|
|
1218
|
-
function
|
|
1219
|
-
let [r, i] =
|
|
1220
|
-
return /* @__PURE__ */
|
|
1322
|
+
function ke({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
1323
|
+
let [r, i] = g(!1);
|
|
1324
|
+
return /* @__PURE__ */ b("div", {
|
|
1221
1325
|
className: "border-t border-border/50",
|
|
1222
|
-
children: [/* @__PURE__ */
|
|
1326
|
+
children: [/* @__PURE__ */ b("button", {
|
|
1223
1327
|
type: "button",
|
|
1224
1328
|
onClick: () => i((e) => !e),
|
|
1225
1329
|
className: "w-full px-4 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
1226
|
-
children: [/* @__PURE__ */
|
|
1330
|
+
children: [/* @__PURE__ */ b("span", {
|
|
1227
1331
|
className: "inline-flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-foreground-subtle",
|
|
1228
|
-
children: [
|
|
1229
|
-
}), /* @__PURE__ */
|
|
1332
|
+
children: [y(r ? P : F, { className: "h-3 w-3" }), "Other active streams"]
|
|
1333
|
+
}), /* @__PURE__ */ y("span", {
|
|
1230
1334
|
className: "rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border",
|
|
1231
1335
|
children: t.length
|
|
1232
1336
|
})]
|
|
1233
|
-
}), r && /* @__PURE__ */
|
|
1337
|
+
}), r && /* @__PURE__ */ y("div", {
|
|
1234
1338
|
className: "divide-y divide-border/30",
|
|
1235
|
-
children: t.map((t) => /* @__PURE__ */
|
|
1339
|
+
children: t.map((t) => /* @__PURE__ */ y(Ae, {
|
|
1236
1340
|
deviceId: e,
|
|
1237
1341
|
camStreamId: t,
|
|
1238
1342
|
camStreams: n
|
|
@@ -1240,82 +1344,82 @@ function Se({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
|
1240
1344
|
})]
|
|
1241
1345
|
});
|
|
1242
1346
|
}
|
|
1243
|
-
function
|
|
1244
|
-
let
|
|
1245
|
-
return /* @__PURE__ */
|
|
1347
|
+
function Ae({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
1348
|
+
let i = S(e, t), a = r("stream-broker.metrics-snapshot", (e) => e.brokerId === i)?.stats, o = n.get(t), s = a?.status === "streaming";
|
|
1349
|
+
return /* @__PURE__ */ b("div", {
|
|
1246
1350
|
className: "px-4 py-2",
|
|
1247
|
-
children: [/* @__PURE__ */
|
|
1351
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1248
1352
|
className: "flex items-center justify-between mb-1",
|
|
1249
|
-
children: /* @__PURE__ */
|
|
1353
|
+
children: /* @__PURE__ */ b("div", {
|
|
1250
1354
|
className: "flex items-center gap-1.5",
|
|
1251
1355
|
children: [
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ y("span", { className: `h-1.5 w-1.5 rounded-full ${s ? "bg-success" : "bg-foreground-subtle/40"}` }),
|
|
1357
|
+
/* @__PURE__ */ y("span", {
|
|
1254
1358
|
className: "text-[11px] font-medium text-foreground",
|
|
1255
|
-
children:
|
|
1359
|
+
children: o?.label ?? t
|
|
1256
1360
|
}),
|
|
1257
|
-
|
|
1361
|
+
o?.resolution && /* @__PURE__ */ b("span", {
|
|
1258
1362
|
className: "text-[10px] text-foreground-subtle",
|
|
1259
1363
|
children: [
|
|
1260
|
-
|
|
1364
|
+
o.resolution.width,
|
|
1261
1365
|
"×",
|
|
1262
|
-
|
|
1366
|
+
o.resolution.height
|
|
1263
1367
|
]
|
|
1264
1368
|
}),
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
className: `text-[10px] ${
|
|
1267
|
-
children:
|
|
1369
|
+
/* @__PURE__ */ y("span", {
|
|
1370
|
+
className: `text-[10px] ${s ? "text-success" : "text-foreground-subtle"}`,
|
|
1371
|
+
children: a?.status ?? "idle"
|
|
1268
1372
|
})
|
|
1269
1373
|
]
|
|
1270
1374
|
})
|
|
1271
|
-
}),
|
|
1375
|
+
}), a && s && /* @__PURE__ */ b("div", {
|
|
1272
1376
|
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1273
1377
|
children: [
|
|
1274
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ b("span", {
|
|
1275
1379
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1276
|
-
children: [/* @__PURE__ */
|
|
1380
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1277
1381
|
className: "text-foreground-subtle",
|
|
1278
1382
|
children: "FPS:"
|
|
1279
|
-
}), /* @__PURE__ */
|
|
1383
|
+
}), /* @__PURE__ */ y("span", {
|
|
1280
1384
|
className: "text-foreground",
|
|
1281
|
-
children:
|
|
1385
|
+
children: a.inputFps.toFixed(1)
|
|
1282
1386
|
})]
|
|
1283
1387
|
}),
|
|
1284
|
-
/* @__PURE__ */
|
|
1388
|
+
/* @__PURE__ */ b("span", {
|
|
1285
1389
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1286
|
-
children: [/* @__PURE__ */
|
|
1390
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1287
1391
|
className: "text-foreground-subtle",
|
|
1288
1392
|
children: "Bitrate:"
|
|
1289
|
-
}), /* @__PURE__ */
|
|
1393
|
+
}), /* @__PURE__ */ y("span", {
|
|
1290
1394
|
className: "text-foreground",
|
|
1291
|
-
children:
|
|
1395
|
+
children: a.bitrateKbps >= 1e3 ? `${(a.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${a.bitrateKbps} kbps`
|
|
1292
1396
|
})]
|
|
1293
1397
|
}),
|
|
1294
|
-
/* @__PURE__ */
|
|
1398
|
+
/* @__PURE__ */ b("span", {
|
|
1295
1399
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1296
|
-
children: [/* @__PURE__ */
|
|
1400
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1297
1401
|
className: "text-foreground-subtle",
|
|
1298
1402
|
children: "Codec:"
|
|
1299
|
-
}), /* @__PURE__ */
|
|
1403
|
+
}), /* @__PURE__ */ y("span", {
|
|
1300
1404
|
className: "text-foreground",
|
|
1301
|
-
children:
|
|
1405
|
+
children: a.codec?.toUpperCase() ?? "—"
|
|
1302
1406
|
})]
|
|
1303
1407
|
}),
|
|
1304
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ b("span", {
|
|
1305
1409
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1306
|
-
children: [/* @__PURE__ */
|
|
1410
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1307
1411
|
className: "text-foreground-subtle",
|
|
1308
1412
|
children: "Pkts:"
|
|
1309
|
-
}), /* @__PURE__ */
|
|
1413
|
+
}), /* @__PURE__ */ y("span", {
|
|
1310
1414
|
className: "text-foreground",
|
|
1311
|
-
children:
|
|
1415
|
+
children: a.packetCount > 1e3 ? `${(a.packetCount / 1e3).toFixed(1)}k` : a.packetCount
|
|
1312
1416
|
})]
|
|
1313
1417
|
})
|
|
1314
1418
|
]
|
|
1315
1419
|
})]
|
|
1316
1420
|
});
|
|
1317
1421
|
}
|
|
1318
|
-
function
|
|
1422
|
+
function X(e, t) {
|
|
1319
1423
|
let n = (e) => {
|
|
1320
1424
|
if (!e || typeof e != "object") return;
|
|
1321
1425
|
let r = e;
|
|
@@ -1336,65 +1440,65 @@ function J(e, t) {
|
|
|
1336
1440
|
if (t !== void 0) return t;
|
|
1337
1441
|
}
|
|
1338
1442
|
}
|
|
1339
|
-
function
|
|
1340
|
-
let o =
|
|
1341
|
-
|
|
1342
|
-
let { data:
|
|
1443
|
+
function je({ slot: e, camStreams: t, compact: a }) {
|
|
1444
|
+
let o = C(), c = r("stream-broker.metrics-snapshot", (t) => t.brokerId === e.brokerId)?.stats;
|
|
1445
|
+
n(["streamBroker", "listClients"], ["stream-broker.metrics-snapshot"]);
|
|
1446
|
+
let { data: u } = s({ brokerId: e.brokerId }, {
|
|
1343
1447
|
enabled: c?.status === "streaming",
|
|
1344
1448
|
staleTime: 2e3
|
|
1345
|
-
}), { data: f } =
|
|
1449
|
+
}), { data: f } = l({ deviceId: e.deviceId }, { staleTime: 15e3 }), p = e.sourceCamStreamId ?? e.profile, m = !!(X(f, `preBufferEnabled:${p}`) ?? !0), h = X(f, `preBufferSec:${p}`), g = d({ onSuccess: () => {
|
|
1346
1450
|
o.invalidateQueries({ queryKey: [["streamBroker", "getDeviceSettingsContribution"]] });
|
|
1347
|
-
} }),
|
|
1348
|
-
|
|
1349
|
-
deviceId:
|
|
1350
|
-
patch: { [`preBufferEnabled:${p}`]:
|
|
1451
|
+
} }), v = (t) => {
|
|
1452
|
+
g.mutate({
|
|
1453
|
+
deviceId: e.deviceId,
|
|
1454
|
+
patch: { [`preBufferEnabled:${p}`]: t }
|
|
1351
1455
|
});
|
|
1352
|
-
},
|
|
1456
|
+
}, S = i({ onSuccess: () => {
|
|
1353
1457
|
o.invalidateQueries({ queryKey: [["streamBroker", "listClients"]] });
|
|
1354
|
-
} }), w =
|
|
1355
|
-
|
|
1356
|
-
brokerId:
|
|
1357
|
-
...
|
|
1458
|
+
} }), w = _((t) => {
|
|
1459
|
+
S.mutate({
|
|
1460
|
+
brokerId: e.brokerId,
|
|
1461
|
+
...t
|
|
1358
1462
|
});
|
|
1359
|
-
}, [
|
|
1360
|
-
return /* @__PURE__ */
|
|
1361
|
-
className: `@container ${
|
|
1463
|
+
}, [S, e.brokerId]), T = (e.sourceCamStreamId ? t.get(e.sourceCamStreamId) : void 0)?.resolution ?? e.resolution, E = c?.status === "streaming", D = T ? `${q[e.profile]} (${T.width}×${T.height})` : q[e.profile], O = c ? c.encodedSubscribers + c.decodedSubscribers + (c.rtspClients ?? 0) + (c.pipeClients ?? 0) : 0;
|
|
1464
|
+
return /* @__PURE__ */ b("div", {
|
|
1465
|
+
className: `@container ${a ? "px-3 py-1.5" : "px-4 py-2"}`,
|
|
1362
1466
|
style: { containerType: "inline-size" },
|
|
1363
1467
|
children: [
|
|
1364
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ b("div", {
|
|
1365
1469
|
className: "flex items-center justify-between gap-2 mb-1.5",
|
|
1366
|
-
children: [/* @__PURE__ */
|
|
1470
|
+
children: [/* @__PURE__ */ b("div", {
|
|
1367
1471
|
className: "flex items-center gap-1.5 min-w-0",
|
|
1368
1472
|
children: [
|
|
1369
|
-
/* @__PURE__ */
|
|
1370
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ y("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${E ? e.profile === "high" ? "bg-success" : e.profile === "mid" ? "bg-warning" : "bg-foreground-subtle" : "bg-foreground-subtle/40"}` }),
|
|
1474
|
+
/* @__PURE__ */ y("span", {
|
|
1371
1475
|
className: "text-[11px] font-medium text-foreground whitespace-nowrap shrink-0",
|
|
1372
1476
|
children: D
|
|
1373
1477
|
}),
|
|
1374
|
-
/* @__PURE__ */
|
|
1478
|
+
/* @__PURE__ */ y("span", {
|
|
1375
1479
|
className: `text-[10px] shrink-0 ${E ? "text-success" : "text-foreground-subtle"}`,
|
|
1376
1480
|
children: c?.status ?? "loading"
|
|
1377
1481
|
}),
|
|
1378
|
-
|
|
1482
|
+
e.sourceCamStreamId && /* @__PURE__ */ b("span", {
|
|
1379
1483
|
className: "text-[10px] text-foreground-subtle truncate min-w-0",
|
|
1380
|
-
title:
|
|
1381
|
-
children: ["← ",
|
|
1484
|
+
title: e.sourceCamStreamId,
|
|
1485
|
+
children: ["← ", e.sourceCamStreamId]
|
|
1382
1486
|
})
|
|
1383
1487
|
]
|
|
1384
|
-
}), /* @__PURE__ */
|
|
1488
|
+
}), /* @__PURE__ */ y("span", {
|
|
1385
1489
|
className: "text-[10px] text-foreground-subtle shrink-0 whitespace-nowrap",
|
|
1386
|
-
children: c && c.uptimeMs > 0 ?
|
|
1490
|
+
children: c && c.uptimeMs > 0 ? Ce(c.uptimeMs) : "—"
|
|
1387
1491
|
})]
|
|
1388
1492
|
}),
|
|
1389
|
-
c && E ?
|
|
1493
|
+
c && E ? a ? /* @__PURE__ */ b("div", {
|
|
1390
1494
|
className: "flex flex-wrap gap-x-3 gap-y-0.5 text-[10px]",
|
|
1391
1495
|
children: [
|
|
1392
|
-
/* @__PURE__ */
|
|
1496
|
+
/* @__PURE__ */ b("span", {
|
|
1393
1497
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1394
|
-
children: [/* @__PURE__ */
|
|
1498
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1395
1499
|
className: "text-foreground-subtle",
|
|
1396
1500
|
children: "FPS:"
|
|
1397
|
-
}), /* @__PURE__ */
|
|
1501
|
+
}), /* @__PURE__ */ b("span", {
|
|
1398
1502
|
className: "text-foreground",
|
|
1399
1503
|
children: [
|
|
1400
1504
|
c.inputFps.toFixed(1),
|
|
@@ -1403,56 +1507,56 @@ function Y({ slot: t, camStreams: n, compact: r }) {
|
|
|
1403
1507
|
]
|
|
1404
1508
|
})]
|
|
1405
1509
|
}),
|
|
1406
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ b("span", {
|
|
1407
1511
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1408
|
-
children: [/* @__PURE__ */
|
|
1512
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1409
1513
|
className: "text-foreground-subtle",
|
|
1410
1514
|
children: "Bitrate:"
|
|
1411
|
-
}), /* @__PURE__ */
|
|
1515
|
+
}), /* @__PURE__ */ y("span", {
|
|
1412
1516
|
className: "text-foreground",
|
|
1413
1517
|
children: c.bitrateKbps >= 1e3 ? `${(c.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${c.bitrateKbps} kbps`
|
|
1414
1518
|
})]
|
|
1415
1519
|
}),
|
|
1416
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ b("span", {
|
|
1417
1521
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1418
|
-
children: [/* @__PURE__ */
|
|
1522
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1419
1523
|
className: "text-foreground-subtle",
|
|
1420
1524
|
children: "Codec:"
|
|
1421
|
-
}), /* @__PURE__ */
|
|
1525
|
+
}), /* @__PURE__ */ y("span", {
|
|
1422
1526
|
className: "text-foreground",
|
|
1423
1527
|
children: c.codec?.toUpperCase() ?? "—"
|
|
1424
1528
|
})]
|
|
1425
1529
|
}),
|
|
1426
|
-
/* @__PURE__ */
|
|
1530
|
+
/* @__PURE__ */ b("span", {
|
|
1427
1531
|
className: "inline-flex items-center whitespace-nowrap gap-1",
|
|
1428
1532
|
children: [
|
|
1429
|
-
/* @__PURE__ */
|
|
1533
|
+
/* @__PURE__ */ y("span", {
|
|
1430
1534
|
className: "text-foreground-subtle",
|
|
1431
1535
|
children: "Clients:"
|
|
1432
1536
|
}),
|
|
1433
|
-
/* @__PURE__ */
|
|
1537
|
+
/* @__PURE__ */ y("span", {
|
|
1434
1538
|
className: "text-foreground font-semibold",
|
|
1435
1539
|
children: O
|
|
1436
1540
|
}),
|
|
1437
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ y("span", {
|
|
1438
1542
|
className: "text-foreground-subtle/70",
|
|
1439
1543
|
children: "("
|
|
1440
1544
|
}),
|
|
1441
|
-
/* @__PURE__ */
|
|
1545
|
+
/* @__PURE__ */ y(Le, {
|
|
1442
1546
|
count: c.encodedSubscribers + c.decodedSubscribers,
|
|
1443
|
-
clients:
|
|
1547
|
+
clients: u,
|
|
1444
1548
|
onKill: w
|
|
1445
1549
|
}),
|
|
1446
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ y("span", {
|
|
1447
1551
|
className: "text-foreground-subtle/70",
|
|
1448
1552
|
children: "·"
|
|
1449
1553
|
}),
|
|
1450
|
-
/* @__PURE__ */
|
|
1554
|
+
/* @__PURE__ */ y(ze, {
|
|
1451
1555
|
count: c.rtspClients ?? 0,
|
|
1452
|
-
clients:
|
|
1556
|
+
clients: u,
|
|
1453
1557
|
onKill: w
|
|
1454
1558
|
}),
|
|
1455
|
-
/* @__PURE__ */
|
|
1559
|
+
/* @__PURE__ */ b("span", {
|
|
1456
1560
|
className: "text-foreground-subtle/70",
|
|
1457
1561
|
children: [
|
|
1458
1562
|
"· pipe ",
|
|
@@ -1463,165 +1567,165 @@ function Y({ slot: t, camStreams: n, compact: r }) {
|
|
|
1463
1567
|
]
|
|
1464
1568
|
})
|
|
1465
1569
|
]
|
|
1466
|
-
}) : /* @__PURE__ */
|
|
1570
|
+
}) : /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ b("div", {
|
|
1467
1571
|
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1468
1572
|
children: [
|
|
1469
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ b("span", {
|
|
1470
1574
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1471
|
-
children: [/* @__PURE__ */
|
|
1575
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1472
1576
|
className: "text-foreground-subtle",
|
|
1473
1577
|
children: "In:"
|
|
1474
|
-
}), /* @__PURE__ */
|
|
1578
|
+
}), /* @__PURE__ */ b("span", {
|
|
1475
1579
|
className: "text-foreground",
|
|
1476
1580
|
children: [c.inputFps.toFixed(1), " fps"]
|
|
1477
1581
|
})]
|
|
1478
1582
|
}),
|
|
1479
|
-
/* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ b("span", {
|
|
1480
1584
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1481
|
-
children: [/* @__PURE__ */
|
|
1585
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1482
1586
|
className: "text-foreground-subtle",
|
|
1483
1587
|
children: "Dec:"
|
|
1484
|
-
}), /* @__PURE__ */
|
|
1588
|
+
}), /* @__PURE__ */ b("span", {
|
|
1485
1589
|
className: "text-foreground",
|
|
1486
1590
|
children: [c.decodeFps.toFixed(1), " fps"]
|
|
1487
1591
|
})]
|
|
1488
1592
|
}),
|
|
1489
|
-
/* @__PURE__ */
|
|
1593
|
+
/* @__PURE__ */ b("span", {
|
|
1490
1594
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1491
|
-
children: [/* @__PURE__ */
|
|
1595
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1492
1596
|
className: "text-foreground-subtle",
|
|
1493
1597
|
children: "Bitrate:"
|
|
1494
|
-
}), /* @__PURE__ */
|
|
1598
|
+
}), /* @__PURE__ */ y("span", {
|
|
1495
1599
|
className: "text-foreground",
|
|
1496
1600
|
children: c.bitrateKbps >= 1e3 ? `${(c.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${c.bitrateKbps} kbps`
|
|
1497
1601
|
})]
|
|
1498
1602
|
}),
|
|
1499
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ b("span", {
|
|
1500
1604
|
className: "hidden @[480px]:inline-flex whitespace-nowrap gap-1",
|
|
1501
|
-
children: [/* @__PURE__ */
|
|
1605
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1502
1606
|
className: "text-foreground-subtle",
|
|
1503
1607
|
children: "IDR:"
|
|
1504
|
-
}), /* @__PURE__ */
|
|
1608
|
+
}), /* @__PURE__ */ y("span", {
|
|
1505
1609
|
className: "text-foreground",
|
|
1506
1610
|
children: c.idrIntervalMs > 0 ? `${(c.idrIntervalMs / 1e3).toFixed(1)}s` : "—"
|
|
1507
1611
|
})]
|
|
1508
1612
|
}),
|
|
1509
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ b("span", {
|
|
1510
1614
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1511
|
-
children: [/* @__PURE__ */
|
|
1615
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1512
1616
|
className: "text-foreground-subtle",
|
|
1513
1617
|
children: "Codec:"
|
|
1514
|
-
}), /* @__PURE__ */
|
|
1618
|
+
}), /* @__PURE__ */ y("span", {
|
|
1515
1619
|
className: "text-foreground",
|
|
1516
1620
|
children: c.codec?.toUpperCase() ?? "—"
|
|
1517
1621
|
})]
|
|
1518
1622
|
}),
|
|
1519
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ b("span", {
|
|
1520
1624
|
className: "hidden @[480px]:inline-flex whitespace-nowrap gap-1 max-w-full overflow-hidden",
|
|
1521
|
-
children: [/* @__PURE__ */
|
|
1625
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1522
1626
|
className: "text-foreground-subtle",
|
|
1523
1627
|
children: "Decoder:"
|
|
1524
|
-
}), /* @__PURE__ */
|
|
1628
|
+
}), /* @__PURE__ */ y("span", {
|
|
1525
1629
|
className: "text-foreground font-mono truncate",
|
|
1526
|
-
children: c.decoderNodeId ?? /* @__PURE__ */
|
|
1630
|
+
children: c.decoderNodeId ?? /* @__PURE__ */ y("span", {
|
|
1527
1631
|
className: "text-foreground-subtle italic",
|
|
1528
1632
|
children: "deferred"
|
|
1529
1633
|
})
|
|
1530
1634
|
})]
|
|
1531
1635
|
}),
|
|
1532
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ b("span", {
|
|
1533
1637
|
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1534
|
-
children: [/* @__PURE__ */
|
|
1638
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1535
1639
|
className: "text-foreground-subtle",
|
|
1536
1640
|
children: "Pipe:"
|
|
1537
|
-
}), /* @__PURE__ */
|
|
1641
|
+
}), /* @__PURE__ */ y("span", {
|
|
1538
1642
|
className: "text-foreground",
|
|
1539
1643
|
children: c.pipeClients ?? 0
|
|
1540
1644
|
})]
|
|
1541
1645
|
}),
|
|
1542
|
-
/* @__PURE__ */
|
|
1646
|
+
/* @__PURE__ */ b("span", {
|
|
1543
1647
|
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1544
|
-
children: [/* @__PURE__ */
|
|
1648
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1545
1649
|
className: "text-foreground-subtle",
|
|
1546
1650
|
children: "Packets:"
|
|
1547
|
-
}), /* @__PURE__ */
|
|
1651
|
+
}), /* @__PURE__ */ y("span", {
|
|
1548
1652
|
className: "text-foreground",
|
|
1549
1653
|
children: c.packetCount > 1e3 ? `${(c.packetCount / 1e3).toFixed(1)}k` : c.packetCount
|
|
1550
1654
|
})]
|
|
1551
1655
|
}),
|
|
1552
|
-
/* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ b("span", {
|
|
1553
1657
|
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1554
|
-
children: [/* @__PURE__ */
|
|
1658
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1555
1659
|
className: "text-foreground-subtle",
|
|
1556
1660
|
children: "Data:"
|
|
1557
|
-
}), /* @__PURE__ */
|
|
1661
|
+
}), /* @__PURE__ */ y("span", {
|
|
1558
1662
|
className: "text-foreground",
|
|
1559
1663
|
children: c.totalBytes > 1048576 ? `${(c.totalBytes / 1048576).toFixed(1)} MB` : `${(c.totalBytes / 1024).toFixed(0)} KB`
|
|
1560
1664
|
})]
|
|
1561
1665
|
}),
|
|
1562
|
-
c.audio && /* @__PURE__ */
|
|
1666
|
+
c.audio && /* @__PURE__ */ b("div", {
|
|
1563
1667
|
className: "basis-full flex flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
1564
1668
|
children: [
|
|
1565
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ y("span", {
|
|
1566
1670
|
className: "text-foreground-subtle whitespace-nowrap",
|
|
1567
1671
|
children: "Audio:"
|
|
1568
1672
|
}),
|
|
1569
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ b("span", {
|
|
1570
1674
|
className: "inline-flex whitespace-nowrap items-center gap-1.5",
|
|
1571
1675
|
children: [
|
|
1572
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ y("span", {
|
|
1573
1677
|
className: "text-foreground",
|
|
1574
1678
|
children: c.audio.codec.toUpperCase()
|
|
1575
1679
|
}),
|
|
1576
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ y("span", {
|
|
1577
1681
|
className: "text-foreground-subtle",
|
|
1578
1682
|
children: "·"
|
|
1579
1683
|
}),
|
|
1580
|
-
/* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ y("span", {
|
|
1581
1685
|
className: "text-foreground",
|
|
1582
1686
|
children: c.audio.sampleRate >= 1e3 ? `${(c.audio.sampleRate / 1e3).toFixed(c.audio.sampleRate % 1e3 == 0 ? 0 : 1)}kHz` : `${c.audio.sampleRate}Hz`
|
|
1583
1687
|
}),
|
|
1584
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ y("span", {
|
|
1585
1689
|
className: "text-foreground-subtle",
|
|
1586
1690
|
children: "·"
|
|
1587
1691
|
}),
|
|
1588
|
-
/* @__PURE__ */
|
|
1692
|
+
/* @__PURE__ */ y("span", {
|
|
1589
1693
|
className: "text-foreground",
|
|
1590
1694
|
children: c.audio.channels === 1 ? "mono" : c.audio.channels === 2 ? "stereo" : `${c.audio.channels}ch`
|
|
1591
1695
|
})
|
|
1592
1696
|
]
|
|
1593
1697
|
}),
|
|
1594
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ y("span", {
|
|
1595
1699
|
className: `px-1 py-px rounded text-[8px] font-medium whitespace-nowrap ${c.audio.supported ? "bg-success/15 text-success" : "bg-amber-500/15 text-amber-500"}`,
|
|
1596
1700
|
children: c.audio.supported ? "decoded" : "no decoder"
|
|
1597
1701
|
})
|
|
1598
1702
|
]
|
|
1599
1703
|
})
|
|
1600
1704
|
]
|
|
1601
|
-
}), /* @__PURE__ */
|
|
1602
|
-
clients:
|
|
1705
|
+
}), /* @__PURE__ */ y(Ie, {
|
|
1706
|
+
clients: u,
|
|
1603
1707
|
encodedCount: c.encodedSubscribers,
|
|
1604
1708
|
onKill: w
|
|
1605
|
-
})] }) : /* @__PURE__ */
|
|
1709
|
+
})] }) : /* @__PURE__ */ y("p", {
|
|
1606
1710
|
className: "text-[10px] text-foreground-subtle italic",
|
|
1607
1711
|
children: "No demand — stream suspended"
|
|
1608
1712
|
}),
|
|
1609
|
-
/* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ b("div", {
|
|
1610
1714
|
className: "mt-1.5 flex items-center gap-1.5 text-[10px]",
|
|
1611
1715
|
children: [
|
|
1612
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ y("span", {
|
|
1613
1717
|
className: "text-foreground-subtle",
|
|
1614
1718
|
children: "Buffer:"
|
|
1615
1719
|
}),
|
|
1616
|
-
/* @__PURE__ */
|
|
1720
|
+
/* @__PURE__ */ y(Re, {
|
|
1617
1721
|
enabled: m,
|
|
1618
|
-
onToggle: (e) =>
|
|
1619
|
-
disabled:
|
|
1722
|
+
onToggle: (e) => v(e),
|
|
1723
|
+
disabled: g.isPending
|
|
1620
1724
|
}),
|
|
1621
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ b("span", {
|
|
1622
1726
|
className: "text-foreground",
|
|
1623
1727
|
children: [
|
|
1624
|
-
|
|
1728
|
+
h ?? c?.preBufferSec ?? 0,
|
|
1625
1729
|
"s",
|
|
1626
1730
|
c && E ? ` (${c.preBufferPackets}p)` : ""
|
|
1627
1731
|
]
|
|
@@ -1631,27 +1735,27 @@ function Y({ slot: t, camStreams: n, compact: r }) {
|
|
|
1631
1735
|
]
|
|
1632
1736
|
});
|
|
1633
1737
|
}
|
|
1634
|
-
var
|
|
1635
|
-
function
|
|
1636
|
-
let r =
|
|
1738
|
+
var Me = 280, Ne = 120;
|
|
1739
|
+
function Pe({ trigger: e, content: t, widthClass: n }) {
|
|
1740
|
+
let r = p(null), i = p(null), [a, o] = g(!1), [s, c] = g(!1), l = _(() => {
|
|
1637
1741
|
i.current &&= (clearTimeout(i.current), null);
|
|
1638
|
-
}, []), u =
|
|
1639
|
-
l(), i.current = setTimeout(() => o(!1),
|
|
1742
|
+
}, []), u = _(() => {
|
|
1743
|
+
l(), i.current = setTimeout(() => o(!1), Ne);
|
|
1640
1744
|
}, [l]);
|
|
1641
|
-
return /* @__PURE__ */
|
|
1745
|
+
return /* @__PURE__ */ b("span", {
|
|
1642
1746
|
ref: r,
|
|
1643
1747
|
className: "relative inline-block",
|
|
1644
|
-
onMouseEnter:
|
|
1748
|
+
onMouseEnter: _(() => {
|
|
1645
1749
|
l();
|
|
1646
1750
|
let e = r.current;
|
|
1647
1751
|
if (e) {
|
|
1648
1752
|
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = t.top;
|
|
1649
|
-
c(n <
|
|
1753
|
+
c(n < Me && r > n);
|
|
1650
1754
|
}
|
|
1651
1755
|
o(!0);
|
|
1652
1756
|
}, [l]),
|
|
1653
1757
|
onMouseLeave: u,
|
|
1654
|
-
children: [e, a && /* @__PURE__ */
|
|
1758
|
+
children: [e, a && /* @__PURE__ */ y("div", {
|
|
1655
1759
|
className: `absolute left-0 ${s ? "bottom-full mb-1" : "top-full mt-1"} z-50 ${n} rounded-md border border-border bg-surface shadow-xl p-2 text-[10px] normal-case`,
|
|
1656
1760
|
onMouseEnter: l,
|
|
1657
1761
|
onMouseLeave: u,
|
|
@@ -1666,21 +1770,21 @@ function Z(e) {
|
|
|
1666
1770
|
let n = Math.floor(t / 60);
|
|
1667
1771
|
return n < 60 ? `${n}m ${t % 60}s` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
1668
1772
|
}
|
|
1669
|
-
function
|
|
1773
|
+
function Fe(e) {
|
|
1670
1774
|
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : e < 1073741824 ? `${(e / 1048576).toFixed(1)} MB` : `${(e / 1073741824).toFixed(2)} GB`;
|
|
1671
1775
|
}
|
|
1672
|
-
function
|
|
1673
|
-
let r = e?.decoded ?? [], i = e?.audio ?? [], a = e?.rtsp ?? [], o = e?.encoded ?? [], s = r.length + i.length + a.length + o.length, [c, l] =
|
|
1674
|
-
return s === 0 ? /* @__PURE__ */
|
|
1776
|
+
function Ie({ clients: e, encodedCount: t, onKill: n }) {
|
|
1777
|
+
let r = e?.decoded ?? [], i = e?.audio ?? [], a = e?.rtsp ?? [], o = e?.encoded ?? [], s = r.length + i.length + a.length + o.length, [c, l] = g(!0);
|
|
1778
|
+
return s === 0 ? /* @__PURE__ */ y("div", {
|
|
1675
1779
|
className: "mt-1.5 text-[10px] text-foreground-subtle italic",
|
|
1676
1780
|
children: "No active subscribers"
|
|
1677
|
-
}) : /* @__PURE__ */
|
|
1781
|
+
}) : /* @__PURE__ */ b("div", {
|
|
1678
1782
|
className: "mt-1.5 border-t border-border/30 pt-1.5",
|
|
1679
|
-
children: [/* @__PURE__ */
|
|
1783
|
+
children: [/* @__PURE__ */ b("button", {
|
|
1680
1784
|
type: "button",
|
|
1681
1785
|
onClick: () => l((e) => !e),
|
|
1682
1786
|
className: "flex items-center gap-1 text-[10px] text-foreground-subtle hover:text-foreground transition-colors",
|
|
1683
|
-
children: [
|
|
1787
|
+
children: [y(c ? P : F, { className: "h-3 w-3" }), /* @__PURE__ */ b("span", {
|
|
1684
1788
|
className: "uppercase tracking-wider",
|
|
1685
1789
|
children: [
|
|
1686
1790
|
"Subscribers (",
|
|
@@ -1688,10 +1792,10 @@ function De({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1688
1792
|
")"
|
|
1689
1793
|
]
|
|
1690
1794
|
})]
|
|
1691
|
-
}), c && /* @__PURE__ */
|
|
1795
|
+
}), c && /* @__PURE__ */ b("div", {
|
|
1692
1796
|
className: "mt-1 divide-y divide-border/20",
|
|
1693
1797
|
children: [
|
|
1694
|
-
r.map((e, t) => /* @__PURE__ */
|
|
1798
|
+
r.map((e, t) => /* @__PURE__ */ y(Q, {
|
|
1695
1799
|
kind: "DECODED",
|
|
1696
1800
|
kindClass: "bg-success/10 text-success",
|
|
1697
1801
|
tag: e.tag || "unknown",
|
|
@@ -1709,7 +1813,7 @@ function De({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1709
1813
|
handle: e.tag
|
|
1710
1814
|
}) : void 0
|
|
1711
1815
|
}, `d-${t}`)),
|
|
1712
|
-
i.map((e, t) => /* @__PURE__ */
|
|
1816
|
+
i.map((e, t) => /* @__PURE__ */ y(Q, {
|
|
1713
1817
|
kind: "AUDIO",
|
|
1714
1818
|
kindClass: "bg-info/10 text-info",
|
|
1715
1819
|
tag: e.tag || "unknown",
|
|
@@ -1722,15 +1826,15 @@ function De({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1722
1826
|
}, `a-${t}`)),
|
|
1723
1827
|
a.map((e) => {
|
|
1724
1828
|
let t = Date.now() - e.lastRtpAt, r = t > 5e3, i = e.playing ? r ? "stalled" : "playing" : "paused", a = e.playing ? r ? "bg-amber-400/10 text-amber-400" : "bg-success/10 text-success" : "bg-foreground-subtle/10 text-foreground-subtle";
|
|
1725
|
-
return /* @__PURE__ */
|
|
1829
|
+
return /* @__PURE__ */ y(Q, {
|
|
1726
1830
|
kind: "RTSP",
|
|
1727
1831
|
kindClass: "bg-warning/10 text-warning",
|
|
1728
|
-
tag: e.userAgent ?
|
|
1832
|
+
tag: e.userAgent ? K(e.userAgent) : e.remoteAddr,
|
|
1729
1833
|
state: {
|
|
1730
1834
|
text: i + (e.muted ? " · muted" : ""),
|
|
1731
1835
|
className: a
|
|
1732
1836
|
},
|
|
1733
|
-
metrics: [
|
|
1837
|
+
metrics: [Fe(e.bytesSent), `last rtp ${Z(t)} ago`],
|
|
1734
1838
|
age: Date.now() - e.connectedAt,
|
|
1735
1839
|
onKill: n ? () => n({
|
|
1736
1840
|
channel: "rtsp",
|
|
@@ -1739,21 +1843,21 @@ function De({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1739
1843
|
}, `r-${e.sessionId}`);
|
|
1740
1844
|
}),
|
|
1741
1845
|
o.map((e) => {
|
|
1742
|
-
let t = e.attribution, n =
|
|
1743
|
-
t.label && i.push(t.label), r && i.push(`sess ${r}`), t.userId && i.push(`user ${t.userId.slice(0, 8)}`), t.remoteAddr && i.push(`@${t.remoteAddr}`), t.userAgent && i.push(
|
|
1744
|
-
let a = i.length > 0 ? i.join(" · ") :
|
|
1745
|
-
return t.media && o.push({ text: t.media }), t.targetCodec && o.push(t.targetCodec), t.transport && o.push(t.transport), o.push(`${e.packetsDelivered} pkts`), /* @__PURE__ */
|
|
1746
|
-
kind:
|
|
1846
|
+
let t = e.attribution, n = we[t.kind] ?? "bg-foreground-subtle/10 text-foreground-subtle", r = t.sessionId ? t.sessionId.slice(0, 8) : null, i = [];
|
|
1847
|
+
t.label && i.push(t.label), r && i.push(`sess ${r}`), t.userId && i.push(`user ${t.userId.slice(0, 8)}`), t.remoteAddr && i.push(`@${t.remoteAddr}`), t.userAgent && i.push(K(t.userAgent));
|
|
1848
|
+
let a = i.length > 0 ? i.join(" · ") : Ee(t.kind), o = [];
|
|
1849
|
+
return t.media && o.push({ text: t.media }), t.targetCodec && o.push(t.targetCodec), t.transport && o.push(t.transport), o.push(`${e.packetsDelivered} pkts`), /* @__PURE__ */ y(Q, {
|
|
1850
|
+
kind: Te(t.kind),
|
|
1747
1851
|
kindClass: n,
|
|
1748
1852
|
tag: a,
|
|
1749
1853
|
metrics: o,
|
|
1750
1854
|
age: Date.now() - e.subscribedAt
|
|
1751
1855
|
}, e.id);
|
|
1752
1856
|
}),
|
|
1753
|
-
o.length === 0 && t > 0 && /* @__PURE__ */
|
|
1857
|
+
o.length === 0 && t > 0 && /* @__PURE__ */ b("div", {
|
|
1754
1858
|
className: "py-0.5 text-[10px] text-foreground-subtle",
|
|
1755
1859
|
children: [
|
|
1756
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__PURE__ */ y("span", {
|
|
1757
1861
|
className: "inline-block px-1 rounded text-[9px] font-bold bg-foreground-subtle/10 text-foreground-subtle mr-2",
|
|
1758
1862
|
children: "ENCODED"
|
|
1759
1863
|
}),
|
|
@@ -1766,82 +1870,82 @@ function De({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1766
1870
|
});
|
|
1767
1871
|
}
|
|
1768
1872
|
function Q({ kind: e, kindClass: t, tag: n, state: r, metrics: i, age: a, onKill: o }) {
|
|
1769
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ b("div", {
|
|
1770
1874
|
className: "flex flex-col gap-y-0.5 py-0.5 text-[10px] @[420px]:flex-row @[420px]:items-center @[420px]:gap-2",
|
|
1771
1875
|
children: [
|
|
1772
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ b("div", {
|
|
1773
1877
|
className: "flex items-center gap-2 min-w-0 @[420px]:flex-1",
|
|
1774
1878
|
children: [
|
|
1775
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ y("span", {
|
|
1776
1880
|
className: `inline-block px-1 rounded text-[9px] font-bold shrink-0 w-14 text-center ${t}`,
|
|
1777
1881
|
children: e
|
|
1778
1882
|
}),
|
|
1779
|
-
/* @__PURE__ */
|
|
1883
|
+
/* @__PURE__ */ y("span", {
|
|
1780
1884
|
className: "text-foreground font-medium truncate min-w-0 flex-1",
|
|
1781
1885
|
title: n,
|
|
1782
1886
|
children: n
|
|
1783
1887
|
}),
|
|
1784
|
-
o && /* @__PURE__ */
|
|
1888
|
+
o && /* @__PURE__ */ y("div", {
|
|
1785
1889
|
className: "shrink-0 flex items-center justify-end @[420px]:hidden",
|
|
1786
|
-
children: /* @__PURE__ */
|
|
1890
|
+
children: /* @__PURE__ */ y($, { onClick: o })
|
|
1787
1891
|
})
|
|
1788
1892
|
]
|
|
1789
1893
|
}),
|
|
1790
|
-
/* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ b("div", {
|
|
1791
1895
|
className: "flex items-center flex-wrap gap-1.5 text-foreground-subtle pl-16 @[420px]:pl-0 @[420px]:flex-nowrap @[420px]:shrink-0",
|
|
1792
1896
|
children: [
|
|
1793
|
-
r && /* @__PURE__ */
|
|
1897
|
+
r && /* @__PURE__ */ y("span", {
|
|
1794
1898
|
className: `text-[9px] px-1 rounded shrink-0 ${r.className}`,
|
|
1795
1899
|
children: r.text
|
|
1796
1900
|
}),
|
|
1797
|
-
i.map((e, t) => /* @__PURE__ */
|
|
1901
|
+
i.map((e, t) => /* @__PURE__ */ b("span", {
|
|
1798
1902
|
className: "whitespace-nowrap",
|
|
1799
|
-
children: [t > 0 && /* @__PURE__ */
|
|
1903
|
+
children: [t > 0 && /* @__PURE__ */ y("span", {
|
|
1800
1904
|
className: "mr-1.5 text-foreground-subtle/50",
|
|
1801
1905
|
children: "·"
|
|
1802
|
-
}), typeof e == "string" ? e : /* @__PURE__ */
|
|
1906
|
+
}), typeof e == "string" ? e : /* @__PURE__ */ y("span", {
|
|
1803
1907
|
className: e.warn ? "text-amber-400" : "",
|
|
1804
1908
|
children: e.text
|
|
1805
1909
|
})]
|
|
1806
1910
|
}, t)),
|
|
1807
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ b("span", {
|
|
1808
1912
|
className: "text-foreground-subtle/70 whitespace-nowrap",
|
|
1809
1913
|
children: ["· ", Z(a)]
|
|
1810
1914
|
})
|
|
1811
1915
|
]
|
|
1812
1916
|
}),
|
|
1813
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ y("div", {
|
|
1814
1918
|
className: "hidden @[420px]:flex w-5 flex-shrink-0 items-center justify-end",
|
|
1815
|
-
children: o ? /* @__PURE__ */
|
|
1919
|
+
children: o ? /* @__PURE__ */ y($, { onClick: o }) : null
|
|
1816
1920
|
})
|
|
1817
1921
|
]
|
|
1818
1922
|
});
|
|
1819
1923
|
}
|
|
1820
|
-
function
|
|
1821
|
-
let r = t?.decoded ?? [], i = t?.audio ?? [], a = t ? t.encodedSubscribers : 0, o = r.length > 0 || i.length > 0 || a > 0, s = /* @__PURE__ */
|
|
1924
|
+
function Le({ count: e, clients: t, onKill: n }) {
|
|
1925
|
+
let r = t?.decoded ?? [], i = t?.audio ?? [], a = t ? t.encodedSubscribers : 0, o = r.length > 0 || i.length > 0 || a > 0, s = /* @__PURE__ */ y("span", {
|
|
1822
1926
|
className: `text-foreground ${o ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1823
1927
|
children: e
|
|
1824
1928
|
});
|
|
1825
|
-
return o ? /* @__PURE__ */
|
|
1929
|
+
return o ? /* @__PURE__ */ y(Pe, {
|
|
1826
1930
|
trigger: s,
|
|
1827
|
-
content: /* @__PURE__ */
|
|
1828
|
-
r.length > 0 && /* @__PURE__ */
|
|
1931
|
+
content: /* @__PURE__ */ b(x, { children: [
|
|
1932
|
+
r.length > 0 && /* @__PURE__ */ b("div", {
|
|
1829
1933
|
className: "mb-2",
|
|
1830
|
-
children: [/* @__PURE__ */
|
|
1934
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1831
1935
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1832
1936
|
children: "Decoded subscribers"
|
|
1833
|
-
}), r.map((e, t) => /* @__PURE__ */
|
|
1937
|
+
}), r.map((e, t) => /* @__PURE__ */ b("div", {
|
|
1834
1938
|
className: "flex items-center justify-between gap-2 py-0.5",
|
|
1835
|
-
children: [/* @__PURE__ */
|
|
1939
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1836
1940
|
className: "text-foreground font-medium truncate",
|
|
1837
1941
|
children: e.tag || "unknown"
|
|
1838
|
-
}), /* @__PURE__ */
|
|
1942
|
+
}), /* @__PURE__ */ b("span", {
|
|
1839
1943
|
className: "text-foreground-subtle text-[9px] flex items-center gap-1.5 shrink-0",
|
|
1840
1944
|
children: [
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
/* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
e.framesDropped > 0 && /* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ b("span", { children: [e.maxFps.toFixed(0), "fps"] }),
|
|
1946
|
+
/* @__PURE__ */ y("span", { children: "·" }),
|
|
1947
|
+
/* @__PURE__ */ b("span", { children: [e.framesDelivered, " del"] }),
|
|
1948
|
+
e.framesDropped > 0 && /* @__PURE__ */ b("span", {
|
|
1845
1949
|
className: "text-amber-400",
|
|
1846
1950
|
children: [
|
|
1847
1951
|
"· ",
|
|
@@ -1849,9 +1953,9 @@ function Oe({ count: e, clients: t, onKill: n }) {
|
|
|
1849
1953
|
" drop"
|
|
1850
1954
|
]
|
|
1851
1955
|
}),
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
1854
|
-
n && e.tag && /* @__PURE__ */
|
|
1956
|
+
/* @__PURE__ */ y("span", { children: "·" }),
|
|
1957
|
+
/* @__PURE__ */ y("span", { children: Z(Date.now() - e.subscribedAt) }),
|
|
1958
|
+
n && e.tag && /* @__PURE__ */ y($, { onClick: () => n({
|
|
1855
1959
|
channel: "decoded",
|
|
1856
1960
|
handle: e.tag
|
|
1857
1961
|
}) })
|
|
@@ -1859,23 +1963,23 @@ function Oe({ count: e, clients: t, onKill: n }) {
|
|
|
1859
1963
|
})]
|
|
1860
1964
|
}, `d-${t}`))]
|
|
1861
1965
|
}),
|
|
1862
|
-
i.length > 0 && /* @__PURE__ */
|
|
1966
|
+
i.length > 0 && /* @__PURE__ */ b("div", {
|
|
1863
1967
|
className: "mb-2",
|
|
1864
|
-
children: [/* @__PURE__ */
|
|
1968
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1865
1969
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1866
1970
|
children: "Audio subscribers"
|
|
1867
|
-
}), i.map((e, t) => /* @__PURE__ */
|
|
1971
|
+
}), i.map((e, t) => /* @__PURE__ */ b("div", {
|
|
1868
1972
|
className: "flex items-center justify-between gap-2 py-0.5",
|
|
1869
|
-
children: [/* @__PURE__ */
|
|
1973
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1870
1974
|
className: "text-foreground font-medium truncate",
|
|
1871
1975
|
children: e.tag || "unknown"
|
|
1872
|
-
}), /* @__PURE__ */
|
|
1976
|
+
}), /* @__PURE__ */ b("span", {
|
|
1873
1977
|
className: "text-foreground-subtle text-[9px] flex items-center gap-1.5 shrink-0",
|
|
1874
1978
|
children: [
|
|
1875
|
-
/* @__PURE__ */
|
|
1876
|
-
/* @__PURE__ */
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
n && e.tag && /* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ b("span", { children: [e.chunksDelivered, " chunks"] }),
|
|
1980
|
+
/* @__PURE__ */ y("span", { children: "·" }),
|
|
1981
|
+
/* @__PURE__ */ y("span", { children: Z(Date.now() - e.subscribedAt) }),
|
|
1982
|
+
n && e.tag && /* @__PURE__ */ y($, { onClick: () => n({
|
|
1879
1983
|
channel: "audio",
|
|
1880
1984
|
handle: e.tag
|
|
1881
1985
|
}) })
|
|
@@ -1883,10 +1987,10 @@ function Oe({ count: e, clients: t, onKill: n }) {
|
|
|
1883
1987
|
})]
|
|
1884
1988
|
}, `a-${t}`))]
|
|
1885
1989
|
}),
|
|
1886
|
-
a > 0 && /* @__PURE__ */
|
|
1990
|
+
a > 0 && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("div", {
|
|
1887
1991
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1888
1992
|
children: "Encoded"
|
|
1889
|
-
}), /* @__PURE__ */
|
|
1993
|
+
}), /* @__PURE__ */ b("div", {
|
|
1890
1994
|
className: "text-foreground",
|
|
1891
1995
|
children: [a, " callback subscriber(s)"]
|
|
1892
1996
|
})] })
|
|
@@ -1894,8 +1998,8 @@ function Oe({ count: e, clients: t, onKill: n }) {
|
|
|
1894
1998
|
widthClass: "min-w-[260px] max-w-[360px]"
|
|
1895
1999
|
}) : s;
|
|
1896
2000
|
}
|
|
1897
|
-
function
|
|
1898
|
-
return /* @__PURE__ */
|
|
2001
|
+
function Re({ enabled: e, onToggle: t, disabled: n }) {
|
|
2002
|
+
return /* @__PURE__ */ y("button", {
|
|
1899
2003
|
type: "button",
|
|
1900
2004
|
role: "switch",
|
|
1901
2005
|
"aria-checked": e,
|
|
@@ -1903,59 +2007,59 @@ function ke({ enabled: e, onToggle: t, disabled: n }) {
|
|
|
1903
2007
|
onClick: () => t(!e),
|
|
1904
2008
|
className: `relative inline-flex h-3 w-6 shrink-0 items-center rounded-full transition-colors ${e ? "bg-success/60" : "bg-foreground-subtle/30"} ${n ? "opacity-50 cursor-wait" : "cursor-pointer"}`,
|
|
1905
2009
|
title: e ? "Pre-buffer enabled — click to disable" : "Pre-buffer disabled — click to enable",
|
|
1906
|
-
children: /* @__PURE__ */
|
|
2010
|
+
children: /* @__PURE__ */ y("span", { className: `inline-block h-2.5 w-2.5 rounded-full bg-white shadow transition-transform ${e ? "translate-x-3" : "translate-x-0.5"}` })
|
|
1907
2011
|
});
|
|
1908
2012
|
}
|
|
1909
2013
|
function $({ onClick: e }) {
|
|
1910
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ y("button", {
|
|
1911
2015
|
type: "button",
|
|
1912
2016
|
title: "Force-disconnect this client",
|
|
1913
2017
|
onClick: (t) => {
|
|
1914
2018
|
t.stopPropagation(), e();
|
|
1915
2019
|
},
|
|
1916
2020
|
className: "inline-flex items-center justify-center h-4 w-4 rounded-sm border border-border/60 text-foreground-subtle hover:bg-red-500/10 hover:text-red-400 hover:border-red-500/40 transition-colors",
|
|
1917
|
-
children: /* @__PURE__ */
|
|
2021
|
+
children: /* @__PURE__ */ y(ae, { className: "h-2.5 w-2.5" })
|
|
1918
2022
|
});
|
|
1919
2023
|
}
|
|
1920
|
-
function
|
|
1921
|
-
let r = t?.rtsp ?? [], i = r.length > 0, a = /* @__PURE__ */
|
|
2024
|
+
function ze({ count: e, clients: t, onKill: n }) {
|
|
2025
|
+
let r = t?.rtsp ?? [], i = r.length > 0, a = /* @__PURE__ */ y("span", {
|
|
1922
2026
|
className: `text-foreground ${i ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1923
2027
|
children: e
|
|
1924
2028
|
});
|
|
1925
|
-
return i ? /* @__PURE__ */
|
|
2029
|
+
return i ? /* @__PURE__ */ y(Pe, {
|
|
1926
2030
|
trigger: a,
|
|
1927
|
-
content: /* @__PURE__ */
|
|
2031
|
+
content: /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y("div", {
|
|
1928
2032
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1929
2033
|
children: "RTSP sessions"
|
|
1930
2034
|
}), r.map((e) => {
|
|
1931
2035
|
let t = Date.now() - e.lastRtpAt, r = t > 5e3;
|
|
1932
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ b("div", {
|
|
1933
2037
|
className: "py-1 border-b border-border/40 last:border-b-0",
|
|
1934
|
-
children: [/* @__PURE__ */
|
|
2038
|
+
children: [/* @__PURE__ */ b("div", {
|
|
1935
2039
|
className: "flex items-center justify-between gap-2",
|
|
1936
|
-
children: [/* @__PURE__ */
|
|
2040
|
+
children: [/* @__PURE__ */ y("span", {
|
|
1937
2041
|
className: "text-foreground font-mono",
|
|
1938
|
-
children: e.userAgent ?
|
|
1939
|
-
}), /* @__PURE__ */
|
|
2042
|
+
children: e.userAgent ? K(e.userAgent) : e.remoteAddr
|
|
2043
|
+
}), /* @__PURE__ */ b("span", {
|
|
1940
2044
|
className: "flex items-center gap-1 shrink-0",
|
|
1941
|
-
children: [/* @__PURE__ */
|
|
2045
|
+
children: [/* @__PURE__ */ b("span", {
|
|
1942
2046
|
className: `text-[9px] px-1 rounded ${e.playing ? r ? "bg-amber-400/10 text-amber-400" : "bg-success/10 text-success" : "bg-foreground-subtle/10 text-foreground-subtle"}`,
|
|
1943
2047
|
children: [e.playing ? r ? "stalled" : "playing" : "paused", e.muted && " · muted"]
|
|
1944
|
-
}), n && /* @__PURE__ */
|
|
2048
|
+
}), n && /* @__PURE__ */ y($, { onClick: () => n({
|
|
1945
2049
|
channel: "rtsp",
|
|
1946
2050
|
handle: e.sessionId
|
|
1947
2051
|
}) })]
|
|
1948
2052
|
})]
|
|
1949
|
-
}), /* @__PURE__ */
|
|
2053
|
+
}), /* @__PURE__ */ b("div", {
|
|
1950
2054
|
className: "flex items-center justify-between gap-2 text-foreground-subtle text-[9px] mt-0.5",
|
|
1951
2055
|
children: [
|
|
1952
|
-
/* @__PURE__ */
|
|
1953
|
-
/* @__PURE__ */
|
|
2056
|
+
/* @__PURE__ */ b("span", { children: [Fe(e.bytesSent), " sent"] }),
|
|
2057
|
+
/* @__PURE__ */ b("span", { children: [
|
|
1954
2058
|
"connected ",
|
|
1955
2059
|
Z(Date.now() - e.connectedAt),
|
|
1956
2060
|
" ago"
|
|
1957
2061
|
] }),
|
|
1958
|
-
/* @__PURE__ */
|
|
2062
|
+
/* @__PURE__ */ b("span", { children: [
|
|
1959
2063
|
"last rtp ",
|
|
1960
2064
|
Z(t),
|
|
1961
2065
|
" ago"
|
|
@@ -1969,9 +2073,9 @@ function Ae({ count: e, clients: t, onKill: n }) {
|
|
|
1969
2073
|
}
|
|
1970
2074
|
//#endregion
|
|
1971
2075
|
//#region src/stream-broker/widgets/index.tsx
|
|
1972
|
-
var
|
|
1973
|
-
"stream-broker-panel":
|
|
1974
|
-
"ffmpeg-params":
|
|
2076
|
+
var Be = {
|
|
2077
|
+
"stream-broker-panel": De,
|
|
2078
|
+
"ffmpeg-params": he
|
|
1975
2079
|
};
|
|
1976
2080
|
//#endregion
|
|
1977
|
-
export {
|
|
2081
|
+
export { Be as default };
|