@nice2dev/ui-video 1.1.10 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +345 -345
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as t, jsx as e, Fragment as
|
|
2
|
-
import { NiceAppShell as
|
|
3
|
-
import { NiceIcon as u, NiceTutorialButton as
|
|
4
|
-
import { useState as b, useRef as M, useEffect as oe, useCallback as
|
|
5
|
-
const
|
|
6
|
-
id:
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as le } from "react/jsx-runtime";
|
|
2
|
+
import { NiceAppShell as he } from "@nice2dev/ui";
|
|
3
|
+
import { NiceIcon as u, NiceTutorialButton as pe, resolveTutorial as ve, createId as $ } from "@nice2dev/ui-core";
|
|
4
|
+
import { useState as b, useRef as M, useEffect as oe, useCallback as de } from "react";
|
|
5
|
+
const fe = {
|
|
6
|
+
id: $(),
|
|
7
7
|
name: "Untitled Project",
|
|
8
8
|
resolution: { width: 1920, height: 1080, label: "1080p" },
|
|
9
9
|
frameRate: 30,
|
|
@@ -35,7 +35,7 @@ const ve = {
|
|
|
35
35
|
audio: { sampleRate: 48e3, channels: 2, bitrate: 320 },
|
|
36
36
|
video: { codec: "h264", bitrate: 8e3, profile: "high" }
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, be = [
|
|
39
39
|
{ type: "blur", name: "Blur", icon: "droplet" },
|
|
40
40
|
{ type: "brightness", name: "Brightness", icon: "sun" },
|
|
41
41
|
{ type: "contrast", name: "Contrast", icon: "moon" },
|
|
@@ -45,14 +45,14 @@ const ve = {
|
|
|
45
45
|
{ type: "chromaKey", name: "Chroma Key", icon: "layers" },
|
|
46
46
|
{ type: "crop", name: "Crop", icon: "crop" },
|
|
47
47
|
{ type: "zoom", name: "Zoom", icon: "search" }
|
|
48
|
-
],
|
|
48
|
+
], ge = [
|
|
49
49
|
{ type: "fade", name: "Fade" },
|
|
50
50
|
{ type: "dissolve", name: "Dissolve" },
|
|
51
51
|
{ type: "wipe", name: "Wipe" },
|
|
52
52
|
{ type: "slide", name: "Slide" },
|
|
53
53
|
{ type: "zoom", name: "Zoom" },
|
|
54
54
|
{ type: "push", name: "Push" }
|
|
55
|
-
],
|
|
55
|
+
], Ne = [
|
|
56
56
|
{
|
|
57
57
|
target: ".nice-video-editor",
|
|
58
58
|
titleKey: "tutorial.videoEditorPro.intro.title",
|
|
@@ -61,45 +61,45 @@ const ve = {
|
|
|
61
61
|
content: "Add media to the timeline, arrange and trim clips, apply effects and transitions, then configure and run the export.",
|
|
62
62
|
placement: "auto"
|
|
63
63
|
}
|
|
64
|
-
],
|
|
65
|
-
project:
|
|
66
|
-
onProjectChange:
|
|
67
|
-
onExport:
|
|
68
|
-
onAssetUpload:
|
|
69
|
-
className:
|
|
64
|
+
], ze = ({
|
|
65
|
+
project: R,
|
|
66
|
+
onProjectChange: z,
|
|
67
|
+
onExport: P,
|
|
68
|
+
onAssetUpload: F,
|
|
69
|
+
className: V = "",
|
|
70
70
|
tutorial: T
|
|
71
71
|
}) => {
|
|
72
|
-
const [d, s] = b(
|
|
72
|
+
const [d, s] = b(R || fe), [A, N] = b(
|
|
73
73
|
"timeline"
|
|
74
|
-
), [
|
|
74
|
+
), [H, h] = b(null), [k, y] = b(null), [D, w] = b(0), [O, B] = b(!1), [C, j] = b(1), [K, I] = b(!0), [_, L] = b(null), ee = M(null), ae = M(null), S = M(null);
|
|
75
75
|
oe(() => {
|
|
76
|
-
|
|
77
|
-
}, [
|
|
76
|
+
R && s(R);
|
|
77
|
+
}, [R]), oe(() => () => {
|
|
78
78
|
S.current && clearInterval(S.current);
|
|
79
79
|
}, []);
|
|
80
|
-
const g =
|
|
80
|
+
const g = de(
|
|
81
81
|
(n) => {
|
|
82
|
-
const
|
|
83
|
-
s(
|
|
82
|
+
const l = { ...d, ...n };
|
|
83
|
+
s(l), z == null || z(l);
|
|
84
84
|
},
|
|
85
|
-
[d,
|
|
85
|
+
[d, z]
|
|
86
86
|
), f = async (n) => {
|
|
87
|
-
const
|
|
87
|
+
const l = [];
|
|
88
88
|
for (const i of Array.from(n)) {
|
|
89
89
|
const c = i.type.startsWith("video/") ? "video" : i.type.startsWith("audio/") ? "audio" : "image";
|
|
90
90
|
let m;
|
|
91
|
-
|
|
92
|
-
id:
|
|
91
|
+
F ? m = await F(i) : m = {
|
|
92
|
+
id: $(),
|
|
93
93
|
type: c,
|
|
94
94
|
name: i.name,
|
|
95
95
|
url: URL.createObjectURL(i),
|
|
96
96
|
size: i.size
|
|
97
|
-
},
|
|
97
|
+
}, l.push(m);
|
|
98
98
|
}
|
|
99
|
-
g({ assets: [...d.assets, ...
|
|
100
|
-
},
|
|
101
|
-
const
|
|
102
|
-
id:
|
|
99
|
+
g({ assets: [...d.assets, ...l] });
|
|
100
|
+
}, U = (n) => {
|
|
101
|
+
const l = {
|
|
102
|
+
id: $(),
|
|
103
103
|
type: n,
|
|
104
104
|
name: `${n.charAt(0).toUpperCase() + n.slice(1)} ${d.tracks.filter((i) => i.type === n).length + 1}`,
|
|
105
105
|
items: [],
|
|
@@ -107,27 +107,27 @@ const ve = {
|
|
|
107
107
|
locked: !1,
|
|
108
108
|
visible: !0
|
|
109
109
|
};
|
|
110
|
-
g({ tracks: [...d.tracks,
|
|
111
|
-
},
|
|
112
|
-
g({ tracks: d.tracks.filter((
|
|
113
|
-
},
|
|
110
|
+
g({ tracks: [...d.tracks, l] });
|
|
111
|
+
}, G = (n) => {
|
|
112
|
+
g({ tracks: d.tracks.filter((l) => l.id !== n) }), H === n && h(null);
|
|
113
|
+
}, W = (n) => {
|
|
114
114
|
g({
|
|
115
|
-
tracks: d.tracks.map((
|
|
115
|
+
tracks: d.tracks.map((l) => l.id === n ? { ...l, muted: !l.muted } : l)
|
|
116
116
|
});
|
|
117
|
-
},
|
|
117
|
+
}, Q = (n) => {
|
|
118
118
|
g({
|
|
119
|
-
tracks: d.tracks.map((
|
|
119
|
+
tracks: d.tracks.map((l) => l.id === n ? { ...l, locked: !l.locked } : l)
|
|
120
120
|
});
|
|
121
|
-
}, x = (n,
|
|
121
|
+
}, x = (n, l) => {
|
|
122
122
|
const i = d.tracks.find((v) => v.id === n);
|
|
123
123
|
if (!i || i.locked)
|
|
124
124
|
return;
|
|
125
125
|
const c = i.items[i.items.length - 1], m = c ? c.startTime + c.duration : 0, p = {
|
|
126
|
-
id:
|
|
127
|
-
assetId:
|
|
128
|
-
type:
|
|
126
|
+
id: $(),
|
|
127
|
+
assetId: l.id,
|
|
128
|
+
type: l.type,
|
|
129
129
|
startTime: m,
|
|
130
|
-
duration:
|
|
130
|
+
duration: l.duration || 5,
|
|
131
131
|
offset: 0,
|
|
132
132
|
properties: {
|
|
133
133
|
x: 0,
|
|
@@ -144,26 +144,26 @@ const ve = {
|
|
|
144
144
|
(v) => v.id === n ? { ...v, items: [...v.items, p] } : v
|
|
145
145
|
)
|
|
146
146
|
});
|
|
147
|
-
},
|
|
147
|
+
}, Y = (n, l, i) => {
|
|
148
148
|
const c = {
|
|
149
|
-
id:
|
|
149
|
+
id: $(),
|
|
150
150
|
type: i,
|
|
151
151
|
name: i.charAt(0).toUpperCase() + i.slice(1),
|
|
152
|
-
parameters:
|
|
152
|
+
parameters: te(i)
|
|
153
153
|
};
|
|
154
154
|
g({
|
|
155
155
|
tracks: d.tracks.map(
|
|
156
156
|
(m) => m.id === n ? {
|
|
157
157
|
...m,
|
|
158
158
|
items: m.items.map(
|
|
159
|
-
(p) => p.id ===
|
|
159
|
+
(p) => p.id === l ? { ...p, effects: [...p.effects, c] } : p
|
|
160
160
|
)
|
|
161
161
|
} : m
|
|
162
162
|
)
|
|
163
163
|
});
|
|
164
|
-
},
|
|
164
|
+
}, E = (n, l, i, c) => {
|
|
165
165
|
const m = {
|
|
166
|
-
id:
|
|
166
|
+
id: $(),
|
|
167
167
|
type: i,
|
|
168
168
|
duration: 0.5,
|
|
169
169
|
position: c
|
|
@@ -173,12 +173,12 @@ const ve = {
|
|
|
173
173
|
(p) => p.id === n ? {
|
|
174
174
|
...p,
|
|
175
175
|
items: p.items.map(
|
|
176
|
-
(v) => v.id ===
|
|
176
|
+
(v) => v.id === l ? { ...v, transitions: [...v.transitions, m] } : v
|
|
177
177
|
)
|
|
178
178
|
} : p
|
|
179
179
|
)
|
|
180
180
|
});
|
|
181
|
-
},
|
|
181
|
+
}, te = (n) => {
|
|
182
182
|
switch (n) {
|
|
183
183
|
case "blur":
|
|
184
184
|
return { radius: 5 };
|
|
@@ -201,41 +201,41 @@ const ve = {
|
|
|
201
201
|
default:
|
|
202
202
|
return {};
|
|
203
203
|
}
|
|
204
|
-
},
|
|
205
|
-
|
|
204
|
+
}, ie = () => {
|
|
205
|
+
O ? (S.current && clearInterval(S.current), B(!1)) : (S.current = setInterval(() => {
|
|
206
206
|
w((n) => {
|
|
207
|
-
const
|
|
207
|
+
const l = Math.max(
|
|
208
208
|
...d.tracks.flatMap((i) => i.items.map((c) => c.startTime + c.duration)),
|
|
209
209
|
0
|
|
210
210
|
);
|
|
211
|
-
return n >=
|
|
211
|
+
return n >= l ? (clearInterval(S.current), B(!1), 0) : n + 1 / d.frameRate;
|
|
212
212
|
});
|
|
213
|
-
}, 1e3 / d.frameRate),
|
|
214
|
-
},
|
|
213
|
+
}, 1e3 / d.frameRate), B(!0));
|
|
214
|
+
}, Z = (n) => {
|
|
215
215
|
w(Math.max(0, n));
|
|
216
|
-
},
|
|
217
|
-
if (
|
|
218
|
-
|
|
216
|
+
}, J = async () => {
|
|
217
|
+
if (P) {
|
|
218
|
+
L(0);
|
|
219
219
|
try {
|
|
220
220
|
const n = setInterval(() => {
|
|
221
|
-
|
|
221
|
+
L((l) => l !== null && l < 90 ? l + Math.random() * 10 : l);
|
|
222
222
|
}, 500);
|
|
223
|
-
await
|
|
223
|
+
await P(d, d.settings.video.codec), clearInterval(n), L(100), setTimeout(() => L(null), 2e3);
|
|
224
224
|
} catch (n) {
|
|
225
|
-
|
|
225
|
+
L(null), console.error("Export failed:", n);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
},
|
|
229
|
-
const
|
|
230
|
-
return `${
|
|
231
|
-
},
|
|
228
|
+
}, X = (n) => {
|
|
229
|
+
const l = Math.floor(n / 60), i = Math.floor(n % 60), c = Math.floor(n % 1 * d.frameRate);
|
|
230
|
+
return `${l.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}`;
|
|
231
|
+
}, q = () => {
|
|
232
232
|
for (const n of d.tracks) {
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
return { track: n, item:
|
|
233
|
+
const l = n.items.find((i) => i.id === k);
|
|
234
|
+
if (l)
|
|
235
|
+
return { track: n, item: l };
|
|
236
236
|
}
|
|
237
237
|
return null;
|
|
238
|
-
},
|
|
238
|
+
}, ne = /* @__PURE__ */ t("header", { className: "video-editor__header", children: [
|
|
239
239
|
/* @__PURE__ */ t("div", { className: "header__project-info", children: [
|
|
240
240
|
/* @__PURE__ */ e(
|
|
241
241
|
"input",
|
|
@@ -258,8 +258,8 @@ const ve = {
|
|
|
258
258
|
/* @__PURE__ */ e("div", { className: "header__tabs", children: ["timeline", "effects", "transitions", "export"].map((n) => /* @__PURE__ */ e(
|
|
259
259
|
"button",
|
|
260
260
|
{
|
|
261
|
-
className: `tab-button ${
|
|
262
|
-
onClick: () =>
|
|
261
|
+
className: `tab-button ${A === n ? "tab-button--active" : ""}`,
|
|
262
|
+
onClick: () => N(n),
|
|
263
263
|
children: n.charAt(0).toUpperCase() + n.slice(1)
|
|
264
264
|
},
|
|
265
265
|
n
|
|
@@ -268,16 +268,16 @@ const ve = {
|
|
|
268
268
|
"button",
|
|
269
269
|
{
|
|
270
270
|
className: "action-button action-button--primary",
|
|
271
|
-
onClick:
|
|
271
|
+
onClick: J,
|
|
272
272
|
disabled: _ !== null,
|
|
273
273
|
children: _ !== null ? `Exporting ${Math.round(_)}%` : "Export"
|
|
274
274
|
}
|
|
275
275
|
) })
|
|
276
|
-
] }),
|
|
277
|
-
const n =
|
|
276
|
+
] }), se = k && A !== "export" ? (() => {
|
|
277
|
+
const n = q();
|
|
278
278
|
if (!n)
|
|
279
279
|
return null;
|
|
280
|
-
const { track:
|
|
280
|
+
const { track: l, item: i } = n;
|
|
281
281
|
return /* @__PURE__ */ t("div", { className: "item-inspector", children: [
|
|
282
282
|
/* @__PURE__ */ e("h4", { children: "Item Properties" }),
|
|
283
283
|
/* @__PURE__ */ t("div", { className: "inspector-section", children: [
|
|
@@ -293,7 +293,7 @@ const ve = {
|
|
|
293
293
|
const m = parseFloat(c.target.value);
|
|
294
294
|
g({
|
|
295
295
|
tracks: d.tracks.map(
|
|
296
|
-
(p) => p.id ===
|
|
296
|
+
(p) => p.id === l.id ? {
|
|
297
297
|
...p,
|
|
298
298
|
items: p.items.map(
|
|
299
299
|
(v) => v.id === i.id ? { ...v, startTime: m } : v
|
|
@@ -317,7 +317,7 @@ const ve = {
|
|
|
317
317
|
const m = parseFloat(c.target.value);
|
|
318
318
|
g({
|
|
319
319
|
tracks: d.tracks.map(
|
|
320
|
-
(p) => p.id ===
|
|
320
|
+
(p) => p.id === l.id ? {
|
|
321
321
|
...p,
|
|
322
322
|
items: p.items.map(
|
|
323
323
|
(v) => v.id === i.id ? { ...v, duration: m } : v
|
|
@@ -343,7 +343,7 @@ const ve = {
|
|
|
343
343
|
const m = parseFloat(c.target.value);
|
|
344
344
|
g({
|
|
345
345
|
tracks: d.tracks.map(
|
|
346
|
-
(p) => p.id ===
|
|
346
|
+
(p) => p.id === l.id ? {
|
|
347
347
|
...p,
|
|
348
348
|
items: p.items.map(
|
|
349
349
|
(v) => v.id === i.id ? {
|
|
@@ -366,7 +366,7 @@ const ve = {
|
|
|
366
366
|
] }),
|
|
367
367
|
/* @__PURE__ */ e("div", { className: "effects-list", children: i.effects.map((c) => /* @__PURE__ */ e("div", { className: "effect-badge", children: c.name }, c.id)) })
|
|
368
368
|
] });
|
|
369
|
-
})() : null, a =
|
|
369
|
+
})() : null, a = K ? /* @__PURE__ */ t("aside", { className: "video-editor__asset-library", children: [
|
|
370
370
|
/* @__PURE__ */ t("div", { className: "asset-library__header", children: [
|
|
371
371
|
/* @__PURE__ */ e("h3", { children: "Assets" }),
|
|
372
372
|
/* @__PURE__ */ e(
|
|
@@ -374,7 +374,7 @@ const ve = {
|
|
|
374
374
|
{
|
|
375
375
|
"aria-label": "Close",
|
|
376
376
|
className: "close-button",
|
|
377
|
-
onClick: () =>
|
|
377
|
+
onClick: () => I(!1),
|
|
378
378
|
children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
|
|
379
379
|
}
|
|
380
380
|
)
|
|
@@ -398,7 +398,7 @@ const ve = {
|
|
|
398
398
|
{
|
|
399
399
|
className: "asset-item",
|
|
400
400
|
draggable: !0,
|
|
401
|
-
onDragStart: (
|
|
401
|
+
onDragStart: (l) => l.dataTransfer.setData("assetId", n.id),
|
|
402
402
|
children: [
|
|
403
403
|
/* @__PURE__ */ e("div", { className: "asset-thumbnail", children: n.thumbnail ? /* @__PURE__ */ e("img", { src: n.thumbnail, alt: n.name }) : /* @__PURE__ */ e("span", { className: "asset-type-icon", children: /* @__PURE__ */ e(
|
|
404
404
|
u,
|
|
@@ -425,12 +425,12 @@ const ve = {
|
|
|
425
425
|
className: "preview-canvas",
|
|
426
426
|
style: { aspectRatio: `${d.resolution.width}/${d.resolution.height}` },
|
|
427
427
|
children: [
|
|
428
|
-
/* @__PURE__ */ e("video", { ref:
|
|
429
|
-
/* @__PURE__ */ e("div", { className: "preview-overlay", children: !
|
|
428
|
+
/* @__PURE__ */ e("video", { ref: ae, className: "preview-video" }),
|
|
429
|
+
/* @__PURE__ */ e("div", { className: "preview-overlay", children: !K && /* @__PURE__ */ e(
|
|
430
430
|
"button",
|
|
431
431
|
{
|
|
432
432
|
className: "toggle-library-button",
|
|
433
|
-
onClick: () =>
|
|
433
|
+
onClick: () => I(!0),
|
|
434
434
|
"aria-label": "Show asset library",
|
|
435
435
|
children: /* @__PURE__ */ e(u, { name: "folder", size: 16 })
|
|
436
436
|
}
|
|
@@ -439,11 +439,11 @@ const ve = {
|
|
|
439
439
|
}
|
|
440
440
|
),
|
|
441
441
|
/* @__PURE__ */ t("div", { className: "playback-controls", children: [
|
|
442
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
442
|
+
/* @__PURE__ */ e("button", { onClick: () => Z(0), "aria-label": "Go to start", children: /* @__PURE__ */ e(u, { name: "skip-back", size: 16 }) }),
|
|
443
443
|
/* @__PURE__ */ e(
|
|
444
444
|
"button",
|
|
445
445
|
{
|
|
446
|
-
onClick: () =>
|
|
446
|
+
onClick: () => Z(D - 1 / d.frameRate),
|
|
447
447
|
"aria-label": "Previous frame",
|
|
448
448
|
children: /* @__PURE__ */ e(u, { name: "chevron-left", size: 16 })
|
|
449
449
|
}
|
|
@@ -451,53 +451,53 @@ const ve = {
|
|
|
451
451
|
/* @__PURE__ */ e(
|
|
452
452
|
"button",
|
|
453
453
|
{
|
|
454
|
-
onClick:
|
|
454
|
+
onClick: ie,
|
|
455
455
|
className: "play-button",
|
|
456
|
-
"aria-label":
|
|
457
|
-
children: /* @__PURE__ */ e(u, { name:
|
|
456
|
+
"aria-label": O ? "Pause" : "Play",
|
|
457
|
+
children: /* @__PURE__ */ e(u, { name: O ? "pause" : "play", size: 18 })
|
|
458
458
|
}
|
|
459
459
|
),
|
|
460
460
|
/* @__PURE__ */ e(
|
|
461
461
|
"button",
|
|
462
462
|
{
|
|
463
|
-
onClick: () =>
|
|
463
|
+
onClick: () => Z(D + 1 / d.frameRate),
|
|
464
464
|
"aria-label": "Next frame",
|
|
465
465
|
children: /* @__PURE__ */ e(u, { name: "chevron-right", size: 16 })
|
|
466
466
|
}
|
|
467
467
|
),
|
|
468
|
-
/* @__PURE__ */ e("span", { className: "time-display", children:
|
|
468
|
+
/* @__PURE__ */ e("span", { className: "time-display", children: X(D) })
|
|
469
469
|
] })
|
|
470
|
-
] }) }),
|
|
471
|
-
|
|
470
|
+
] }) }), o = /* @__PURE__ */ t("div", { className: "video-editor__panel", children: [
|
|
471
|
+
A === "timeline" && /* @__PURE__ */ t("div", { className: "timeline-panel", children: [
|
|
472
472
|
/* @__PURE__ */ t("div", { className: "timeline-toolbar", children: [
|
|
473
473
|
/* @__PURE__ */ t("div", { className: "track-buttons", children: [
|
|
474
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
475
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
476
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
474
|
+
/* @__PURE__ */ e("button", { onClick: () => U("video"), children: "+ Video Track" }),
|
|
475
|
+
/* @__PURE__ */ e("button", { onClick: () => U("audio"), children: "+ Audio Track" }),
|
|
476
|
+
/* @__PURE__ */ e("button", { onClick: () => U("text"), children: "+ Text Track" })
|
|
477
477
|
] }),
|
|
478
478
|
/* @__PURE__ */ t("div", { className: "zoom-controls", children: [
|
|
479
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
479
|
+
/* @__PURE__ */ e("button", { onClick: () => j(Math.max(0.25, C - 0.25)), children: "-" }),
|
|
480
480
|
/* @__PURE__ */ t("span", { children: [
|
|
481
481
|
Math.round(C * 100),
|
|
482
482
|
"%"
|
|
483
483
|
] }),
|
|
484
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
484
|
+
/* @__PURE__ */ e("button", { onClick: () => j(Math.min(4, C + 0.25)), children: "+" })
|
|
485
485
|
] })
|
|
486
486
|
] }),
|
|
487
|
-
/* @__PURE__ */ t("div", { className: "timeline-container", ref:
|
|
488
|
-
/* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / C) }).map((n,
|
|
489
|
-
/* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${
|
|
487
|
+
/* @__PURE__ */ t("div", { className: "timeline-container", ref: ee, children: [
|
|
488
|
+
/* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / C) }).map((n, l) => /* @__PURE__ */ e("div", { className: "ruler-mark", style: { left: `${l * 50 * C}px` }, children: X(l) }, l)) }),
|
|
489
|
+
/* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${D * 50 * C}px` } }),
|
|
490
490
|
/* @__PURE__ */ e("div", { className: "timeline-tracks", children: d.tracks.map((n) => /* @__PURE__ */ t(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
493
|
-
className: `timeline-track ${
|
|
493
|
+
className: `timeline-track ${H === n.id ? "timeline-track--selected" : ""} ${n.locked ? "timeline-track--locked" : ""}`,
|
|
494
494
|
onClick: () => h(n.id),
|
|
495
|
-
onDrop: (
|
|
496
|
-
|
|
497
|
-
const i =
|
|
495
|
+
onDrop: (l) => {
|
|
496
|
+
l.preventDefault();
|
|
497
|
+
const i = l.dataTransfer.getData("assetId"), c = d.assets.find((m) => m.id === i);
|
|
498
498
|
c && x(n.id, c);
|
|
499
499
|
},
|
|
500
|
-
onDragOver: (
|
|
500
|
+
onDragOver: (l) => l.preventDefault(),
|
|
501
501
|
children: [
|
|
502
502
|
/* @__PURE__ */ t("div", { className: "track-header", children: [
|
|
503
503
|
/* @__PURE__ */ e("span", { className: "track-name", children: n.name }),
|
|
@@ -506,8 +506,8 @@ const ve = {
|
|
|
506
506
|
"button",
|
|
507
507
|
{
|
|
508
508
|
className: n.muted ? "active" : "",
|
|
509
|
-
onClick: (
|
|
510
|
-
|
|
509
|
+
onClick: (l) => {
|
|
510
|
+
l.stopPropagation(), W(n.id);
|
|
511
511
|
},
|
|
512
512
|
children: /* @__PURE__ */ e(u, { name: n.muted ? "volume-off" : "volume", size: 14 })
|
|
513
513
|
}
|
|
@@ -516,8 +516,8 @@ const ve = {
|
|
|
516
516
|
"button",
|
|
517
517
|
{
|
|
518
518
|
className: n.locked ? "active" : "",
|
|
519
|
-
onClick: (
|
|
520
|
-
|
|
519
|
+
onClick: (l) => {
|
|
520
|
+
l.stopPropagation(), Q(n.id);
|
|
521
521
|
},
|
|
522
522
|
children: /* @__PURE__ */ e(u, { name: n.locked ? "lock" : "unlock", size: 14 })
|
|
523
523
|
}
|
|
@@ -525,8 +525,8 @@ const ve = {
|
|
|
525
525
|
/* @__PURE__ */ e(
|
|
526
526
|
"button",
|
|
527
527
|
{
|
|
528
|
-
onClick: (
|
|
529
|
-
|
|
528
|
+
onClick: (l) => {
|
|
529
|
+
l.stopPropagation(), G(n.id);
|
|
530
530
|
},
|
|
531
531
|
"aria-label": "Remove track",
|
|
532
532
|
children: /* @__PURE__ */ e(u, { name: "trash", size: 14 })
|
|
@@ -534,26 +534,26 @@ const ve = {
|
|
|
534
534
|
)
|
|
535
535
|
] })
|
|
536
536
|
] }),
|
|
537
|
-
/* @__PURE__ */ e("div", { className: "track-items", children: n.items.map((
|
|
538
|
-
const i = d.assets.find((c) => c.id ===
|
|
537
|
+
/* @__PURE__ */ e("div", { className: "track-items", children: n.items.map((l) => {
|
|
538
|
+
const i = d.assets.find((c) => c.id === l.assetId);
|
|
539
539
|
return /* @__PURE__ */ t(
|
|
540
540
|
"div",
|
|
541
541
|
{
|
|
542
|
-
className: `track-item track-item--${
|
|
542
|
+
className: `track-item track-item--${l.type} ${k === l.id ? "track-item--selected" : ""}`,
|
|
543
543
|
style: {
|
|
544
|
-
left: `${
|
|
545
|
-
width: `${
|
|
544
|
+
left: `${l.startTime * 50 * C}px`,
|
|
545
|
+
width: `${l.duration * 50 * C}px`
|
|
546
546
|
},
|
|
547
547
|
onClick: (c) => {
|
|
548
|
-
c.stopPropagation(),
|
|
548
|
+
c.stopPropagation(), y(l.id);
|
|
549
549
|
},
|
|
550
550
|
children: [
|
|
551
551
|
/* @__PURE__ */ e("span", { className: "item-name", children: (i == null ? void 0 : i.name) || "Untitled" }),
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
l.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "item-transitions", children: /* @__PURE__ */ e(u, { name: "wand", size: 12 }) }),
|
|
553
|
+
l.effects.length > 0 && /* @__PURE__ */ e("span", { className: "item-effects", children: /* @__PURE__ */ e(u, { name: "palette", size: 12 }) })
|
|
554
554
|
]
|
|
555
555
|
},
|
|
556
|
-
|
|
556
|
+
l.id
|
|
557
557
|
);
|
|
558
558
|
}) })
|
|
559
559
|
]
|
|
@@ -562,17 +562,17 @@ const ve = {
|
|
|
562
562
|
)) })
|
|
563
563
|
] })
|
|
564
564
|
] }),
|
|
565
|
-
|
|
565
|
+
A === "effects" && /* @__PURE__ */ t("div", { className: "effects-panel", children: [
|
|
566
566
|
/* @__PURE__ */ e("h3", { children: "Video Effects" }),
|
|
567
567
|
/* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip to apply effects" }),
|
|
568
|
-
/* @__PURE__ */ e("div", { className: "effects-grid", children:
|
|
568
|
+
/* @__PURE__ */ e("div", { className: "effects-grid", children: be.map((n) => /* @__PURE__ */ t(
|
|
569
569
|
"button",
|
|
570
570
|
{
|
|
571
571
|
className: "effect-preset",
|
|
572
572
|
disabled: !k,
|
|
573
573
|
onClick: () => {
|
|
574
|
-
const
|
|
575
|
-
|
|
574
|
+
const l = q();
|
|
575
|
+
l && Y(l.track.id, l.item.id, n.type);
|
|
576
576
|
},
|
|
577
577
|
children: [
|
|
578
578
|
/* @__PURE__ */ e("span", { className: "effect-icon", children: /* @__PURE__ */ e(u, { name: n.icon, size: 16 }) }),
|
|
@@ -582,10 +582,10 @@ const ve = {
|
|
|
582
582
|
n.type
|
|
583
583
|
)) })
|
|
584
584
|
] }),
|
|
585
|
-
|
|
585
|
+
A === "transitions" && /* @__PURE__ */ t("div", { className: "transitions-panel", children: [
|
|
586
586
|
/* @__PURE__ */ e("h3", { children: "Transitions" }),
|
|
587
587
|
/* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip and add transitions between clips" }),
|
|
588
|
-
/* @__PURE__ */ e("div", { className: "transitions-grid", children:
|
|
588
|
+
/* @__PURE__ */ e("div", { className: "transitions-grid", children: ge.map((n) => /* @__PURE__ */ t("div", { className: "transition-preset", children: [
|
|
589
589
|
/* @__PURE__ */ e("span", { className: "transition-name", children: n.name }),
|
|
590
590
|
/* @__PURE__ */ t("div", { className: "transition-buttons", children: [
|
|
591
591
|
/* @__PURE__ */ e(
|
|
@@ -593,8 +593,8 @@ const ve = {
|
|
|
593
593
|
{
|
|
594
594
|
disabled: !k,
|
|
595
595
|
onClick: () => {
|
|
596
|
-
const
|
|
597
|
-
|
|
596
|
+
const l = q();
|
|
597
|
+
l && E(l.track.id, l.item.id, n.type, "start");
|
|
598
598
|
},
|
|
599
599
|
children: "In"
|
|
600
600
|
}
|
|
@@ -604,8 +604,8 @@ const ve = {
|
|
|
604
604
|
{
|
|
605
605
|
disabled: !k,
|
|
606
606
|
onClick: () => {
|
|
607
|
-
const
|
|
608
|
-
|
|
607
|
+
const l = q();
|
|
608
|
+
l && E(l.track.id, l.item.id, n.type, "end");
|
|
609
609
|
},
|
|
610
610
|
children: "Out"
|
|
611
611
|
}
|
|
@@ -613,7 +613,7 @@ const ve = {
|
|
|
613
613
|
] })
|
|
614
614
|
] }, n.type)) })
|
|
615
615
|
] }),
|
|
616
|
-
|
|
616
|
+
A === "export" && /* @__PURE__ */ t("div", { className: "export-panel", children: [
|
|
617
617
|
/* @__PURE__ */ e("h3", { children: "Export Settings" }),
|
|
618
618
|
/* @__PURE__ */ t("div", { className: "export-settings", children: [
|
|
619
619
|
/* @__PURE__ */ t("div", { className: "setting-group", children: [
|
|
@@ -623,8 +623,8 @@ const ve = {
|
|
|
623
623
|
{
|
|
624
624
|
value: `${d.resolution.width}x${d.resolution.height}`,
|
|
625
625
|
onChange: (n) => {
|
|
626
|
-
const [
|
|
627
|
-
g({ resolution: { width:
|
|
626
|
+
const [l, i] = n.target.value.split("x").map(Number);
|
|
627
|
+
g({ resolution: { width: l, height: i } });
|
|
628
628
|
},
|
|
629
629
|
children: [
|
|
630
630
|
/* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
|
|
@@ -701,7 +701,7 @@ const ve = {
|
|
|
701
701
|
"button",
|
|
702
702
|
{
|
|
703
703
|
className: "export-button",
|
|
704
|
-
onClick:
|
|
704
|
+
onClick: J,
|
|
705
705
|
disabled: _ !== null,
|
|
706
706
|
children: _ !== null ? `Exporting... ${Math.round(_)}%` : "Export Video"
|
|
707
707
|
}
|
|
@@ -710,18 +710,18 @@ const ve = {
|
|
|
710
710
|
] })
|
|
711
711
|
] });
|
|
712
712
|
return /* @__PURE__ */ t(
|
|
713
|
-
|
|
713
|
+
he,
|
|
714
714
|
{
|
|
715
715
|
flush: !0,
|
|
716
|
-
className: `nice-video-editor ${
|
|
716
|
+
className: `nice-video-editor ${V}`,
|
|
717
717
|
height: "100%",
|
|
718
718
|
style: { position: "relative", minHeight: 600 },
|
|
719
|
-
toolbar:
|
|
719
|
+
toolbar: ne,
|
|
720
720
|
sidebar: a,
|
|
721
|
-
rightSidebar:
|
|
722
|
-
bottomPanel:
|
|
721
|
+
rightSidebar: se ?? void 0,
|
|
722
|
+
bottomPanel: o,
|
|
723
723
|
children: [
|
|
724
|
-
/* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(
|
|
724
|
+
/* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(pe, { steps: ve(T, Ne) }) }),
|
|
725
725
|
r
|
|
726
726
|
]
|
|
727
727
|
}
|
|
@@ -744,33 +744,33 @@ const ve = {
|
|
|
744
744
|
quality: "high"
|
|
745
745
|
}
|
|
746
746
|
}, Ie = ({
|
|
747
|
-
options:
|
|
748
|
-
onRecordingStart:
|
|
749
|
-
onRecordingStop:
|
|
750
|
-
onRecordingPause:
|
|
751
|
-
onRecordingResume:
|
|
747
|
+
options: R,
|
|
748
|
+
onRecordingStart: z,
|
|
749
|
+
onRecordingStop: P,
|
|
750
|
+
onRecordingPause: F,
|
|
751
|
+
onRecordingResume: V,
|
|
752
752
|
onError: T,
|
|
753
753
|
className: d = ""
|
|
754
754
|
}) => {
|
|
755
|
-
var n,
|
|
756
|
-
const [s,
|
|
755
|
+
var n, l;
|
|
756
|
+
const [s, A] = b({
|
|
757
757
|
...ye,
|
|
758
|
-
|
|
759
|
-
}), [
|
|
758
|
+
...R
|
|
759
|
+
}), [N, H] = b(null), [h, k] = b("idle"), [y, D] = b([]), [w, O] = b(null), [B, C] = b(null), [j, K] = b(!1), [I, _] = b(!1), [L, ee] = b(
|
|
760
760
|
"pen"
|
|
761
|
-
), [
|
|
761
|
+
), [ae, S] = b("var(--nice-danger, #ff0000)"), g = M(null), f = M([]), U = M(null), G = M(null), W = M(null), Q = M(0);
|
|
762
762
|
oe(() => () => {
|
|
763
|
-
w && w.getTracks().forEach((i) => i.stop()),
|
|
763
|
+
w && w.getTracks().forEach((i) => i.stop()), W.current && clearInterval(W.current);
|
|
764
764
|
}, [w]);
|
|
765
765
|
const x = (i) => {
|
|
766
|
-
|
|
766
|
+
A((c) => ({
|
|
767
767
|
...c,
|
|
768
768
|
...i,
|
|
769
769
|
video: { ...c.video, ...i.video },
|
|
770
770
|
audio: { ...c.audio, ...i.audio },
|
|
771
771
|
output: { ...c.output, ...i.output }
|
|
772
772
|
}));
|
|
773
|
-
},
|
|
773
|
+
}, Y = async () => {
|
|
774
774
|
try {
|
|
775
775
|
k("preparing");
|
|
776
776
|
const i = {
|
|
@@ -791,31 +791,31 @@ const ve = {
|
|
|
791
791
|
} catch (m) {
|
|
792
792
|
console.warn("Could not access microphone:", m);
|
|
793
793
|
}
|
|
794
|
-
|
|
794
|
+
O(c), U.current && (U.current.srcObject = c, U.current.play()), k("idle");
|
|
795
795
|
} catch (i) {
|
|
796
796
|
k("error"), T == null || T(i instanceof Error ? i : new Error("Failed to start preview"));
|
|
797
797
|
}
|
|
798
|
-
},
|
|
799
|
-
w || await
|
|
798
|
+
}, E = async () => {
|
|
799
|
+
w || await Y();
|
|
800
800
|
for (let i = 3; i > 0; i--)
|
|
801
801
|
C(i), await new Promise((c) => setTimeout(c, 1e3));
|
|
802
802
|
C(null);
|
|
803
803
|
try {
|
|
804
|
-
const i = w || await
|
|
804
|
+
const i = w || await te();
|
|
805
805
|
if (!i)
|
|
806
806
|
throw new Error("No stream available");
|
|
807
|
-
const c =
|
|
807
|
+
const c = ne(s.output.format), m = new MediaRecorder(i, {
|
|
808
808
|
mimeType: c,
|
|
809
|
-
videoBitsPerSecond:
|
|
809
|
+
videoBitsPerSecond: se(s.output.quality)
|
|
810
810
|
});
|
|
811
811
|
f.current = [], m.ondataavailable = (v) => {
|
|
812
812
|
v.data.size > 0 && f.current.push(v.data);
|
|
813
813
|
}, m.onstop = () => {
|
|
814
814
|
const v = new Blob(f.current, { type: c });
|
|
815
|
-
|
|
816
|
-
}, g.current = m, m.start(1e3),
|
|
815
|
+
N && (P == null || P({ ...N, status: "stopped" }, v));
|
|
816
|
+
}, g.current = m, m.start(1e3), Q.current = Date.now();
|
|
817
817
|
const p = {
|
|
818
|
-
id:
|
|
818
|
+
id: $(),
|
|
819
819
|
status: "recording",
|
|
820
820
|
startTime: /* @__PURE__ */ new Date(),
|
|
821
821
|
duration: 0,
|
|
@@ -823,40 +823,40 @@ const ve = {
|
|
|
823
823
|
options: s,
|
|
824
824
|
chunks: []
|
|
825
825
|
};
|
|
826
|
-
|
|
827
|
-
|
|
826
|
+
H(p), k("recording"), z == null || z(p), W.current = setInterval(() => {
|
|
827
|
+
H(
|
|
828
828
|
(v) => v ? {
|
|
829
829
|
...v,
|
|
830
|
-
duration: (Date.now() -
|
|
831
|
-
size: f.current.reduce((
|
|
830
|
+
duration: (Date.now() - Q.current) / 1e3,
|
|
831
|
+
size: f.current.reduce((ue, me) => ue + me.size, 0)
|
|
832
832
|
} : null
|
|
833
833
|
);
|
|
834
834
|
}, 100);
|
|
835
835
|
} catch (i) {
|
|
836
836
|
k("error"), T == null || T(i instanceof Error ? i : new Error("Failed to start recording"));
|
|
837
837
|
}
|
|
838
|
-
},
|
|
839
|
-
g.current && h === "recording" && (g.current.pause(), k("paused"),
|
|
840
|
-
}, Y = () => {
|
|
841
|
-
g.current && h === "paused" && (g.current.resume(), k("recording"), L == null || L());
|
|
838
|
+
}, te = async () => (await Y(), w), ie = () => {
|
|
839
|
+
g.current && h === "recording" && (g.current.pause(), k("paused"), F == null || F());
|
|
842
840
|
}, Z = () => {
|
|
843
|
-
|
|
844
|
-
},
|
|
841
|
+
g.current && h === "paused" && (g.current.resume(), k("recording"), V == null || V());
|
|
842
|
+
}, J = () => {
|
|
843
|
+
W.current && clearInterval(W.current), g.current && (h === "recording" || h === "paused") && (g.current.stop(), k("stopped")), w && (w.getTracks().forEach((i) => i.stop()), O(null));
|
|
844
|
+
}, X = de(
|
|
845
845
|
(i) => {
|
|
846
846
|
if (h !== "recording")
|
|
847
847
|
return;
|
|
848
848
|
const c = {
|
|
849
|
-
id:
|
|
850
|
-
time: (
|
|
851
|
-
label: i || `Marker ${
|
|
849
|
+
id: $(),
|
|
850
|
+
time: (N == null ? void 0 : N.duration) || 0,
|
|
851
|
+
label: i || `Marker ${y.length + 1}`,
|
|
852
852
|
color: a()
|
|
853
853
|
};
|
|
854
|
-
|
|
854
|
+
D((m) => [...m, c]);
|
|
855
855
|
},
|
|
856
|
-
[h,
|
|
857
|
-
),
|
|
858
|
-
|
|
859
|
-
},
|
|
856
|
+
[h, N == null ? void 0 : N.duration, y.length]
|
|
857
|
+
), q = (i) => {
|
|
858
|
+
D((c) => c.filter((m) => m.id !== i));
|
|
859
|
+
}, ne = (i) => {
|
|
860
860
|
switch (i) {
|
|
861
861
|
case "mp4":
|
|
862
862
|
return "video/mp4";
|
|
@@ -865,7 +865,7 @@ const ve = {
|
|
|
865
865
|
default:
|
|
866
866
|
return "video/webm;codecs=vp9";
|
|
867
867
|
}
|
|
868
|
-
},
|
|
868
|
+
}, se = (i) => {
|
|
869
869
|
switch (i) {
|
|
870
870
|
case "low":
|
|
871
871
|
return 25e5;
|
|
@@ -889,13 +889,13 @@ const ve = {
|
|
|
889
889
|
}, r = (i) => {
|
|
890
890
|
const c = Math.floor(i / 3600), m = Math.floor(i % 3600 / 60), p = Math.floor(i % 60), v = Math.floor(i % 1 * 100);
|
|
891
891
|
return c > 0 ? `${c}:${m.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}` : `${m.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}.${v.toString().padStart(2, "0")}`;
|
|
892
|
-
},
|
|
892
|
+
}, o = (i) => i < 1024 ? `${i} B` : i < 1024 * 1024 ? `${(i / 1024).toFixed(1)} KB` : `${(i / 1024 / 1024).toFixed(1)} MB`;
|
|
893
893
|
return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${d}`, children: [
|
|
894
894
|
/* @__PURE__ */ t("div", { className: "recorder__preview", children: [
|
|
895
|
-
|
|
896
|
-
/* @__PURE__ */ e("video", { ref:
|
|
897
|
-
|
|
898
|
-
!w && h === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ t("button", { className: "start-preview-button", onClick:
|
|
895
|
+
B !== null && /* @__PURE__ */ e("div", { className: "countdown-overlay", children: /* @__PURE__ */ e("span", { className: "countdown-number", children: B }) }),
|
|
896
|
+
/* @__PURE__ */ e("video", { ref: U, className: "preview-video", muted: !0, playsInline: !0 }),
|
|
897
|
+
I && /* @__PURE__ */ e("canvas", { ref: G, className: "annotation-canvas" }),
|
|
898
|
+
!w && h === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ t("button", { className: "start-preview-button", onClick: Y, children: [
|
|
899
899
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "monitor", size: 18 }) }),
|
|
900
900
|
/* @__PURE__ */ e("span", { children: "Select Screen to Record" })
|
|
901
901
|
] }) }),
|
|
@@ -910,30 +910,30 @@ const ve = {
|
|
|
910
910
|
"button",
|
|
911
911
|
{
|
|
912
912
|
className: "control-button control-button--record",
|
|
913
|
-
onClick:
|
|
914
|
-
disabled: !!
|
|
913
|
+
onClick: E,
|
|
914
|
+
disabled: !!B,
|
|
915
915
|
children: [
|
|
916
916
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "circle", size: 18 }) }),
|
|
917
917
|
/* @__PURE__ */ e("span", { children: "Start Recording" })
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
),
|
|
921
|
-
h === "recording" && /* @__PURE__ */ t(
|
|
922
|
-
/* @__PURE__ */ t("button", { className: "control-button control-button--pause", onClick:
|
|
921
|
+
h === "recording" && /* @__PURE__ */ t(le, { children: [
|
|
922
|
+
/* @__PURE__ */ t("button", { className: "control-button control-button--pause", onClick: ie, children: [
|
|
923
923
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "pause", size: 18 }) }),
|
|
924
924
|
/* @__PURE__ */ e("span", { children: "Pause" })
|
|
925
925
|
] }),
|
|
926
|
-
/* @__PURE__ */ t("button", { className: "control-button control-button--stop", onClick:
|
|
926
|
+
/* @__PURE__ */ t("button", { className: "control-button control-button--stop", onClick: J, children: [
|
|
927
927
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "stop", size: 18 }) }),
|
|
928
928
|
/* @__PURE__ */ e("span", { children: "Stop" })
|
|
929
929
|
] })
|
|
930
930
|
] }),
|
|
931
|
-
h === "paused" && /* @__PURE__ */ t(
|
|
932
|
-
/* @__PURE__ */ t("button", { className: "control-button control-button--resume", onClick:
|
|
931
|
+
h === "paused" && /* @__PURE__ */ t(le, { children: [
|
|
932
|
+
/* @__PURE__ */ t("button", { className: "control-button control-button--resume", onClick: Z, children: [
|
|
933
933
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "play", size: 18 }) }),
|
|
934
934
|
/* @__PURE__ */ e("span", { children: "Resume" })
|
|
935
935
|
] }),
|
|
936
|
-
/* @__PURE__ */ t("button", { className: "control-button control-button--stop", onClick:
|
|
936
|
+
/* @__PURE__ */ t("button", { className: "control-button control-button--stop", onClick: J, children: [
|
|
937
937
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "stop", size: 18 }) }),
|
|
938
938
|
/* @__PURE__ */ e("span", { children: "Stop" })
|
|
939
939
|
] })
|
|
@@ -943,7 +943,7 @@ const ve = {
|
|
|
943
943
|
{
|
|
944
944
|
className: "control-button control-button--new",
|
|
945
945
|
onClick: () => {
|
|
946
|
-
k("idle"),
|
|
946
|
+
k("idle"), H(null), D([]);
|
|
947
947
|
},
|
|
948
948
|
children: [
|
|
949
949
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "refresh", size: 18 }) }),
|
|
@@ -953,15 +953,15 @@ const ve = {
|
|
|
953
953
|
)
|
|
954
954
|
] }),
|
|
955
955
|
/* @__PURE__ */ t("div", { className: "controls__secondary", children: [
|
|
956
|
-
(h === "recording" || h === "paused") && /* @__PURE__ */ t("button", { className: "control-button control-button--marker", onClick: () =>
|
|
956
|
+
(h === "recording" || h === "paused") && /* @__PURE__ */ t("button", { className: "control-button control-button--marker", onClick: () => X(), children: [
|
|
957
957
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "tag", size: 18 }) }),
|
|
958
958
|
/* @__PURE__ */ e("span", { children: "Add Marker" })
|
|
959
959
|
] }),
|
|
960
960
|
/* @__PURE__ */ t(
|
|
961
961
|
"button",
|
|
962
962
|
{
|
|
963
|
-
className: `control-button ${
|
|
964
|
-
onClick: () => _(!
|
|
963
|
+
className: `control-button ${I ? "control-button--active" : ""}`,
|
|
964
|
+
onClick: () => _(!I),
|
|
965
965
|
disabled: h !== "recording",
|
|
966
966
|
children: [
|
|
967
967
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "pen", size: 18 }) }),
|
|
@@ -973,7 +973,7 @@ const ve = {
|
|
|
973
973
|
"button",
|
|
974
974
|
{
|
|
975
975
|
className: "control-button control-button--settings",
|
|
976
|
-
onClick: () =>
|
|
976
|
+
onClick: () => K(!j),
|
|
977
977
|
disabled: h === "recording",
|
|
978
978
|
"aria-label": "Settings",
|
|
979
979
|
children: /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "settings", size: 18 }) })
|
|
@@ -986,17 +986,17 @@ const ve = {
|
|
|
986
986
|
/* @__PURE__ */ t("span", { className: "status-item", children: [
|
|
987
987
|
/* @__PURE__ */ e("strong", { children: "Duration:" }),
|
|
988
988
|
" ",
|
|
989
|
-
r((
|
|
989
|
+
r((N == null ? void 0 : N.duration) || 0)
|
|
990
990
|
] }),
|
|
991
991
|
/* @__PURE__ */ t("span", { className: "status-item", children: [
|
|
992
992
|
/* @__PURE__ */ e("strong", { children: "Size:" }),
|
|
993
993
|
" ",
|
|
994
|
-
|
|
994
|
+
o((N == null ? void 0 : N.size) || 0)
|
|
995
995
|
] }),
|
|
996
996
|
/* @__PURE__ */ t("span", { className: "status-item", children: [
|
|
997
997
|
/* @__PURE__ */ e("strong", { children: "Markers:" }),
|
|
998
998
|
" ",
|
|
999
|
-
|
|
999
|
+
y.length
|
|
1000
1000
|
] })
|
|
1001
1001
|
] }),
|
|
1002
1002
|
/* @__PURE__ */ t("div", { className: "status__quality", children: [
|
|
@@ -1012,12 +1012,12 @@ const ve = {
|
|
|
1012
1012
|
/* @__PURE__ */ e("span", { className: s.audio.enabled ? "audio-on" : "audio-off", children: /* @__PURE__ */ e(u, { name: s.audio.enabled ? "volume" : "volume-off", size: 14 }) })
|
|
1013
1013
|
] })
|
|
1014
1014
|
] }),
|
|
1015
|
-
|
|
1015
|
+
I && h === "recording" && /* @__PURE__ */ t("div", { className: "recorder__annotation-tools", children: [
|
|
1016
1016
|
/* @__PURE__ */ e("div", { className: "tool-group", children: ["pen", "arrow", "rectangle", "text"].map((i) => /* @__PURE__ */ e(
|
|
1017
1017
|
"button",
|
|
1018
1018
|
{
|
|
1019
|
-
className: `tool-button ${
|
|
1020
|
-
onClick: () =>
|
|
1019
|
+
className: `tool-button ${L === i ? "tool-button--active" : ""}`,
|
|
1020
|
+
onClick: () => ee(i),
|
|
1021
1021
|
"aria-label": i,
|
|
1022
1022
|
children: /* @__PURE__ */ e(
|
|
1023
1023
|
u,
|
|
@@ -1039,16 +1039,16 @@ const ve = {
|
|
|
1039
1039
|
].map((i) => /* @__PURE__ */ e(
|
|
1040
1040
|
"button",
|
|
1041
1041
|
{
|
|
1042
|
-
className: `color-button ${
|
|
1042
|
+
className: `color-button ${ae === i ? "color-button--active" : ""}`,
|
|
1043
1043
|
style: { backgroundColor: i },
|
|
1044
1044
|
onClick: () => S(i)
|
|
1045
1045
|
},
|
|
1046
1046
|
i
|
|
1047
1047
|
)) })
|
|
1048
1048
|
] }),
|
|
1049
|
-
|
|
1049
|
+
y.length > 0 && /* @__PURE__ */ t("div", { className: "recorder__markers", children: [
|
|
1050
1050
|
/* @__PURE__ */ e("h4", { children: "Markers" }),
|
|
1051
|
-
/* @__PURE__ */ e("div", { className: "markers-list", children:
|
|
1051
|
+
/* @__PURE__ */ e("div", { className: "markers-list", children: y.map((i) => /* @__PURE__ */ t(
|
|
1052
1052
|
"div",
|
|
1053
1053
|
{
|
|
1054
1054
|
className: "marker-item",
|
|
@@ -1061,7 +1061,7 @@ const ve = {
|
|
|
1061
1061
|
type: "text",
|
|
1062
1062
|
value: i.label,
|
|
1063
1063
|
onChange: (c) => {
|
|
1064
|
-
|
|
1064
|
+
D(
|
|
1065
1065
|
(m) => m.map((p) => p.id === i.id ? { ...p, label: c.target.value } : p)
|
|
1066
1066
|
);
|
|
1067
1067
|
},
|
|
@@ -1073,7 +1073,7 @@ const ve = {
|
|
|
1073
1073
|
{
|
|
1074
1074
|
"aria-label": "Close",
|
|
1075
1075
|
className: "marker-remove",
|
|
1076
|
-
onClick: () =>
|
|
1076
|
+
onClick: () => q(i.id),
|
|
1077
1077
|
children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
|
|
1078
1078
|
}
|
|
1079
1079
|
)
|
|
@@ -1082,7 +1082,7 @@ const ve = {
|
|
|
1082
1082
|
i.id
|
|
1083
1083
|
)) })
|
|
1084
1084
|
] }),
|
|
1085
|
-
|
|
1085
|
+
j && /* @__PURE__ */ t("div", { className: "recorder__settings", children: [
|
|
1086
1086
|
/* @__PURE__ */ t("div", { className: "settings-header", children: [
|
|
1087
1087
|
/* @__PURE__ */ e("h3", { children: "Recording Settings" }),
|
|
1088
1088
|
/* @__PURE__ */ e(
|
|
@@ -1090,7 +1090,7 @@ const ve = {
|
|
|
1090
1090
|
{
|
|
1091
1091
|
"aria-label": "Close",
|
|
1092
1092
|
className: "close-button",
|
|
1093
|
-
onClick: () =>
|
|
1093
|
+
onClick: () => K(!1),
|
|
1094
1094
|
children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
|
|
1095
1095
|
}
|
|
1096
1096
|
)
|
|
@@ -1123,7 +1123,7 @@ const ve = {
|
|
|
1123
1123
|
/* @__PURE__ */ t(
|
|
1124
1124
|
"select",
|
|
1125
1125
|
{
|
|
1126
|
-
value: `${(n = s.video.resolution) == null ? void 0 : n.width}x${(
|
|
1126
|
+
value: `${(n = s.video.resolution) == null ? void 0 : n.width}x${(l = s.video.resolution) == null ? void 0 : l.height}`,
|
|
1127
1127
|
onChange: (i) => {
|
|
1128
1128
|
const [c, m] = i.target.value.split("x").map(Number);
|
|
1129
1129
|
x({
|
|
@@ -1186,7 +1186,7 @@ const ve = {
|
|
|
1186
1186
|
),
|
|
1187
1187
|
"Enable Audio"
|
|
1188
1188
|
] }),
|
|
1189
|
-
s.audio.enabled && /* @__PURE__ */ t(
|
|
1189
|
+
s.audio.enabled && /* @__PURE__ */ t(le, { children: [
|
|
1190
1190
|
/* @__PURE__ */ t("label", { children: [
|
|
1191
1191
|
"Source",
|
|
1192
1192
|
/* @__PURE__ */ t(
|
|
@@ -1278,8 +1278,8 @@ const ve = {
|
|
|
1278
1278
|
] })
|
|
1279
1279
|
] })
|
|
1280
1280
|
] });
|
|
1281
|
-
},
|
|
1282
|
-
id:
|
|
1281
|
+
}, ke = {
|
|
1282
|
+
id: $(),
|
|
1283
1283
|
name: "My Stream",
|
|
1284
1284
|
protocol: "rtmp",
|
|
1285
1285
|
destinations: [],
|
|
@@ -1306,7 +1306,7 @@ const ve = {
|
|
|
1306
1306
|
codec: "aac"
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
},
|
|
1309
|
+
}, ce = [
|
|
1310
1310
|
{
|
|
1311
1311
|
platform: "youtube",
|
|
1312
1312
|
name: "YouTube",
|
|
@@ -1322,7 +1322,7 @@ const ve = {
|
|
|
1322
1322
|
},
|
|
1323
1323
|
{ platform: "custom-rtmp", name: "Custom RTMP", icon: "link", defaultUrl: "" },
|
|
1324
1324
|
{ platform: "custom-srt", name: "Custom SRT", icon: "lock", defaultUrl: "" }
|
|
1325
|
-
],
|
|
1325
|
+
], re = [
|
|
1326
1326
|
{ type: "camera", name: "Camera", icon: "camera" },
|
|
1327
1327
|
{ type: "screen", name: "Screen Capture", icon: "monitor" },
|
|
1328
1328
|
{ type: "window", name: "Window Capture", icon: "window" },
|
|
@@ -1331,18 +1331,18 @@ const ve = {
|
|
|
1331
1331
|
{ type: "video", name: "Video", icon: "video" },
|
|
1332
1332
|
{ type: "microphone", name: "Microphone", icon: "mic" },
|
|
1333
1333
|
{ type: "system-audio", name: "System Audio", icon: "volume" }
|
|
1334
|
-
],
|
|
1335
|
-
config:
|
|
1336
|
-
onConfigChange:
|
|
1337
|
-
onStreamStart:
|
|
1338
|
-
onStreamStop:
|
|
1339
|
-
onStatsUpdate:
|
|
1334
|
+
], _e = ({
|
|
1335
|
+
config: R,
|
|
1336
|
+
onConfigChange: z,
|
|
1337
|
+
onStreamStart: P,
|
|
1338
|
+
onStreamStop: F,
|
|
1339
|
+
onStatsUpdate: V,
|
|
1340
1340
|
onError: T,
|
|
1341
1341
|
className: d = ""
|
|
1342
1342
|
}) => {
|
|
1343
|
-
const [s,
|
|
1343
|
+
const [s, A] = b(R || ke), [N, H] = b(
|
|
1344
1344
|
"sources"
|
|
1345
|
-
), [h, k] = b(!1), [
|
|
1345
|
+
), [h, k] = b(!1), [y, D] = b({
|
|
1346
1346
|
duration: 0,
|
|
1347
1347
|
viewers: 0,
|
|
1348
1348
|
peakViewers: 0,
|
|
@@ -1351,21 +1351,21 @@ const ve = {
|
|
|
1351
1351
|
droppedFrames: 0,
|
|
1352
1352
|
cpuUsage: 0,
|
|
1353
1353
|
memoryUsage: 0
|
|
1354
|
-
}), [w,
|
|
1354
|
+
}), [w, O] = b(null), [B, C] = b(!1), [j, K] = b(!1), [I, _] = b([s.layout]), [L, ee] = b(0), ae = M(null), S = M(null), g = M(0);
|
|
1355
1355
|
oe(() => {
|
|
1356
|
-
|
|
1357
|
-
}, [
|
|
1356
|
+
R && A(R);
|
|
1357
|
+
}, [R]), oe(() => () => {
|
|
1358
1358
|
S.current && clearInterval(S.current);
|
|
1359
1359
|
}, []);
|
|
1360
|
-
const f =
|
|
1360
|
+
const f = de(
|
|
1361
1361
|
(a) => {
|
|
1362
1362
|
const r = { ...s, ...a };
|
|
1363
|
-
|
|
1363
|
+
A(r), z == null || z(r);
|
|
1364
1364
|
},
|
|
1365
|
-
[s,
|
|
1366
|
-
),
|
|
1367
|
-
const r =
|
|
1368
|
-
id:
|
|
1365
|
+
[s, z]
|
|
1366
|
+
), U = (a) => {
|
|
1367
|
+
const r = ce.find((n) => n.platform === a), o = {
|
|
1368
|
+
id: $(),
|
|
1369
1369
|
name: (r == null ? void 0 : r.name) || "Custom",
|
|
1370
1370
|
platform: a,
|
|
1371
1371
|
url: (r == null ? void 0 : r.defaultUrl) || "",
|
|
@@ -1373,36 +1373,36 @@ const ve = {
|
|
|
1373
1373
|
enabled: !0,
|
|
1374
1374
|
status: "idle"
|
|
1375
1375
|
};
|
|
1376
|
-
f({ destinations: [...s.destinations,
|
|
1377
|
-
},
|
|
1376
|
+
f({ destinations: [...s.destinations, o] }), K(!1);
|
|
1377
|
+
}, G = (a, r) => {
|
|
1378
1378
|
f({
|
|
1379
|
-
destinations: s.destinations.map((
|
|
1379
|
+
destinations: s.destinations.map((o) => o.id === a ? { ...o, ...r } : o)
|
|
1380
1380
|
});
|
|
1381
|
-
},
|
|
1381
|
+
}, W = (a) => {
|
|
1382
1382
|
f({ destinations: s.destinations.filter((r) => r.id !== a) });
|
|
1383
|
-
},
|
|
1384
|
-
const r =
|
|
1385
|
-
id:
|
|
1383
|
+
}, Q = async (a) => {
|
|
1384
|
+
const r = re.find((l) => l.type === a), o = {
|
|
1385
|
+
id: $(),
|
|
1386
1386
|
type: a,
|
|
1387
|
-
name: `${(r == null ? void 0 : r.name) || a} ${s.sources.filter((
|
|
1387
|
+
name: `${(r == null ? void 0 : r.name) || a} ${s.sources.filter((l) => l.type === a).length + 1}`,
|
|
1388
1388
|
settings: {},
|
|
1389
1389
|
volume: 1,
|
|
1390
1390
|
muted: !1
|
|
1391
1391
|
};
|
|
1392
1392
|
try {
|
|
1393
1393
|
if (a === "camera" || a === "microphone") {
|
|
1394
|
-
const
|
|
1394
|
+
const l = a === "camera" ? { video: !0 } : { audio: !0 }, c = (await navigator.mediaDevices.enumerateDevices()).filter(
|
|
1395
1395
|
(m) => a === "camera" ? m.kind === "videoinput" : m.kind === "audioinput"
|
|
1396
1396
|
);
|
|
1397
|
-
c.length > 0 && (
|
|
1397
|
+
c.length > 0 && (o.settings.deviceId = c[0].deviceId);
|
|
1398
1398
|
} else (a === "screen" || a === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
|
|
1399
|
-
} catch (
|
|
1400
|
-
console.warn(`Could not access ${a}:`,
|
|
1399
|
+
} catch (l) {
|
|
1400
|
+
console.warn(`Could not access ${a}:`, l);
|
|
1401
1401
|
}
|
|
1402
|
-
f({ sources: [...s.sources,
|
|
1402
|
+
f({ sources: [...s.sources, o] });
|
|
1403
1403
|
const n = {
|
|
1404
|
-
id:
|
|
1405
|
-
sourceId:
|
|
1404
|
+
id: $(),
|
|
1405
|
+
sourceId: o.id,
|
|
1406
1406
|
position: { x: 0, y: 0 },
|
|
1407
1407
|
size: { width: s.layout.canvas.width, height: s.layout.canvas.height },
|
|
1408
1408
|
visible: !0,
|
|
@@ -1417,9 +1417,9 @@ const ve = {
|
|
|
1417
1417
|
}), C(!1);
|
|
1418
1418
|
}, x = (a, r) => {
|
|
1419
1419
|
f({
|
|
1420
|
-
sources: s.sources.map((
|
|
1420
|
+
sources: s.sources.map((o) => o.id === a ? { ...o, ...r } : o)
|
|
1421
1421
|
});
|
|
1422
|
-
},
|
|
1422
|
+
}, Y = (a) => {
|
|
1423
1423
|
f({
|
|
1424
1424
|
sources: s.sources.filter((r) => r.id !== a),
|
|
1425
1425
|
layout: {
|
|
@@ -1427,40 +1427,40 @@ const ve = {
|
|
|
1427
1427
|
layers: s.layout.layers.filter((r) => r.sourceId !== a)
|
|
1428
1428
|
}
|
|
1429
1429
|
});
|
|
1430
|
-
},
|
|
1430
|
+
}, E = (a, r) => {
|
|
1431
1431
|
f({
|
|
1432
1432
|
layout: {
|
|
1433
1433
|
...s.layout,
|
|
1434
|
-
layers: s.layout.layers.map((
|
|
1434
|
+
layers: s.layout.layers.map((o) => o.id === a ? { ...o, ...r } : o)
|
|
1435
1435
|
}
|
|
1436
1436
|
});
|
|
1437
|
-
},
|
|
1438
|
-
const r = s.layout.layers.findIndex((
|
|
1437
|
+
}, te = (a) => {
|
|
1438
|
+
const r = s.layout.layers.findIndex((o) => o.id === a);
|
|
1439
1439
|
if (r < s.layout.layers.length - 1) {
|
|
1440
|
-
const
|
|
1441
|
-
[
|
|
1442
|
-
n.zIndex =
|
|
1443
|
-
}), f({ layout: { ...s.layout, layers:
|
|
1440
|
+
const o = [...s.layout.layers];
|
|
1441
|
+
[o[r], o[r + 1]] = [o[r + 1], o[r]], o.forEach((n, l) => {
|
|
1442
|
+
n.zIndex = l;
|
|
1443
|
+
}), f({ layout: { ...s.layout, layers: o } });
|
|
1444
1444
|
}
|
|
1445
|
-
},
|
|
1446
|
-
const r = s.layout.layers.findIndex((
|
|
1445
|
+
}, ie = (a) => {
|
|
1446
|
+
const r = s.layout.layers.findIndex((o) => o.id === a);
|
|
1447
1447
|
if (r > 0) {
|
|
1448
|
-
const
|
|
1449
|
-
[
|
|
1450
|
-
n.zIndex =
|
|
1451
|
-
}), f({ layout: { ...s.layout, layers:
|
|
1448
|
+
const o = [...s.layout.layers];
|
|
1449
|
+
[o[r], o[r - 1]] = [o[r - 1], o[r]], o.forEach((n, l) => {
|
|
1450
|
+
n.zIndex = l;
|
|
1451
|
+
}), f({ layout: { ...s.layout, layers: o } });
|
|
1452
1452
|
}
|
|
1453
|
-
},
|
|
1453
|
+
}, Z = () => {
|
|
1454
1454
|
const a = {
|
|
1455
|
-
name: `Scene ${
|
|
1455
|
+
name: `Scene ${I.length + 1}`,
|
|
1456
1456
|
canvas: { ...s.layout.canvas },
|
|
1457
1457
|
layers: []
|
|
1458
1458
|
};
|
|
1459
|
-
_([...
|
|
1460
|
-
},
|
|
1461
|
-
const r = [...
|
|
1462
|
-
r[
|
|
1463
|
-
},
|
|
1459
|
+
_([...I, a]);
|
|
1460
|
+
}, J = (a) => {
|
|
1461
|
+
const r = [...I];
|
|
1462
|
+
r[L] = s.layout, _(r), ee(a), f({ layout: I[a] });
|
|
1463
|
+
}, X = async () => {
|
|
1464
1464
|
try {
|
|
1465
1465
|
f({
|
|
1466
1466
|
destinations: s.destinations.map(
|
|
@@ -1470,18 +1470,18 @@ const ve = {
|
|
|
1470
1470
|
destinations: s.destinations.map(
|
|
1471
1471
|
(a) => a.enabled ? { ...a, status: "live" } : a
|
|
1472
1472
|
)
|
|
1473
|
-
}), k(!0), g.current = Date.now(),
|
|
1473
|
+
}), k(!0), g.current = Date.now(), P == null || P(), S.current = setInterval(() => {
|
|
1474
1474
|
const a = {
|
|
1475
1475
|
duration: (Date.now() - g.current) / 1e3,
|
|
1476
|
-
viewers: Math.floor(Math.random() * 100) +
|
|
1477
|
-
peakViewers: Math.max(
|
|
1476
|
+
viewers: Math.floor(Math.random() * 100) + y.viewers,
|
|
1477
|
+
peakViewers: Math.max(y.peakViewers, y.viewers),
|
|
1478
1478
|
bitrate: s.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
|
|
1479
1479
|
fps: s.settings.video.frameRate - Math.random() * 2,
|
|
1480
|
-
droppedFrames:
|
|
1480
|
+
droppedFrames: y.droppedFrames + (Math.random() > 0.95 ? 1 : 0),
|
|
1481
1481
|
cpuUsage: 15 + Math.random() * 30,
|
|
1482
1482
|
memoryUsage: 40 + Math.random() * 20
|
|
1483
1483
|
};
|
|
1484
|
-
|
|
1484
|
+
D(a), V == null || V(a);
|
|
1485
1485
|
}, 1e3);
|
|
1486
1486
|
} catch (a) {
|
|
1487
1487
|
T == null || T(a instanceof Error ? a : new Error("Failed to start stream")), f({
|
|
@@ -1491,14 +1491,14 @@ const ve = {
|
|
|
1491
1491
|
}))
|
|
1492
1492
|
});
|
|
1493
1493
|
}
|
|
1494
|
-
},
|
|
1494
|
+
}, q = () => {
|
|
1495
1495
|
S.current && clearInterval(S.current), f({
|
|
1496
1496
|
destinations: s.destinations.map((a) => ({ ...a, status: "idle" }))
|
|
1497
|
-
}), k(!1),
|
|
1498
|
-
}, ie = (a) => {
|
|
1499
|
-
const r = Math.floor(a / 3600), l = Math.floor(a % 3600 / 60), n = Math.floor(a % 60);
|
|
1500
|
-
return `${r.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
|
|
1497
|
+
}), k(!1), F == null || F();
|
|
1501
1498
|
}, ne = (a) => {
|
|
1499
|
+
const r = Math.floor(a / 3600), o = Math.floor(a % 3600 / 60), n = Math.floor(a % 60);
|
|
1500
|
+
return `${r.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
|
|
1501
|
+
}, se = (a) => {
|
|
1502
1502
|
switch (a) {
|
|
1503
1503
|
case "live":
|
|
1504
1504
|
return "var(--nice-success, #00ff00)";
|
|
@@ -1527,35 +1527,35 @@ const ve = {
|
|
|
1527
1527
|
" LIVE"
|
|
1528
1528
|
] })
|
|
1529
1529
|
] }),
|
|
1530
|
-
/* @__PURE__ */ e("div", { className: "header__stats", children: h && /* @__PURE__ */ t(
|
|
1530
|
+
/* @__PURE__ */ e("div", { className: "header__stats", children: h && /* @__PURE__ */ t(le, { children: [
|
|
1531
1531
|
/* @__PURE__ */ t("span", { className: "stat-item", children: [
|
|
1532
1532
|
/* @__PURE__ */ e(u, { name: "clock", size: 14 }),
|
|
1533
1533
|
" ",
|
|
1534
|
-
|
|
1534
|
+
ne(y.duration)
|
|
1535
1535
|
] }),
|
|
1536
1536
|
/* @__PURE__ */ t("span", { className: "stat-item", children: [
|
|
1537
1537
|
/* @__PURE__ */ e(u, { name: "users", size: 14 }),
|
|
1538
1538
|
" ",
|
|
1539
|
-
|
|
1539
|
+
y.viewers
|
|
1540
1540
|
] }),
|
|
1541
1541
|
/* @__PURE__ */ t("span", { className: "stat-item", children: [
|
|
1542
1542
|
/* @__PURE__ */ e(u, { name: "bar-chart", size: 14 }),
|
|
1543
1543
|
" ",
|
|
1544
|
-
Math.round(
|
|
1544
|
+
Math.round(y.bitrate),
|
|
1545
1545
|
" kbps"
|
|
1546
1546
|
] }),
|
|
1547
1547
|
/* @__PURE__ */ t("span", { className: "stat-item", children: [
|
|
1548
1548
|
/* @__PURE__ */ e(u, { name: "video", size: 14 }),
|
|
1549
1549
|
" ",
|
|
1550
|
-
|
|
1550
|
+
y.fps.toFixed(1),
|
|
1551
1551
|
" fps"
|
|
1552
1552
|
] })
|
|
1553
1553
|
] }) }),
|
|
1554
|
-
/* @__PURE__ */ e("div", { className: "header__actions", children: h ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick:
|
|
1554
|
+
/* @__PURE__ */ e("div", { className: "header__actions", children: h ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick: q, children: "End Stream" }) : /* @__PURE__ */ e(
|
|
1555
1555
|
"button",
|
|
1556
1556
|
{
|
|
1557
1557
|
className: "action-button action-button--go-live",
|
|
1558
|
-
onClick:
|
|
1558
|
+
onClick: X,
|
|
1559
1559
|
disabled: s.destinations.filter((a) => a.enabled).length === 0,
|
|
1560
1560
|
children: "Go Live"
|
|
1561
1561
|
}
|
|
@@ -1564,28 +1564,28 @@ const ve = {
|
|
|
1564
1564
|
/* @__PURE__ */ t("div", { className: "streaming__main", children: [
|
|
1565
1565
|
/* @__PURE__ */ t("div", { className: "streaming__preview", children: [
|
|
1566
1566
|
/* @__PURE__ */ t("div", { className: "scenes-bar", children: [
|
|
1567
|
-
|
|
1567
|
+
I.map((a, r) => /* @__PURE__ */ e(
|
|
1568
1568
|
"button",
|
|
1569
1569
|
{
|
|
1570
|
-
className: `scene-button ${
|
|
1571
|
-
onClick: () =>
|
|
1570
|
+
className: `scene-button ${L === r ? "scene-button--active" : ""}`,
|
|
1571
|
+
onClick: () => J(r),
|
|
1572
1572
|
children: a.name
|
|
1573
1573
|
},
|
|
1574
1574
|
r
|
|
1575
1575
|
)),
|
|
1576
|
-
/* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick:
|
|
1576
|
+
/* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick: Z, children: "+" })
|
|
1577
1577
|
] }),
|
|
1578
1578
|
/* @__PURE__ */ e(
|
|
1579
1579
|
"div",
|
|
1580
1580
|
{
|
|
1581
|
-
ref:
|
|
1581
|
+
ref: ae,
|
|
1582
1582
|
className: "preview-canvas",
|
|
1583
1583
|
style: {
|
|
1584
1584
|
aspectRatio: `${s.layout.canvas.width}/${s.layout.canvas.height}`,
|
|
1585
1585
|
backgroundColor: s.layout.canvas.backgroundColor
|
|
1586
1586
|
},
|
|
1587
1587
|
children: s.layout.layers.sort((a, r) => a.zIndex - r.zIndex).map((a) => {
|
|
1588
|
-
var
|
|
1588
|
+
var o;
|
|
1589
1589
|
const r = s.sources.find((n) => n.id === a.sourceId);
|
|
1590
1590
|
return !a.visible || !r ? null : /* @__PURE__ */ e(
|
|
1591
1591
|
"div",
|
|
@@ -1599,12 +1599,12 @@ const ve = {
|
|
|
1599
1599
|
opacity: a.opacity,
|
|
1600
1600
|
zIndex: a.zIndex
|
|
1601
1601
|
},
|
|
1602
|
-
onClick: () =>
|
|
1602
|
+
onClick: () => O(a.id),
|
|
1603
1603
|
children: /* @__PURE__ */ t("div", { className: "layer-content", children: [
|
|
1604
1604
|
/* @__PURE__ */ e("span", { className: "layer-icon", children: /* @__PURE__ */ e(
|
|
1605
1605
|
u,
|
|
1606
1606
|
{
|
|
1607
|
-
name: ((
|
|
1607
|
+
name: ((o = re.find((n) => n.type === r.type)) == null ? void 0 : o.icon) ?? "box",
|
|
1608
1608
|
size: 16
|
|
1609
1609
|
}
|
|
1610
1610
|
) }),
|
|
@@ -1621,14 +1621,14 @@ const ve = {
|
|
|
1621
1621
|
/* @__PURE__ */ e("div", { className: "panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((a) => /* @__PURE__ */ e(
|
|
1622
1622
|
"button",
|
|
1623
1623
|
{
|
|
1624
|
-
className: `panel-tab ${
|
|
1625
|
-
onClick: () =>
|
|
1624
|
+
className: `panel-tab ${N === a ? "panel-tab--active" : ""}`,
|
|
1625
|
+
onClick: () => H(a),
|
|
1626
1626
|
children: a.charAt(0).toUpperCase() + a.slice(1)
|
|
1627
1627
|
},
|
|
1628
1628
|
a
|
|
1629
1629
|
)) }),
|
|
1630
1630
|
/* @__PURE__ */ t("div", { className: "panel-content", children: [
|
|
1631
|
-
|
|
1631
|
+
N === "sources" && /* @__PURE__ */ t("div", { className: "sources-panel", children: [
|
|
1632
1632
|
/* @__PURE__ */ t("div", { className: "panel-header", children: [
|
|
1633
1633
|
/* @__PURE__ */ e("h3", { children: "Sources" }),
|
|
1634
1634
|
/* @__PURE__ */ e(
|
|
@@ -1642,18 +1642,18 @@ const ve = {
|
|
|
1642
1642
|
)
|
|
1643
1643
|
] }),
|
|
1644
1644
|
/* @__PURE__ */ e("div", { className: "sources-list", children: s.sources.filter((a) => a.type !== "microphone" && a.type !== "system-audio").map((a) => {
|
|
1645
|
-
var
|
|
1645
|
+
var o;
|
|
1646
1646
|
const r = s.layout.layers.find((n) => n.sourceId === a.id);
|
|
1647
1647
|
return /* @__PURE__ */ t(
|
|
1648
1648
|
"div",
|
|
1649
1649
|
{
|
|
1650
1650
|
className: `source-item ${w === (r == null ? void 0 : r.id) ? "source-item--selected" : ""}`,
|
|
1651
|
-
onClick: () => r &&
|
|
1651
|
+
onClick: () => r && O(r.id),
|
|
1652
1652
|
children: [
|
|
1653
1653
|
/* @__PURE__ */ e("span", { className: "source-icon", children: /* @__PURE__ */ e(
|
|
1654
1654
|
u,
|
|
1655
1655
|
{
|
|
1656
|
-
name: ((
|
|
1656
|
+
name: ((o = re.find((n) => n.type === a.type)) == null ? void 0 : o.icon) ?? "box",
|
|
1657
1657
|
size: 16
|
|
1658
1658
|
}
|
|
1659
1659
|
) }),
|
|
@@ -1664,7 +1664,7 @@ const ve = {
|
|
|
1664
1664
|
{
|
|
1665
1665
|
className: r != null && r.visible ? "" : "inactive",
|
|
1666
1666
|
onClick: (n) => {
|
|
1667
|
-
n.stopPropagation(), r &&
|
|
1667
|
+
n.stopPropagation(), r && E(r.id, { visible: !r.visible });
|
|
1668
1668
|
},
|
|
1669
1669
|
children: /* @__PURE__ */ e(u, { name: r != null && r.visible ? "eye" : "eye-off", size: 14 })
|
|
1670
1670
|
}
|
|
@@ -1673,7 +1673,7 @@ const ve = {
|
|
|
1673
1673
|
"button",
|
|
1674
1674
|
{
|
|
1675
1675
|
onClick: (n) => {
|
|
1676
|
-
n.stopPropagation(), r &&
|
|
1676
|
+
n.stopPropagation(), r && te(r.id);
|
|
1677
1677
|
},
|
|
1678
1678
|
children: /* @__PURE__ */ e(u, { name: "arrow-up", size: 14 })
|
|
1679
1679
|
}
|
|
@@ -1682,7 +1682,7 @@ const ve = {
|
|
|
1682
1682
|
"button",
|
|
1683
1683
|
{
|
|
1684
1684
|
onClick: (n) => {
|
|
1685
|
-
n.stopPropagation(), r &&
|
|
1685
|
+
n.stopPropagation(), r && ie(r.id);
|
|
1686
1686
|
},
|
|
1687
1687
|
children: /* @__PURE__ */ e(u, { name: "arrow-down", size: 14 })
|
|
1688
1688
|
}
|
|
@@ -1691,7 +1691,7 @@ const ve = {
|
|
|
1691
1691
|
"button",
|
|
1692
1692
|
{
|
|
1693
1693
|
onClick: (n) => {
|
|
1694
|
-
n.stopPropagation(),
|
|
1694
|
+
n.stopPropagation(), Y(a.id);
|
|
1695
1695
|
},
|
|
1696
1696
|
disabled: h,
|
|
1697
1697
|
children: /* @__PURE__ */ e(u, { name: "trash", size: 14 })
|
|
@@ -1707,7 +1707,7 @@ const ve = {
|
|
|
1707
1707
|
/* @__PURE__ */ e("h4", { children: "Properties" }),
|
|
1708
1708
|
(() => {
|
|
1709
1709
|
const a = s.layout.layers.find((r) => r.id === w);
|
|
1710
|
-
return a ? /* @__PURE__ */ t(
|
|
1710
|
+
return a ? /* @__PURE__ */ t(le, { children: [
|
|
1711
1711
|
/* @__PURE__ */ t("label", { children: [
|
|
1712
1712
|
"X Position",
|
|
1713
1713
|
/* @__PURE__ */ e(
|
|
@@ -1715,7 +1715,7 @@ const ve = {
|
|
|
1715
1715
|
{
|
|
1716
1716
|
type: "number",
|
|
1717
1717
|
value: a.position.x,
|
|
1718
|
-
onChange: (r) =>
|
|
1718
|
+
onChange: (r) => E(a.id, {
|
|
1719
1719
|
position: { ...a.position, x: parseInt(r.target.value) || 0 }
|
|
1720
1720
|
})
|
|
1721
1721
|
}
|
|
@@ -1728,7 +1728,7 @@ const ve = {
|
|
|
1728
1728
|
{
|
|
1729
1729
|
type: "number",
|
|
1730
1730
|
value: a.position.y,
|
|
1731
|
-
onChange: (r) =>
|
|
1731
|
+
onChange: (r) => E(a.id, {
|
|
1732
1732
|
position: { ...a.position, y: parseInt(r.target.value) || 0 }
|
|
1733
1733
|
})
|
|
1734
1734
|
}
|
|
@@ -1741,7 +1741,7 @@ const ve = {
|
|
|
1741
1741
|
{
|
|
1742
1742
|
type: "number",
|
|
1743
1743
|
value: a.size.width,
|
|
1744
|
-
onChange: (r) =>
|
|
1744
|
+
onChange: (r) => E(a.id, {
|
|
1745
1745
|
size: { ...a.size, width: parseInt(r.target.value) || 100 }
|
|
1746
1746
|
})
|
|
1747
1747
|
}
|
|
@@ -1754,7 +1754,7 @@ const ve = {
|
|
|
1754
1754
|
{
|
|
1755
1755
|
type: "number",
|
|
1756
1756
|
value: a.size.height,
|
|
1757
|
-
onChange: (r) =>
|
|
1757
|
+
onChange: (r) => E(a.id, {
|
|
1758
1758
|
size: { ...a.size, height: parseInt(r.target.value) || 100 }
|
|
1759
1759
|
})
|
|
1760
1760
|
}
|
|
@@ -1770,7 +1770,7 @@ const ve = {
|
|
|
1770
1770
|
max: "1",
|
|
1771
1771
|
step: "0.1",
|
|
1772
1772
|
value: a.opacity,
|
|
1773
|
-
onChange: (r) =>
|
|
1773
|
+
onChange: (r) => E(a.id, {
|
|
1774
1774
|
opacity: parseFloat(r.target.value)
|
|
1775
1775
|
})
|
|
1776
1776
|
}
|
|
@@ -1780,7 +1780,7 @@ const ve = {
|
|
|
1780
1780
|
})()
|
|
1781
1781
|
] })
|
|
1782
1782
|
] }),
|
|
1783
|
-
|
|
1783
|
+
N === "audio" && /* @__PURE__ */ t("div", { className: "audio-panel", children: [
|
|
1784
1784
|
/* @__PURE__ */ t("div", { className: "panel-header", children: [
|
|
1785
1785
|
/* @__PURE__ */ e("h3", { children: "Audio Mixer" }),
|
|
1786
1786
|
/* @__PURE__ */ e(
|
|
@@ -1805,7 +1805,7 @@ const ve = {
|
|
|
1805
1805
|
/* @__PURE__ */ e("span", { className: "audio-icon", children: /* @__PURE__ */ e(
|
|
1806
1806
|
u,
|
|
1807
1807
|
{
|
|
1808
|
-
name: ((r =
|
|
1808
|
+
name: ((r = re.find((o) => o.type === a.type)) == null ? void 0 : r.icon) ?? "box",
|
|
1809
1809
|
size: 16
|
|
1810
1810
|
}
|
|
1811
1811
|
) }),
|
|
@@ -1828,7 +1828,7 @@ const ve = {
|
|
|
1828
1828
|
max: "1",
|
|
1829
1829
|
step: "0.01",
|
|
1830
1830
|
value: a.volume ?? 1,
|
|
1831
|
-
onChange: (
|
|
1831
|
+
onChange: (o) => x(a.id, { volume: parseFloat(o.target.value) }),
|
|
1832
1832
|
disabled: a.muted
|
|
1833
1833
|
}
|
|
1834
1834
|
),
|
|
@@ -1851,14 +1851,14 @@ const ve = {
|
|
|
1851
1851
|
).length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No audio sources added" })
|
|
1852
1852
|
] })
|
|
1853
1853
|
] }),
|
|
1854
|
-
|
|
1854
|
+
N === "destinations" && /* @__PURE__ */ t("div", { className: "destinations-panel", children: [
|
|
1855
1855
|
/* @__PURE__ */ t("div", { className: "panel-header", children: [
|
|
1856
1856
|
/* @__PURE__ */ e("h3", { children: "Destinations" }),
|
|
1857
1857
|
/* @__PURE__ */ e(
|
|
1858
1858
|
"button",
|
|
1859
1859
|
{
|
|
1860
1860
|
className: "add-button",
|
|
1861
|
-
onClick: () =>
|
|
1861
|
+
onClick: () => K(!0),
|
|
1862
1862
|
disabled: h,
|
|
1863
1863
|
children: "+ Add"
|
|
1864
1864
|
}
|
|
@@ -1873,13 +1873,13 @@ const ve = {
|
|
|
1873
1873
|
"span",
|
|
1874
1874
|
{
|
|
1875
1875
|
className: "status-indicator",
|
|
1876
|
-
style: { backgroundColor:
|
|
1876
|
+
style: { backgroundColor: se(a.status) }
|
|
1877
1877
|
}
|
|
1878
1878
|
),
|
|
1879
1879
|
/* @__PURE__ */ e("span", { className: "destination-icon", children: /* @__PURE__ */ e(
|
|
1880
1880
|
u,
|
|
1881
1881
|
{
|
|
1882
|
-
name: ((r =
|
|
1882
|
+
name: ((r = ce.find((o) => o.platform === a.platform)) == null ? void 0 : r.icon) ?? "link",
|
|
1883
1883
|
size: 16
|
|
1884
1884
|
}
|
|
1885
1885
|
) }),
|
|
@@ -1890,7 +1890,7 @@ const ve = {
|
|
|
1890
1890
|
{
|
|
1891
1891
|
type: "checkbox",
|
|
1892
1892
|
checked: a.enabled,
|
|
1893
|
-
onChange: (
|
|
1893
|
+
onChange: (o) => G(a.id, { enabled: o.target.checked }),
|
|
1894
1894
|
disabled: h
|
|
1895
1895
|
}
|
|
1896
1896
|
),
|
|
@@ -1905,7 +1905,7 @@ const ve = {
|
|
|
1905
1905
|
{
|
|
1906
1906
|
type: "text",
|
|
1907
1907
|
value: a.url,
|
|
1908
|
-
onChange: (
|
|
1908
|
+
onChange: (o) => G(a.id, { url: o.target.value }),
|
|
1909
1909
|
placeholder: "rtmp://...",
|
|
1910
1910
|
disabled: h
|
|
1911
1911
|
}
|
|
@@ -1918,7 +1918,7 @@ const ve = {
|
|
|
1918
1918
|
{
|
|
1919
1919
|
type: "password",
|
|
1920
1920
|
value: a.streamKey || "",
|
|
1921
|
-
onChange: (
|
|
1921
|
+
onChange: (o) => G(a.id, { streamKey: o.target.value }),
|
|
1922
1922
|
placeholder: "Enter stream key",
|
|
1923
1923
|
disabled: h
|
|
1924
1924
|
}
|
|
@@ -1929,7 +1929,7 @@ const ve = {
|
|
|
1929
1929
|
"button",
|
|
1930
1930
|
{
|
|
1931
1931
|
className: "remove-button",
|
|
1932
|
-
onClick: () =>
|
|
1932
|
+
onClick: () => W(a.id),
|
|
1933
1933
|
disabled: h,
|
|
1934
1934
|
children: "Remove"
|
|
1935
1935
|
}
|
|
@@ -1939,7 +1939,7 @@ const ve = {
|
|
|
1939
1939
|
s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No destinations configured" })
|
|
1940
1940
|
] })
|
|
1941
1941
|
] }),
|
|
1942
|
-
|
|
1942
|
+
N === "settings" && /* @__PURE__ */ t("div", { className: "settings-panel", children: [
|
|
1943
1943
|
/* @__PURE__ */ t("div", { className: "setting-section", children: [
|
|
1944
1944
|
/* @__PURE__ */ e("h4", { children: "Video" }),
|
|
1945
1945
|
/* @__PURE__ */ t("label", { children: [
|
|
@@ -1949,15 +1949,15 @@ const ve = {
|
|
|
1949
1949
|
{
|
|
1950
1950
|
value: `${s.settings.video.resolution.width}x${s.settings.video.resolution.height}`,
|
|
1951
1951
|
onChange: (a) => {
|
|
1952
|
-
const [r,
|
|
1952
|
+
const [r, o] = a.target.value.split("x").map(Number);
|
|
1953
1953
|
f({
|
|
1954
1954
|
settings: {
|
|
1955
1955
|
...s.settings,
|
|
1956
|
-
video: { ...s.settings.video, resolution: { width: r, height:
|
|
1956
|
+
video: { ...s.settings.video, resolution: { width: r, height: o } }
|
|
1957
1957
|
},
|
|
1958
1958
|
layout: {
|
|
1959
1959
|
...s.layout,
|
|
1960
|
-
canvas: { ...s.layout.canvas, width: r, height:
|
|
1960
|
+
canvas: { ...s.layout.canvas, width: r, height: o }
|
|
1961
1961
|
}
|
|
1962
1962
|
});
|
|
1963
1963
|
},
|
|
@@ -2095,27 +2095,27 @@ const ve = {
|
|
|
2095
2095
|
/* @__PURE__ */ t("span", { className: "stat", children: [
|
|
2096
2096
|
/* @__PURE__ */ e("label", { children: "CPU" }),
|
|
2097
2097
|
/* @__PURE__ */ t("span", { className: "value", children: [
|
|
2098
|
-
|
|
2098
|
+
y.cpuUsage.toFixed(1),
|
|
2099
2099
|
"%"
|
|
2100
2100
|
] })
|
|
2101
2101
|
] }),
|
|
2102
2102
|
/* @__PURE__ */ t("span", { className: "stat", children: [
|
|
2103
2103
|
/* @__PURE__ */ e("label", { children: "Memory" }),
|
|
2104
2104
|
/* @__PURE__ */ t("span", { className: "value", children: [
|
|
2105
|
-
|
|
2105
|
+
y.memoryUsage.toFixed(1),
|
|
2106
2106
|
"%"
|
|
2107
2107
|
] })
|
|
2108
2108
|
] }),
|
|
2109
2109
|
/* @__PURE__ */ t("span", { className: "stat", children: [
|
|
2110
2110
|
/* @__PURE__ */ e("label", { children: "Dropped" }),
|
|
2111
|
-
/* @__PURE__ */ e("span", { className: "value", children:
|
|
2111
|
+
/* @__PURE__ */ e("span", { className: "value", children: y.droppedFrames })
|
|
2112
2112
|
] }),
|
|
2113
2113
|
/* @__PURE__ */ t("span", { className: "stat", children: [
|
|
2114
2114
|
/* @__PURE__ */ e("label", { children: "Peak Viewers" }),
|
|
2115
|
-
/* @__PURE__ */ e("span", { className: "value", children:
|
|
2115
|
+
/* @__PURE__ */ e("span", { className: "value", children: y.peakViewers })
|
|
2116
2116
|
] })
|
|
2117
2117
|
] }) }),
|
|
2118
|
-
|
|
2118
|
+
B && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ t("div", { className: "modal", children: [
|
|
2119
2119
|
/* @__PURE__ */ t("div", { className: "modal-header", children: [
|
|
2120
2120
|
/* @__PURE__ */ e("h3", { children: "Add Source" }),
|
|
2121
2121
|
/* @__PURE__ */ e(
|
|
@@ -2128,11 +2128,11 @@ const ve = {
|
|
|
2128
2128
|
}
|
|
2129
2129
|
)
|
|
2130
2130
|
] }),
|
|
2131
|
-
/* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children:
|
|
2131
|
+
/* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children: re.map((a) => /* @__PURE__ */ t(
|
|
2132
2132
|
"button",
|
|
2133
2133
|
{
|
|
2134
2134
|
className: "source-type-button",
|
|
2135
|
-
onClick: () =>
|
|
2135
|
+
onClick: () => Q(a.type),
|
|
2136
2136
|
children: [
|
|
2137
2137
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: a.icon, size: 24 }) }),
|
|
2138
2138
|
/* @__PURE__ */ e("span", { className: "name", children: a.name })
|
|
@@ -2141,7 +2141,7 @@ const ve = {
|
|
|
2141
2141
|
a.type
|
|
2142
2142
|
)) }) })
|
|
2143
2143
|
] }) }),
|
|
2144
|
-
|
|
2144
|
+
j && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ t("div", { className: "modal", children: [
|
|
2145
2145
|
/* @__PURE__ */ t("div", { className: "modal-header", children: [
|
|
2146
2146
|
/* @__PURE__ */ e("h3", { children: "Add Destination" }),
|
|
2147
2147
|
/* @__PURE__ */ e(
|
|
@@ -2149,16 +2149,16 @@ const ve = {
|
|
|
2149
2149
|
{
|
|
2150
2150
|
"aria-label": "Close",
|
|
2151
2151
|
className: "close-button",
|
|
2152
|
-
onClick: () =>
|
|
2152
|
+
onClick: () => K(!1),
|
|
2153
2153
|
children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
|
|
2154
2154
|
}
|
|
2155
2155
|
)
|
|
2156
2156
|
] }),
|
|
2157
|
-
/* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children:
|
|
2157
|
+
/* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children: ce.map((a) => /* @__PURE__ */ t(
|
|
2158
2158
|
"button",
|
|
2159
2159
|
{
|
|
2160
2160
|
className: "platform-button",
|
|
2161
|
-
onClick: () =>
|
|
2161
|
+
onClick: () => U(a.platform),
|
|
2162
2162
|
children: [
|
|
2163
2163
|
/* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: a.icon, size: 24 }) }),
|
|
2164
2164
|
/* @__PURE__ */ e("span", { className: "name", children: a.name })
|
|
@@ -2170,7 +2170,7 @@ const ve = {
|
|
|
2170
2170
|
] });
|
|
2171
2171
|
};
|
|
2172
2172
|
export {
|
|
2173
|
-
|
|
2173
|
+
_e as NiceLiveStreaming,
|
|
2174
2174
|
Ie as NiceScreenRecorder,
|
|
2175
|
-
|
|
2175
|
+
ze as NiceVideoEditor
|
|
2176
2176
|
};
|