@camstack/addon-pipeline 1.1.21 → 1.1.22
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/audio-codec-ffmpeg/index.js +1 -1
- package/dist/audio-codec-ffmpeg/index.mjs +1 -1
- package/dist/decoder-ffmpeg/index.js +1 -1
- package/dist/decoder-ffmpeg/index.mjs +1 -1
- package/dist/detection-pipeline/index.js +1 -1
- package/dist/detection-pipeline/index.mjs +1 -1
- package/dist/{dist-BiP1gPeY.js → dist-CE3a05qT.js} +228 -16
- package/dist/{dist-tzhTTRq4.mjs → dist-pd_-3C0T.mjs} +228 -16
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +412 -247
- package/dist/pipeline-runner/index.mjs +412 -247
- package/dist/recorder/index.js +260 -234
- package/dist/recorder/index.mjs +260 -234
- package/dist/stream-broker/_stub.js +378 -324
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D08qJTw_.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CLVitFM4.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BFeBlYRQ.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-C0QtG7oR.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BC1Jt6G8.mjs} +1 -1
- package/dist/stream-broker/{hostInit-CGnMNtPl.mjs → hostInit-B15D9Mjv.mjs} +2 -2
- package/dist/stream-broker/index.js +13862 -12493
- package/dist/stream-broker/index.mjs +13878 -12509
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-CW4Qu4V6.js → MaskShapeCanvas-DI4BY7W2-BqXU75it.js} +1 -1
- package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-CHJ39tfi.js → MotionZonesSettings-NcxxQN8r-Ct2fpgCd.js} +1 -1
- package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-dInJ7kcz.js → PrivacyMaskSettings-APgPLF7p-a9eFVPPl.js} +1 -1
- package/embed-dist/assets/index-DhdVxWXL.js +80 -0
- package/embed-dist/index.html +1 -1
- 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-BSWrW78G.mjs +0 -26
- package/embed-dist/assets/index-CKpVWKSG.js +0 -80
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { a as
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BC1Jt6G8.mjs";
|
|
2
|
+
import { a as u, i as d, n as f, o as p, r as m, t as h } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
3
3
|
import { n as g, r as _, t as v } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
4
|
import { n as y, t as b } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
5
|
-
import { t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
5
|
+
import { t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BFeBlYRQ.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
7
7
|
var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), w = (e) => {
|
|
8
8
|
let t = C(e);
|
|
@@ -19,37 +19,37 @@ var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) =
|
|
|
19
19
|
strokeWidth: 2,
|
|
20
20
|
strokeLinecap: "round",
|
|
21
21
|
strokeLinejoin: "round"
|
|
22
|
-
}, O =
|
|
23
|
-
ref:
|
|
22
|
+
}, O = f(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => h("svg", {
|
|
23
|
+
ref: c,
|
|
24
24
|
...D,
|
|
25
25
|
width: t,
|
|
26
26
|
height: t,
|
|
27
27
|
stroke: e,
|
|
28
28
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
29
29
|
className: T("lucide", i),
|
|
30
|
-
...!
|
|
31
|
-
...
|
|
32
|
-
}, [...
|
|
33
|
-
let
|
|
30
|
+
...!a && !E(s) && { "aria-hidden": "true" },
|
|
31
|
+
...s
|
|
32
|
+
}, [...o.map(([e, t]) => h(e, t)), ...Array.isArray(a) ? a : [a]])), k = (e, t) => {
|
|
33
|
+
let n = f(({ className: n, ...r }, i) => h(O, {
|
|
34
34
|
ref: i,
|
|
35
35
|
iconNode: t,
|
|
36
36
|
className: T(`lucide-${S(w(e))}`, `lucide-${e}`, n),
|
|
37
37
|
...r
|
|
38
38
|
}));
|
|
39
|
-
return
|
|
39
|
+
return n.displayName = w(e), n;
|
|
40
40
|
}, A = k("chevron-down", [["path", {
|
|
41
41
|
d: "m6 9 6 6 6-6",
|
|
42
42
|
key: "qrunsl"
|
|
43
43
|
}]]), j = k("chevron-right", [["path", {
|
|
44
44
|
d: "m9 18 6-6-6-6",
|
|
45
45
|
key: "mthhwq"
|
|
46
|
-
}]]),
|
|
46
|
+
}]]), M = k("plus", [["path", {
|
|
47
47
|
d: "M5 12h14",
|
|
48
48
|
key: "1ays0h"
|
|
49
49
|
}], ["path", {
|
|
50
50
|
d: "M12 5v14",
|
|
51
51
|
key: "s699le"
|
|
52
|
-
}]]),
|
|
52
|
+
}]]), ee = k("radio", [
|
|
53
53
|
["path", {
|
|
54
54
|
d: "M4.9 19.1C1 15.2 1 8.8 4.9 4.9",
|
|
55
55
|
key: "1vaf9d"
|
|
@@ -72,7 +72,7 @@ var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) =
|
|
|
72
72
|
d: "M19.1 4.9C23 8.8 23 15.1 19.1 19",
|
|
73
73
|
key: "10b0cb"
|
|
74
74
|
}]
|
|
75
|
-
]),
|
|
75
|
+
]), te = k("x", [["path", {
|
|
76
76
|
d: "M18 6 6 18",
|
|
77
77
|
key: "1bl5f8"
|
|
78
78
|
}], ["path", {
|
|
@@ -81,7 +81,7 @@ var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) =
|
|
|
81
81
|
}]]);
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/stream-broker/widgets/GeometryBuilder.tsx
|
|
84
|
-
function
|
|
84
|
+
function ne(e) {
|
|
85
85
|
let t = [];
|
|
86
86
|
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) {
|
|
87
87
|
let n = e.targetAspect.replace(":", "/");
|
|
@@ -89,7 +89,7 @@ function re(e) {
|
|
|
89
89
|
}
|
|
90
90
|
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(",");
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function re(e, t) {
|
|
93
93
|
let n = [];
|
|
94
94
|
for (let t = 0; t < e.length; t++) {
|
|
95
95
|
if (e[t] === "-vf") {
|
|
@@ -101,16 +101,16 @@ function ie(e, t) {
|
|
|
101
101
|
}
|
|
102
102
|
return t.length > 0 && n.push("-vf", t), n;
|
|
103
103
|
}
|
|
104
|
-
var
|
|
105
|
-
function
|
|
106
|
-
let [n,
|
|
104
|
+
var N = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium";
|
|
105
|
+
function ie({ outputArgs: e, onChange: t }) {
|
|
106
|
+
let [n, r] = p(""), [i, a] = p("pad"), [o, s] = p("1920"), [c, l] = p("1080"), [u, d] = p(!1), [f, m] = p("0"), [h, y] = p("0"), [b, x] = p("0"), [S, C] = p("0"), [w, T] = p(0), [E, D] = p(!1), [O, k] = p(!1), A = ne((() => {
|
|
107
107
|
let e = {
|
|
108
108
|
rotate: w,
|
|
109
109
|
hflip: E,
|
|
110
110
|
vflip: O
|
|
111
111
|
};
|
|
112
|
-
return n !== "" && (e.targetAspect = n, e.mode =
|
|
113
|
-
x: Number(
|
|
112
|
+
return n !== "" && (e.targetAspect = n, e.mode = i, e.width = Number(o), e.height = Number(c)), u && (e.crop = {
|
|
113
|
+
x: Number(f),
|
|
114
114
|
y: Number(h),
|
|
115
115
|
w: Number(b),
|
|
116
116
|
h: Number(S)
|
|
@@ -122,14 +122,14 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
122
122
|
/* @__PURE__ */ _("div", {
|
|
123
123
|
className: "flex items-center justify-between",
|
|
124
124
|
children: [/* @__PURE__ */ _("span", {
|
|
125
|
-
className:
|
|
125
|
+
className: N,
|
|
126
126
|
children: ["Geometry / zoom", /* @__PURE__ */ g("span", {
|
|
127
127
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
128
128
|
children: "composes a single -vf into output args"
|
|
129
129
|
})]
|
|
130
130
|
}), /* @__PURE__ */ g("button", {
|
|
131
131
|
type: "button",
|
|
132
|
-
onClick: () => t(
|
|
132
|
+
onClick: () => t(re(e, A)),
|
|
133
133
|
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",
|
|
134
134
|
children: "Apply geometry"
|
|
135
135
|
})]
|
|
@@ -138,14 +138,14 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
138
138
|
className: "flex flex-wrap items-center gap-2",
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ g("label", {
|
|
141
|
-
className:
|
|
141
|
+
className: N,
|
|
142
142
|
htmlFor: "geom-aspect",
|
|
143
143
|
children: "Aspect"
|
|
144
144
|
}),
|
|
145
145
|
/* @__PURE__ */ _("select", {
|
|
146
146
|
id: "geom-aspect",
|
|
147
147
|
value: n,
|
|
148
|
-
onChange: (e) =>
|
|
148
|
+
onChange: (e) => r(e.target.value),
|
|
149
149
|
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]",
|
|
150
150
|
children: [
|
|
151
151
|
/* @__PURE__ */ g("option", {
|
|
@@ -169,8 +169,8 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
169
169
|
n !== "" && /* @__PURE__ */ _(v, { children: [
|
|
170
170
|
/* @__PURE__ */ _("select", {
|
|
171
171
|
"aria-label": "Aspect mode",
|
|
172
|
-
value:
|
|
173
|
-
onChange: (e) =>
|
|
172
|
+
value: i,
|
|
173
|
+
onChange: (e) => a(e.target.value),
|
|
174
174
|
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]",
|
|
175
175
|
children: [/* @__PURE__ */ g("option", {
|
|
176
176
|
value: "pad",
|
|
@@ -183,8 +183,8 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
183
183
|
/* @__PURE__ */ g("input", {
|
|
184
184
|
type: "number",
|
|
185
185
|
"aria-label": "Aspect width",
|
|
186
|
-
value:
|
|
187
|
-
onChange: (e) =>
|
|
186
|
+
value: o,
|
|
187
|
+
onChange: (e) => s(e.target.value),
|
|
188
188
|
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"
|
|
189
189
|
}),
|
|
190
190
|
/* @__PURE__ */ g("span", {
|
|
@@ -194,8 +194,8 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
194
194
|
/* @__PURE__ */ g("input", {
|
|
195
195
|
type: "number",
|
|
196
196
|
"aria-label": "Aspect height",
|
|
197
|
-
value:
|
|
198
|
-
onChange: (e) =>
|
|
197
|
+
value: c,
|
|
198
|
+
onChange: (e) => l(e.target.value),
|
|
199
199
|
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"
|
|
200
200
|
})
|
|
201
201
|
] })
|
|
@@ -207,14 +207,14 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
207
207
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
208
208
|
children: [/* @__PURE__ */ g("input", {
|
|
209
209
|
type: "checkbox",
|
|
210
|
-
checked:
|
|
211
|
-
onChange: (e) =>
|
|
210
|
+
checked: u,
|
|
211
|
+
onChange: (e) => d(e.target.checked)
|
|
212
212
|
}), "Crop / zoom"]
|
|
213
|
-
}),
|
|
213
|
+
}), u && /* @__PURE__ */ _(v, { children: [
|
|
214
214
|
/* @__PURE__ */ g("input", {
|
|
215
215
|
type: "number",
|
|
216
216
|
"aria-label": "Crop x",
|
|
217
|
-
value:
|
|
217
|
+
value: f,
|
|
218
218
|
onChange: (e) => m(e.target.value),
|
|
219
219
|
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",
|
|
220
220
|
placeholder: "x"
|
|
@@ -249,7 +249,7 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
249
249
|
className: "flex flex-wrap items-center gap-2",
|
|
250
250
|
children: [
|
|
251
251
|
/* @__PURE__ */ g("label", {
|
|
252
|
-
className:
|
|
252
|
+
className: N,
|
|
253
253
|
htmlFor: "geom-rotate",
|
|
254
254
|
children: "Rotate"
|
|
255
255
|
}),
|
|
@@ -307,7 +307,7 @@ function ae({ outputArgs: e, onChange: t }) {
|
|
|
307
307
|
}
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region src/stream-broker/widgets/FfmpegParamsField.tsx
|
|
310
|
-
var
|
|
310
|
+
var ae = [
|
|
311
311
|
{
|
|
312
312
|
group: "Demuxer",
|
|
313
313
|
label: "-thread_queue_size 1024",
|
|
@@ -349,8 +349,20 @@ var oe = [
|
|
|
349
349
|
label: "-stimeout 5000000",
|
|
350
350
|
args: ["-stimeout", "5000000"],
|
|
351
351
|
description: "Socket I/O timeout (microseconds, 5s)"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
group: "Timestamps",
|
|
355
|
+
label: "-use_wallclock_as_timestamps 1",
|
|
356
|
+
args: ["-use_wallclock_as_timestamps", "1"],
|
|
357
|
+
description: "Rewrite timestamps from wall-clock (fixes non-monotonic cloud sources)"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
group: "Timestamps",
|
|
361
|
+
label: "-fflags +genpts+igndts",
|
|
362
|
+
args: ["-fflags", "+genpts+igndts"],
|
|
363
|
+
description: "Generate PTS + ignore DTS"
|
|
352
364
|
}
|
|
353
|
-
],
|
|
365
|
+
], oe = [
|
|
354
366
|
{
|
|
355
367
|
group: "Muxer",
|
|
356
368
|
label: "-flush_packets 1",
|
|
@@ -422,56 +434,74 @@ var oe = [
|
|
|
422
434
|
label: "-copyts",
|
|
423
435
|
args: ["-copyts"],
|
|
424
436
|
description: "Preserve source timestamps"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
group: "Timestamps",
|
|
440
|
+
label: "-avoid_negative_ts make_zero",
|
|
441
|
+
args: ["-avoid_negative_ts", "make_zero"],
|
|
442
|
+
description: "Shift timestamps so they start at zero"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
group: "Audio",
|
|
446
|
+
label: "-af aresample=async=1",
|
|
447
|
+
args: ["-af", "aresample=async=1"],
|
|
448
|
+
description: "Resample audio to correct drift / gaps"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
group: "Muxer",
|
|
452
|
+
label: "-muxdelay 0",
|
|
453
|
+
args: ["-muxdelay", "0"],
|
|
454
|
+
description: "No mux buffering delay"
|
|
425
455
|
}
|
|
426
456
|
], se = {
|
|
427
457
|
video: { codec: "copy" },
|
|
428
458
|
audio: "passthrough"
|
|
429
459
|
}, P = "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", F = "flex items-center justify-between gap-3 py-1.5", I = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium", L = "rounded-lg border border-border bg-surface overflow-hidden", R = "border-b border-border px-3 py-1.5 flex items-center justify-between bg-surface-hover/30", z = "text-[11px] font-semibold text-foreground uppercase tracking-wider";
|
|
430
|
-
function ce({ config:
|
|
431
|
-
let [
|
|
432
|
-
f.current !==
|
|
433
|
-
let
|
|
434
|
-
|
|
435
|
-
},
|
|
460
|
+
function ce({ config: e, value: t, onSave: n }) {
|
|
461
|
+
let [r, i] = p(!1), a = e.argsOnly === !0, o = t ?? se, [s, c] = p(() => (o.inputArgs ?? []).join("\n")), [l, d] = p(() => (o.outputArgs ?? []).join("\n")), f = u(o);
|
|
462
|
+
f.current !== o && (f.current = o, c((o.inputArgs ?? []).join("\n")), d((o.outputArgs ?? []).join("\n")));
|
|
463
|
+
let m = (e) => {
|
|
464
|
+
n(e(o));
|
|
465
|
+
}, h = (e) => m((t) => ({
|
|
436
466
|
...t,
|
|
437
467
|
video: {
|
|
438
468
|
...t.video,
|
|
439
469
|
codec: e
|
|
440
470
|
}
|
|
441
|
-
})),
|
|
471
|
+
})), y = (e) => m((t) => ({
|
|
442
472
|
...t,
|
|
443
473
|
video: {
|
|
444
474
|
...t.video,
|
|
445
475
|
width: e
|
|
446
476
|
}
|
|
447
|
-
})),
|
|
477
|
+
})), b = (e) => m((t) => ({
|
|
448
478
|
...t,
|
|
449
479
|
video: {
|
|
450
480
|
...t.video,
|
|
451
481
|
height: e
|
|
452
482
|
}
|
|
453
|
-
})),
|
|
483
|
+
})), x = (e) => m((t) => ({
|
|
454
484
|
...t,
|
|
455
485
|
video: {
|
|
456
486
|
...t.video,
|
|
457
487
|
fps: e
|
|
458
488
|
}
|
|
459
|
-
})),
|
|
489
|
+
})), S = (e) => m((t) => ({
|
|
460
490
|
...t,
|
|
461
491
|
video: {
|
|
462
492
|
...t.video,
|
|
463
493
|
bitrateKbps: e
|
|
464
494
|
}
|
|
465
|
-
})),
|
|
495
|
+
})), C = () => m((e) => ({
|
|
466
496
|
...e,
|
|
467
497
|
audio: "passthrough"
|
|
468
|
-
})),
|
|
498
|
+
})), w = (e) => m((t) => ({
|
|
469
499
|
...t,
|
|
470
500
|
audio: typeof t.audio == "object" ? {
|
|
471
501
|
...t.audio,
|
|
472
502
|
codec: e
|
|
473
503
|
} : { codec: e }
|
|
474
|
-
})),
|
|
504
|
+
})), T = (e) => m((t) => ({
|
|
475
505
|
...t,
|
|
476
506
|
audio: typeof t.audio == "object" ? {
|
|
477
507
|
...t.audio,
|
|
@@ -480,26 +510,76 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
480
510
|
codec: "opus",
|
|
481
511
|
bitrateKbps: e
|
|
482
512
|
}
|
|
483
|
-
})),
|
|
513
|
+
})), E = (e) => m((t) => ({
|
|
484
514
|
...t,
|
|
485
515
|
inputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
486
|
-
})),
|
|
516
|
+
})), D = (e) => m((t) => ({
|
|
487
517
|
...t,
|
|
488
518
|
outputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
489
|
-
})),
|
|
519
|
+
})), O = (e, t) => {
|
|
490
520
|
let n = t.args.join(" ");
|
|
491
521
|
if (e === "input") {
|
|
492
|
-
let e =
|
|
493
|
-
|
|
522
|
+
let e = s.length === 0 ? n : `${s}\n${n}`;
|
|
523
|
+
c(e), E(e);
|
|
494
524
|
} else {
|
|
495
|
-
let e =
|
|
496
|
-
d(e),
|
|
525
|
+
let e = l.length === 0 ? n : `${l}\n${n}`;
|
|
526
|
+
d(e), D(e);
|
|
497
527
|
}
|
|
498
|
-
}
|
|
528
|
+
}, k = /* @__PURE__ */ _("div", {
|
|
529
|
+
className: "space-y-1.5",
|
|
530
|
+
children: [/* @__PURE__ */ _("div", {
|
|
531
|
+
className: "flex items-center justify-between",
|
|
532
|
+
children: [/* @__PURE__ */ _("label", {
|
|
533
|
+
htmlFor: `${e.fieldKey}-input-args`,
|
|
534
|
+
className: I,
|
|
535
|
+
children: ["Input args", /* @__PURE__ */ g("span", {
|
|
536
|
+
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
537
|
+
children: "one per line · inserted between globals and -i"
|
|
538
|
+
})]
|
|
539
|
+
}), /* @__PURE__ */ g(B, {
|
|
540
|
+
id: `${e.fieldKey}-input-picker`,
|
|
541
|
+
disabled: !1,
|
|
542
|
+
catalogue: ae,
|
|
543
|
+
onPick: (e) => O("input", e)
|
|
544
|
+
})]
|
|
545
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
546
|
+
id: `${e.fieldKey}-input-args`,
|
|
547
|
+
value: s,
|
|
548
|
+
onChange: (e) => c(e.target.value),
|
|
549
|
+
onBlur: (e) => E(e.target.value),
|
|
550
|
+
placeholder: "-thread_queue_size 1024",
|
|
551
|
+
className: P
|
|
552
|
+
})]
|
|
553
|
+
}), M = /* @__PURE__ */ _("div", {
|
|
554
|
+
className: "space-y-1.5",
|
|
555
|
+
children: [/* @__PURE__ */ _("div", {
|
|
556
|
+
className: "flex items-center justify-between",
|
|
557
|
+
children: [/* @__PURE__ */ _("label", {
|
|
558
|
+
htmlFor: `${e.fieldKey}-output-args`,
|
|
559
|
+
className: I,
|
|
560
|
+
children: ["Output args", /* @__PURE__ */ g("span", {
|
|
561
|
+
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
562
|
+
children: "one per line · inserted before the final muxer"
|
|
563
|
+
})]
|
|
564
|
+
}), /* @__PURE__ */ g(B, {
|
|
565
|
+
id: `${e.fieldKey}-output-picker`,
|
|
566
|
+
disabled: !1,
|
|
567
|
+
catalogue: oe,
|
|
568
|
+
onPick: (e) => O("output", e)
|
|
569
|
+
})]
|
|
570
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
571
|
+
id: `${e.fieldKey}-output-args`,
|
|
572
|
+
value: l,
|
|
573
|
+
onChange: (e) => d(e.target.value),
|
|
574
|
+
onBlur: (e) => D(e.target.value),
|
|
575
|
+
placeholder: "-bsf:v h264_mp4toannexb",
|
|
576
|
+
className: P
|
|
577
|
+
})]
|
|
578
|
+
});
|
|
499
579
|
return /* @__PURE__ */ _("div", {
|
|
500
580
|
className: "space-y-3",
|
|
501
581
|
children: [
|
|
502
|
-
|
|
582
|
+
e.sourceParams !== void 0 && /* @__PURE__ */ _("div", {
|
|
503
583
|
className: L,
|
|
504
584
|
children: [/* @__PURE__ */ _("div", {
|
|
505
585
|
className: R,
|
|
@@ -512,10 +592,10 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
512
592
|
})]
|
|
513
593
|
}), /* @__PURE__ */ g("div", {
|
|
514
594
|
className: "px-3 py-2 flex flex-wrap gap-1.5",
|
|
515
|
-
children: /* @__PURE__ */ g(le, { profile:
|
|
595
|
+
children: /* @__PURE__ */ g(le, { profile: e.sourceParams })
|
|
516
596
|
})]
|
|
517
597
|
}),
|
|
518
|
-
/* @__PURE__ */ g("div", {
|
|
598
|
+
!a && /* @__PURE__ */ g("div", {
|
|
519
599
|
className: "@container",
|
|
520
600
|
children: /* @__PURE__ */ _("div", {
|
|
521
601
|
className: "grid grid-cols-1 @[480px]:grid-cols-2 gap-3",
|
|
@@ -532,13 +612,13 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
532
612
|
children: [/* @__PURE__ */ _("div", {
|
|
533
613
|
className: F,
|
|
534
614
|
children: [/* @__PURE__ */ g("label", {
|
|
535
|
-
htmlFor: `${
|
|
615
|
+
htmlFor: `${e.fieldKey}-video-codec`,
|
|
536
616
|
className: I,
|
|
537
617
|
children: "Codec"
|
|
538
618
|
}), /* @__PURE__ */ _("select", {
|
|
539
|
-
id: `${
|
|
540
|
-
value:
|
|
541
|
-
onChange: (e) =>
|
|
619
|
+
id: `${e.fieldKey}-video-codec`,
|
|
620
|
+
value: o.video.codec,
|
|
621
|
+
onChange: (e) => h(e.target.value),
|
|
542
622
|
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]",
|
|
543
623
|
children: [
|
|
544
624
|
/* @__PURE__ */ g("option", {
|
|
@@ -555,61 +635,61 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
555
635
|
})
|
|
556
636
|
]
|
|
557
637
|
})]
|
|
558
|
-
}),
|
|
638
|
+
}), o.video.codec !== "copy" && /* @__PURE__ */ _(v, { children: [
|
|
559
639
|
/* @__PURE__ */ _("div", {
|
|
560
640
|
className: F,
|
|
561
641
|
children: [/* @__PURE__ */ g("label", {
|
|
562
|
-
htmlFor: `${
|
|
642
|
+
htmlFor: `${e.fieldKey}-video-width`,
|
|
563
643
|
className: I,
|
|
564
644
|
children: "Width"
|
|
565
645
|
}), /* @__PURE__ */ g("input", {
|
|
566
|
-
id: `${
|
|
646
|
+
id: `${e.fieldKey}-video-width`,
|
|
567
647
|
type: "number",
|
|
568
648
|
"aria-label": "Width",
|
|
569
|
-
value:
|
|
570
|
-
onChange: (e) =>
|
|
649
|
+
value: o.video.width ?? "",
|
|
650
|
+
onChange: (e) => y(Number(e.target.value)),
|
|
571
651
|
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"
|
|
572
652
|
})]
|
|
573
653
|
}),
|
|
574
654
|
/* @__PURE__ */ _("div", {
|
|
575
655
|
className: F,
|
|
576
656
|
children: [/* @__PURE__ */ g("label", {
|
|
577
|
-
htmlFor: `${
|
|
657
|
+
htmlFor: `${e.fieldKey}-video-height`,
|
|
578
658
|
className: I,
|
|
579
659
|
children: "Height"
|
|
580
660
|
}), /* @__PURE__ */ g("input", {
|
|
581
|
-
id: `${
|
|
661
|
+
id: `${e.fieldKey}-video-height`,
|
|
582
662
|
type: "number",
|
|
583
|
-
value:
|
|
584
|
-
onChange: (e) =>
|
|
663
|
+
value: o.video.height ?? "",
|
|
664
|
+
onChange: (e) => b(Number(e.target.value)),
|
|
585
665
|
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"
|
|
586
666
|
})]
|
|
587
667
|
}),
|
|
588
668
|
/* @__PURE__ */ _("div", {
|
|
589
669
|
className: F,
|
|
590
670
|
children: [/* @__PURE__ */ g("label", {
|
|
591
|
-
htmlFor: `${
|
|
671
|
+
htmlFor: `${e.fieldKey}-video-fps`,
|
|
592
672
|
className: I,
|
|
593
673
|
children: "FPS"
|
|
594
674
|
}), /* @__PURE__ */ g("input", {
|
|
595
|
-
id: `${
|
|
675
|
+
id: `${e.fieldKey}-video-fps`,
|
|
596
676
|
type: "number",
|
|
597
|
-
value:
|
|
598
|
-
onChange: (e) =>
|
|
677
|
+
value: o.video.fps ?? "",
|
|
678
|
+
onChange: (e) => x(Number(e.target.value)),
|
|
599
679
|
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"
|
|
600
680
|
})]
|
|
601
681
|
}),
|
|
602
682
|
/* @__PURE__ */ _("div", {
|
|
603
683
|
className: F,
|
|
604
684
|
children: [/* @__PURE__ */ g("label", {
|
|
605
|
-
htmlFor: `${
|
|
685
|
+
htmlFor: `${e.fieldKey}-video-bitrate`,
|
|
606
686
|
className: I,
|
|
607
687
|
children: "Bitrate (kbps)"
|
|
608
688
|
}), /* @__PURE__ */ g("input", {
|
|
609
|
-
id: `${
|
|
689
|
+
id: `${e.fieldKey}-video-bitrate`,
|
|
610
690
|
type: "number",
|
|
611
|
-
value:
|
|
612
|
-
onChange: (e) =>
|
|
691
|
+
value: o.video.bitrateKbps ?? "",
|
|
692
|
+
onChange: (e) => S(Number(e.target.value)),
|
|
613
693
|
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"
|
|
614
694
|
})]
|
|
615
695
|
})
|
|
@@ -625,14 +705,14 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
625
705
|
})
|
|
626
706
|
}), /* @__PURE__ */ g("div", {
|
|
627
707
|
className: "px-3 py-2",
|
|
628
|
-
children:
|
|
708
|
+
children: o.audio === "passthrough" ? /* @__PURE__ */ _("div", {
|
|
629
709
|
className: "flex items-center justify-between gap-3",
|
|
630
710
|
children: [/* @__PURE__ */ g("span", {
|
|
631
711
|
className: "text-[11px] text-foreground-subtle italic",
|
|
632
712
|
children: "Source audio forwarded without re-encode."
|
|
633
713
|
}), /* @__PURE__ */ g("button", {
|
|
634
714
|
type: "button",
|
|
635
|
-
onClick: () =>
|
|
715
|
+
onClick: () => w("opus"),
|
|
636
716
|
className: "rounded-md border border-border bg-surface-hover px-2 py-1 text-[11px] text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
637
717
|
children: "Switch to custom encode"
|
|
638
718
|
})]
|
|
@@ -642,13 +722,13 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
642
722
|
/* @__PURE__ */ _("div", {
|
|
643
723
|
className: F,
|
|
644
724
|
children: [/* @__PURE__ */ g("label", {
|
|
645
|
-
htmlFor: `${
|
|
725
|
+
htmlFor: `${e.fieldKey}-audio-codec`,
|
|
646
726
|
className: I,
|
|
647
727
|
children: "Codec"
|
|
648
728
|
}), /* @__PURE__ */ _("select", {
|
|
649
|
-
id: `${
|
|
650
|
-
value:
|
|
651
|
-
onChange: (e) =>
|
|
729
|
+
id: `${e.fieldKey}-audio-codec`,
|
|
730
|
+
value: o.audio.codec,
|
|
731
|
+
onChange: (e) => w(e.target.value),
|
|
652
732
|
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]",
|
|
653
733
|
children: [
|
|
654
734
|
/* @__PURE__ */ g("option", {
|
|
@@ -677,14 +757,14 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
677
757
|
/* @__PURE__ */ _("div", {
|
|
678
758
|
className: F,
|
|
679
759
|
children: [/* @__PURE__ */ g("label", {
|
|
680
|
-
htmlFor: `${
|
|
760
|
+
htmlFor: `${e.fieldKey}-audio-bitrate`,
|
|
681
761
|
className: I,
|
|
682
762
|
children: "Bitrate (kbps)"
|
|
683
763
|
}), /* @__PURE__ */ g("input", {
|
|
684
|
-
id: `${
|
|
764
|
+
id: `${e.fieldKey}-audio-bitrate`,
|
|
685
765
|
type: "number",
|
|
686
|
-
value:
|
|
687
|
-
onChange: (e) =>
|
|
766
|
+
value: o.audio.bitrateKbps ?? "",
|
|
767
|
+
onChange: (e) => T(Number(e.target.value)),
|
|
688
768
|
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"
|
|
689
769
|
})]
|
|
690
770
|
}),
|
|
@@ -692,7 +772,7 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
692
772
|
className: "pt-2",
|
|
693
773
|
children: /* @__PURE__ */ g("button", {
|
|
694
774
|
type: "button",
|
|
695
|
-
onClick:
|
|
775
|
+
onClick: C,
|
|
696
776
|
className: "text-[11px] text-foreground-subtle hover:text-foreground underline-offset-2 hover:underline",
|
|
697
777
|
children: "Switch back to passthrough"
|
|
698
778
|
})
|
|
@@ -703,80 +783,54 @@ function ce({ config: t, value: n, onSave: i }) {
|
|
|
703
783
|
})]
|
|
704
784
|
})
|
|
705
785
|
}),
|
|
706
|
-
/* @__PURE__ */ _("div", {
|
|
786
|
+
a ? /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ _("div", {
|
|
787
|
+
className: L,
|
|
788
|
+
children: [/* @__PURE__ */ g("div", {
|
|
789
|
+
className: R,
|
|
790
|
+
children: /* @__PURE__ */ g("h3", {
|
|
791
|
+
className: z,
|
|
792
|
+
children: "Input args"
|
|
793
|
+
})
|
|
794
|
+
}), /* @__PURE__ */ g("div", {
|
|
795
|
+
className: "px-3 py-2",
|
|
796
|
+
children: k
|
|
797
|
+
})]
|
|
798
|
+
}), /* @__PURE__ */ _("div", {
|
|
799
|
+
className: L,
|
|
800
|
+
children: [/* @__PURE__ */ g("div", {
|
|
801
|
+
className: R,
|
|
802
|
+
children: /* @__PURE__ */ g("h3", {
|
|
803
|
+
className: z,
|
|
804
|
+
children: "Output args"
|
|
805
|
+
})
|
|
806
|
+
}), /* @__PURE__ */ g("div", {
|
|
807
|
+
className: "px-3 py-2",
|
|
808
|
+
children: M
|
|
809
|
+
})]
|
|
810
|
+
})] }) : /* @__PURE__ */ _("div", {
|
|
707
811
|
className: L,
|
|
708
812
|
children: [/* @__PURE__ */ _("button", {
|
|
709
813
|
type: "button",
|
|
710
|
-
onClick: () =>
|
|
814
|
+
onClick: () => i((e) => !e),
|
|
711
815
|
className: "w-full px-3 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
712
816
|
children: [/* @__PURE__ */ _("span", {
|
|
713
817
|
className: "inline-flex items-center gap-1.5 text-[11px] font-semibold text-foreground uppercase tracking-wider",
|
|
714
|
-
children: [g(
|
|
818
|
+
children: [g(r ? A : j, { className: "h-3 w-3" }), "Advanced — raw ffmpeg args"]
|
|
715
819
|
}), /* @__PURE__ */ _("span", {
|
|
716
820
|
className: "text-[10px] text-foreground-subtle italic",
|
|
717
|
-
children: [(
|
|
821
|
+
children: [(o.inputArgs?.length ?? 0) + (o.outputArgs?.length ?? 0), " args"]
|
|
718
822
|
})]
|
|
719
|
-
}),
|
|
823
|
+
}), r && /* @__PURE__ */ _("div", {
|
|
720
824
|
className: "px-3 py-2 space-y-3 border-t border-border/50",
|
|
721
825
|
children: [
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
className: "flex items-center justify-between",
|
|
726
|
-
children: [/* @__PURE__ */ _("label", {
|
|
727
|
-
htmlFor: `${t.fieldKey}-input-args`,
|
|
728
|
-
className: I,
|
|
729
|
-
children: ["Input args", /* @__PURE__ */ g("span", {
|
|
730
|
-
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
731
|
-
children: "one per line · inserted between globals and -i"
|
|
732
|
-
})]
|
|
733
|
-
}), /* @__PURE__ */ g(B, {
|
|
734
|
-
id: `${t.fieldKey}-input-picker`,
|
|
735
|
-
disabled: !1,
|
|
736
|
-
catalogue: oe,
|
|
737
|
-
onPick: (e) => D("input", e)
|
|
738
|
-
})]
|
|
739
|
-
}), /* @__PURE__ */ g("textarea", {
|
|
740
|
-
id: `${t.fieldKey}-input-args`,
|
|
741
|
-
value: c,
|
|
742
|
-
onChange: (e) => l(e.target.value),
|
|
743
|
-
onBlur: (e) => T(e.target.value),
|
|
744
|
-
placeholder: "-thread_queue_size 1024",
|
|
745
|
-
className: P
|
|
746
|
-
})]
|
|
747
|
-
}),
|
|
748
|
-
/* @__PURE__ */ g(ae, {
|
|
749
|
-
outputArgs: s.outputArgs ?? [],
|
|
826
|
+
k,
|
|
827
|
+
/* @__PURE__ */ g(ie, {
|
|
828
|
+
outputArgs: o.outputArgs ?? [],
|
|
750
829
|
onChange: (e) => {
|
|
751
|
-
d(e.join("\n")),
|
|
830
|
+
d(e.join("\n")), D(e.join("\n"));
|
|
752
831
|
}
|
|
753
832
|
}),
|
|
754
|
-
|
|
755
|
-
className: "space-y-1.5",
|
|
756
|
-
children: [/* @__PURE__ */ _("div", {
|
|
757
|
-
className: "flex items-center justify-between",
|
|
758
|
-
children: [/* @__PURE__ */ _("label", {
|
|
759
|
-
htmlFor: `${t.fieldKey}-output-args`,
|
|
760
|
-
className: I,
|
|
761
|
-
children: ["Output args", /* @__PURE__ */ g("span", {
|
|
762
|
-
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
763
|
-
children: "one per line · inserted before the final muxer"
|
|
764
|
-
})]
|
|
765
|
-
}), /* @__PURE__ */ g(B, {
|
|
766
|
-
id: `${t.fieldKey}-output-picker`,
|
|
767
|
-
disabled: !1,
|
|
768
|
-
catalogue: N,
|
|
769
|
-
onPick: (e) => D("output", e)
|
|
770
|
-
})]
|
|
771
|
-
}), /* @__PURE__ */ g("textarea", {
|
|
772
|
-
id: `${t.fieldKey}-output-args`,
|
|
773
|
-
value: u,
|
|
774
|
-
onChange: (e) => d(e.target.value),
|
|
775
|
-
onBlur: (e) => E(e.target.value),
|
|
776
|
-
placeholder: "-bsf:v h264_mp4toannexb",
|
|
777
|
-
className: P
|
|
778
|
-
})]
|
|
779
|
-
})
|
|
833
|
+
M
|
|
780
834
|
]
|
|
781
835
|
})]
|
|
782
836
|
})
|
|
@@ -865,17 +919,17 @@ function le({ profile: e }) {
|
|
|
865
919
|
] });
|
|
866
920
|
}
|
|
867
921
|
function ue(e) {
|
|
868
|
-
let t = e.config ?? {}, n =
|
|
869
|
-
if (
|
|
870
|
-
let
|
|
871
|
-
if (
|
|
922
|
+
let t = e.config ?? {}, n = c(), [r, i] = p(() => t.initialValue), a = m((r) => {
|
|
923
|
+
if (i(r), e.deviceId === void 0) return;
|
|
924
|
+
let a = t.writerCapName, o = t.writerAddonId, s = t.fieldKey;
|
|
925
|
+
if (a === void 0 || o === void 0 || s === void 0) {
|
|
872
926
|
console.warn(`[ffmpeg-params] widgetConfig is missing writerCapName/writerAddonId/fieldKey — field ${s ?? "(unknown)"} cannot be saved. Fix the contribution builder.`);
|
|
873
927
|
return;
|
|
874
928
|
}
|
|
875
929
|
n.mutate({
|
|
876
930
|
deviceId: e.deviceId,
|
|
877
|
-
writerCapName:
|
|
878
|
-
writerAddonId:
|
|
931
|
+
writerCapName: a,
|
|
932
|
+
writerAddonId: o,
|
|
879
933
|
key: s,
|
|
880
934
|
value: r ?? null
|
|
881
935
|
});
|
|
@@ -890,45 +944,45 @@ function ue(e) {
|
|
|
890
944
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
891
945
|
children: "ffmpeg-params: no deviceId in widget context — this widget only renders inside a device tab."
|
|
892
946
|
});
|
|
893
|
-
let
|
|
894
|
-
return
|
|
947
|
+
let o = t.fieldKey;
|
|
948
|
+
return o === void 0 || o.length === 0 ? /* @__PURE__ */ g("div", {
|
|
895
949
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
896
950
|
children: "ffmpeg-params: widgetConfig.fieldKey is required — fix the contribution builder."
|
|
897
951
|
}) : /* @__PURE__ */ g(ce, {
|
|
898
952
|
config: {
|
|
899
953
|
...t,
|
|
900
|
-
fieldKey:
|
|
954
|
+
fieldKey: o
|
|
901
955
|
},
|
|
902
|
-
value:
|
|
903
|
-
onSave:
|
|
956
|
+
value: r,
|
|
957
|
+
onSave: a
|
|
904
958
|
});
|
|
905
959
|
}
|
|
906
|
-
function B({ id: e, disabled:
|
|
907
|
-
let [
|
|
960
|
+
function B({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
961
|
+
let [i, a] = p(!1), o = d(() => {
|
|
908
962
|
let e = /* @__PURE__ */ new Map();
|
|
909
|
-
for (let t of
|
|
963
|
+
for (let t of n) {
|
|
910
964
|
let n = e.get(t.group) ?? [];
|
|
911
965
|
n.push(t), e.set(t.group, n);
|
|
912
966
|
}
|
|
913
967
|
return e;
|
|
914
|
-
}, [
|
|
968
|
+
}, [n]);
|
|
915
969
|
return /* @__PURE__ */ _("div", {
|
|
916
970
|
className: "relative",
|
|
917
971
|
children: [/* @__PURE__ */ _("button", {
|
|
918
972
|
id: e,
|
|
919
973
|
type: "button",
|
|
920
|
-
disabled:
|
|
921
|
-
onClick: () =>
|
|
974
|
+
disabled: t,
|
|
975
|
+
onClick: () => a((e) => !e),
|
|
922
976
|
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",
|
|
923
|
-
children: [/* @__PURE__ */ g(
|
|
924
|
-
}),
|
|
977
|
+
children: [/* @__PURE__ */ g(M, { className: "h-3 w-3" }), "Add flag…"]
|
|
978
|
+
}), i && !t && /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g("div", {
|
|
925
979
|
className: "fixed inset-0 z-40",
|
|
926
|
-
onClick: () =>
|
|
980
|
+
onClick: () => a(!1),
|
|
927
981
|
"aria-hidden": "true"
|
|
928
982
|
}), /* @__PURE__ */ g("div", {
|
|
929
983
|
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",
|
|
930
984
|
role: "menu",
|
|
931
|
-
children: Array.from(
|
|
985
|
+
children: Array.from(o.entries()).map(([e, t]) => /* @__PURE__ */ _("div", {
|
|
932
986
|
className: "border-b border-border/30 last:border-b-0",
|
|
933
987
|
children: [/* @__PURE__ */ g("div", {
|
|
934
988
|
className: "sticky top-0 bg-surface-hover/80 backdrop-blur px-2 py-1 text-[9px] font-semibold uppercase tracking-wider text-foreground-subtle",
|
|
@@ -936,7 +990,7 @@ function B({ id: e, disabled: n, catalogue: i, onPick: a }) {
|
|
|
936
990
|
}), t.map((e) => /* @__PURE__ */ _("button", {
|
|
937
991
|
type: "button",
|
|
938
992
|
onClick: () => {
|
|
939
|
-
|
|
993
|
+
r(e), a(!1);
|
|
940
994
|
},
|
|
941
995
|
className: "w-full text-left px-2 py-1.5 hover:bg-surface-hover transition-colors group",
|
|
942
996
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -982,7 +1036,7 @@ var U = {
|
|
|
982
1036
|
"high",
|
|
983
1037
|
"mid",
|
|
984
1038
|
"low"
|
|
985
|
-
],
|
|
1039
|
+
], me = {
|
|
986
1040
|
alexa: "bg-blue-500/15 text-blue-400",
|
|
987
1041
|
homekit: "bg-purple-500/15 text-purple-400",
|
|
988
1042
|
"webrtc-browser": "bg-emerald-500/15 text-emerald-400",
|
|
@@ -995,7 +1049,7 @@ var U = {
|
|
|
995
1049
|
snapshot: "bg-cyan-500/15 text-cyan-400",
|
|
996
1050
|
warmup: "bg-foreground-subtle/10 text-foreground-subtle",
|
|
997
1051
|
unknown: "bg-foreground-subtle/10 text-foreground-subtle"
|
|
998
|
-
},
|
|
1052
|
+
}, G = {
|
|
999
1053
|
alexa: "ALEXA",
|
|
1000
1054
|
homekit: "HOMEKIT",
|
|
1001
1055
|
"webrtc-browser": "BROWSER",
|
|
@@ -1009,48 +1063,48 @@ var U = {
|
|
|
1009
1063
|
warmup: "WARMUP",
|
|
1010
1064
|
unknown: "—"
|
|
1011
1065
|
};
|
|
1012
|
-
function me(e) {
|
|
1013
|
-
return K[e] ?? e.toUpperCase().slice(0, 8);
|
|
1014
|
-
}
|
|
1015
1066
|
function he(e) {
|
|
1016
|
-
return
|
|
1067
|
+
return G[e] ?? e.toUpperCase().slice(0, 8);
|
|
1017
1068
|
}
|
|
1018
1069
|
function ge(e) {
|
|
1070
|
+
return G[e] ?? e;
|
|
1071
|
+
}
|
|
1072
|
+
function _e(e) {
|
|
1019
1073
|
let t = e.config ?? {};
|
|
1020
1074
|
return e.deviceId === void 0 ? /* @__PURE__ */ g("div", {
|
|
1021
1075
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
1022
1076
|
children: "StreamBrokerPanel requires a deviceId"
|
|
1023
|
-
}) : /* @__PURE__ */ g(
|
|
1077
|
+
}) : /* @__PURE__ */ g(ve, {
|
|
1024
1078
|
deviceId: e.deviceId,
|
|
1025
1079
|
title: t.title,
|
|
1026
1080
|
variant: t.variant,
|
|
1027
1081
|
hideEmpty: t.hideEmpty
|
|
1028
1082
|
});
|
|
1029
1083
|
}
|
|
1030
|
-
function
|
|
1031
|
-
|
|
1084
|
+
function ve({ deviceId: e, title: n = "Stream Brokers", variant: r = "full", hideEmpty: a = !1 }) {
|
|
1085
|
+
o(["streamBroker", "listAllProfileSlots"], [
|
|
1032
1086
|
"device.streams-registered",
|
|
1033
1087
|
"device.streams-unregistered",
|
|
1034
1088
|
"device.registered",
|
|
1035
1089
|
"device.unregistered"
|
|
1036
1090
|
]);
|
|
1037
|
-
let { data:
|
|
1091
|
+
let { data: s } = t(void 0, { staleTime: 3e4 }), c = (s ?? []).filter((t) => t.deviceId === e && t.sourceCamStreamId !== null).slice().toSorted((e, t) => W.indexOf(e.profile) - W.indexOf(t.profile)), u = i(l().trpcClient, e), { data: d } = b({
|
|
1038
1092
|
queryKey: [
|
|
1039
1093
|
"device",
|
|
1040
1094
|
e,
|
|
1041
1095
|
"cameraStreams.getCameraStreams"
|
|
1042
1096
|
],
|
|
1043
|
-
queryFn: () =>
|
|
1044
|
-
enabled: !!
|
|
1097
|
+
queryFn: () => u?.cameraStreams?.getCameraStreams({}) ?? [],
|
|
1098
|
+
enabled: !!u,
|
|
1045
1099
|
staleTime: 3e4
|
|
1046
|
-
}),
|
|
1047
|
-
for (let e of
|
|
1048
|
-
let
|
|
1049
|
-
return
|
|
1100
|
+
}), f = /* @__PURE__ */ new Map();
|
|
1101
|
+
for (let e of d ?? []) f.set(e.camStreamId, e);
|
|
1102
|
+
let p = new Set(c.map((e) => e.sourceCamStreamId).filter((e) => e !== null)), m = (d ?? []).filter((e) => !p.has(e.camStreamId)), h = c.length > 0, v = m.length > 0;
|
|
1103
|
+
return a && !h && !v ? null : r === "compact" ? h ? /* @__PURE__ */ g("div", {
|
|
1050
1104
|
className: "divide-y divide-border/30",
|
|
1051
|
-
children:
|
|
1105
|
+
children: c.map((e) => /* @__PURE__ */ g(q, {
|
|
1052
1106
|
slot: e,
|
|
1053
|
-
camStreams:
|
|
1107
|
+
camStreams: f,
|
|
1054
1108
|
compact: !0
|
|
1055
1109
|
}, e.brokerId))
|
|
1056
1110
|
}) : /* @__PURE__ */ g("div", {
|
|
@@ -1063,52 +1117,52 @@ function _e({ deviceId: e, title: t = "Stream Brokers", variant: n = "full", hid
|
|
|
1063
1117
|
className: "border-b border-border px-4 py-2 flex items-center justify-between",
|
|
1064
1118
|
children: [/* @__PURE__ */ g("h2", {
|
|
1065
1119
|
className: "text-xs font-semibold text-foreground uppercase tracking-wider",
|
|
1066
|
-
children:
|
|
1067
|
-
}),
|
|
1120
|
+
children: n
|
|
1121
|
+
}), h && /* @__PURE__ */ _("span", {
|
|
1068
1122
|
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",
|
|
1069
|
-
children: [
|
|
1123
|
+
children: [c.length, " assigned"]
|
|
1070
1124
|
})]
|
|
1071
1125
|
}),
|
|
1072
|
-
|
|
1126
|
+
h ? /* @__PURE__ */ g("div", {
|
|
1073
1127
|
className: "divide-y divide-border/30",
|
|
1074
|
-
children:
|
|
1128
|
+
children: c.map((e) => /* @__PURE__ */ g(q, {
|
|
1075
1129
|
slot: e,
|
|
1076
|
-
camStreams:
|
|
1130
|
+
camStreams: f,
|
|
1077
1131
|
compact: !1
|
|
1078
1132
|
}, e.brokerId))
|
|
1079
1133
|
}) : /* @__PURE__ */ _("div", {
|
|
1080
1134
|
className: "px-4 py-6 flex flex-col items-center text-center text-foreground-subtle",
|
|
1081
|
-
children: [/* @__PURE__ */ g(
|
|
1135
|
+
children: [/* @__PURE__ */ g(ee, { className: "h-5 w-5 mb-2 opacity-30" }), /* @__PURE__ */ g("p", {
|
|
1082
1136
|
className: "text-xs",
|
|
1083
1137
|
children: "No profile slots assigned for this device"
|
|
1084
1138
|
})]
|
|
1085
1139
|
}),
|
|
1086
|
-
v && /* @__PURE__ */ g(
|
|
1140
|
+
v && /* @__PURE__ */ g(ye, {
|
|
1087
1141
|
deviceId: e,
|
|
1088
|
-
camStreamIds:
|
|
1089
|
-
camStreams:
|
|
1142
|
+
camStreamIds: m.map((e) => e.camStreamId),
|
|
1143
|
+
camStreams: f
|
|
1090
1144
|
})
|
|
1091
1145
|
]
|
|
1092
1146
|
});
|
|
1093
1147
|
}
|
|
1094
|
-
function
|
|
1095
|
-
let [
|
|
1148
|
+
function ye({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
1149
|
+
let [r, i] = p(!1);
|
|
1096
1150
|
return /* @__PURE__ */ _("div", {
|
|
1097
1151
|
className: "border-t border-border/50",
|
|
1098
1152
|
children: [/* @__PURE__ */ _("button", {
|
|
1099
1153
|
type: "button",
|
|
1100
|
-
onClick: () =>
|
|
1154
|
+
onClick: () => i((e) => !e),
|
|
1101
1155
|
className: "w-full px-4 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
1102
1156
|
children: [/* @__PURE__ */ _("span", {
|
|
1103
1157
|
className: "inline-flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-foreground-subtle",
|
|
1104
|
-
children: [g(
|
|
1158
|
+
children: [g(r ? A : j, { className: "h-3 w-3" }), "Other active streams"]
|
|
1105
1159
|
}), /* @__PURE__ */ g("span", {
|
|
1106
1160
|
className: "rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border",
|
|
1107
1161
|
children: t.length
|
|
1108
1162
|
})]
|
|
1109
|
-
}),
|
|
1163
|
+
}), r && /* @__PURE__ */ g("div", {
|
|
1110
1164
|
className: "divide-y divide-border/30",
|
|
1111
|
-
children: t.map((t) => /* @__PURE__ */ g(
|
|
1165
|
+
children: t.map((t) => /* @__PURE__ */ g(be, {
|
|
1112
1166
|
deviceId: e,
|
|
1113
1167
|
camStreamId: t,
|
|
1114
1168
|
camStreams: n
|
|
@@ -1116,8 +1170,8 @@ function ve({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
|
1116
1170
|
})]
|
|
1117
1171
|
});
|
|
1118
1172
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let
|
|
1173
|
+
function be({ deviceId: e, camStreamId: t, camStreams: r }) {
|
|
1174
|
+
let i = x(e, t), a = n("stream-broker.metrics-snapshot", (e) => e.brokerId === i)?.stats, o = r.get(t), s = a?.status === "streaming";
|
|
1121
1175
|
return /* @__PURE__ */ _("div", {
|
|
1122
1176
|
className: "px-4 py-2",
|
|
1123
1177
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -1125,26 +1179,26 @@ function ye({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
|
1125
1179
|
children: /* @__PURE__ */ _("div", {
|
|
1126
1180
|
className: "flex items-center gap-1.5",
|
|
1127
1181
|
children: [
|
|
1128
|
-
/* @__PURE__ */ g("span", { className: `h-1.5 w-1.5 rounded-full ${
|
|
1182
|
+
/* @__PURE__ */ g("span", { className: `h-1.5 w-1.5 rounded-full ${s ? "bg-success" : "bg-foreground-subtle/40"}` }),
|
|
1129
1183
|
/* @__PURE__ */ g("span", {
|
|
1130
1184
|
className: "text-[11px] font-medium text-foreground",
|
|
1131
|
-
children:
|
|
1185
|
+
children: o?.label ?? t
|
|
1132
1186
|
}),
|
|
1133
|
-
|
|
1187
|
+
o?.resolution && /* @__PURE__ */ _("span", {
|
|
1134
1188
|
className: "text-[10px] text-foreground-subtle",
|
|
1135
1189
|
children: [
|
|
1136
|
-
|
|
1190
|
+
o.resolution.width,
|
|
1137
1191
|
"×",
|
|
1138
|
-
|
|
1192
|
+
o.resolution.height
|
|
1139
1193
|
]
|
|
1140
1194
|
}),
|
|
1141
1195
|
/* @__PURE__ */ g("span", {
|
|
1142
|
-
className: `text-[10px] ${
|
|
1143
|
-
children:
|
|
1196
|
+
className: `text-[10px] ${s ? "text-success" : "text-foreground-subtle"}`,
|
|
1197
|
+
children: a?.status ?? "idle"
|
|
1144
1198
|
})
|
|
1145
1199
|
]
|
|
1146
1200
|
})
|
|
1147
|
-
}),
|
|
1201
|
+
}), a && s && /* @__PURE__ */ _("div", {
|
|
1148
1202
|
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1149
1203
|
children: [
|
|
1150
1204
|
/* @__PURE__ */ _("span", {
|
|
@@ -1154,7 +1208,7 @@ function ye({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
|
1154
1208
|
children: "FPS:"
|
|
1155
1209
|
}), /* @__PURE__ */ g("span", {
|
|
1156
1210
|
className: "text-foreground",
|
|
1157
|
-
children:
|
|
1211
|
+
children: a.inputFps.toFixed(1)
|
|
1158
1212
|
})]
|
|
1159
1213
|
}),
|
|
1160
1214
|
/* @__PURE__ */ _("span", {
|
|
@@ -1164,7 +1218,7 @@ function ye({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
|
1164
1218
|
children: "Bitrate:"
|
|
1165
1219
|
}), /* @__PURE__ */ g("span", {
|
|
1166
1220
|
className: "text-foreground",
|
|
1167
|
-
children:
|
|
1221
|
+
children: a.bitrateKbps >= 1e3 ? `${(a.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${a.bitrateKbps} kbps`
|
|
1168
1222
|
})]
|
|
1169
1223
|
}),
|
|
1170
1224
|
/* @__PURE__ */ _("span", {
|
|
@@ -1174,7 +1228,7 @@ function ye({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
|
1174
1228
|
children: "Codec:"
|
|
1175
1229
|
}), /* @__PURE__ */ g("span", {
|
|
1176
1230
|
className: "text-foreground",
|
|
1177
|
-
children:
|
|
1231
|
+
children: a.codec?.toUpperCase() ?? "—"
|
|
1178
1232
|
})]
|
|
1179
1233
|
}),
|
|
1180
1234
|
/* @__PURE__ */ _("span", {
|
|
@@ -1184,14 +1238,14 @@ function ye({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
|
1184
1238
|
children: "Pkts:"
|
|
1185
1239
|
}), /* @__PURE__ */ g("span", {
|
|
1186
1240
|
className: "text-foreground",
|
|
1187
|
-
children:
|
|
1241
|
+
children: a.packetCount > 1e3 ? `${(a.packetCount / 1e3).toFixed(1)}k` : a.packetCount
|
|
1188
1242
|
})]
|
|
1189
1243
|
})
|
|
1190
1244
|
]
|
|
1191
1245
|
})]
|
|
1192
1246
|
});
|
|
1193
1247
|
}
|
|
1194
|
-
function
|
|
1248
|
+
function K(e, t) {
|
|
1195
1249
|
let n = (e) => {
|
|
1196
1250
|
if (!e || typeof e != "object") return;
|
|
1197
1251
|
let r = e;
|
|
@@ -1212,29 +1266,29 @@ function q(e, t) {
|
|
|
1212
1266
|
if (t !== void 0) return t;
|
|
1213
1267
|
}
|
|
1214
1268
|
}
|
|
1215
|
-
function
|
|
1216
|
-
let
|
|
1217
|
-
|
|
1218
|
-
let { data:
|
|
1219
|
-
enabled:
|
|
1269
|
+
function q({ slot: t, camStreams: i, compact: c }) {
|
|
1270
|
+
let l = y(), u = n("stream-broker.metrics-snapshot", (e) => e.brokerId === t.brokerId)?.stats;
|
|
1271
|
+
o(["streamBroker", "listClients"], ["stream-broker.metrics-snapshot"]);
|
|
1272
|
+
let { data: d } = r({ brokerId: t.brokerId }, {
|
|
1273
|
+
enabled: u?.status === "streaming",
|
|
1220
1274
|
staleTime: 2e3
|
|
1221
|
-
}), { data:
|
|
1222
|
-
|
|
1223
|
-
} }), S = (
|
|
1275
|
+
}), { data: f } = a({ deviceId: t.deviceId }, { staleTime: 15e3 }), p = t.sourceCamStreamId ?? t.profile, h = !!(K(f, `preBufferEnabled:${p}`) ?? !0), b = K(f, `preBufferSec:${p}`), x = e({ onSuccess: () => {
|
|
1276
|
+
l.invalidateQueries({ queryKey: [["streamBroker", "getDeviceSettingsContribution"]] });
|
|
1277
|
+
} }), S = (e) => {
|
|
1224
1278
|
x.mutate({
|
|
1225
|
-
deviceId:
|
|
1226
|
-
patch: { [`preBufferEnabled:${
|
|
1279
|
+
deviceId: t.deviceId,
|
|
1280
|
+
patch: { [`preBufferEnabled:${p}`]: e }
|
|
1227
1281
|
});
|
|
1228
|
-
}, C =
|
|
1229
|
-
|
|
1230
|
-
} }), w =
|
|
1282
|
+
}, C = s({ onSuccess: () => {
|
|
1283
|
+
l.invalidateQueries({ queryKey: [["streamBroker", "listClients"]] });
|
|
1284
|
+
} }), w = m((e) => {
|
|
1231
1285
|
C.mutate({
|
|
1232
|
-
brokerId:
|
|
1233
|
-
...
|
|
1286
|
+
brokerId: t.brokerId,
|
|
1287
|
+
...e
|
|
1234
1288
|
});
|
|
1235
|
-
}, [C,
|
|
1289
|
+
}, [C, t.brokerId]), T = (t.sourceCamStreamId ? i.get(t.sourceCamStreamId) : void 0)?.resolution ?? t.resolution, E = u?.status === "streaming", D = T ? `${U[t.profile]} (${T.width}×${T.height})` : U[t.profile], O = u ? u.encodedSubscribers + u.decodedSubscribers + (u.rtspClients ?? 0) + (u.pipeClients ?? 0) : 0;
|
|
1236
1290
|
return /* @__PURE__ */ _("div", {
|
|
1237
|
-
className: `@container ${
|
|
1291
|
+
className: `@container ${c ? "px-3 py-1.5" : "px-4 py-2"}`,
|
|
1238
1292
|
style: { containerType: "inline-size" },
|
|
1239
1293
|
children: [
|
|
1240
1294
|
/* @__PURE__ */ _("div", {
|
|
@@ -1242,26 +1296,26 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1242
1296
|
children: [/* @__PURE__ */ _("div", {
|
|
1243
1297
|
className: "flex items-center gap-1.5",
|
|
1244
1298
|
children: [
|
|
1245
|
-
/* @__PURE__ */ g("span", { className: `h-1.5 w-1.5 rounded-full ${E ?
|
|
1299
|
+
/* @__PURE__ */ g("span", { className: `h-1.5 w-1.5 rounded-full ${E ? t.profile === "high" ? "bg-success" : t.profile === "mid" ? "bg-warning" : "bg-foreground-subtle" : "bg-foreground-subtle/40"}` }),
|
|
1246
1300
|
/* @__PURE__ */ g("span", {
|
|
1247
1301
|
className: "text-[11px] font-medium text-foreground",
|
|
1248
1302
|
children: D
|
|
1249
1303
|
}),
|
|
1250
1304
|
/* @__PURE__ */ g("span", {
|
|
1251
1305
|
className: `text-[10px] ${E ? "text-success" : "text-foreground-subtle"}`,
|
|
1252
|
-
children:
|
|
1306
|
+
children: u?.status ?? "loading"
|
|
1253
1307
|
}),
|
|
1254
|
-
|
|
1308
|
+
t.sourceCamStreamId && /* @__PURE__ */ _("span", {
|
|
1255
1309
|
className: "text-[10px] text-foreground-subtle",
|
|
1256
|
-
children: ["← ",
|
|
1310
|
+
children: ["← ", t.sourceCamStreamId]
|
|
1257
1311
|
})
|
|
1258
1312
|
]
|
|
1259
1313
|
}), /* @__PURE__ */ g("span", {
|
|
1260
1314
|
className: "text-[10px] text-foreground-subtle",
|
|
1261
|
-
children:
|
|
1315
|
+
children: u && u.uptimeMs > 0 ? pe(u.uptimeMs) : "—"
|
|
1262
1316
|
})]
|
|
1263
1317
|
}),
|
|
1264
|
-
|
|
1318
|
+
u && E ? c ? /* @__PURE__ */ _("div", {
|
|
1265
1319
|
className: "flex flex-wrap gap-x-3 gap-y-0.5 text-[10px]",
|
|
1266
1320
|
children: [
|
|
1267
1321
|
/* @__PURE__ */ _("span", {
|
|
@@ -1272,9 +1326,9 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1272
1326
|
}), /* @__PURE__ */ _("span", {
|
|
1273
1327
|
className: "text-foreground",
|
|
1274
1328
|
children: [
|
|
1275
|
-
|
|
1329
|
+
u.inputFps.toFixed(1),
|
|
1276
1330
|
"/",
|
|
1277
|
-
|
|
1331
|
+
u.decodeFps.toFixed(1)
|
|
1278
1332
|
]
|
|
1279
1333
|
})]
|
|
1280
1334
|
}),
|
|
@@ -1285,7 +1339,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1285
1339
|
children: "Bitrate:"
|
|
1286
1340
|
}), /* @__PURE__ */ g("span", {
|
|
1287
1341
|
className: "text-foreground",
|
|
1288
|
-
children:
|
|
1342
|
+
children: u.bitrateKbps >= 1e3 ? `${(u.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${u.bitrateKbps} kbps`
|
|
1289
1343
|
})]
|
|
1290
1344
|
}),
|
|
1291
1345
|
/* @__PURE__ */ _("span", {
|
|
@@ -1295,7 +1349,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1295
1349
|
children: "Codec:"
|
|
1296
1350
|
}), /* @__PURE__ */ g("span", {
|
|
1297
1351
|
className: "text-foreground",
|
|
1298
|
-
children:
|
|
1352
|
+
children: u.codec?.toUpperCase() ?? "—"
|
|
1299
1353
|
})]
|
|
1300
1354
|
}),
|
|
1301
1355
|
/* @__PURE__ */ _("span", {
|
|
@@ -1314,8 +1368,8 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1314
1368
|
children: "("
|
|
1315
1369
|
}),
|
|
1316
1370
|
/* @__PURE__ */ g(Ce, {
|
|
1317
|
-
count:
|
|
1318
|
-
clients:
|
|
1371
|
+
count: u.encodedSubscribers + u.decodedSubscribers,
|
|
1372
|
+
clients: d,
|
|
1319
1373
|
onKill: w
|
|
1320
1374
|
}),
|
|
1321
1375
|
/* @__PURE__ */ g("span", {
|
|
@@ -1323,15 +1377,15 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1323
1377
|
children: "·"
|
|
1324
1378
|
}),
|
|
1325
1379
|
/* @__PURE__ */ g(Te, {
|
|
1326
|
-
count:
|
|
1327
|
-
clients:
|
|
1380
|
+
count: u.rtspClients ?? 0,
|
|
1381
|
+
clients: d,
|
|
1328
1382
|
onKill: w
|
|
1329
1383
|
}),
|
|
1330
1384
|
/* @__PURE__ */ _("span", {
|
|
1331
1385
|
className: "text-foreground-subtle/70",
|
|
1332
1386
|
children: [
|
|
1333
1387
|
"· pipe ",
|
|
1334
|
-
|
|
1388
|
+
u.pipeClients ?? 0,
|
|
1335
1389
|
")"
|
|
1336
1390
|
]
|
|
1337
1391
|
})
|
|
@@ -1348,7 +1402,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1348
1402
|
children: "In:"
|
|
1349
1403
|
}), /* @__PURE__ */ _("span", {
|
|
1350
1404
|
className: "text-foreground",
|
|
1351
|
-
children: [
|
|
1405
|
+
children: [u.inputFps.toFixed(1), " fps"]
|
|
1352
1406
|
})]
|
|
1353
1407
|
}),
|
|
1354
1408
|
/* @__PURE__ */ _("span", {
|
|
@@ -1358,7 +1412,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1358
1412
|
children: "Dec:"
|
|
1359
1413
|
}), /* @__PURE__ */ _("span", {
|
|
1360
1414
|
className: "text-foreground",
|
|
1361
|
-
children: [
|
|
1415
|
+
children: [u.decodeFps.toFixed(1), " fps"]
|
|
1362
1416
|
})]
|
|
1363
1417
|
}),
|
|
1364
1418
|
/* @__PURE__ */ _("span", {
|
|
@@ -1368,7 +1422,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1368
1422
|
children: "Bitrate:"
|
|
1369
1423
|
}), /* @__PURE__ */ g("span", {
|
|
1370
1424
|
className: "text-foreground",
|
|
1371
|
-
children:
|
|
1425
|
+
children: u.bitrateKbps >= 1e3 ? `${(u.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${u.bitrateKbps} kbps`
|
|
1372
1426
|
})]
|
|
1373
1427
|
}),
|
|
1374
1428
|
/* @__PURE__ */ _("span", {
|
|
@@ -1378,7 +1432,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1378
1432
|
children: "IDR:"
|
|
1379
1433
|
}), /* @__PURE__ */ g("span", {
|
|
1380
1434
|
className: "text-foreground",
|
|
1381
|
-
children:
|
|
1435
|
+
children: u.idrIntervalMs > 0 ? `${(u.idrIntervalMs / 1e3).toFixed(1)}s` : "—"
|
|
1382
1436
|
})]
|
|
1383
1437
|
}),
|
|
1384
1438
|
/* @__PURE__ */ _("span", {
|
|
@@ -1388,7 +1442,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1388
1442
|
children: "Codec:"
|
|
1389
1443
|
}), /* @__PURE__ */ g("span", {
|
|
1390
1444
|
className: "text-foreground",
|
|
1391
|
-
children:
|
|
1445
|
+
children: u.codec?.toUpperCase() ?? "—"
|
|
1392
1446
|
})]
|
|
1393
1447
|
}),
|
|
1394
1448
|
/* @__PURE__ */ _("span", {
|
|
@@ -1398,7 +1452,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1398
1452
|
children: "Decoder:"
|
|
1399
1453
|
}), /* @__PURE__ */ g("span", {
|
|
1400
1454
|
className: "text-foreground font-mono truncate",
|
|
1401
|
-
children:
|
|
1455
|
+
children: u.decoderNodeId ?? /* @__PURE__ */ g("span", {
|
|
1402
1456
|
className: "text-foreground-subtle italic",
|
|
1403
1457
|
children: "deferred"
|
|
1404
1458
|
})
|
|
@@ -1411,7 +1465,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1411
1465
|
children: "Pipe:"
|
|
1412
1466
|
}), /* @__PURE__ */ g("span", {
|
|
1413
1467
|
className: "text-foreground",
|
|
1414
|
-
children:
|
|
1468
|
+
children: u.pipeClients ?? 0
|
|
1415
1469
|
})]
|
|
1416
1470
|
}),
|
|
1417
1471
|
/* @__PURE__ */ _("span", {
|
|
@@ -1421,7 +1475,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1421
1475
|
children: "Packets:"
|
|
1422
1476
|
}), /* @__PURE__ */ g("span", {
|
|
1423
1477
|
className: "text-foreground",
|
|
1424
|
-
children:
|
|
1478
|
+
children: u.packetCount > 1e3 ? `${(u.packetCount / 1e3).toFixed(1)}k` : u.packetCount
|
|
1425
1479
|
})]
|
|
1426
1480
|
}),
|
|
1427
1481
|
/* @__PURE__ */ _("span", {
|
|
@@ -1431,10 +1485,10 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1431
1485
|
children: "Data:"
|
|
1432
1486
|
}), /* @__PURE__ */ g("span", {
|
|
1433
1487
|
className: "text-foreground",
|
|
1434
|
-
children:
|
|
1488
|
+
children: u.totalBytes > 1048576 ? `${(u.totalBytes / 1048576).toFixed(1)} MB` : `${(u.totalBytes / 1024).toFixed(0)} KB`
|
|
1435
1489
|
})]
|
|
1436
1490
|
}),
|
|
1437
|
-
|
|
1491
|
+
u.audio && /* @__PURE__ */ _("div", {
|
|
1438
1492
|
className: "basis-full flex flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
1439
1493
|
children: [
|
|
1440
1494
|
/* @__PURE__ */ g("span", {
|
|
@@ -1446,7 +1500,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1446
1500
|
children: [
|
|
1447
1501
|
/* @__PURE__ */ g("span", {
|
|
1448
1502
|
className: "text-foreground",
|
|
1449
|
-
children:
|
|
1503
|
+
children: u.audio.codec.toUpperCase()
|
|
1450
1504
|
}),
|
|
1451
1505
|
/* @__PURE__ */ g("span", {
|
|
1452
1506
|
className: "text-foreground-subtle",
|
|
@@ -1454,7 +1508,7 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1454
1508
|
}),
|
|
1455
1509
|
/* @__PURE__ */ g("span", {
|
|
1456
1510
|
className: "text-foreground",
|
|
1457
|
-
children:
|
|
1511
|
+
children: u.audio.sampleRate >= 1e3 ? `${(u.audio.sampleRate / 1e3).toFixed(u.audio.sampleRate % 1e3 == 0 ? 0 : 1)}kHz` : `${u.audio.sampleRate}Hz`
|
|
1458
1512
|
}),
|
|
1459
1513
|
/* @__PURE__ */ g("span", {
|
|
1460
1514
|
className: "text-foreground-subtle",
|
|
@@ -1462,20 +1516,20 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1462
1516
|
}),
|
|
1463
1517
|
/* @__PURE__ */ g("span", {
|
|
1464
1518
|
className: "text-foreground",
|
|
1465
|
-
children:
|
|
1519
|
+
children: u.audio.channels === 1 ? "mono" : u.audio.channels === 2 ? "stereo" : `${u.audio.channels}ch`
|
|
1466
1520
|
})
|
|
1467
1521
|
]
|
|
1468
1522
|
}),
|
|
1469
1523
|
/* @__PURE__ */ g("span", {
|
|
1470
|
-
className: `px-1 py-px rounded text-[8px] font-medium whitespace-nowrap ${
|
|
1471
|
-
children:
|
|
1524
|
+
className: `px-1 py-px rounded text-[8px] font-medium whitespace-nowrap ${u.audio.supported ? "bg-success/15 text-success" : "bg-amber-500/15 text-amber-500"}`,
|
|
1525
|
+
children: u.audio.supported ? "decoded" : "no decoder"
|
|
1472
1526
|
})
|
|
1473
1527
|
]
|
|
1474
1528
|
})
|
|
1475
1529
|
]
|
|
1476
|
-
}), /* @__PURE__ */ g(
|
|
1477
|
-
clients:
|
|
1478
|
-
encodedCount:
|
|
1530
|
+
}), /* @__PURE__ */ g(Z, {
|
|
1531
|
+
clients: d,
|
|
1532
|
+
encodedCount: u.encodedSubscribers,
|
|
1479
1533
|
onKill: w
|
|
1480
1534
|
})] }) : /* @__PURE__ */ g("p", {
|
|
1481
1535
|
className: "text-[10px] text-foreground-subtle italic",
|
|
@@ -1496,9 +1550,9 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1496
1550
|
/* @__PURE__ */ _("span", {
|
|
1497
1551
|
className: "text-foreground",
|
|
1498
1552
|
children: [
|
|
1499
|
-
b ??
|
|
1553
|
+
b ?? u?.preBufferSec ?? 0,
|
|
1500
1554
|
"s",
|
|
1501
|
-
|
|
1555
|
+
u && E ? ` (${u.preBufferPackets}p)` : ""
|
|
1502
1556
|
]
|
|
1503
1557
|
})
|
|
1504
1558
|
]
|
|
@@ -1506,67 +1560,67 @@ function J({ slot: e, camStreams: t, compact: n }) {
|
|
|
1506
1560
|
]
|
|
1507
1561
|
});
|
|
1508
1562
|
}
|
|
1509
|
-
var
|
|
1510
|
-
function
|
|
1511
|
-
let
|
|
1512
|
-
|
|
1513
|
-
}, []),
|
|
1514
|
-
|
|
1515
|
-
}, [
|
|
1563
|
+
var xe = 280, Se = 120;
|
|
1564
|
+
function J({ trigger: e, content: t, widthClass: n }) {
|
|
1565
|
+
let r = u(null), i = u(null), [a, o] = p(!1), [s, c] = p(!1), l = m(() => {
|
|
1566
|
+
i.current &&= (clearTimeout(i.current), null);
|
|
1567
|
+
}, []), d = m(() => {
|
|
1568
|
+
l(), i.current = setTimeout(() => o(!1), Se);
|
|
1569
|
+
}, [l]);
|
|
1516
1570
|
return /* @__PURE__ */ _("span", {
|
|
1517
|
-
ref:
|
|
1571
|
+
ref: r,
|
|
1518
1572
|
className: "relative inline-block",
|
|
1519
|
-
onMouseEnter:
|
|
1520
|
-
|
|
1521
|
-
let e =
|
|
1573
|
+
onMouseEnter: m(() => {
|
|
1574
|
+
l();
|
|
1575
|
+
let e = r.current;
|
|
1522
1576
|
if (e) {
|
|
1523
1577
|
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = t.top;
|
|
1524
|
-
|
|
1578
|
+
c(n < xe && r > n);
|
|
1525
1579
|
}
|
|
1526
|
-
|
|
1527
|
-
}, [
|
|
1528
|
-
onMouseLeave:
|
|
1529
|
-
children: [
|
|
1530
|
-
className: `absolute left-0 ${
|
|
1531
|
-
onMouseEnter:
|
|
1532
|
-
onMouseLeave:
|
|
1533
|
-
children:
|
|
1580
|
+
o(!0);
|
|
1581
|
+
}, [l]),
|
|
1582
|
+
onMouseLeave: d,
|
|
1583
|
+
children: [e, a && /* @__PURE__ */ g("div", {
|
|
1584
|
+
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`,
|
|
1585
|
+
onMouseEnter: l,
|
|
1586
|
+
onMouseLeave: d,
|
|
1587
|
+
children: t
|
|
1534
1588
|
})]
|
|
1535
1589
|
});
|
|
1536
1590
|
}
|
|
1537
|
-
function
|
|
1591
|
+
function Y(e) {
|
|
1538
1592
|
if (e < 1e3) return `${e}ms`;
|
|
1539
1593
|
let t = Math.floor(e / 1e3);
|
|
1540
1594
|
if (t < 60) return `${t}s`;
|
|
1541
1595
|
let n = Math.floor(t / 60);
|
|
1542
1596
|
return n < 60 ? `${n}m ${t % 60}s` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
1543
1597
|
}
|
|
1544
|
-
function
|
|
1598
|
+
function X(e) {
|
|
1545
1599
|
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : e < 1073741824 ? `${(e / 1048576).toFixed(1)} MB` : `${(e / 1073741824).toFixed(2)} GB`;
|
|
1546
1600
|
}
|
|
1547
|
-
function
|
|
1548
|
-
let
|
|
1549
|
-
return
|
|
1601
|
+
function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
1602
|
+
let r = e?.decoded ?? [], i = e?.audio ?? [], a = e?.rtsp ?? [], o = e?.encoded ?? [], s = r.length + i.length + a.length + o.length, [c, l] = p(!0);
|
|
1603
|
+
return s === 0 ? /* @__PURE__ */ g("div", {
|
|
1550
1604
|
className: "mt-1.5 text-[10px] text-foreground-subtle italic",
|
|
1551
1605
|
children: "No active subscribers"
|
|
1552
1606
|
}) : /* @__PURE__ */ _("div", {
|
|
1553
1607
|
className: "mt-1.5 border-t border-border/30 pt-1.5",
|
|
1554
1608
|
children: [/* @__PURE__ */ _("button", {
|
|
1555
1609
|
type: "button",
|
|
1556
|
-
onClick: () =>
|
|
1610
|
+
onClick: () => l((e) => !e),
|
|
1557
1611
|
className: "flex items-center gap-1 text-[10px] text-foreground-subtle hover:text-foreground transition-colors",
|
|
1558
|
-
children: [g(
|
|
1612
|
+
children: [g(c ? A : j, { className: "h-3 w-3" }), /* @__PURE__ */ _("span", {
|
|
1559
1613
|
className: "uppercase tracking-wider",
|
|
1560
1614
|
children: [
|
|
1561
1615
|
"Subscribers (",
|
|
1562
|
-
|
|
1616
|
+
s,
|
|
1563
1617
|
")"
|
|
1564
1618
|
]
|
|
1565
1619
|
})]
|
|
1566
|
-
}),
|
|
1620
|
+
}), c && /* @__PURE__ */ _("div", {
|
|
1567
1621
|
className: "mt-1 divide-y divide-border/20",
|
|
1568
1622
|
children: [
|
|
1569
|
-
|
|
1623
|
+
r.map((e, t) => /* @__PURE__ */ g(Q, {
|
|
1570
1624
|
kind: "DECODED",
|
|
1571
1625
|
kindClass: "bg-success/10 text-success",
|
|
1572
1626
|
tag: e.tag || "unknown",
|
|
@@ -1584,7 +1638,7 @@ function Se({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1584
1638
|
handle: e.tag
|
|
1585
1639
|
}) : void 0
|
|
1586
1640
|
}, `d-${t}`)),
|
|
1587
|
-
|
|
1641
|
+
i.map((e, t) => /* @__PURE__ */ g(Q, {
|
|
1588
1642
|
kind: "AUDIO",
|
|
1589
1643
|
kindClass: "bg-info/10 text-info",
|
|
1590
1644
|
tag: e.tag || "unknown",
|
|
@@ -1595,7 +1649,7 @@ function Se({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1595
1649
|
handle: e.tag
|
|
1596
1650
|
}) : void 0
|
|
1597
1651
|
}, `a-${t}`)),
|
|
1598
|
-
|
|
1652
|
+
a.map((e) => {
|
|
1599
1653
|
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";
|
|
1600
1654
|
return /* @__PURE__ */ g(Q, {
|
|
1601
1655
|
kind: "RTSP",
|
|
@@ -1605,7 +1659,7 @@ function Se({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1605
1659
|
text: i + (e.muted ? " · muted" : ""),
|
|
1606
1660
|
className: a
|
|
1607
1661
|
},
|
|
1608
|
-
metrics: [
|
|
1662
|
+
metrics: [X(e.bytesSent), `last rtp ${Y(t)} ago`],
|
|
1609
1663
|
age: Date.now() - e.connectedAt,
|
|
1610
1664
|
onKill: n ? () => n({
|
|
1611
1665
|
channel: "rtsp",
|
|
@@ -1613,19 +1667,19 @@ function Se({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1613
1667
|
}) : void 0
|
|
1614
1668
|
}, `r-${e.sessionId}`);
|
|
1615
1669
|
}),
|
|
1616
|
-
|
|
1617
|
-
let t = e.attribution, n =
|
|
1670
|
+
o.map((e) => {
|
|
1671
|
+
let t = e.attribution, n = me[t.kind] ?? "bg-foreground-subtle/10 text-foreground-subtle", r = t.sessionId ? t.sessionId.slice(0, 8) : null, i = [];
|
|
1618
1672
|
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(H(t.userAgent));
|
|
1619
|
-
let a = i.length > 0 ? i.join(" · ") :
|
|
1673
|
+
let a = i.length > 0 ? i.join(" · ") : ge(t.kind), o = [];
|
|
1620
1674
|
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__ */ g(Q, {
|
|
1621
|
-
kind:
|
|
1675
|
+
kind: he(t.kind),
|
|
1622
1676
|
kindClass: n,
|
|
1623
1677
|
tag: a,
|
|
1624
1678
|
metrics: o,
|
|
1625
1679
|
age: Date.now() - e.subscribedAt
|
|
1626
1680
|
}, e.id);
|
|
1627
1681
|
}),
|
|
1628
|
-
|
|
1682
|
+
o.length === 0 && t > 0 && /* @__PURE__ */ _("div", {
|
|
1629
1683
|
className: "py-0.5 text-[10px] text-foreground-subtle",
|
|
1630
1684
|
children: [
|
|
1631
1685
|
/* @__PURE__ */ g("span", {
|
|
@@ -1666,7 +1720,7 @@ function Q({ kind: e, kindClass: t, tag: n, state: r, metrics: i, age: a, onKill
|
|
|
1666
1720
|
children: e.text
|
|
1667
1721
|
})] }, t)), /* @__PURE__ */ _("span", {
|
|
1668
1722
|
className: "text-foreground-subtle/70",
|
|
1669
|
-
children: ["· ",
|
|
1723
|
+
children: ["· ", Y(a)]
|
|
1670
1724
|
})]
|
|
1671
1725
|
}),
|
|
1672
1726
|
/* @__PURE__ */ g("div", {
|
|
@@ -1681,7 +1735,7 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1681
1735
|
className: `text-foreground ${o ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1682
1736
|
children: e
|
|
1683
1737
|
});
|
|
1684
|
-
return o ? /* @__PURE__ */ g(
|
|
1738
|
+
return o ? /* @__PURE__ */ g(J, {
|
|
1685
1739
|
trigger: s,
|
|
1686
1740
|
content: /* @__PURE__ */ _(v, { children: [
|
|
1687
1741
|
r.length > 0 && /* @__PURE__ */ _("div", {
|
|
@@ -1709,7 +1763,7 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1709
1763
|
]
|
|
1710
1764
|
}),
|
|
1711
1765
|
/* @__PURE__ */ g("span", { children: "·" }),
|
|
1712
|
-
/* @__PURE__ */ g("span", { children:
|
|
1766
|
+
/* @__PURE__ */ g("span", { children: Y(Date.now() - e.subscribedAt) }),
|
|
1713
1767
|
n && e.tag && /* @__PURE__ */ g($, { onClick: () => n({
|
|
1714
1768
|
channel: "decoded",
|
|
1715
1769
|
handle: e.tag
|
|
@@ -1733,7 +1787,7 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1733
1787
|
children: [
|
|
1734
1788
|
/* @__PURE__ */ _("span", { children: [e.chunksDelivered, " chunks"] }),
|
|
1735
1789
|
/* @__PURE__ */ g("span", { children: "·" }),
|
|
1736
|
-
/* @__PURE__ */ g("span", { children:
|
|
1790
|
+
/* @__PURE__ */ g("span", { children: Y(Date.now() - e.subscribedAt) }),
|
|
1737
1791
|
n && e.tag && /* @__PURE__ */ g($, { onClick: () => n({
|
|
1738
1792
|
channel: "audio",
|
|
1739
1793
|
handle: e.tag
|
|
@@ -1773,7 +1827,7 @@ function $({ onClick: e }) {
|
|
|
1773
1827
|
t.stopPropagation(), e();
|
|
1774
1828
|
},
|
|
1775
1829
|
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",
|
|
1776
|
-
children: /* @__PURE__ */ g(
|
|
1830
|
+
children: /* @__PURE__ */ g(te, { className: "h-2.5 w-2.5" })
|
|
1777
1831
|
});
|
|
1778
1832
|
}
|
|
1779
1833
|
function Te({ count: e, clients: t, onKill: n }) {
|
|
@@ -1781,7 +1835,7 @@ function Te({ count: e, clients: t, onKill: n }) {
|
|
|
1781
1835
|
className: `text-foreground ${i ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1782
1836
|
children: e
|
|
1783
1837
|
});
|
|
1784
|
-
return i ? /* @__PURE__ */ g(
|
|
1838
|
+
return i ? /* @__PURE__ */ g(J, {
|
|
1785
1839
|
trigger: a,
|
|
1786
1840
|
content: /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g("div", {
|
|
1787
1841
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
@@ -1808,15 +1862,15 @@ function Te({ count: e, clients: t, onKill: n }) {
|
|
|
1808
1862
|
}), /* @__PURE__ */ _("div", {
|
|
1809
1863
|
className: "flex items-center justify-between gap-2 text-foreground-subtle text-[9px] mt-0.5",
|
|
1810
1864
|
children: [
|
|
1811
|
-
/* @__PURE__ */ _("span", { children: [
|
|
1865
|
+
/* @__PURE__ */ _("span", { children: [X(e.bytesSent), " sent"] }),
|
|
1812
1866
|
/* @__PURE__ */ _("span", { children: [
|
|
1813
1867
|
"connected ",
|
|
1814
|
-
|
|
1868
|
+
Y(Date.now() - e.connectedAt),
|
|
1815
1869
|
" ago"
|
|
1816
1870
|
] }),
|
|
1817
1871
|
/* @__PURE__ */ _("span", { children: [
|
|
1818
1872
|
"last rtp ",
|
|
1819
|
-
|
|
1873
|
+
Y(t),
|
|
1820
1874
|
" ago"
|
|
1821
1875
|
] })
|
|
1822
1876
|
]
|
|
@@ -1829,7 +1883,7 @@ function Te({ count: e, clients: t, onKill: n }) {
|
|
|
1829
1883
|
//#endregion
|
|
1830
1884
|
//#region src/stream-broker/widgets/index.tsx
|
|
1831
1885
|
var Ee = {
|
|
1832
|
-
"stream-broker-panel":
|
|
1886
|
+
"stream-broker-panel": _e,
|
|
1833
1887
|
"ffmpeg-params": ue
|
|
1834
1888
|
};
|
|
1835
1889
|
//#endregion
|