@nice2dev/ui-video 1.2.1 → 1.2.2
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 +633 -623
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as t, jsx as e, Fragment as
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as ce } from "react/jsx-runtime";
|
|
2
2
|
import { NiceAppShell as pe } from "@nice2dev/ui";
|
|
3
|
-
import { useNiceTranslation as me, NiceIcon as m, NiceTutorialButton as _e, resolveTutorial as ge, createId as
|
|
4
|
-
import { useState as
|
|
3
|
+
import { useNiceTranslation as me, NiceIcon as m, NiceTutorialButton as _e, resolveTutorial as ge, createId as M } from "@nice2dev/ui-core";
|
|
4
|
+
import { useState as f, useRef as I, useEffect as le, useCallback as ue } from "react";
|
|
5
5
|
const fe = {
|
|
6
|
-
id:
|
|
6
|
+
id: M(),
|
|
7
7
|
name: "Untitled Project",
|
|
8
8
|
resolution: { width: 1920, height: 1080, label: "1080p" },
|
|
9
9
|
frameRate: 30,
|
|
@@ -62,72 +62,72 @@ const fe = {
|
|
|
62
62
|
placement: "auto"
|
|
63
63
|
}
|
|
64
64
|
], ze = ({
|
|
65
|
-
project:
|
|
65
|
+
project: $,
|
|
66
66
|
onProjectChange: R,
|
|
67
67
|
onExport: F,
|
|
68
68
|
onAssetUpload: L,
|
|
69
69
|
className: O = "",
|
|
70
|
-
tutorial:
|
|
70
|
+
tutorial: T
|
|
71
71
|
}) => {
|
|
72
|
-
const { t:
|
|
72
|
+
const { t: u } = me(), [n, s] = f($ || fe), [A, y] = f(
|
|
73
73
|
"timeline"
|
|
74
|
-
), [
|
|
74
|
+
), [q, h] = f(null), [k, N] = f(null), [D, w] = f(0), [B, K] = f(!1), [S, G] = f(1), [W, z] = f(!0), [E, U] = f(null), ie = I(null), te = I(null), x = I(null);
|
|
75
75
|
le(() => {
|
|
76
|
-
|
|
77
|
-
}, [
|
|
76
|
+
$ && s($);
|
|
77
|
+
}, [$]), le(() => () => {
|
|
78
78
|
x.current && clearInterval(x.current);
|
|
79
79
|
}, []);
|
|
80
|
-
const
|
|
81
|
-
(
|
|
82
|
-
const
|
|
83
|
-
s(
|
|
80
|
+
const b = ue(
|
|
81
|
+
(r) => {
|
|
82
|
+
const c = { ...n, ...r };
|
|
83
|
+
s(c), R == null || R(c);
|
|
84
84
|
},
|
|
85
|
-
[
|
|
86
|
-
),
|
|
87
|
-
const
|
|
88
|
-
for (const
|
|
89
|
-
const d =
|
|
90
|
-
let
|
|
91
|
-
L ?
|
|
92
|
-
id:
|
|
85
|
+
[n, R]
|
|
86
|
+
), g = async (r) => {
|
|
87
|
+
const c = [];
|
|
88
|
+
for (const a of Array.from(r)) {
|
|
89
|
+
const d = a.type.startsWith("video/") ? "video" : a.type.startsWith("audio/") ? "audio" : "image";
|
|
90
|
+
let v;
|
|
91
|
+
L ? v = await L(a) : v = {
|
|
92
|
+
id: M(),
|
|
93
93
|
type: d,
|
|
94
|
-
name:
|
|
95
|
-
url: URL.createObjectURL(
|
|
96
|
-
size:
|
|
97
|
-
},
|
|
94
|
+
name: a.name,
|
|
95
|
+
url: URL.createObjectURL(a),
|
|
96
|
+
size: a.size
|
|
97
|
+
}, c.push(v);
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
}, V = (
|
|
101
|
-
const
|
|
102
|
-
id:
|
|
103
|
-
type:
|
|
104
|
-
name: `${
|
|
99
|
+
b({ assets: [...n.assets, ...c] });
|
|
100
|
+
}, V = (r) => {
|
|
101
|
+
const c = {
|
|
102
|
+
id: M(),
|
|
103
|
+
type: r,
|
|
104
|
+
name: `${r.charAt(0).toUpperCase() + r.slice(1)} ${n.tracks.filter((a) => a.type === r).length + 1}`,
|
|
105
105
|
items: [],
|
|
106
106
|
muted: !1,
|
|
107
107
|
locked: !1,
|
|
108
108
|
visible: !0
|
|
109
109
|
};
|
|
110
|
-
|
|
111
|
-
}, Y = (
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
tracks:
|
|
110
|
+
b({ tracks: [...n.tracks, c] });
|
|
111
|
+
}, Y = (r) => {
|
|
112
|
+
b({ tracks: n.tracks.filter((c) => c.id !== r) }), q === r && h(null);
|
|
113
|
+
}, H = (r) => {
|
|
114
|
+
b({
|
|
115
|
+
tracks: n.tracks.map((c) => c.id === r ? { ...c, muted: !c.muted } : c)
|
|
116
116
|
});
|
|
117
|
-
}, X = (
|
|
118
|
-
|
|
119
|
-
tracks:
|
|
117
|
+
}, X = (r) => {
|
|
118
|
+
b({
|
|
119
|
+
tracks: n.tracks.map((c) => c.id === r ? { ...c, locked: !c.locked } : c)
|
|
120
120
|
});
|
|
121
|
-
},
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
121
|
+
}, C = (r, c) => {
|
|
122
|
+
const a = n.tracks.find((_) => _.id === r);
|
|
123
|
+
if (!a || a.locked)
|
|
124
124
|
return;
|
|
125
|
-
const d =
|
|
126
|
-
id:
|
|
127
|
-
assetId:
|
|
128
|
-
type:
|
|
129
|
-
startTime:
|
|
130
|
-
duration:
|
|
125
|
+
const d = a.items[a.items.length - 1], v = d ? d.startTime + d.duration : 0, p = {
|
|
126
|
+
id: M(),
|
|
127
|
+
assetId: c.id,
|
|
128
|
+
type: c.type,
|
|
129
|
+
startTime: v,
|
|
130
|
+
duration: c.duration || 5,
|
|
131
131
|
offset: 0,
|
|
132
132
|
properties: {
|
|
133
133
|
x: 0,
|
|
@@ -139,47 +139,47 @@ const fe = {
|
|
|
139
139
|
effects: [],
|
|
140
140
|
transitions: []
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
tracks:
|
|
144
|
-
(
|
|
142
|
+
b({
|
|
143
|
+
tracks: n.tracks.map(
|
|
144
|
+
(_) => _.id === r ? { ..._, items: [..._.items, p] } : _
|
|
145
145
|
)
|
|
146
146
|
});
|
|
147
|
-
}, Z = (
|
|
147
|
+
}, Z = (r, c, a) => {
|
|
148
148
|
const d = {
|
|
149
|
-
id:
|
|
150
|
-
type:
|
|
151
|
-
name:
|
|
152
|
-
parameters: ne(
|
|
149
|
+
id: M(),
|
|
150
|
+
type: a,
|
|
151
|
+
name: a.charAt(0).toUpperCase() + a.slice(1),
|
|
152
|
+
parameters: ne(a)
|
|
153
153
|
};
|
|
154
|
-
|
|
155
|
-
tracks:
|
|
156
|
-
(
|
|
157
|
-
...
|
|
158
|
-
items:
|
|
159
|
-
(
|
|
154
|
+
b({
|
|
155
|
+
tracks: n.tracks.map(
|
|
156
|
+
(v) => v.id === r ? {
|
|
157
|
+
...v,
|
|
158
|
+
items: v.items.map(
|
|
159
|
+
(p) => p.id === c ? { ...p, effects: [...p.effects, d] } : p
|
|
160
160
|
)
|
|
161
|
-
} :
|
|
161
|
+
} : v
|
|
162
162
|
)
|
|
163
163
|
});
|
|
164
|
-
}, P = (
|
|
165
|
-
const
|
|
166
|
-
id:
|
|
167
|
-
type:
|
|
164
|
+
}, P = (r, c, a, d) => {
|
|
165
|
+
const v = {
|
|
166
|
+
id: M(),
|
|
167
|
+
type: a,
|
|
168
168
|
duration: 0.5,
|
|
169
169
|
position: d
|
|
170
170
|
};
|
|
171
|
-
|
|
172
|
-
tracks:
|
|
173
|
-
(
|
|
174
|
-
...
|
|
175
|
-
items:
|
|
176
|
-
(
|
|
171
|
+
b({
|
|
172
|
+
tracks: n.tracks.map(
|
|
173
|
+
(p) => p.id === r ? {
|
|
174
|
+
...p,
|
|
175
|
+
items: p.items.map(
|
|
176
|
+
(_) => _.id === c ? { ..._, transitions: [..._.transitions, v] } : _
|
|
177
177
|
)
|
|
178
|
-
} :
|
|
178
|
+
} : p
|
|
179
179
|
)
|
|
180
180
|
});
|
|
181
|
-
}, ne = (
|
|
182
|
-
switch (
|
|
181
|
+
}, ne = (r) => {
|
|
182
|
+
switch (r) {
|
|
183
183
|
case "blur":
|
|
184
184
|
return { radius: 5 };
|
|
185
185
|
case "brightness":
|
|
@@ -203,102 +203,105 @@ const fe = {
|
|
|
203
203
|
}
|
|
204
204
|
}, ae = () => {
|
|
205
205
|
B ? (x.current && clearInterval(x.current), K(!1)) : (x.current = setInterval(() => {
|
|
206
|
-
w((
|
|
207
|
-
const
|
|
208
|
-
...
|
|
206
|
+
w((r) => {
|
|
207
|
+
const c = Math.max(
|
|
208
|
+
...n.tracks.flatMap((a) => a.items.map((d) => d.startTime + d.duration)),
|
|
209
209
|
0
|
|
210
210
|
);
|
|
211
|
-
return
|
|
211
|
+
return r >= c ? (clearInterval(x.current), K(!1), 0) : r + 1 / n.frameRate;
|
|
212
212
|
});
|
|
213
|
-
}, 1e3 /
|
|
214
|
-
}, J = (
|
|
215
|
-
w(Math.max(0,
|
|
213
|
+
}, 1e3 / n.frameRate), K(!0));
|
|
214
|
+
}, J = (r) => {
|
|
215
|
+
w(Math.max(0, r));
|
|
216
216
|
}, Q = async () => {
|
|
217
217
|
if (F) {
|
|
218
218
|
U(0);
|
|
219
219
|
try {
|
|
220
|
-
const
|
|
221
|
-
U((
|
|
220
|
+
const r = setInterval(() => {
|
|
221
|
+
U((c) => c !== null && c < 90 ? c + Math.random() * 10 : c);
|
|
222
222
|
}, 500);
|
|
223
|
-
await F(
|
|
224
|
-
} catch (
|
|
225
|
-
U(null), console.error("Export failed:",
|
|
223
|
+
await F(n, n.settings.video.codec), clearInterval(r), U(100), setTimeout(() => U(null), 2e3);
|
|
224
|
+
} catch (r) {
|
|
225
|
+
U(null), console.error("Export failed:", r);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
}, ee = (
|
|
229
|
-
const
|
|
230
|
-
return `${
|
|
228
|
+
}, ee = (r) => {
|
|
229
|
+
const c = Math.floor(r / 60), a = Math.floor(r % 60), d = Math.floor(r % 1 * n.frameRate);
|
|
230
|
+
return `${c.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${d.toString().padStart(2, "0")}`;
|
|
231
231
|
}, j = () => {
|
|
232
|
-
for (const
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
return { track:
|
|
232
|
+
for (const r of n.tracks) {
|
|
233
|
+
const c = r.items.find((a) => a.id === k);
|
|
234
|
+
if (c)
|
|
235
|
+
return { track: r, item: c };
|
|
236
236
|
}
|
|
237
237
|
return null;
|
|
238
|
-
},
|
|
238
|
+
}, re = /* @__PURE__ */ t("header", { className: "nice-video-studio__header", children: [
|
|
239
239
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__header-project-info", children: [
|
|
240
240
|
/* @__PURE__ */ e(
|
|
241
241
|
"input",
|
|
242
242
|
{
|
|
243
243
|
type: "text",
|
|
244
|
-
value:
|
|
245
|
-
onChange: (
|
|
244
|
+
value: n.name,
|
|
245
|
+
onChange: (r) => b({ name: r.target.value }),
|
|
246
246
|
className: "nice-video-studio__project-name-input"
|
|
247
247
|
}
|
|
248
248
|
),
|
|
249
249
|
/* @__PURE__ */ t("span", { className: "nice-video-studio__project-settings", children: [
|
|
250
|
-
|
|
250
|
+
n.resolution.width,
|
|
251
251
|
"x",
|
|
252
|
-
|
|
252
|
+
n.resolution.height,
|
|
253
253
|
" • ",
|
|
254
|
-
|
|
254
|
+
n.frameRate,
|
|
255
255
|
"fps"
|
|
256
256
|
] })
|
|
257
257
|
] }),
|
|
258
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__header-tabs", children: ["timeline", "effects", "transitions", "export"].map((
|
|
258
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__header-tabs", children: ["timeline", "effects", "transitions", "export"].map((r) => /* @__PURE__ */ e(
|
|
259
259
|
"button",
|
|
260
260
|
{
|
|
261
|
-
className: `nice-video-studio__tab-button ${A ===
|
|
262
|
-
onClick: () => y(
|
|
263
|
-
children:
|
|
261
|
+
className: `nice-video-studio__tab-button ${A === r ? "nice-video-studio__tab-button--active" : ""}`,
|
|
262
|
+
onClick: () => y(r),
|
|
263
|
+
children: r.charAt(0).toUpperCase() + r.slice(1)
|
|
264
264
|
},
|
|
265
|
-
|
|
265
|
+
r
|
|
266
266
|
)) }),
|
|
267
267
|
/* @__PURE__ */ e("div", { className: "nice-video-studio__header-actions", children: /* @__PURE__ */ e(
|
|
268
268
|
"button",
|
|
269
269
|
{
|
|
270
270
|
className: "nice-video-studio__action-button nice-video-studio__action-button--primary",
|
|
271
271
|
onClick: Q,
|
|
272
|
-
disabled:
|
|
273
|
-
children:
|
|
272
|
+
disabled: E !== null,
|
|
273
|
+
children: E !== null ? u("videoEditor.exporting", "Exporting {exportProgress}%").replace(
|
|
274
|
+
"{exportProgress}",
|
|
275
|
+
String(Math.round(E))
|
|
276
|
+
) : u("videoEditor.export", "Export")
|
|
274
277
|
}
|
|
275
278
|
) })
|
|
276
|
-
] }),
|
|
277
|
-
const
|
|
278
|
-
if (!
|
|
279
|
+
] }), se = k && A !== "export" ? (() => {
|
|
280
|
+
const r = j();
|
|
281
|
+
if (!r)
|
|
279
282
|
return null;
|
|
280
|
-
const { track:
|
|
283
|
+
const { track: c, item: a } = r;
|
|
281
284
|
return /* @__PURE__ */ t("div", { className: "nice-video-studio__item-inspector", children: [
|
|
282
|
-
/* @__PURE__ */ e("h4", { children:
|
|
285
|
+
/* @__PURE__ */ e("h4", { children: u("videoEditor.itemProperties", "Item Properties") }),
|
|
283
286
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__inspector-section", children: [
|
|
284
287
|
/* @__PURE__ */ t("label", { children: [
|
|
285
|
-
|
|
288
|
+
u("videoEditor.startTime", "Start Time"),
|
|
286
289
|
/* @__PURE__ */ e(
|
|
287
290
|
"input",
|
|
288
291
|
{
|
|
289
292
|
type: "number",
|
|
290
293
|
step: "0.1",
|
|
291
|
-
value:
|
|
294
|
+
value: a.startTime,
|
|
292
295
|
onChange: (d) => {
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
tracks:
|
|
296
|
-
(
|
|
297
|
-
...
|
|
298
|
-
items:
|
|
299
|
-
(
|
|
296
|
+
const v = parseFloat(d.target.value);
|
|
297
|
+
b({
|
|
298
|
+
tracks: n.tracks.map(
|
|
299
|
+
(p) => p.id === c.id ? {
|
|
300
|
+
...p,
|
|
301
|
+
items: p.items.map(
|
|
302
|
+
(_) => _.id === a.id ? { ..._, startTime: v } : _
|
|
300
303
|
)
|
|
301
|
-
} :
|
|
304
|
+
} : p
|
|
302
305
|
)
|
|
303
306
|
});
|
|
304
307
|
}
|
|
@@ -306,23 +309,23 @@ const fe = {
|
|
|
306
309
|
)
|
|
307
310
|
] }),
|
|
308
311
|
/* @__PURE__ */ t("label", { children: [
|
|
309
|
-
|
|
312
|
+
u("videoEditor.duration", "Duration"),
|
|
310
313
|
/* @__PURE__ */ e(
|
|
311
314
|
"input",
|
|
312
315
|
{
|
|
313
316
|
type: "number",
|
|
314
317
|
step: "0.1",
|
|
315
|
-
value:
|
|
318
|
+
value: a.duration,
|
|
316
319
|
onChange: (d) => {
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
tracks:
|
|
320
|
-
(
|
|
321
|
-
...
|
|
322
|
-
items:
|
|
323
|
-
(
|
|
320
|
+
const v = parseFloat(d.target.value);
|
|
321
|
+
b({
|
|
322
|
+
tracks: n.tracks.map(
|
|
323
|
+
(p) => p.id === c.id ? {
|
|
324
|
+
...p,
|
|
325
|
+
items: p.items.map(
|
|
326
|
+
(_) => _.id === a.id ? { ..._, duration: v } : _
|
|
324
327
|
)
|
|
325
|
-
} :
|
|
328
|
+
} : p
|
|
326
329
|
)
|
|
327
330
|
});
|
|
328
331
|
}
|
|
@@ -330,7 +333,7 @@ const fe = {
|
|
|
330
333
|
)
|
|
331
334
|
] }),
|
|
332
335
|
/* @__PURE__ */ t("label", { children: [
|
|
333
|
-
|
|
336
|
+
u("videoEditor.opacity", "Opacity"),
|
|
334
337
|
/* @__PURE__ */ e(
|
|
335
338
|
"input",
|
|
336
339
|
{
|
|
@@ -338,20 +341,20 @@ const fe = {
|
|
|
338
341
|
min: "0",
|
|
339
342
|
max: "1",
|
|
340
343
|
step: "0.1",
|
|
341
|
-
value:
|
|
344
|
+
value: a.properties.opacity ?? 1,
|
|
342
345
|
onChange: (d) => {
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
tracks:
|
|
346
|
-
(
|
|
347
|
-
...
|
|
348
|
-
items:
|
|
349
|
-
(
|
|
350
|
-
...
|
|
351
|
-
properties: { ...
|
|
352
|
-
} :
|
|
346
|
+
const v = parseFloat(d.target.value);
|
|
347
|
+
b({
|
|
348
|
+
tracks: n.tracks.map(
|
|
349
|
+
(p) => p.id === c.id ? {
|
|
350
|
+
...p,
|
|
351
|
+
items: p.items.map(
|
|
352
|
+
(_) => _.id === a.id ? {
|
|
353
|
+
..._,
|
|
354
|
+
properties: { ..._.properties, opacity: v }
|
|
355
|
+
} : _
|
|
353
356
|
)
|
|
354
|
-
} :
|
|
357
|
+
} : p
|
|
355
358
|
)
|
|
356
359
|
});
|
|
357
360
|
}
|
|
@@ -359,20 +362,19 @@ const fe = {
|
|
|
359
362
|
)
|
|
360
363
|
] })
|
|
361
364
|
] }),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
"
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__effects-list", children: n.effects.map((d) => /* @__PURE__ */ e("div", { className: "nice-video-studio__effect-badge", children: d.name }, d.id)) })
|
|
365
|
+
/* @__PURE__ */ e("h4", { children: u("videoEditor.effects", "Effects ({effects})").replace(
|
|
366
|
+
"{effects}",
|
|
367
|
+
String(a.effects.length)
|
|
368
|
+
) }),
|
|
369
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__effects-list", children: a.effects.map((d) => /* @__PURE__ */ e("div", { className: "nice-video-studio__effect-badge", children: d.name }, d.id)) })
|
|
368
370
|
] });
|
|
369
371
|
})() : null, i = W ? /* @__PURE__ */ t("aside", { className: "nice-video-studio__asset-library", children: [
|
|
370
372
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__asset-library-header", children: [
|
|
371
|
-
/* @__PURE__ */ e("h3", { children:
|
|
373
|
+
/* @__PURE__ */ e("h3", { children: u("videoEditor.assets", "Assets") }),
|
|
372
374
|
/* @__PURE__ */ e(
|
|
373
375
|
"button",
|
|
374
376
|
{
|
|
375
|
-
"aria-label":
|
|
377
|
+
"aria-label": u("videoEditor.close", "Close"),
|
|
376
378
|
className: "nice-video-studio__close-button",
|
|
377
379
|
onClick: () => z(!1),
|
|
378
380
|
children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
|
|
@@ -386,44 +388,44 @@ const fe = {
|
|
|
386
388
|
type: "file",
|
|
387
389
|
multiple: !0,
|
|
388
390
|
accept: "video/*,audio/*,image/*",
|
|
389
|
-
onChange: (
|
|
391
|
+
onChange: (r) => r.target.files && g(r.target.files),
|
|
390
392
|
hidden: !0
|
|
391
393
|
}
|
|
392
394
|
),
|
|
393
395
|
/* @__PURE__ */ e("span", { className: "nice-video-studio__upload-icon", children: "+" }),
|
|
394
|
-
/* @__PURE__ */ e("span", { children:
|
|
396
|
+
/* @__PURE__ */ e("span", { children: u("videoEditor.dropFilesOrClickTo", "Drop files or click to upload") })
|
|
395
397
|
] }) }),
|
|
396
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__asset-library-list", children:
|
|
398
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__asset-library-list", children: n.assets.map((r) => /* @__PURE__ */ t(
|
|
397
399
|
"div",
|
|
398
400
|
{
|
|
399
401
|
className: "nice-video-studio__asset-item",
|
|
400
402
|
draggable: !0,
|
|
401
|
-
onDragStart: (
|
|
403
|
+
onDragStart: (c) => c.dataTransfer.setData("assetId", r.id),
|
|
402
404
|
children: [
|
|
403
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__asset-thumbnail", children:
|
|
405
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__asset-thumbnail", children: r.thumbnail ? /* @__PURE__ */ e("img", { src: r.thumbnail, alt: r.name }) : /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-type-icon", children: /* @__PURE__ */ e(
|
|
404
406
|
m,
|
|
405
407
|
{
|
|
406
|
-
name:
|
|
408
|
+
name: r.type === "video" ? "video" : r.type === "audio" ? "music" : "image",
|
|
407
409
|
size: 24
|
|
408
410
|
}
|
|
409
411
|
) }) }),
|
|
410
412
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__asset-info", children: [
|
|
411
|
-
/* @__PURE__ */ e("span", { className: "nice-video-studio__asset-name", children:
|
|
413
|
+
/* @__PURE__ */ e("span", { className: "nice-video-studio__asset-name", children: r.name }),
|
|
412
414
|
/* @__PURE__ */ t("span", { className: "nice-video-studio__asset-meta", children: [
|
|
413
|
-
(
|
|
415
|
+
(r.size / 1024 / 1024).toFixed(1),
|
|
414
416
|
"MB"
|
|
415
417
|
] })
|
|
416
418
|
] })
|
|
417
419
|
]
|
|
418
420
|
},
|
|
419
|
-
|
|
421
|
+
r.id
|
|
420
422
|
)) })
|
|
421
|
-
] }) : void 0,
|
|
423
|
+
] }) : void 0, o = /* @__PURE__ */ e("div", { className: "nice-video-studio__preview-area", children: /* @__PURE__ */ t("div", { className: "nice-video-studio__preview-container", children: [
|
|
422
424
|
/* @__PURE__ */ t(
|
|
423
425
|
"div",
|
|
424
426
|
{
|
|
425
427
|
className: "nice-video-studio__preview-canvas",
|
|
426
|
-
style: { aspectRatio: `${
|
|
428
|
+
style: { aspectRatio: `${n.resolution.width}/${n.resolution.height}` },
|
|
427
429
|
children: [
|
|
428
430
|
/* @__PURE__ */ e("video", { ref: te, className: "nice-video-studio__preview-video" }),
|
|
429
431
|
/* @__PURE__ */ e("div", { className: "nice-video-studio__preview-overlay", children: !W && /* @__PURE__ */ e(
|
|
@@ -431,7 +433,7 @@ const fe = {
|
|
|
431
433
|
{
|
|
432
434
|
className: "nice-video-studio__toggle-library-button",
|
|
433
435
|
onClick: () => z(!0),
|
|
434
|
-
"aria-label":
|
|
436
|
+
"aria-label": u("videoEditor.showAssetLibrary", "Show asset library"),
|
|
435
437
|
children: /* @__PURE__ */ e(m, { name: "folder", size: 16 })
|
|
436
438
|
}
|
|
437
439
|
) })
|
|
@@ -443,15 +445,15 @@ const fe = {
|
|
|
443
445
|
"button",
|
|
444
446
|
{
|
|
445
447
|
onClick: () => J(0),
|
|
446
|
-
"aria-label":
|
|
448
|
+
"aria-label": u("videoEditor.goToStart", "Go to start"),
|
|
447
449
|
children: /* @__PURE__ */ e(m, { name: "skip-back", size: 16 })
|
|
448
450
|
}
|
|
449
451
|
),
|
|
450
452
|
/* @__PURE__ */ e(
|
|
451
453
|
"button",
|
|
452
454
|
{
|
|
453
|
-
onClick: () => J(D - 1 /
|
|
454
|
-
"aria-label":
|
|
455
|
+
onClick: () => J(D - 1 / n.frameRate),
|
|
456
|
+
"aria-label": u("videoEditor.previousFrame", "Previous frame"),
|
|
455
457
|
children: /* @__PURE__ */ e(m, { name: "chevron-left", size: 16 })
|
|
456
458
|
}
|
|
457
459
|
),
|
|
@@ -460,15 +462,15 @@ const fe = {
|
|
|
460
462
|
{
|
|
461
463
|
onClick: ae,
|
|
462
464
|
className: "nice-video-studio__play-button",
|
|
463
|
-
"aria-label": B ? "Pause" : "Play",
|
|
465
|
+
"aria-label": B ? u("videoEditor.pause", "Pause") : u("videoEditor.play", "Play"),
|
|
464
466
|
children: /* @__PURE__ */ e(m, { name: B ? "pause" : "play", size: 18 })
|
|
465
467
|
}
|
|
466
468
|
),
|
|
467
469
|
/* @__PURE__ */ e(
|
|
468
470
|
"button",
|
|
469
471
|
{
|
|
470
|
-
onClick: () => J(D + 1 /
|
|
471
|
-
"aria-label":
|
|
472
|
+
onClick: () => J(D + 1 / n.frameRate),
|
|
473
|
+
"aria-label": u("videoEditor.nextFrame", "Next frame"),
|
|
472
474
|
children: /* @__PURE__ */ e(m, { name: "chevron-right", size: 16 })
|
|
473
475
|
}
|
|
474
476
|
),
|
|
@@ -478,146 +480,146 @@ const fe = {
|
|
|
478
480
|
A === "timeline" && /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-panel", children: [
|
|
479
481
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-toolbar", children: [
|
|
480
482
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__track-buttons", children: [
|
|
481
|
-
/* @__PURE__ */ e("button", { onClick: () => V("video"), children: "+ Video Track" }),
|
|
482
|
-
/* @__PURE__ */ e("button", { onClick: () => V("audio"), children: "+ Audio Track" }),
|
|
483
|
-
/* @__PURE__ */ e("button", { onClick: () => V("text"), children: "+ Text Track" })
|
|
483
|
+
/* @__PURE__ */ e("button", { onClick: () => V("video"), children: u("videoEditor.videoTrack", "+ Video Track") }),
|
|
484
|
+
/* @__PURE__ */ e("button", { onClick: () => V("audio"), children: u("videoEditor.audioTrack", "+ Audio Track") }),
|
|
485
|
+
/* @__PURE__ */ e("button", { onClick: () => V("text"), children: u("videoEditor.textTrack", "+ Text Track") })
|
|
484
486
|
] }),
|
|
485
487
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__zoom-controls", children: [
|
|
486
|
-
/* @__PURE__ */ e("button", { onClick: () => G(Math.max(0.25,
|
|
488
|
+
/* @__PURE__ */ e("button", { onClick: () => G(Math.max(0.25, S - 0.25)), children: "-" }),
|
|
487
489
|
/* @__PURE__ */ t("span", { children: [
|
|
488
|
-
Math.round(
|
|
490
|
+
Math.round(S * 100),
|
|
489
491
|
"%"
|
|
490
492
|
] }),
|
|
491
|
-
/* @__PURE__ */ e("button", { onClick: () => G(Math.min(4,
|
|
493
|
+
/* @__PURE__ */ e("button", { onClick: () => G(Math.min(4, S + 0.25)), children: "+" })
|
|
492
494
|
] })
|
|
493
495
|
] }),
|
|
494
496
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-container", ref: ie, children: [
|
|
495
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-ruler", children: Array.from({ length: Math.ceil(30 /
|
|
497
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-ruler", children: Array.from({ length: Math.ceil(30 / S) }).map((r, c) => /* @__PURE__ */ e(
|
|
496
498
|
"div",
|
|
497
499
|
{
|
|
498
500
|
className: "nice-video-studio__ruler-mark",
|
|
499
|
-
style: { left: `${
|
|
500
|
-
children: ee(
|
|
501
|
+
style: { left: `${c * 50 * S}px` },
|
|
502
|
+
children: ee(c)
|
|
501
503
|
},
|
|
502
|
-
|
|
504
|
+
c
|
|
503
505
|
)) }),
|
|
504
506
|
/* @__PURE__ */ e(
|
|
505
507
|
"div",
|
|
506
508
|
{
|
|
507
509
|
className: "nice-video-studio__timeline-playhead",
|
|
508
|
-
style: { left: `${D * 50 *
|
|
510
|
+
style: { left: `${D * 50 * S}px` }
|
|
509
511
|
}
|
|
510
512
|
),
|
|
511
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-tracks", children:
|
|
513
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-tracks", children: n.tracks.map((r) => /* @__PURE__ */ t(
|
|
512
514
|
"div",
|
|
513
515
|
{
|
|
514
|
-
className: `nice-video-studio__timeline-track ${
|
|
515
|
-
onClick: () =>
|
|
516
|
-
onDrop: (
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
d &&
|
|
516
|
+
className: `nice-video-studio__timeline-track ${q === r.id ? "nice-video-studio__timeline-track--selected" : ""} ${r.locked ? "nice-video-studio__timeline-track--locked" : ""}`,
|
|
517
|
+
onClick: () => h(r.id),
|
|
518
|
+
onDrop: (c) => {
|
|
519
|
+
c.preventDefault();
|
|
520
|
+
const a = c.dataTransfer.getData("assetId"), d = n.assets.find((v) => v.id === a);
|
|
521
|
+
d && C(r.id, d);
|
|
520
522
|
},
|
|
521
|
-
onDragOver: (
|
|
523
|
+
onDragOver: (c) => c.preventDefault(),
|
|
522
524
|
children: [
|
|
523
525
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__track-header", children: [
|
|
524
|
-
/* @__PURE__ */ e("span", { className: "nice-video-studio__track-name", children:
|
|
526
|
+
/* @__PURE__ */ e("span", { className: "nice-video-studio__track-name", children: r.name }),
|
|
525
527
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__track-controls", children: [
|
|
526
528
|
/* @__PURE__ */ e(
|
|
527
529
|
"button",
|
|
528
530
|
{
|
|
529
|
-
className: `nice-video-studio__track-toggle ${
|
|
530
|
-
onClick: (
|
|
531
|
-
|
|
531
|
+
className: `nice-video-studio__track-toggle ${r.muted ? "nice-video-studio__track-toggle--active" : ""}`,
|
|
532
|
+
onClick: (c) => {
|
|
533
|
+
c.stopPropagation(), H(r.id);
|
|
532
534
|
},
|
|
533
|
-
children: /* @__PURE__ */ e(m, { name:
|
|
535
|
+
children: /* @__PURE__ */ e(m, { name: r.muted ? "volume-off" : "volume", size: 14 })
|
|
534
536
|
}
|
|
535
537
|
),
|
|
536
538
|
/* @__PURE__ */ e(
|
|
537
539
|
"button",
|
|
538
540
|
{
|
|
539
|
-
className: `nice-video-studio__track-toggle ${
|
|
540
|
-
onClick: (
|
|
541
|
-
|
|
541
|
+
className: `nice-video-studio__track-toggle ${r.locked ? "nice-video-studio__track-toggle--active" : ""}`,
|
|
542
|
+
onClick: (c) => {
|
|
543
|
+
c.stopPropagation(), X(r.id);
|
|
542
544
|
},
|
|
543
|
-
children: /* @__PURE__ */ e(m, { name:
|
|
545
|
+
children: /* @__PURE__ */ e(m, { name: r.locked ? "lock" : "unlock", size: 14 })
|
|
544
546
|
}
|
|
545
547
|
),
|
|
546
548
|
/* @__PURE__ */ e(
|
|
547
549
|
"button",
|
|
548
550
|
{
|
|
549
|
-
onClick: (
|
|
550
|
-
|
|
551
|
+
onClick: (c) => {
|
|
552
|
+
c.stopPropagation(), Y(r.id);
|
|
551
553
|
},
|
|
552
|
-
"aria-label":
|
|
554
|
+
"aria-label": u("videoEditor.removeTrack", "Remove track"),
|
|
553
555
|
children: /* @__PURE__ */ e(m, { name: "trash", size: 14 })
|
|
554
556
|
}
|
|
555
557
|
)
|
|
556
558
|
] })
|
|
557
559
|
] }),
|
|
558
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__track-items", children:
|
|
559
|
-
const
|
|
560
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__track-items", children: r.items.map((c) => {
|
|
561
|
+
const a = n.assets.find((d) => d.id === c.assetId);
|
|
560
562
|
return /* @__PURE__ */ t(
|
|
561
563
|
"div",
|
|
562
564
|
{
|
|
563
|
-
className: `nice-video-studio__track-item nice-video-studio__track-item--${
|
|
565
|
+
className: `nice-video-studio__track-item nice-video-studio__track-item--${c.type} ${k === c.id ? "nice-video-studio__track-item--selected" : ""}`,
|
|
564
566
|
style: {
|
|
565
|
-
left: `${
|
|
566
|
-
width: `${
|
|
567
|
+
left: `${c.startTime * 50 * S}px`,
|
|
568
|
+
width: `${c.duration * 50 * S}px`
|
|
567
569
|
},
|
|
568
570
|
onClick: (d) => {
|
|
569
|
-
d.stopPropagation(), N(
|
|
571
|
+
d.stopPropagation(), N(c.id);
|
|
570
572
|
},
|
|
571
573
|
children: [
|
|
572
|
-
/* @__PURE__ */ e("span", { className: "nice-video-studio__item-name", children: (
|
|
573
|
-
|
|
574
|
-
|
|
574
|
+
/* @__PURE__ */ e("span", { className: "nice-video-studio__item-name", children: (a == null ? void 0 : a.name) || u("videoEditor.untitled", "Untitled") }),
|
|
575
|
+
c.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-transitions", children: /* @__PURE__ */ e(m, { name: "wand", size: 12 }) }),
|
|
576
|
+
c.effects.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-effects", children: /* @__PURE__ */ e(m, { name: "palette", size: 12 }) })
|
|
575
577
|
]
|
|
576
578
|
},
|
|
577
|
-
|
|
579
|
+
c.id
|
|
578
580
|
);
|
|
579
581
|
}) })
|
|
580
582
|
]
|
|
581
583
|
},
|
|
582
|
-
|
|
584
|
+
r.id
|
|
583
585
|
)) })
|
|
584
586
|
] })
|
|
585
587
|
] }),
|
|
586
588
|
A === "effects" && /* @__PURE__ */ t("div", { className: "nice-video-studio__effects-panel", children: [
|
|
587
|
-
/* @__PURE__ */ e("h3", { children:
|
|
588
|
-
/* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children:
|
|
589
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__effects-grid", children: be.map((
|
|
589
|
+
/* @__PURE__ */ e("h3", { children: u("videoEditor.videoEffects", "Video Effects") }),
|
|
590
|
+
/* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: u("videoEditor.selectAClipToApply", "Select a clip to apply effects") }),
|
|
591
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__effects-grid", children: be.map((r) => /* @__PURE__ */ t(
|
|
590
592
|
"button",
|
|
591
593
|
{
|
|
592
594
|
className: "nice-video-studio__effect-preset",
|
|
593
595
|
disabled: !k,
|
|
594
596
|
onClick: () => {
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
+
const c = j();
|
|
598
|
+
c && Z(c.track.id, c.item.id, r.type);
|
|
597
599
|
},
|
|
598
600
|
children: [
|
|
599
|
-
/* @__PURE__ */ e("span", { className: "nice-video-studio__effect-icon", children: /* @__PURE__ */ e(m, { name:
|
|
600
|
-
/* @__PURE__ */ e("span", { className: "nice-video-studio__effect-name", children:
|
|
601
|
+
/* @__PURE__ */ e("span", { className: "nice-video-studio__effect-icon", children: /* @__PURE__ */ e(m, { name: r.icon, size: 16 }) }),
|
|
602
|
+
/* @__PURE__ */ e("span", { className: "nice-video-studio__effect-name", children: r.name })
|
|
601
603
|
]
|
|
602
604
|
},
|
|
603
|
-
|
|
605
|
+
r.type
|
|
604
606
|
)) })
|
|
605
607
|
] }),
|
|
606
608
|
A === "transitions" && /* @__PURE__ */ t("div", { className: "nice-video-studio__transitions-panel", children: [
|
|
607
|
-
/* @__PURE__ */ e("h3", { children:
|
|
608
|
-
/* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children:
|
|
609
|
-
/* @__PURE__ */ e("div", { className: "nice-video-studio__transitions-grid", children: ye.map((
|
|
610
|
-
/* @__PURE__ */ e("span", { className: "nice-video-studio__transition-name", children:
|
|
609
|
+
/* @__PURE__ */ e("h3", { children: u("videoEditor.transitions", "Transitions") }),
|
|
610
|
+
/* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: u("videoEditor.selectAClipAndAdd", "Select a clip and add transitions between clips") }),
|
|
611
|
+
/* @__PURE__ */ e("div", { className: "nice-video-studio__transitions-grid", children: ye.map((r) => /* @__PURE__ */ t("div", { className: "nice-video-studio__transition-preset", children: [
|
|
612
|
+
/* @__PURE__ */ e("span", { className: "nice-video-studio__transition-name", children: r.name }),
|
|
611
613
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__transition-buttons", children: [
|
|
612
614
|
/* @__PURE__ */ e(
|
|
613
615
|
"button",
|
|
614
616
|
{
|
|
615
617
|
disabled: !k,
|
|
616
618
|
onClick: () => {
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
+
const c = j();
|
|
620
|
+
c && P(c.track.id, c.item.id, r.type, "start");
|
|
619
621
|
},
|
|
620
|
-
children: "In"
|
|
622
|
+
children: u("videoEditor.in", "In")
|
|
621
623
|
}
|
|
622
624
|
),
|
|
623
625
|
/* @__PURE__ */ e(
|
|
@@ -625,27 +627,27 @@ const fe = {
|
|
|
625
627
|
{
|
|
626
628
|
disabled: !k,
|
|
627
629
|
onClick: () => {
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
+
const c = j();
|
|
631
|
+
c && P(c.track.id, c.item.id, r.type, "end");
|
|
630
632
|
},
|
|
631
|
-
children: "Out"
|
|
633
|
+
children: u("videoEditor.out", "Out")
|
|
632
634
|
}
|
|
633
635
|
)
|
|
634
636
|
] })
|
|
635
|
-
] },
|
|
637
|
+
] }, r.type)) })
|
|
636
638
|
] }),
|
|
637
639
|
A === "export" && /* @__PURE__ */ t("div", { className: "nice-video-studio__export-panel", children: [
|
|
638
|
-
/* @__PURE__ */ e("h3", { children:
|
|
640
|
+
/* @__PURE__ */ e("h3", { children: u("videoEditor.exportSettings", "Export Settings") }),
|
|
639
641
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__export-settings", children: [
|
|
640
642
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
|
|
641
|
-
/* @__PURE__ */ e("label", { children:
|
|
643
|
+
/* @__PURE__ */ e("label", { children: u("videoEditor.resolution", "Resolution") }),
|
|
642
644
|
/* @__PURE__ */ t(
|
|
643
645
|
"select",
|
|
644
646
|
{
|
|
645
|
-
value: `${
|
|
646
|
-
onChange: (
|
|
647
|
-
const [
|
|
648
|
-
|
|
647
|
+
value: `${n.resolution.width}x${n.resolution.height}`,
|
|
648
|
+
onChange: (r) => {
|
|
649
|
+
const [c, a] = r.target.value.split("x").map(Number);
|
|
650
|
+
b({ resolution: { width: c, height: a } });
|
|
649
651
|
},
|
|
650
652
|
children: [
|
|
651
653
|
/* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
|
|
@@ -657,12 +659,12 @@ const fe = {
|
|
|
657
659
|
)
|
|
658
660
|
] }),
|
|
659
661
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
|
|
660
|
-
/* @__PURE__ */ e("label", { children:
|
|
662
|
+
/* @__PURE__ */ e("label", { children: u("videoEditor.frameRate", "Frame Rate") }),
|
|
661
663
|
/* @__PURE__ */ t(
|
|
662
664
|
"select",
|
|
663
665
|
{
|
|
664
|
-
value:
|
|
665
|
-
onChange: (
|
|
666
|
+
value: n.frameRate,
|
|
667
|
+
onChange: (r) => b({ frameRate: parseInt(r.target.value) }),
|
|
666
668
|
children: [
|
|
667
669
|
/* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
|
|
668
670
|
/* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
|
|
@@ -673,42 +675,42 @@ const fe = {
|
|
|
673
675
|
)
|
|
674
676
|
] }),
|
|
675
677
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
|
|
676
|
-
/* @__PURE__ */ e("label", { children:
|
|
678
|
+
/* @__PURE__ */ e("label", { children: u("videoEditor.videoCodec", "Video Codec") }),
|
|
677
679
|
/* @__PURE__ */ t(
|
|
678
680
|
"select",
|
|
679
681
|
{
|
|
680
|
-
value:
|
|
681
|
-
onChange: (
|
|
682
|
+
value: n.settings.video.codec,
|
|
683
|
+
onChange: (r) => b({
|
|
682
684
|
settings: {
|
|
683
|
-
...
|
|
685
|
+
...n.settings,
|
|
684
686
|
video: {
|
|
685
|
-
...
|
|
686
|
-
codec:
|
|
687
|
+
...n.settings.video,
|
|
688
|
+
codec: r.target.value
|
|
687
689
|
}
|
|
688
690
|
}
|
|
689
691
|
}),
|
|
690
692
|
children: [
|
|
691
|
-
/* @__PURE__ */ e("option", { value: "h264", children: "H.264 (Best Compatibility)" }),
|
|
692
|
-
/* @__PURE__ */ e("option", { value: "h265", children: "H.265/HEVC (Smaller Size)" }),
|
|
693
|
-
/* @__PURE__ */ e("option", { value: "vp9", children: "VP9 (Web Optimized)" }),
|
|
694
|
-
/* @__PURE__ */ e("option", { value: "av1", children: "AV1 (Future Standard)" })
|
|
693
|
+
/* @__PURE__ */ e("option", { value: "h264", children: u("videoEditor.h264BestCompatibility", "H.264 (Best Compatibility)") }),
|
|
694
|
+
/* @__PURE__ */ e("option", { value: "h265", children: u("videoEditor.h265HevcSmallerSize", "H.265/HEVC (Smaller Size)") }),
|
|
695
|
+
/* @__PURE__ */ e("option", { value: "vp9", children: u("videoEditor.vp9WebOptimized", "VP9 (Web Optimized)") }),
|
|
696
|
+
/* @__PURE__ */ e("option", { value: "av1", children: u("videoEditor.av1FutureStandard", "AV1 (Future Standard)") })
|
|
695
697
|
]
|
|
696
698
|
}
|
|
697
699
|
)
|
|
698
700
|
] }),
|
|
699
701
|
/* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
|
|
700
|
-
/* @__PURE__ */ e("label", { children: "Video Bitrate (Mbps)" }),
|
|
702
|
+
/* @__PURE__ */ e("label", { children: u("videoEditor.videoBitrateMbps", "Video Bitrate (Mbps)") }),
|
|
701
703
|
/* @__PURE__ */ e(
|
|
702
704
|
"input",
|
|
703
705
|
{
|
|
704
706
|
type: "number",
|
|
705
|
-
value:
|
|
706
|
-
onChange: (
|
|
707
|
+
value: n.settings.video.bitrate / 1e3,
|
|
708
|
+
onChange: (r) => b({
|
|
707
709
|
settings: {
|
|
708
|
-
...
|
|
710
|
+
...n.settings,
|
|
709
711
|
video: {
|
|
710
|
-
...
|
|
711
|
-
bitrate: parseFloat(
|
|
712
|
+
...n.settings.video,
|
|
713
|
+
bitrate: parseFloat(r.target.value) * 1e3
|
|
712
714
|
}
|
|
713
715
|
}
|
|
714
716
|
}),
|
|
@@ -723,15 +725,18 @@ const fe = {
|
|
|
723
725
|
{
|
|
724
726
|
className: "nice-video-studio__export-button",
|
|
725
727
|
onClick: Q,
|
|
726
|
-
disabled:
|
|
727
|
-
children:
|
|
728
|
+
disabled: E !== null,
|
|
729
|
+
children: E !== null ? u("videoEditor.exporting2", "Exporting... {exportProgress}%").replace(
|
|
730
|
+
"{exportProgress}",
|
|
731
|
+
String(Math.round(E))
|
|
732
|
+
) : u("videoEditor.exportVideo", "Export Video")
|
|
728
733
|
}
|
|
729
734
|
),
|
|
730
|
-
|
|
735
|
+
E !== null && /* @__PURE__ */ e("div", { className: "nice-video-studio__export-progress", children: /* @__PURE__ */ e(
|
|
731
736
|
"div",
|
|
732
737
|
{
|
|
733
738
|
className: "nice-video-studio__export-progress-bar",
|
|
734
|
-
style: { width: `${
|
|
739
|
+
style: { width: `${E}%` }
|
|
735
740
|
}
|
|
736
741
|
) })
|
|
737
742
|
] })
|
|
@@ -743,13 +748,13 @@ const fe = {
|
|
|
743
748
|
className: `nice-video-editor nice-video-studio ${O}`,
|
|
744
749
|
height: "100%",
|
|
745
750
|
style: { position: "relative", minHeight: 600 },
|
|
746
|
-
toolbar:
|
|
751
|
+
toolbar: re,
|
|
747
752
|
sidebar: i,
|
|
748
|
-
rightSidebar:
|
|
753
|
+
rightSidebar: se ?? void 0,
|
|
749
754
|
bottomPanel: l,
|
|
750
755
|
children: [
|
|
751
|
-
/* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(_e, { steps: ge(
|
|
752
|
-
|
|
756
|
+
/* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(_e, { steps: ge(T, Ne) }) }),
|
|
757
|
+
o
|
|
753
758
|
]
|
|
754
759
|
}
|
|
755
760
|
);
|
|
@@ -770,43 +775,43 @@ const fe = {
|
|
|
770
775
|
format: "webm",
|
|
771
776
|
quality: "high"
|
|
772
777
|
}
|
|
773
|
-
},
|
|
774
|
-
options:
|
|
778
|
+
}, Ee = ({
|
|
779
|
+
options: $,
|
|
775
780
|
onRecordingStart: R,
|
|
776
781
|
onRecordingStop: F,
|
|
777
782
|
onRecordingPause: L,
|
|
778
783
|
onRecordingResume: O,
|
|
779
|
-
onError:
|
|
780
|
-
className:
|
|
784
|
+
onError: T,
|
|
785
|
+
className: u = ""
|
|
781
786
|
}) => {
|
|
782
|
-
var
|
|
783
|
-
const { t:
|
|
787
|
+
var r, c;
|
|
788
|
+
const { t: n } = me(), [s, A] = f({
|
|
784
789
|
...ke,
|
|
785
|
-
|
|
786
|
-
}), [y,
|
|
790
|
+
...$
|
|
791
|
+
}), [y, q] = f(null), [h, k] = f("idle"), [N, D] = f([]), [w, B] = f(null), [K, S] = f(null), [G, W] = f(!1), [z, E] = f(!1), [U, ie] = f(
|
|
787
792
|
"pen"
|
|
788
|
-
), [te, x] =
|
|
793
|
+
), [te, x] = f("var(--nice-danger, #ff0000)"), b = I(null), g = I([]), V = I(null), Y = I(null), H = I(null), X = I(0);
|
|
789
794
|
le(() => () => {
|
|
790
|
-
w && w.getTracks().forEach((
|
|
795
|
+
w && w.getTracks().forEach((a) => a.stop()), H.current && clearInterval(H.current);
|
|
791
796
|
}, [w]);
|
|
792
|
-
const
|
|
797
|
+
const C = (a) => {
|
|
793
798
|
A((d) => ({
|
|
794
799
|
...d,
|
|
795
|
-
...
|
|
796
|
-
video: { ...d.video, ...
|
|
797
|
-
audio: { ...d.audio, ...
|
|
798
|
-
output: { ...d.output, ...
|
|
800
|
+
...a,
|
|
801
|
+
video: { ...d.video, ...a.video },
|
|
802
|
+
audio: { ...d.audio, ...a.audio },
|
|
803
|
+
output: { ...d.output, ...a.output }
|
|
799
804
|
}));
|
|
800
805
|
}, Z = async () => {
|
|
801
806
|
try {
|
|
802
807
|
k("preparing");
|
|
803
|
-
const
|
|
808
|
+
const a = {
|
|
804
809
|
video: {
|
|
805
810
|
cursor: s.video.showCursor ? "always" : "never",
|
|
806
811
|
frameRate: s.video.frameRate
|
|
807
812
|
},
|
|
808
813
|
audio: s.audio.source === "system" || s.audio.source === "both"
|
|
809
|
-
}, d = await navigator.mediaDevices.getDisplayMedia(
|
|
814
|
+
}, d = await navigator.mediaDevices.getDisplayMedia(a);
|
|
810
815
|
if (s.audio.enabled && (s.audio.source === "microphone" || s.audio.source === "both"))
|
|
811
816
|
try {
|
|
812
817
|
(await navigator.mediaDevices.getUserMedia({
|
|
@@ -814,35 +819,35 @@ const fe = {
|
|
|
814
819
|
echoCancellation: s.audio.echoCancellation,
|
|
815
820
|
noiseSuppression: s.audio.noiseSuppression
|
|
816
821
|
}
|
|
817
|
-
})).getAudioTracks().forEach((
|
|
818
|
-
} catch (
|
|
819
|
-
console.warn("Could not access microphone:",
|
|
822
|
+
})).getAudioTracks().forEach((p) => d.addTrack(p));
|
|
823
|
+
} catch (v) {
|
|
824
|
+
console.warn("Could not access microphone:", v);
|
|
820
825
|
}
|
|
821
826
|
B(d), V.current && (V.current.srcObject = d, V.current.play()), k("idle");
|
|
822
|
-
} catch (
|
|
823
|
-
k("error"),
|
|
827
|
+
} catch (a) {
|
|
828
|
+
k("error"), T == null || T(a instanceof Error ? a : new Error("Failed to start preview"));
|
|
824
829
|
}
|
|
825
830
|
}, P = async () => {
|
|
826
831
|
w || await Z();
|
|
827
|
-
for (let
|
|
828
|
-
|
|
829
|
-
|
|
832
|
+
for (let a = 3; a > 0; a--)
|
|
833
|
+
S(a), await new Promise((d) => setTimeout(d, 1e3));
|
|
834
|
+
S(null);
|
|
830
835
|
try {
|
|
831
|
-
const
|
|
832
|
-
if (!
|
|
836
|
+
const a = w || await ne();
|
|
837
|
+
if (!a)
|
|
833
838
|
throw new Error("No stream available");
|
|
834
|
-
const d =
|
|
839
|
+
const d = re(s.output.format), v = new MediaRecorder(a, {
|
|
835
840
|
mimeType: d,
|
|
836
|
-
videoBitsPerSecond:
|
|
841
|
+
videoBitsPerSecond: se(s.output.quality)
|
|
837
842
|
});
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
},
|
|
841
|
-
const
|
|
842
|
-
y && (F == null || F({ ...y, status: "stopped" },
|
|
843
|
-
},
|
|
844
|
-
const
|
|
845
|
-
id:
|
|
843
|
+
g.current = [], v.ondataavailable = (_) => {
|
|
844
|
+
_.data.size > 0 && g.current.push(_.data);
|
|
845
|
+
}, v.onstop = () => {
|
|
846
|
+
const _ = new Blob(g.current, { type: d });
|
|
847
|
+
y && (F == null || F({ ...y, status: "stopped" }, _));
|
|
848
|
+
}, b.current = v, v.start(1e3), X.current = Date.now();
|
|
849
|
+
const p = {
|
|
850
|
+
id: M(),
|
|
846
851
|
status: "recording",
|
|
847
852
|
startTime: /* @__PURE__ */ new Date(),
|
|
848
853
|
duration: 0,
|
|
@@ -850,41 +855,44 @@ const fe = {
|
|
|
850
855
|
options: s,
|
|
851
856
|
chunks: []
|
|
852
857
|
};
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
(
|
|
856
|
-
...
|
|
858
|
+
q(p), k("recording"), R == null || R(p), H.current = setInterval(() => {
|
|
859
|
+
q(
|
|
860
|
+
(_) => _ ? {
|
|
861
|
+
..._,
|
|
857
862
|
duration: (Date.now() - X.current) / 1e3,
|
|
858
|
-
size:
|
|
863
|
+
size: g.current.reduce((ve, he) => ve + he.size, 0)
|
|
859
864
|
} : null
|
|
860
865
|
);
|
|
861
866
|
}, 100);
|
|
862
|
-
} catch (
|
|
863
|
-
k("error"),
|
|
867
|
+
} catch (a) {
|
|
868
|
+
k("error"), T == null || T(a instanceof Error ? a : new Error("Failed to start recording"));
|
|
864
869
|
}
|
|
865
870
|
}, ne = async () => (await Z(), w), ae = () => {
|
|
866
|
-
|
|
871
|
+
b.current && h === "recording" && (b.current.pause(), k("paused"), L == null || L());
|
|
867
872
|
}, J = () => {
|
|
868
|
-
|
|
873
|
+
b.current && h === "paused" && (b.current.resume(), k("recording"), O == null || O());
|
|
869
874
|
}, Q = () => {
|
|
870
|
-
|
|
875
|
+
H.current && clearInterval(H.current), b.current && (h === "recording" || h === "paused") && (b.current.stop(), k("stopped")), w && (w.getTracks().forEach((a) => a.stop()), B(null));
|
|
871
876
|
}, ee = ue(
|
|
872
|
-
(
|
|
873
|
-
if (
|
|
877
|
+
(a) => {
|
|
878
|
+
if (h !== "recording")
|
|
874
879
|
return;
|
|
875
880
|
const d = {
|
|
876
|
-
id:
|
|
881
|
+
id: M(),
|
|
877
882
|
time: (y == null ? void 0 : y.duration) || 0,
|
|
878
|
-
label:
|
|
883
|
+
label: a || n("screenRecorder.marker", "Marker {markers}").replace(
|
|
884
|
+
"{markers}",
|
|
885
|
+
String(N.length + 1)
|
|
886
|
+
),
|
|
879
887
|
color: i()
|
|
880
888
|
};
|
|
881
|
-
D((
|
|
889
|
+
D((v) => [...v, d]);
|
|
882
890
|
},
|
|
883
|
-
[
|
|
884
|
-
), j = (
|
|
885
|
-
D((d) => d.filter((
|
|
886
|
-
},
|
|
887
|
-
switch (
|
|
891
|
+
[h, y == null ? void 0 : y.duration, N.length, n]
|
|
892
|
+
), j = (a) => {
|
|
893
|
+
D((d) => d.filter((v) => v.id !== a));
|
|
894
|
+
}, re = (a) => {
|
|
895
|
+
switch (a) {
|
|
888
896
|
case "mp4":
|
|
889
897
|
return "video/mp4";
|
|
890
898
|
case "mkv":
|
|
@@ -892,8 +900,8 @@ const fe = {
|
|
|
892
900
|
default:
|
|
893
901
|
return "video/webm;codecs=vp9";
|
|
894
902
|
}
|
|
895
|
-
},
|
|
896
|
-
switch (
|
|
903
|
+
}, se = (a) => {
|
|
904
|
+
switch (a) {
|
|
897
905
|
case "low":
|
|
898
906
|
return 25e5;
|
|
899
907
|
case "medium":
|
|
@@ -904,7 +912,7 @@ const fe = {
|
|
|
904
912
|
return 8e6;
|
|
905
913
|
}
|
|
906
914
|
}, i = () => {
|
|
907
|
-
const
|
|
915
|
+
const a = [
|
|
908
916
|
"var(--nice-danger, #ff4444)",
|
|
909
917
|
// audit-allow: literal-color +5 — annotation pens drawn into the recording
|
|
910
918
|
"#44ff44",
|
|
@@ -913,12 +921,12 @@ const fe = {
|
|
|
913
921
|
"#ff44ff",
|
|
914
922
|
"#44ffff"
|
|
915
923
|
];
|
|
916
|
-
return
|
|
917
|
-
},
|
|
918
|
-
const d = Math.floor(
|
|
919
|
-
return d > 0 ? `${d}:${
|
|
920
|
-
}, l = (
|
|
921
|
-
return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${
|
|
924
|
+
return a[Math.floor(Math.random() * a.length)];
|
|
925
|
+
}, o = (a) => {
|
|
926
|
+
const d = Math.floor(a / 3600), v = Math.floor(a % 3600 / 60), p = Math.floor(a % 60), _ = Math.floor(a % 1 * 100);
|
|
927
|
+
return d > 0 ? `${d}:${v.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}` : `${v.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}.${_.toString().padStart(2, "0")}`;
|
|
928
|
+
}, l = (a) => a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / 1024 / 1024).toFixed(1)} MB`;
|
|
929
|
+
return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${u}`, children: [
|
|
922
930
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__preview", children: [
|
|
923
931
|
K !== null && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__countdown-overlay", children: /* @__PURE__ */ e("span", { className: "nice-screen-recorder__countdown-number", children: K }) }),
|
|
924
932
|
/* @__PURE__ */ e(
|
|
@@ -931,18 +939,18 @@ const fe = {
|
|
|
931
939
|
}
|
|
932
940
|
),
|
|
933
941
|
z && /* @__PURE__ */ e("canvas", { ref: Y, className: "nice-screen-recorder__annotation-canvas" }),
|
|
934
|
-
!w &&
|
|
942
|
+
!w && h === "idle" && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__preview-placeholder", children: /* @__PURE__ */ t("button", { className: "nice-screen-recorder__start-preview-button", onClick: Z, children: [
|
|
935
943
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "monitor", size: 18 }) }),
|
|
936
|
-
/* @__PURE__ */ e("span", { children:
|
|
944
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.selectScreenToRecord", "Select Screen to Record") })
|
|
937
945
|
] }) }),
|
|
938
|
-
|
|
946
|
+
h === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__recording-indicator", children: [
|
|
939
947
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__recording-dot" }),
|
|
940
|
-
/* @__PURE__ */ e("span", { children: "REC" })
|
|
948
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.rec", "REC") })
|
|
941
949
|
] })
|
|
942
950
|
] }),
|
|
943
951
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls", children: [
|
|
944
952
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls-main", children: [
|
|
945
|
-
|
|
953
|
+
h === "idle" && /* @__PURE__ */ t(
|
|
946
954
|
"button",
|
|
947
955
|
{
|
|
948
956
|
className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--record",
|
|
@@ -950,11 +958,11 @@ const fe = {
|
|
|
950
958
|
disabled: !!K,
|
|
951
959
|
children: [
|
|
952
960
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "circle", size: 18 }) }),
|
|
953
|
-
/* @__PURE__ */ e("span", { children:
|
|
961
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.startRecording", "Start Recording") })
|
|
954
962
|
]
|
|
955
963
|
}
|
|
956
964
|
),
|
|
957
|
-
|
|
965
|
+
h === "recording" && /* @__PURE__ */ t(ce, { children: [
|
|
958
966
|
/* @__PURE__ */ t(
|
|
959
967
|
"button",
|
|
960
968
|
{
|
|
@@ -962,7 +970,7 @@ const fe = {
|
|
|
962
970
|
onClick: ae,
|
|
963
971
|
children: [
|
|
964
972
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "pause", size: 18 }) }),
|
|
965
|
-
/* @__PURE__ */ e("span", { children:
|
|
973
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.pause", "Pause") })
|
|
966
974
|
]
|
|
967
975
|
}
|
|
968
976
|
),
|
|
@@ -973,12 +981,12 @@ const fe = {
|
|
|
973
981
|
onClick: Q,
|
|
974
982
|
children: [
|
|
975
983
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "stop", size: 18 }) }),
|
|
976
|
-
/* @__PURE__ */ e("span", { children:
|
|
984
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.stop", "Stop") })
|
|
977
985
|
]
|
|
978
986
|
}
|
|
979
987
|
)
|
|
980
988
|
] }),
|
|
981
|
-
|
|
989
|
+
h === "paused" && /* @__PURE__ */ t(ce, { children: [
|
|
982
990
|
/* @__PURE__ */ t(
|
|
983
991
|
"button",
|
|
984
992
|
{
|
|
@@ -986,7 +994,7 @@ const fe = {
|
|
|
986
994
|
onClick: J,
|
|
987
995
|
children: [
|
|
988
996
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "play", size: 18 }) }),
|
|
989
|
-
/* @__PURE__ */ e("span", { children:
|
|
997
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.resume", "Resume") })
|
|
990
998
|
]
|
|
991
999
|
}
|
|
992
1000
|
),
|
|
@@ -997,34 +1005,34 @@ const fe = {
|
|
|
997
1005
|
onClick: Q,
|
|
998
1006
|
children: [
|
|
999
1007
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "stop", size: 18 }) }),
|
|
1000
|
-
/* @__PURE__ */ e("span", { children:
|
|
1008
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.stop", "Stop") })
|
|
1001
1009
|
]
|
|
1002
1010
|
}
|
|
1003
1011
|
)
|
|
1004
1012
|
] }),
|
|
1005
|
-
|
|
1013
|
+
h === "stopped" && /* @__PURE__ */ t(
|
|
1006
1014
|
"button",
|
|
1007
1015
|
{
|
|
1008
1016
|
className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--new",
|
|
1009
1017
|
onClick: () => {
|
|
1010
|
-
k("idle"),
|
|
1018
|
+
k("idle"), q(null), D([]);
|
|
1011
1019
|
},
|
|
1012
1020
|
children: [
|
|
1013
1021
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "refresh", size: 18 }) }),
|
|
1014
|
-
/* @__PURE__ */ e("span", { children:
|
|
1022
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.newRecording", "New Recording") })
|
|
1015
1023
|
]
|
|
1016
1024
|
}
|
|
1017
1025
|
)
|
|
1018
1026
|
] }),
|
|
1019
1027
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls-secondary", children: [
|
|
1020
|
-
(
|
|
1028
|
+
(h === "recording" || h === "paused") && /* @__PURE__ */ t(
|
|
1021
1029
|
"button",
|
|
1022
1030
|
{
|
|
1023
1031
|
className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--marker",
|
|
1024
1032
|
onClick: () => ee(),
|
|
1025
1033
|
children: [
|
|
1026
1034
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "tag", size: 18 }) }),
|
|
1027
|
-
/* @__PURE__ */ e("span", { children:
|
|
1035
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.addMarker", "Add Marker") })
|
|
1028
1036
|
]
|
|
1029
1037
|
}
|
|
1030
1038
|
),
|
|
@@ -1032,11 +1040,11 @@ const fe = {
|
|
|
1032
1040
|
"button",
|
|
1033
1041
|
{
|
|
1034
1042
|
className: `nice-screen-recorder__control-button ${z ? "nice-screen-recorder__control-button--active" : ""}`,
|
|
1035
|
-
onClick: () =>
|
|
1036
|
-
disabled:
|
|
1043
|
+
onClick: () => E(!z),
|
|
1044
|
+
disabled: h !== "recording",
|
|
1037
1045
|
children: [
|
|
1038
1046
|
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "pen", size: 18 }) }),
|
|
1039
|
-
/* @__PURE__ */ e("span", { children:
|
|
1047
|
+
/* @__PURE__ */ e("span", { children: n("screenRecorder.annotate", "Annotate") })
|
|
1040
1048
|
]
|
|
1041
1049
|
}
|
|
1042
1050
|
),
|
|
@@ -1045,8 +1053,8 @@ const fe = {
|
|
|
1045
1053
|
{
|
|
1046
1054
|
className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--settings",
|
|
1047
1055
|
onClick: () => W(!G),
|
|
1048
|
-
disabled:
|
|
1049
|
-
"aria-label":
|
|
1056
|
+
disabled: h === "recording",
|
|
1057
|
+
"aria-label": n("screenRecorder.settings", "Settings"),
|
|
1050
1058
|
children: /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "settings", size: 18 }) })
|
|
1051
1059
|
}
|
|
1052
1060
|
)
|
|
@@ -1055,17 +1063,17 @@ const fe = {
|
|
|
1055
1063
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__status", children: [
|
|
1056
1064
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__status-info", children: [
|
|
1057
1065
|
/* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
|
|
1058
|
-
/* @__PURE__ */ e("strong", { children: "Duration:" }),
|
|
1066
|
+
/* @__PURE__ */ e("strong", { children: n("screenRecorder.duration", "Duration:") }),
|
|
1059
1067
|
" ",
|
|
1060
|
-
|
|
1068
|
+
o((y == null ? void 0 : y.duration) || 0)
|
|
1061
1069
|
] }),
|
|
1062
1070
|
/* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
|
|
1063
|
-
/* @__PURE__ */ e("strong", { children: "Size:" }),
|
|
1071
|
+
/* @__PURE__ */ e("strong", { children: n("screenRecorder.size", "Size:") }),
|
|
1064
1072
|
" ",
|
|
1065
1073
|
l((y == null ? void 0 : y.size) || 0)
|
|
1066
1074
|
] }),
|
|
1067
1075
|
/* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
|
|
1068
|
-
/* @__PURE__ */ e("strong", { children: "Markers:" }),
|
|
1076
|
+
/* @__PURE__ */ e("strong", { children: n("screenRecorder.markers2", "Markers:") }),
|
|
1069
1077
|
" ",
|
|
1070
1078
|
N.length
|
|
1071
1079
|
] })
|
|
@@ -1089,22 +1097,22 @@ const fe = {
|
|
|
1089
1097
|
)
|
|
1090
1098
|
] })
|
|
1091
1099
|
] }),
|
|
1092
|
-
z &&
|
|
1093
|
-
/* @__PURE__ */ e("div", { className: "nice-screen-recorder__tool-group", children: ["pen", "arrow", "rectangle", "text"].map((
|
|
1100
|
+
z && h === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__annotation-tools", children: [
|
|
1101
|
+
/* @__PURE__ */ e("div", { className: "nice-screen-recorder__tool-group", children: ["pen", "arrow", "rectangle", "text"].map((a) => /* @__PURE__ */ e(
|
|
1094
1102
|
"button",
|
|
1095
1103
|
{
|
|
1096
|
-
className: `nice-screen-recorder__tool-button ${U ===
|
|
1097
|
-
onClick: () => ie(
|
|
1098
|
-
"aria-label":
|
|
1104
|
+
className: `nice-screen-recorder__tool-button ${U === a ? "nice-screen-recorder__tool-button--active" : ""}`,
|
|
1105
|
+
onClick: () => ie(a),
|
|
1106
|
+
"aria-label": a,
|
|
1099
1107
|
children: /* @__PURE__ */ e(
|
|
1100
1108
|
m,
|
|
1101
1109
|
{
|
|
1102
|
-
name:
|
|
1110
|
+
name: a === "pen" ? "pen" : a === "arrow" ? "arrow-right" : a === "rectangle" ? "square" : "type",
|
|
1103
1111
|
size: 16
|
|
1104
1112
|
}
|
|
1105
1113
|
)
|
|
1106
1114
|
},
|
|
1107
|
-
|
|
1115
|
+
a
|
|
1108
1116
|
)) }),
|
|
1109
1117
|
/* @__PURE__ */ e("div", { className: "nice-screen-recorder__color-group", children: [
|
|
1110
1118
|
"var(--nice-danger, #ff0000)",
|
|
@@ -1113,33 +1121,33 @@ const fe = {
|
|
|
1113
1121
|
"var(--nice-warning, #ffff00)",
|
|
1114
1122
|
"var(--nice-bg, #fff)",
|
|
1115
1123
|
"var(--nice-text, #000000)"
|
|
1116
|
-
].map((
|
|
1124
|
+
].map((a) => /* @__PURE__ */ e(
|
|
1117
1125
|
"button",
|
|
1118
1126
|
{
|
|
1119
|
-
className: `nice-screen-recorder__color-button ${te ===
|
|
1120
|
-
style: { backgroundColor:
|
|
1121
|
-
onClick: () => x(
|
|
1127
|
+
className: `nice-screen-recorder__color-button ${te === a ? "nice-screen-recorder__color-button--active" : ""}`,
|
|
1128
|
+
style: { backgroundColor: a },
|
|
1129
|
+
onClick: () => x(a)
|
|
1122
1130
|
},
|
|
1123
|
-
|
|
1131
|
+
a
|
|
1124
1132
|
)) })
|
|
1125
1133
|
] }),
|
|
1126
1134
|
N.length > 0 && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__markers", children: [
|
|
1127
|
-
/* @__PURE__ */ e("h4", { children:
|
|
1128
|
-
/* @__PURE__ */ e("div", { className: "nice-screen-recorder__markers-list", children: N.map((
|
|
1135
|
+
/* @__PURE__ */ e("h4", { children: n("screenRecorder.markers", "Markers") }),
|
|
1136
|
+
/* @__PURE__ */ e("div", { className: "nice-screen-recorder__markers-list", children: N.map((a) => /* @__PURE__ */ t(
|
|
1129
1137
|
"div",
|
|
1130
1138
|
{
|
|
1131
1139
|
className: "nice-screen-recorder__marker-item",
|
|
1132
|
-
style: { borderLeftColor:
|
|
1140
|
+
style: { borderLeftColor: a.color },
|
|
1133
1141
|
children: [
|
|
1134
|
-
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__marker-time", children:
|
|
1142
|
+
/* @__PURE__ */ e("span", { className: "nice-screen-recorder__marker-time", children: o(a.time) }),
|
|
1135
1143
|
/* @__PURE__ */ e(
|
|
1136
1144
|
"input",
|
|
1137
1145
|
{
|
|
1138
1146
|
type: "text",
|
|
1139
|
-
value:
|
|
1147
|
+
value: a.label,
|
|
1140
1148
|
onChange: (d) => {
|
|
1141
1149
|
D(
|
|
1142
|
-
(
|
|
1150
|
+
(v) => v.map((p) => p.id === a.id ? { ...p, label: d.target.value } : p)
|
|
1143
1151
|
);
|
|
1144
1152
|
},
|
|
1145
1153
|
className: "nice-screen-recorder__marker-label"
|
|
@@ -1148,24 +1156,24 @@ const fe = {
|
|
|
1148
1156
|
/* @__PURE__ */ e(
|
|
1149
1157
|
"button",
|
|
1150
1158
|
{
|
|
1151
|
-
"aria-label":
|
|
1159
|
+
"aria-label": n("screenRecorder.close", "Close"),
|
|
1152
1160
|
className: "nice-screen-recorder__marker-remove",
|
|
1153
|
-
onClick: () => j(
|
|
1161
|
+
onClick: () => j(a.id),
|
|
1154
1162
|
children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
|
|
1155
1163
|
}
|
|
1156
1164
|
)
|
|
1157
1165
|
]
|
|
1158
1166
|
},
|
|
1159
|
-
|
|
1167
|
+
a.id
|
|
1160
1168
|
)) })
|
|
1161
1169
|
] }),
|
|
1162
1170
|
G && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings", children: [
|
|
1163
1171
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-header", children: [
|
|
1164
|
-
/* @__PURE__ */ e("h3", { children:
|
|
1172
|
+
/* @__PURE__ */ e("h3", { children: n("screenRecorder.recordingSettings", "Recording Settings") }),
|
|
1165
1173
|
/* @__PURE__ */ e(
|
|
1166
1174
|
"button",
|
|
1167
1175
|
{
|
|
1168
|
-
"aria-label":
|
|
1176
|
+
"aria-label": n("screenRecorder.close", "Close"),
|
|
1169
1177
|
className: "nice-screen-recorder__close-button",
|
|
1170
1178
|
onClick: () => W(!1),
|
|
1171
1179
|
children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
|
|
@@ -1173,38 +1181,38 @@ const fe = {
|
|
|
1173
1181
|
)
|
|
1174
1182
|
] }),
|
|
1175
1183
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
|
|
1176
|
-
/* @__PURE__ */ e("h4", { children:
|
|
1184
|
+
/* @__PURE__ */ e("h4", { children: n("screenRecorder.video", "Video") }),
|
|
1177
1185
|
/* @__PURE__ */ t("label", { children: [
|
|
1178
|
-
|
|
1186
|
+
n("screenRecorder.source", "Source"),
|
|
1179
1187
|
/* @__PURE__ */ t(
|
|
1180
1188
|
"select",
|
|
1181
1189
|
{
|
|
1182
1190
|
value: s.video.source,
|
|
1183
|
-
onChange: (
|
|
1191
|
+
onChange: (a) => C({
|
|
1184
1192
|
video: {
|
|
1185
1193
|
...s.video,
|
|
1186
|
-
source:
|
|
1194
|
+
source: a.target.value
|
|
1187
1195
|
}
|
|
1188
1196
|
}),
|
|
1189
1197
|
children: [
|
|
1190
|
-
/* @__PURE__ */ e("option", { value: "screen", children:
|
|
1191
|
-
/* @__PURE__ */ e("option", { value: "window", children:
|
|
1192
|
-
/* @__PURE__ */ e("option", { value: "tab", children:
|
|
1193
|
-
/* @__PURE__ */ e("option", { value: "camera", children:
|
|
1198
|
+
/* @__PURE__ */ e("option", { value: "screen", children: n("screenRecorder.entireScreen", "Entire Screen") }),
|
|
1199
|
+
/* @__PURE__ */ e("option", { value: "window", children: n("screenRecorder.applicationWindow", "Application Window") }),
|
|
1200
|
+
/* @__PURE__ */ e("option", { value: "tab", children: n("screenRecorder.browserTab", "Browser Tab") }),
|
|
1201
|
+
/* @__PURE__ */ e("option", { value: "camera", children: n("screenRecorder.camera", "Camera") })
|
|
1194
1202
|
]
|
|
1195
1203
|
}
|
|
1196
1204
|
)
|
|
1197
1205
|
] }),
|
|
1198
1206
|
/* @__PURE__ */ t("label", { children: [
|
|
1199
|
-
|
|
1207
|
+
n("screenRecorder.resolution", "Resolution"),
|
|
1200
1208
|
/* @__PURE__ */ t(
|
|
1201
1209
|
"select",
|
|
1202
1210
|
{
|
|
1203
|
-
value: `${(
|
|
1204
|
-
onChange: (
|
|
1205
|
-
const [d,
|
|
1206
|
-
|
|
1207
|
-
video: { ...s.video, resolution: { width: d, height:
|
|
1211
|
+
value: `${(r = s.video.resolution) == null ? void 0 : r.width}x${(c = s.video.resolution) == null ? void 0 : c.height}`,
|
|
1212
|
+
onChange: (a) => {
|
|
1213
|
+
const [d, v] = a.target.value.split("x").map(Number);
|
|
1214
|
+
C({
|
|
1215
|
+
video: { ...s.video, resolution: { width: d, height: v } }
|
|
1208
1216
|
});
|
|
1209
1217
|
},
|
|
1210
1218
|
children: [
|
|
@@ -1217,13 +1225,13 @@ const fe = {
|
|
|
1217
1225
|
)
|
|
1218
1226
|
] }),
|
|
1219
1227
|
/* @__PURE__ */ t("label", { children: [
|
|
1220
|
-
|
|
1228
|
+
n("screenRecorder.frameRate", "Frame Rate"),
|
|
1221
1229
|
/* @__PURE__ */ t(
|
|
1222
1230
|
"select",
|
|
1223
1231
|
{
|
|
1224
1232
|
value: s.video.frameRate,
|
|
1225
|
-
onChange: (
|
|
1226
|
-
video: { ...s.video, frameRate: parseInt(
|
|
1233
|
+
onChange: (a) => C({
|
|
1234
|
+
video: { ...s.video, frameRate: parseInt(a.target.value) }
|
|
1227
1235
|
}),
|
|
1228
1236
|
children: [
|
|
1229
1237
|
/* @__PURE__ */ e("option", { value: "15", children: "15 fps" }),
|
|
@@ -1240,46 +1248,46 @@ const fe = {
|
|
|
1240
1248
|
{
|
|
1241
1249
|
type: "checkbox",
|
|
1242
1250
|
checked: s.video.showCursor,
|
|
1243
|
-
onChange: (
|
|
1244
|
-
video: { ...s.video, showCursor:
|
|
1251
|
+
onChange: (a) => C({
|
|
1252
|
+
video: { ...s.video, showCursor: a.target.checked }
|
|
1245
1253
|
})
|
|
1246
1254
|
}
|
|
1247
1255
|
),
|
|
1248
|
-
|
|
1256
|
+
n("screenRecorder.showCursor", "Show Cursor")
|
|
1249
1257
|
] })
|
|
1250
1258
|
] }),
|
|
1251
1259
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
|
|
1252
|
-
/* @__PURE__ */ e("h4", { children:
|
|
1260
|
+
/* @__PURE__ */ e("h4", { children: n("screenRecorder.audio", "Audio") }),
|
|
1253
1261
|
/* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
|
|
1254
1262
|
/* @__PURE__ */ e(
|
|
1255
1263
|
"input",
|
|
1256
1264
|
{
|
|
1257
1265
|
type: "checkbox",
|
|
1258
1266
|
checked: s.audio.enabled,
|
|
1259
|
-
onChange: (
|
|
1260
|
-
audio: { ...s.audio, enabled:
|
|
1267
|
+
onChange: (a) => C({
|
|
1268
|
+
audio: { ...s.audio, enabled: a.target.checked }
|
|
1261
1269
|
})
|
|
1262
1270
|
}
|
|
1263
1271
|
),
|
|
1264
|
-
|
|
1272
|
+
n("screenRecorder.enableAudio", "Enable Audio")
|
|
1265
1273
|
] }),
|
|
1266
|
-
s.audio.enabled && /* @__PURE__ */ t(
|
|
1274
|
+
s.audio.enabled && /* @__PURE__ */ t(ce, { children: [
|
|
1267
1275
|
/* @__PURE__ */ t("label", { children: [
|
|
1268
|
-
|
|
1276
|
+
n("screenRecorder.source", "Source"),
|
|
1269
1277
|
/* @__PURE__ */ t(
|
|
1270
1278
|
"select",
|
|
1271
1279
|
{
|
|
1272
1280
|
value: s.audio.source,
|
|
1273
|
-
onChange: (
|
|
1281
|
+
onChange: (a) => C({
|
|
1274
1282
|
audio: {
|
|
1275
1283
|
...s.audio,
|
|
1276
|
-
source:
|
|
1284
|
+
source: a.target.value
|
|
1277
1285
|
}
|
|
1278
1286
|
}),
|
|
1279
1287
|
children: [
|
|
1280
|
-
/* @__PURE__ */ e("option", { value: "system", children:
|
|
1281
|
-
/* @__PURE__ */ e("option", { value: "microphone", children:
|
|
1282
|
-
/* @__PURE__ */ e("option", { value: "both", children:
|
|
1288
|
+
/* @__PURE__ */ e("option", { value: "system", children: n("screenRecorder.systemAudio", "System Audio") }),
|
|
1289
|
+
/* @__PURE__ */ e("option", { value: "microphone", children: n("screenRecorder.microphone", "Microphone") }),
|
|
1290
|
+
/* @__PURE__ */ e("option", { value: "both", children: n("screenRecorder.both", "Both") })
|
|
1283
1291
|
]
|
|
1284
1292
|
}
|
|
1285
1293
|
)
|
|
@@ -1290,12 +1298,12 @@ const fe = {
|
|
|
1290
1298
|
{
|
|
1291
1299
|
type: "checkbox",
|
|
1292
1300
|
checked: s.audio.echoCancellation,
|
|
1293
|
-
onChange: (
|
|
1294
|
-
audio: { ...s.audio, echoCancellation:
|
|
1301
|
+
onChange: (a) => C({
|
|
1302
|
+
audio: { ...s.audio, echoCancellation: a.target.checked }
|
|
1295
1303
|
})
|
|
1296
1304
|
}
|
|
1297
1305
|
),
|
|
1298
|
-
|
|
1306
|
+
n("screenRecorder.echoCancellation", "Echo Cancellation")
|
|
1299
1307
|
] }),
|
|
1300
1308
|
/* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
|
|
1301
1309
|
/* @__PURE__ */ e(
|
|
@@ -1303,51 +1311,51 @@ const fe = {
|
|
|
1303
1311
|
{
|
|
1304
1312
|
type: "checkbox",
|
|
1305
1313
|
checked: s.audio.noiseSuppression,
|
|
1306
|
-
onChange: (
|
|
1307
|
-
audio: { ...s.audio, noiseSuppression:
|
|
1314
|
+
onChange: (a) => C({
|
|
1315
|
+
audio: { ...s.audio, noiseSuppression: a.target.checked }
|
|
1308
1316
|
})
|
|
1309
1317
|
}
|
|
1310
1318
|
),
|
|
1311
|
-
|
|
1319
|
+
n("screenRecorder.noiseSuppression", "Noise Suppression")
|
|
1312
1320
|
] })
|
|
1313
1321
|
] })
|
|
1314
1322
|
] }),
|
|
1315
1323
|
/* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
|
|
1316
|
-
/* @__PURE__ */ e("h4", { children:
|
|
1324
|
+
/* @__PURE__ */ e("h4", { children: n("screenRecorder.output", "Output") }),
|
|
1317
1325
|
/* @__PURE__ */ t("label", { children: [
|
|
1318
|
-
|
|
1326
|
+
n("screenRecorder.format", "Format"),
|
|
1319
1327
|
/* @__PURE__ */ t(
|
|
1320
1328
|
"select",
|
|
1321
1329
|
{
|
|
1322
1330
|
value: s.output.format,
|
|
1323
|
-
onChange: (
|
|
1324
|
-
output: { ...s.output, format:
|
|
1331
|
+
onChange: (a) => C({
|
|
1332
|
+
output: { ...s.output, format: a.target.value }
|
|
1325
1333
|
}),
|
|
1326
1334
|
children: [
|
|
1327
|
-
/* @__PURE__ */ e("option", { value: "webm", children: "WebM (Best Web)" }),
|
|
1328
|
-
/* @__PURE__ */ e("option", { value: "mp4", children: "MP4 (Most Compatible)" }),
|
|
1329
|
-
/* @__PURE__ */ e("option", { value: "mkv", children: "MKV (Lossless)" })
|
|
1335
|
+
/* @__PURE__ */ e("option", { value: "webm", children: n("screenRecorder.webmBestWeb", "WebM (Best Web)") }),
|
|
1336
|
+
/* @__PURE__ */ e("option", { value: "mp4", children: n("screenRecorder.mp4MostCompatible", "MP4 (Most Compatible)") }),
|
|
1337
|
+
/* @__PURE__ */ e("option", { value: "mkv", children: n("screenRecorder.mkvLossless", "MKV (Lossless)") })
|
|
1330
1338
|
]
|
|
1331
1339
|
}
|
|
1332
1340
|
)
|
|
1333
1341
|
] }),
|
|
1334
1342
|
/* @__PURE__ */ t("label", { children: [
|
|
1335
|
-
|
|
1343
|
+
n("screenRecorder.quality", "Quality"),
|
|
1336
1344
|
/* @__PURE__ */ t(
|
|
1337
1345
|
"select",
|
|
1338
1346
|
{
|
|
1339
1347
|
value: s.output.quality,
|
|
1340
|
-
onChange: (
|
|
1348
|
+
onChange: (a) => C({
|
|
1341
1349
|
output: {
|
|
1342
1350
|
...s.output,
|
|
1343
|
-
quality:
|
|
1351
|
+
quality: a.target.value
|
|
1344
1352
|
}
|
|
1345
1353
|
}),
|
|
1346
1354
|
children: [
|
|
1347
|
-
/* @__PURE__ */ e("option", { value: "low", children: "Low (Smaller file)" }),
|
|
1348
|
-
/* @__PURE__ */ e("option", { value: "medium", children:
|
|
1349
|
-
/* @__PURE__ */ e("option", { value: "high", children: "High (Recommended)" }),
|
|
1350
|
-
/* @__PURE__ */ e("option", { value: "lossless", children: "Lossless (Largest file)" })
|
|
1355
|
+
/* @__PURE__ */ e("option", { value: "low", children: n("screenRecorder.lowSmallerFile", "Low (Smaller file)") }),
|
|
1356
|
+
/* @__PURE__ */ e("option", { value: "medium", children: n("screenRecorder.medium", "Medium") }),
|
|
1357
|
+
/* @__PURE__ */ e("option", { value: "high", children: n("screenRecorder.highRecommended", "High (Recommended)") }),
|
|
1358
|
+
/* @__PURE__ */ e("option", { value: "lossless", children: n("screenRecorder.losslessLargestFile", "Lossless (Largest file)") })
|
|
1351
1359
|
]
|
|
1352
1360
|
}
|
|
1353
1361
|
)
|
|
@@ -1356,7 +1364,7 @@ const fe = {
|
|
|
1356
1364
|
] })
|
|
1357
1365
|
] });
|
|
1358
1366
|
}, we = {
|
|
1359
|
-
id:
|
|
1367
|
+
id: M(),
|
|
1360
1368
|
name: "My Stream",
|
|
1361
1369
|
protocol: "rtmp",
|
|
1362
1370
|
destinations: [],
|
|
@@ -1399,7 +1407,7 @@ const fe = {
|
|
|
1399
1407
|
},
|
|
1400
1408
|
{ platform: "custom-rtmp", name: "Custom RTMP", icon: "link", defaultUrl: "" },
|
|
1401
1409
|
{ platform: "custom-srt", name: "Custom SRT", icon: "lock", defaultUrl: "" }
|
|
1402
|
-
],
|
|
1410
|
+
], oe = [
|
|
1403
1411
|
{ type: "camera", name: "Camera", icon: "camera" },
|
|
1404
1412
|
{ type: "screen", name: "Screen Capture", icon: "monitor" },
|
|
1405
1413
|
{ type: "window", name: "Window Capture", icon: "window" },
|
|
@@ -1408,18 +1416,18 @@ const fe = {
|
|
|
1408
1416
|
{ type: "video", name: "Video", icon: "video" },
|
|
1409
1417
|
{ type: "microphone", name: "Microphone", icon: "mic" },
|
|
1410
1418
|
{ type: "system-audio", name: "System Audio", icon: "volume" }
|
|
1411
|
-
],
|
|
1412
|
-
config:
|
|
1419
|
+
], Te = ({
|
|
1420
|
+
config: $,
|
|
1413
1421
|
onConfigChange: R,
|
|
1414
1422
|
onStreamStart: F,
|
|
1415
1423
|
onStreamStop: L,
|
|
1416
1424
|
onStatsUpdate: O,
|
|
1417
|
-
onError:
|
|
1418
|
-
className:
|
|
1425
|
+
onError: T,
|
|
1426
|
+
className: u = ""
|
|
1419
1427
|
}) => {
|
|
1420
|
-
const { t:
|
|
1428
|
+
const { t: n } = me(), [s, A] = f($ || we), [y, q] = f(
|
|
1421
1429
|
"sources"
|
|
1422
|
-
), [
|
|
1430
|
+
), [h, k] = f(!1), [N, D] = f({
|
|
1423
1431
|
duration: 0,
|
|
1424
1432
|
viewers: 0,
|
|
1425
1433
|
peakViewers: 0,
|
|
@@ -1428,57 +1436,57 @@ const fe = {
|
|
|
1428
1436
|
droppedFrames: 0,
|
|
1429
1437
|
cpuUsage: 0,
|
|
1430
1438
|
memoryUsage: 0
|
|
1431
|
-
}), [w, B] =
|
|
1439
|
+
}), [w, B] = f(null), [K, S] = f(!1), [G, W] = f(!1), [z, E] = f([s.layout]), [U, ie] = f(0), te = I(null), x = I(null), b = I(0);
|
|
1432
1440
|
le(() => {
|
|
1433
|
-
|
|
1434
|
-
}, [
|
|
1441
|
+
$ && A($);
|
|
1442
|
+
}, [$]), le(() => () => {
|
|
1435
1443
|
x.current && clearInterval(x.current);
|
|
1436
1444
|
}, []);
|
|
1437
|
-
const
|
|
1445
|
+
const g = ue(
|
|
1438
1446
|
(i) => {
|
|
1439
|
-
const
|
|
1440
|
-
A(
|
|
1447
|
+
const o = { ...s, ...i };
|
|
1448
|
+
A(o), R == null || R(o);
|
|
1441
1449
|
},
|
|
1442
1450
|
[s, R]
|
|
1443
1451
|
), V = (i) => {
|
|
1444
|
-
const
|
|
1445
|
-
id:
|
|
1446
|
-
name: (
|
|
1452
|
+
const o = de.find((r) => r.platform === i), l = {
|
|
1453
|
+
id: M(),
|
|
1454
|
+
name: (o == null ? void 0 : o.name) || "Custom",
|
|
1447
1455
|
platform: i,
|
|
1448
|
-
url: (
|
|
1456
|
+
url: (o == null ? void 0 : o.defaultUrl) || "",
|
|
1449
1457
|
streamKey: "",
|
|
1450
1458
|
enabled: !0,
|
|
1451
1459
|
status: "idle"
|
|
1452
1460
|
};
|
|
1453
|
-
|
|
1454
|
-
}, Y = (i,
|
|
1455
|
-
|
|
1456
|
-
destinations: s.destinations.map((l) => l.id === i ? { ...l, ...
|
|
1461
|
+
g({ destinations: [...s.destinations, l] }), W(!1);
|
|
1462
|
+
}, Y = (i, o) => {
|
|
1463
|
+
g({
|
|
1464
|
+
destinations: s.destinations.map((l) => l.id === i ? { ...l, ...o } : l)
|
|
1457
1465
|
});
|
|
1458
|
-
},
|
|
1459
|
-
|
|
1466
|
+
}, H = (i) => {
|
|
1467
|
+
g({ destinations: s.destinations.filter((o) => o.id !== i) });
|
|
1460
1468
|
}, X = async (i) => {
|
|
1461
|
-
const
|
|
1462
|
-
id:
|
|
1469
|
+
const o = oe.find((c) => c.type === i), l = {
|
|
1470
|
+
id: M(),
|
|
1463
1471
|
type: i,
|
|
1464
|
-
name: `${(
|
|
1472
|
+
name: `${(o == null ? void 0 : o.name) || i} ${s.sources.filter((c) => c.type === i).length + 1}`,
|
|
1465
1473
|
settings: {},
|
|
1466
1474
|
volume: 1,
|
|
1467
1475
|
muted: !1
|
|
1468
1476
|
};
|
|
1469
1477
|
try {
|
|
1470
1478
|
if (i === "camera" || i === "microphone") {
|
|
1471
|
-
const
|
|
1472
|
-
(
|
|
1479
|
+
const c = i === "camera" ? { video: !0 } : { audio: !0 }, d = (await navigator.mediaDevices.enumerateDevices()).filter(
|
|
1480
|
+
(v) => i === "camera" ? v.kind === "videoinput" : v.kind === "audioinput"
|
|
1473
1481
|
);
|
|
1474
1482
|
d.length > 0 && (l.settings.deviceId = d[0].deviceId);
|
|
1475
1483
|
} else (i === "screen" || i === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
|
|
1476
|
-
} catch (
|
|
1477
|
-
console.warn(`Could not access ${i}:`,
|
|
1484
|
+
} catch (c) {
|
|
1485
|
+
console.warn(`Could not access ${i}:`, c);
|
|
1478
1486
|
}
|
|
1479
|
-
|
|
1480
|
-
const
|
|
1481
|
-
id:
|
|
1487
|
+
g({ sources: [...s.sources, l] });
|
|
1488
|
+
const r = {
|
|
1489
|
+
id: M(),
|
|
1482
1490
|
sourceId: l.id,
|
|
1483
1491
|
position: { x: 0, y: 0 },
|
|
1484
1492
|
size: { width: s.layout.canvas.width, height: s.layout.canvas.height },
|
|
@@ -1486,46 +1494,46 @@ const fe = {
|
|
|
1486
1494
|
opacity: 1,
|
|
1487
1495
|
zIndex: s.layout.layers.length
|
|
1488
1496
|
};
|
|
1489
|
-
|
|
1497
|
+
g({
|
|
1490
1498
|
layout: {
|
|
1491
1499
|
...s.layout,
|
|
1492
|
-
layers: [...s.layout.layers,
|
|
1500
|
+
layers: [...s.layout.layers, r]
|
|
1493
1501
|
}
|
|
1494
|
-
}),
|
|
1495
|
-
},
|
|
1496
|
-
|
|
1497
|
-
sources: s.sources.map((l) => l.id === i ? { ...l, ...
|
|
1502
|
+
}), S(!1);
|
|
1503
|
+
}, C = (i, o) => {
|
|
1504
|
+
g({
|
|
1505
|
+
sources: s.sources.map((l) => l.id === i ? { ...l, ...o } : l)
|
|
1498
1506
|
});
|
|
1499
1507
|
}, Z = (i) => {
|
|
1500
|
-
|
|
1501
|
-
sources: s.sources.filter((
|
|
1508
|
+
g({
|
|
1509
|
+
sources: s.sources.filter((o) => o.id !== i),
|
|
1502
1510
|
layout: {
|
|
1503
1511
|
...s.layout,
|
|
1504
|
-
layers: s.layout.layers.filter((
|
|
1512
|
+
layers: s.layout.layers.filter((o) => o.sourceId !== i)
|
|
1505
1513
|
}
|
|
1506
1514
|
});
|
|
1507
|
-
}, P = (i,
|
|
1508
|
-
|
|
1515
|
+
}, P = (i, o) => {
|
|
1516
|
+
g({
|
|
1509
1517
|
layout: {
|
|
1510
1518
|
...s.layout,
|
|
1511
|
-
layers: s.layout.layers.map((l) => l.id === i ? { ...l, ...
|
|
1519
|
+
layers: s.layout.layers.map((l) => l.id === i ? { ...l, ...o } : l)
|
|
1512
1520
|
}
|
|
1513
1521
|
});
|
|
1514
1522
|
}, ne = (i) => {
|
|
1515
|
-
const
|
|
1516
|
-
if (
|
|
1523
|
+
const o = s.layout.layers.findIndex((l) => l.id === i);
|
|
1524
|
+
if (o < s.layout.layers.length - 1) {
|
|
1517
1525
|
const l = [...s.layout.layers];
|
|
1518
|
-
[l[
|
|
1519
|
-
|
|
1520
|
-
}),
|
|
1526
|
+
[l[o], l[o + 1]] = [l[o + 1], l[o]], l.forEach((r, c) => {
|
|
1527
|
+
r.zIndex = c;
|
|
1528
|
+
}), g({ layout: { ...s.layout, layers: l } });
|
|
1521
1529
|
}
|
|
1522
1530
|
}, ae = (i) => {
|
|
1523
|
-
const
|
|
1524
|
-
if (
|
|
1531
|
+
const o = s.layout.layers.findIndex((l) => l.id === i);
|
|
1532
|
+
if (o > 0) {
|
|
1525
1533
|
const l = [...s.layout.layers];
|
|
1526
|
-
[l[
|
|
1527
|
-
|
|
1528
|
-
}),
|
|
1534
|
+
[l[o], l[o - 1]] = [l[o - 1], l[o]], l.forEach((r, c) => {
|
|
1535
|
+
r.zIndex = c;
|
|
1536
|
+
}), g({ layout: { ...s.layout, layers: l } });
|
|
1529
1537
|
}
|
|
1530
1538
|
}, J = () => {
|
|
1531
1539
|
const i = {
|
|
@@ -1533,23 +1541,23 @@ const fe = {
|
|
|
1533
1541
|
canvas: { ...s.layout.canvas },
|
|
1534
1542
|
layers: []
|
|
1535
1543
|
};
|
|
1536
|
-
|
|
1544
|
+
E([...z, i]);
|
|
1537
1545
|
}, Q = (i) => {
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1546
|
+
const o = [...z];
|
|
1547
|
+
o[U] = s.layout, E(o), ie(i), g({ layout: z[i] });
|
|
1540
1548
|
}, ee = async () => {
|
|
1541
1549
|
try {
|
|
1542
|
-
|
|
1550
|
+
g({
|
|
1543
1551
|
destinations: s.destinations.map(
|
|
1544
1552
|
(i) => i.enabled ? { ...i, status: "connecting" } : i
|
|
1545
1553
|
)
|
|
1546
|
-
}), await new Promise((i) => setTimeout(i, 2e3)),
|
|
1554
|
+
}), await new Promise((i) => setTimeout(i, 2e3)), g({
|
|
1547
1555
|
destinations: s.destinations.map(
|
|
1548
1556
|
(i) => i.enabled ? { ...i, status: "live" } : i
|
|
1549
1557
|
)
|
|
1550
|
-
}), k(!0),
|
|
1558
|
+
}), k(!0), b.current = Date.now(), F == null || F(), x.current = setInterval(() => {
|
|
1551
1559
|
const i = {
|
|
1552
|
-
duration: (Date.now() -
|
|
1560
|
+
duration: (Date.now() - b.current) / 1e3,
|
|
1553
1561
|
viewers: Math.floor(Math.random() * 100) + N.viewers,
|
|
1554
1562
|
peakViewers: Math.max(N.peakViewers, N.viewers),
|
|
1555
1563
|
bitrate: s.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
|
|
@@ -1561,21 +1569,21 @@ const fe = {
|
|
|
1561
1569
|
D(i), O == null || O(i);
|
|
1562
1570
|
}, 1e3);
|
|
1563
1571
|
} catch (i) {
|
|
1564
|
-
|
|
1565
|
-
destinations: s.destinations.map((
|
|
1566
|
-
...
|
|
1572
|
+
T == null || T(i instanceof Error ? i : new Error("Failed to start stream")), g({
|
|
1573
|
+
destinations: s.destinations.map((o) => ({
|
|
1574
|
+
...o,
|
|
1567
1575
|
status: "error"
|
|
1568
1576
|
}))
|
|
1569
1577
|
});
|
|
1570
1578
|
}
|
|
1571
1579
|
}, j = () => {
|
|
1572
|
-
x.current && clearInterval(x.current),
|
|
1580
|
+
x.current && clearInterval(x.current), g({
|
|
1573
1581
|
destinations: s.destinations.map((i) => ({ ...i, status: "idle" }))
|
|
1574
1582
|
}), k(!1), L == null || L();
|
|
1575
|
-
}, se = (i) => {
|
|
1576
|
-
const c = Math.floor(i / 3600), l = Math.floor(i % 3600 / 60), a = Math.floor(i % 60);
|
|
1577
|
-
return `${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
|
|
1578
1583
|
}, re = (i) => {
|
|
1584
|
+
const o = Math.floor(i / 3600), l = Math.floor(i % 3600 / 60), r = Math.floor(i % 60);
|
|
1585
|
+
return `${o.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
|
|
1586
|
+
}, se = (i) => {
|
|
1579
1587
|
switch (i) {
|
|
1580
1588
|
case "live":
|
|
1581
1589
|
return "var(--nice-success, #00ff00)";
|
|
@@ -1587,7 +1595,7 @@ const fe = {
|
|
|
1587
1595
|
return "var(--nice-text-secondary, #888888)";
|
|
1588
1596
|
}
|
|
1589
1597
|
};
|
|
1590
|
-
return /* @__PURE__ */ t("div", { className: `nice-live-streaming ${
|
|
1598
|
+
return /* @__PURE__ */ t("div", { className: `nice-live-streaming ${u}`, children: [
|
|
1591
1599
|
/* @__PURE__ */ t("header", { className: "nice-live-streaming__header", children: [
|
|
1592
1600
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__header-title", children: [
|
|
1593
1601
|
/* @__PURE__ */ e(
|
|
@@ -1595,21 +1603,21 @@ const fe = {
|
|
|
1595
1603
|
{
|
|
1596
1604
|
type: "text",
|
|
1597
1605
|
value: s.name,
|
|
1598
|
-
onChange: (i) =>
|
|
1606
|
+
onChange: (i) => g({ name: i.target.value }),
|
|
1599
1607
|
className: "nice-live-streaming__stream-name-input"
|
|
1600
1608
|
}
|
|
1601
1609
|
),
|
|
1602
|
-
|
|
1610
|
+
h && /* @__PURE__ */ t("span", { className: "nice-live-streaming__live-badge", children: [
|
|
1603
1611
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__live-dot" }),
|
|
1604
1612
|
" ",
|
|
1605
|
-
|
|
1613
|
+
n("liveStreaming.live", "LIVE")
|
|
1606
1614
|
] })
|
|
1607
1615
|
] }),
|
|
1608
|
-
/* @__PURE__ */ e("div", { className: "nice-live-streaming__header-stats", children:
|
|
1616
|
+
/* @__PURE__ */ e("div", { className: "nice-live-streaming__header-stats", children: h && /* @__PURE__ */ t(ce, { children: [
|
|
1609
1617
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
|
|
1610
1618
|
/* @__PURE__ */ e(m, { name: "clock", size: 14 }),
|
|
1611
1619
|
" ",
|
|
1612
|
-
|
|
1620
|
+
re(N.duration)
|
|
1613
1621
|
] }),
|
|
1614
1622
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
|
|
1615
1623
|
/* @__PURE__ */ e(m, { name: "users", size: 14 }),
|
|
@@ -1619,8 +1627,10 @@ const fe = {
|
|
|
1619
1627
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
|
|
1620
1628
|
/* @__PURE__ */ e(m, { name: "bar-chart", size: 14 }),
|
|
1621
1629
|
" ",
|
|
1622
|
-
|
|
1623
|
-
|
|
1630
|
+
n("liveStreaming.kbps", "{bitrate} kbps").replace(
|
|
1631
|
+
"{bitrate}",
|
|
1632
|
+
String(Math.round(N.bitrate))
|
|
1633
|
+
)
|
|
1624
1634
|
] }),
|
|
1625
1635
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
|
|
1626
1636
|
/* @__PURE__ */ e(m, { name: "video", size: 14 }),
|
|
@@ -1629,12 +1639,12 @@ const fe = {
|
|
|
1629
1639
|
" fps"
|
|
1630
1640
|
] })
|
|
1631
1641
|
] }) }),
|
|
1632
|
-
/* @__PURE__ */ e("div", { className: "nice-live-streaming__header-actions", children:
|
|
1642
|
+
/* @__PURE__ */ e("div", { className: "nice-live-streaming__header-actions", children: h ? /* @__PURE__ */ e(
|
|
1633
1643
|
"button",
|
|
1634
1644
|
{
|
|
1635
1645
|
className: "nice-live-streaming__action-button nice-live-streaming__action-button--stop",
|
|
1636
1646
|
onClick: j,
|
|
1637
|
-
children:
|
|
1647
|
+
children: n("liveStreaming.endStream", "End Stream")
|
|
1638
1648
|
}
|
|
1639
1649
|
) : /* @__PURE__ */ e(
|
|
1640
1650
|
"button",
|
|
@@ -1642,21 +1652,21 @@ const fe = {
|
|
|
1642
1652
|
className: "nice-live-streaming__action-button nice-live-streaming__action-button--go-live",
|
|
1643
1653
|
onClick: ee,
|
|
1644
1654
|
disabled: s.destinations.filter((i) => i.enabled).length === 0,
|
|
1645
|
-
children:
|
|
1655
|
+
children: n("liveStreaming.goLive", "Go Live")
|
|
1646
1656
|
}
|
|
1647
1657
|
) })
|
|
1648
1658
|
] }),
|
|
1649
1659
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__main", children: [
|
|
1650
1660
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__preview", children: [
|
|
1651
1661
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__scenes-bar", children: [
|
|
1652
|
-
z.map((i,
|
|
1662
|
+
z.map((i, o) => /* @__PURE__ */ e(
|
|
1653
1663
|
"button",
|
|
1654
1664
|
{
|
|
1655
|
-
className: `nice-live-streaming__scene-button ${U ===
|
|
1656
|
-
onClick: () => Q(
|
|
1665
|
+
className: `nice-live-streaming__scene-button ${U === o ? "nice-live-streaming__scene-button--active" : ""}`,
|
|
1666
|
+
onClick: () => Q(o),
|
|
1657
1667
|
children: i.name
|
|
1658
1668
|
},
|
|
1659
|
-
|
|
1669
|
+
o
|
|
1660
1670
|
)),
|
|
1661
1671
|
/* @__PURE__ */ e(
|
|
1662
1672
|
"button",
|
|
@@ -1676,10 +1686,10 @@ const fe = {
|
|
|
1676
1686
|
aspectRatio: `${s.layout.canvas.width}/${s.layout.canvas.height}`,
|
|
1677
1687
|
backgroundColor: s.layout.canvas.backgroundColor
|
|
1678
1688
|
},
|
|
1679
|
-
children: s.layout.layers.sort((i,
|
|
1689
|
+
children: s.layout.layers.sort((i, o) => i.zIndex - o.zIndex).map((i) => {
|
|
1680
1690
|
var l;
|
|
1681
|
-
const
|
|
1682
|
-
return !i.visible || !
|
|
1691
|
+
const o = s.sources.find((r) => r.id === i.sourceId);
|
|
1692
|
+
return !i.visible || !o ? null : /* @__PURE__ */ e(
|
|
1683
1693
|
"div",
|
|
1684
1694
|
{
|
|
1685
1695
|
className: `nice-live-streaming__canvas-layer ${w === i.id ? "nice-live-streaming__canvas-layer--selected" : ""}`,
|
|
@@ -1696,11 +1706,11 @@ const fe = {
|
|
|
1696
1706
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-icon", children: /* @__PURE__ */ e(
|
|
1697
1707
|
m,
|
|
1698
1708
|
{
|
|
1699
|
-
name: ((l =
|
|
1709
|
+
name: ((l = oe.find((r) => r.type === o.type)) == null ? void 0 : l.icon) ?? "box",
|
|
1700
1710
|
size: 16
|
|
1701
1711
|
}
|
|
1702
1712
|
) }),
|
|
1703
|
-
/* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-name", children:
|
|
1713
|
+
/* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-name", children: o.name })
|
|
1704
1714
|
] })
|
|
1705
1715
|
},
|
|
1706
1716
|
i.id
|
|
@@ -1714,7 +1724,7 @@ const fe = {
|
|
|
1714
1724
|
"button",
|
|
1715
1725
|
{
|
|
1716
1726
|
className: `nice-live-streaming__panel-tab ${y === i ? "nice-live-streaming__panel-tab--active" : ""}`,
|
|
1717
|
-
onClick: () =>
|
|
1727
|
+
onClick: () => q(i),
|
|
1718
1728
|
children: i.charAt(0).toUpperCase() + i.slice(1)
|
|
1719
1729
|
},
|
|
1720
1730
|
i
|
|
@@ -1722,30 +1732,30 @@ const fe = {
|
|
|
1722
1732
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-content", children: [
|
|
1723
1733
|
y === "sources" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__sources-panel", children: [
|
|
1724
1734
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
|
|
1725
|
-
/* @__PURE__ */ e("h3", { children:
|
|
1735
|
+
/* @__PURE__ */ e("h3", { children: n("liveStreaming.sources", "Sources") }),
|
|
1726
1736
|
/* @__PURE__ */ e(
|
|
1727
1737
|
"button",
|
|
1728
1738
|
{
|
|
1729
1739
|
className: "nice-live-streaming__add-button",
|
|
1730
|
-
onClick: () =>
|
|
1731
|
-
disabled:
|
|
1732
|
-
children: "+ Add"
|
|
1740
|
+
onClick: () => S(!0),
|
|
1741
|
+
disabled: h,
|
|
1742
|
+
children: n("liveStreaming.add", "+ Add")
|
|
1733
1743
|
}
|
|
1734
1744
|
)
|
|
1735
1745
|
] }),
|
|
1736
1746
|
/* @__PURE__ */ e("div", { className: "nice-live-streaming__sources-list", children: s.sources.filter((i) => i.type !== "microphone" && i.type !== "system-audio").map((i) => {
|
|
1737
1747
|
var l;
|
|
1738
|
-
const
|
|
1748
|
+
const o = s.layout.layers.find((r) => r.sourceId === i.id);
|
|
1739
1749
|
return /* @__PURE__ */ t(
|
|
1740
1750
|
"div",
|
|
1741
1751
|
{
|
|
1742
|
-
className: `nice-live-streaming__source-item ${w === (
|
|
1743
|
-
onClick: () =>
|
|
1752
|
+
className: `nice-live-streaming__source-item ${w === (o == null ? void 0 : o.id) ? "nice-live-streaming__source-item--selected" : ""}`,
|
|
1753
|
+
onClick: () => o && B(o.id),
|
|
1744
1754
|
children: [
|
|
1745
1755
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__source-icon", children: /* @__PURE__ */ e(
|
|
1746
1756
|
m,
|
|
1747
1757
|
{
|
|
1748
|
-
name: ((l =
|
|
1758
|
+
name: ((l = oe.find((r) => r.type === i.type)) == null ? void 0 : l.icon) ?? "box",
|
|
1749
1759
|
size: 16
|
|
1750
1760
|
}
|
|
1751
1761
|
) }),
|
|
@@ -1754,18 +1764,18 @@ const fe = {
|
|
|
1754
1764
|
/* @__PURE__ */ e(
|
|
1755
1765
|
"button",
|
|
1756
1766
|
{
|
|
1757
|
-
className: `nice-live-streaming__visibility-toggle ${
|
|
1758
|
-
onClick: (
|
|
1759
|
-
|
|
1767
|
+
className: `nice-live-streaming__visibility-toggle ${o != null && o.visible ? "" : "nice-live-streaming__visibility-toggle--hidden"}`,
|
|
1768
|
+
onClick: (r) => {
|
|
1769
|
+
r.stopPropagation(), o && P(o.id, { visible: !o.visible });
|
|
1760
1770
|
},
|
|
1761
|
-
children: /* @__PURE__ */ e(m, { name:
|
|
1771
|
+
children: /* @__PURE__ */ e(m, { name: o != null && o.visible ? "eye" : "eye-off", size: 14 })
|
|
1762
1772
|
}
|
|
1763
1773
|
),
|
|
1764
1774
|
/* @__PURE__ */ e(
|
|
1765
1775
|
"button",
|
|
1766
1776
|
{
|
|
1767
|
-
onClick: (
|
|
1768
|
-
|
|
1777
|
+
onClick: (r) => {
|
|
1778
|
+
r.stopPropagation(), o && ne(o.id);
|
|
1769
1779
|
},
|
|
1770
1780
|
children: /* @__PURE__ */ e(m, { name: "arrow-up", size: 14 })
|
|
1771
1781
|
}
|
|
@@ -1773,8 +1783,8 @@ const fe = {
|
|
|
1773
1783
|
/* @__PURE__ */ e(
|
|
1774
1784
|
"button",
|
|
1775
1785
|
{
|
|
1776
|
-
onClick: (
|
|
1777
|
-
|
|
1786
|
+
onClick: (r) => {
|
|
1787
|
+
r.stopPropagation(), o && ae(o.id);
|
|
1778
1788
|
},
|
|
1779
1789
|
children: /* @__PURE__ */ e(m, { name: "arrow-down", size: 14 })
|
|
1780
1790
|
}
|
|
@@ -1782,10 +1792,10 @@ const fe = {
|
|
|
1782
1792
|
/* @__PURE__ */ e(
|
|
1783
1793
|
"button",
|
|
1784
1794
|
{
|
|
1785
|
-
onClick: (
|
|
1786
|
-
|
|
1795
|
+
onClick: (r) => {
|
|
1796
|
+
r.stopPropagation(), Z(i.id);
|
|
1787
1797
|
},
|
|
1788
|
-
disabled:
|
|
1798
|
+
disabled: h,
|
|
1789
1799
|
children: /* @__PURE__ */ e(m, { name: "trash", size: 14 })
|
|
1790
1800
|
}
|
|
1791
1801
|
)
|
|
@@ -1796,64 +1806,64 @@ const fe = {
|
|
|
1796
1806
|
);
|
|
1797
1807
|
}) }),
|
|
1798
1808
|
w && /* @__PURE__ */ t("div", { className: "nice-live-streaming__layer-properties", children: [
|
|
1799
|
-
/* @__PURE__ */ e("h4", { children:
|
|
1809
|
+
/* @__PURE__ */ e("h4", { children: n("liveStreaming.properties", "Properties") }),
|
|
1800
1810
|
(() => {
|
|
1801
|
-
const i = s.layout.layers.find((
|
|
1802
|
-
return i ? /* @__PURE__ */ t(
|
|
1811
|
+
const i = s.layout.layers.find((o) => o.id === w);
|
|
1812
|
+
return i ? /* @__PURE__ */ t(ce, { children: [
|
|
1803
1813
|
/* @__PURE__ */ t("label", { children: [
|
|
1804
|
-
|
|
1814
|
+
n("liveStreaming.xPosition", "X Position"),
|
|
1805
1815
|
/* @__PURE__ */ e(
|
|
1806
1816
|
"input",
|
|
1807
1817
|
{
|
|
1808
1818
|
type: "number",
|
|
1809
1819
|
value: i.position.x,
|
|
1810
|
-
onChange: (
|
|
1811
|
-
position: { ...i.position, x: parseInt(
|
|
1820
|
+
onChange: (o) => P(i.id, {
|
|
1821
|
+
position: { ...i.position, x: parseInt(o.target.value) || 0 }
|
|
1812
1822
|
})
|
|
1813
1823
|
}
|
|
1814
1824
|
)
|
|
1815
1825
|
] }),
|
|
1816
1826
|
/* @__PURE__ */ t("label", { children: [
|
|
1817
|
-
|
|
1827
|
+
n("liveStreaming.yPosition", "Y Position"),
|
|
1818
1828
|
/* @__PURE__ */ e(
|
|
1819
1829
|
"input",
|
|
1820
1830
|
{
|
|
1821
1831
|
type: "number",
|
|
1822
1832
|
value: i.position.y,
|
|
1823
|
-
onChange: (
|
|
1824
|
-
position: { ...i.position, y: parseInt(
|
|
1833
|
+
onChange: (o) => P(i.id, {
|
|
1834
|
+
position: { ...i.position, y: parseInt(o.target.value) || 0 }
|
|
1825
1835
|
})
|
|
1826
1836
|
}
|
|
1827
1837
|
)
|
|
1828
1838
|
] }),
|
|
1829
1839
|
/* @__PURE__ */ t("label", { children: [
|
|
1830
|
-
|
|
1840
|
+
n("liveStreaming.width", "Width"),
|
|
1831
1841
|
/* @__PURE__ */ e(
|
|
1832
1842
|
"input",
|
|
1833
1843
|
{
|
|
1834
1844
|
type: "number",
|
|
1835
1845
|
value: i.size.width,
|
|
1836
|
-
onChange: (
|
|
1837
|
-
size: { ...i.size, width: parseInt(
|
|
1846
|
+
onChange: (o) => P(i.id, {
|
|
1847
|
+
size: { ...i.size, width: parseInt(o.target.value) || 100 }
|
|
1838
1848
|
})
|
|
1839
1849
|
}
|
|
1840
1850
|
)
|
|
1841
1851
|
] }),
|
|
1842
1852
|
/* @__PURE__ */ t("label", { children: [
|
|
1843
|
-
|
|
1853
|
+
n("liveStreaming.height", "Height"),
|
|
1844
1854
|
/* @__PURE__ */ e(
|
|
1845
1855
|
"input",
|
|
1846
1856
|
{
|
|
1847
1857
|
type: "number",
|
|
1848
1858
|
value: i.size.height,
|
|
1849
|
-
onChange: (
|
|
1850
|
-
size: { ...i.size, height: parseInt(
|
|
1859
|
+
onChange: (o) => P(i.id, {
|
|
1860
|
+
size: { ...i.size, height: parseInt(o.target.value) || 100 }
|
|
1851
1861
|
})
|
|
1852
1862
|
}
|
|
1853
1863
|
)
|
|
1854
1864
|
] }),
|
|
1855
1865
|
/* @__PURE__ */ t("label", { children: [
|
|
1856
|
-
|
|
1866
|
+
n("liveStreaming.opacity", "Opacity"),
|
|
1857
1867
|
/* @__PURE__ */ e(
|
|
1858
1868
|
"input",
|
|
1859
1869
|
{
|
|
@@ -1862,8 +1872,8 @@ const fe = {
|
|
|
1862
1872
|
max: "1",
|
|
1863
1873
|
step: "0.1",
|
|
1864
1874
|
value: i.opacity,
|
|
1865
|
-
onChange: (
|
|
1866
|
-
opacity: parseFloat(
|
|
1875
|
+
onChange: (o) => P(i.id, {
|
|
1876
|
+
opacity: parseFloat(o.target.value)
|
|
1867
1877
|
})
|
|
1868
1878
|
}
|
|
1869
1879
|
)
|
|
@@ -1874,16 +1884,16 @@ const fe = {
|
|
|
1874
1884
|
] }),
|
|
1875
1885
|
y === "audio" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-panel", children: [
|
|
1876
1886
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
|
|
1877
|
-
/* @__PURE__ */ e("h3", { children:
|
|
1887
|
+
/* @__PURE__ */ e("h3", { children: n("liveStreaming.audioMixer", "Audio Mixer") }),
|
|
1878
1888
|
/* @__PURE__ */ e(
|
|
1879
1889
|
"button",
|
|
1880
1890
|
{
|
|
1881
1891
|
className: "nice-live-streaming__add-button",
|
|
1882
1892
|
onClick: () => {
|
|
1883
|
-
|
|
1893
|
+
S(!0);
|
|
1884
1894
|
},
|
|
1885
|
-
disabled:
|
|
1886
|
-
children: "+ Add"
|
|
1895
|
+
disabled: h,
|
|
1896
|
+
children: n("liveStreaming.add", "+ Add")
|
|
1887
1897
|
}
|
|
1888
1898
|
)
|
|
1889
1899
|
] }),
|
|
@@ -1891,13 +1901,13 @@ const fe = {
|
|
|
1891
1901
|
s.sources.filter(
|
|
1892
1902
|
(i) => i.type === "microphone" || i.type === "system-audio" || i.type === "video"
|
|
1893
1903
|
).map((i) => {
|
|
1894
|
-
var
|
|
1904
|
+
var o;
|
|
1895
1905
|
return /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-source", children: [
|
|
1896
1906
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-header", children: [
|
|
1897
1907
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__audio-icon", children: /* @__PURE__ */ e(
|
|
1898
1908
|
m,
|
|
1899
1909
|
{
|
|
1900
|
-
name: ((
|
|
1910
|
+
name: ((o = oe.find((l) => l.type === i.type)) == null ? void 0 : o.icon) ?? "box",
|
|
1901
1911
|
size: 16
|
|
1902
1912
|
}
|
|
1903
1913
|
) }),
|
|
@@ -1906,7 +1916,7 @@ const fe = {
|
|
|
1906
1916
|
"button",
|
|
1907
1917
|
{
|
|
1908
1918
|
className: `nice-live-streaming__mute-toggle ${i.muted ? "nice-live-streaming__mute-toggle--muted" : ""}`,
|
|
1909
|
-
onClick: () =>
|
|
1919
|
+
onClick: () => C(i.id, { muted: !i.muted }),
|
|
1910
1920
|
children: /* @__PURE__ */ e(m, { name: i.muted ? "volume-off" : "volume", size: 14 })
|
|
1911
1921
|
}
|
|
1912
1922
|
)
|
|
@@ -1920,7 +1930,7 @@ const fe = {
|
|
|
1920
1930
|
max: "1",
|
|
1921
1931
|
step: "0.01",
|
|
1922
1932
|
value: i.volume ?? 1,
|
|
1923
|
-
onChange: (l) =>
|
|
1933
|
+
onChange: (l) => C(i.id, { volume: parseFloat(l.target.value) }),
|
|
1924
1934
|
disabled: i.muted
|
|
1925
1935
|
}
|
|
1926
1936
|
),
|
|
@@ -1940,38 +1950,38 @@ const fe = {
|
|
|
1940
1950
|
}),
|
|
1941
1951
|
s.sources.filter(
|
|
1942
1952
|
(i) => i.type === "microphone" || i.type === "system-audio"
|
|
1943
|
-
).length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children:
|
|
1953
|
+
).length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: n("liveStreaming.noAudioSourcesAdded", "No audio sources added") })
|
|
1944
1954
|
] })
|
|
1945
1955
|
] }),
|
|
1946
1956
|
y === "destinations" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__destinations-panel", children: [
|
|
1947
1957
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
|
|
1948
|
-
/* @__PURE__ */ e("h3", { children:
|
|
1958
|
+
/* @__PURE__ */ e("h3", { children: n("liveStreaming.destinations", "Destinations") }),
|
|
1949
1959
|
/* @__PURE__ */ e(
|
|
1950
1960
|
"button",
|
|
1951
1961
|
{
|
|
1952
1962
|
className: "nice-live-streaming__add-button",
|
|
1953
1963
|
onClick: () => W(!0),
|
|
1954
|
-
disabled:
|
|
1955
|
-
children: "+ Add"
|
|
1964
|
+
disabled: h,
|
|
1965
|
+
children: n("liveStreaming.add", "+ Add")
|
|
1956
1966
|
}
|
|
1957
1967
|
)
|
|
1958
1968
|
] }),
|
|
1959
1969
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__destinations-list", children: [
|
|
1960
1970
|
s.destinations.map((i) => {
|
|
1961
|
-
var
|
|
1971
|
+
var o;
|
|
1962
1972
|
return /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-item", children: [
|
|
1963
1973
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-header", children: [
|
|
1964
1974
|
/* @__PURE__ */ e(
|
|
1965
1975
|
"span",
|
|
1966
1976
|
{
|
|
1967
1977
|
className: "nice-live-streaming__status-indicator",
|
|
1968
|
-
style: { backgroundColor:
|
|
1978
|
+
style: { backgroundColor: se(i.status) }
|
|
1969
1979
|
}
|
|
1970
1980
|
),
|
|
1971
1981
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__destination-icon", children: /* @__PURE__ */ e(
|
|
1972
1982
|
m,
|
|
1973
1983
|
{
|
|
1974
|
-
name: ((
|
|
1984
|
+
name: ((o = de.find((l) => l.platform === i.platform)) == null ? void 0 : o.icon) ?? "link",
|
|
1975
1985
|
size: 16
|
|
1976
1986
|
}
|
|
1977
1987
|
) }),
|
|
@@ -1983,7 +1993,7 @@ const fe = {
|
|
|
1983
1993
|
type: "checkbox",
|
|
1984
1994
|
checked: i.enabled,
|
|
1985
1995
|
onChange: (l) => Y(i.id, { enabled: l.target.checked }),
|
|
1986
|
-
disabled:
|
|
1996
|
+
disabled: h
|
|
1987
1997
|
}
|
|
1988
1998
|
),
|
|
1989
1999
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__toggle-slider" })
|
|
@@ -1991,28 +2001,28 @@ const fe = {
|
|
|
1991
2001
|
] }),
|
|
1992
2002
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-config", children: [
|
|
1993
2003
|
/* @__PURE__ */ t("label", { children: [
|
|
1994
|
-
|
|
2004
|
+
n("liveStreaming.serverUrl", "Server URL"),
|
|
1995
2005
|
/* @__PURE__ */ e(
|
|
1996
2006
|
"input",
|
|
1997
2007
|
{
|
|
1998
2008
|
type: "text",
|
|
1999
2009
|
value: i.url,
|
|
2000
2010
|
onChange: (l) => Y(i.id, { url: l.target.value }),
|
|
2001
|
-
placeholder:
|
|
2002
|
-
disabled:
|
|
2011
|
+
placeholder: n("liveStreaming.rtmp", "rtmp://..."),
|
|
2012
|
+
disabled: h
|
|
2003
2013
|
}
|
|
2004
2014
|
)
|
|
2005
2015
|
] }),
|
|
2006
2016
|
/* @__PURE__ */ t("label", { children: [
|
|
2007
|
-
|
|
2017
|
+
n("liveStreaming.streamKey", "Stream Key"),
|
|
2008
2018
|
/* @__PURE__ */ e(
|
|
2009
2019
|
"input",
|
|
2010
2020
|
{
|
|
2011
2021
|
type: "password",
|
|
2012
2022
|
value: i.streamKey || "",
|
|
2013
2023
|
onChange: (l) => Y(i.id, { streamKey: l.target.value }),
|
|
2014
|
-
placeholder:
|
|
2015
|
-
disabled:
|
|
2024
|
+
placeholder: n("liveStreaming.enterStreamKey", "Enter stream key"),
|
|
2025
|
+
disabled: h
|
|
2016
2026
|
}
|
|
2017
2027
|
)
|
|
2018
2028
|
] })
|
|
@@ -2021,39 +2031,39 @@ const fe = {
|
|
|
2021
2031
|
"button",
|
|
2022
2032
|
{
|
|
2023
2033
|
className: "nice-live-streaming__remove-button",
|
|
2024
|
-
onClick: () =>
|
|
2025
|
-
disabled:
|
|
2026
|
-
children:
|
|
2034
|
+
onClick: () => H(i.id),
|
|
2035
|
+
disabled: h,
|
|
2036
|
+
children: n("liveStreaming.remove", "Remove")
|
|
2027
2037
|
}
|
|
2028
2038
|
)
|
|
2029
2039
|
] }, i.id);
|
|
2030
2040
|
}),
|
|
2031
|
-
s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children:
|
|
2041
|
+
s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: n("liveStreaming.noDestinationsConfigured", "No destinations configured") })
|
|
2032
2042
|
] })
|
|
2033
2043
|
] }),
|
|
2034
2044
|
y === "settings" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__settings-panel", children: [
|
|
2035
2045
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__setting-section", children: [
|
|
2036
|
-
/* @__PURE__ */ e("h4", { children:
|
|
2046
|
+
/* @__PURE__ */ e("h4", { children: n("liveStreaming.video", "Video") }),
|
|
2037
2047
|
/* @__PURE__ */ t("label", { children: [
|
|
2038
|
-
|
|
2048
|
+
n("liveStreaming.resolution", "Resolution"),
|
|
2039
2049
|
/* @__PURE__ */ t(
|
|
2040
2050
|
"select",
|
|
2041
2051
|
{
|
|
2042
2052
|
value: `${s.settings.video.resolution.width}x${s.settings.video.resolution.height}`,
|
|
2043
2053
|
onChange: (i) => {
|
|
2044
|
-
const [
|
|
2045
|
-
|
|
2054
|
+
const [o, l] = i.target.value.split("x").map(Number);
|
|
2055
|
+
g({
|
|
2046
2056
|
settings: {
|
|
2047
2057
|
...s.settings,
|
|
2048
|
-
video: { ...s.settings.video, resolution: { width:
|
|
2058
|
+
video: { ...s.settings.video, resolution: { width: o, height: l } }
|
|
2049
2059
|
},
|
|
2050
2060
|
layout: {
|
|
2051
2061
|
...s.layout,
|
|
2052
|
-
canvas: { ...s.layout.canvas, width:
|
|
2062
|
+
canvas: { ...s.layout.canvas, width: o, height: l }
|
|
2053
2063
|
}
|
|
2054
2064
|
});
|
|
2055
2065
|
},
|
|
2056
|
-
disabled:
|
|
2066
|
+
disabled: h,
|
|
2057
2067
|
children: [
|
|
2058
2068
|
/* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
|
|
2059
2069
|
/* @__PURE__ */ e("option", { value: "1280x720", children: "720p (1280x720)" }),
|
|
@@ -2063,12 +2073,12 @@ const fe = {
|
|
|
2063
2073
|
)
|
|
2064
2074
|
] }),
|
|
2065
2075
|
/* @__PURE__ */ t("label", { children: [
|
|
2066
|
-
|
|
2076
|
+
n("liveStreaming.frameRate", "Frame Rate"),
|
|
2067
2077
|
/* @__PURE__ */ t(
|
|
2068
2078
|
"select",
|
|
2069
2079
|
{
|
|
2070
2080
|
value: s.settings.video.frameRate,
|
|
2071
|
-
onChange: (i) =>
|
|
2081
|
+
onChange: (i) => g({
|
|
2072
2082
|
settings: {
|
|
2073
2083
|
...s.settings,
|
|
2074
2084
|
video: {
|
|
@@ -2077,7 +2087,7 @@ const fe = {
|
|
|
2077
2087
|
}
|
|
2078
2088
|
}
|
|
2079
2089
|
}),
|
|
2080
|
-
disabled:
|
|
2090
|
+
disabled: h,
|
|
2081
2091
|
children: [
|
|
2082
2092
|
/* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
|
|
2083
2093
|
/* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
|
|
@@ -2087,13 +2097,13 @@ const fe = {
|
|
|
2087
2097
|
)
|
|
2088
2098
|
] }),
|
|
2089
2099
|
/* @__PURE__ */ t("label", { children: [
|
|
2090
|
-
"Bitrate (kbps)",
|
|
2100
|
+
n("liveStreaming.bitrateKbps", "Bitrate (kbps)"),
|
|
2091
2101
|
/* @__PURE__ */ e(
|
|
2092
2102
|
"input",
|
|
2093
2103
|
{
|
|
2094
2104
|
type: "number",
|
|
2095
2105
|
value: s.settings.video.bitrate,
|
|
2096
|
-
onChange: (i) =>
|
|
2106
|
+
onChange: (i) => g({
|
|
2097
2107
|
settings: {
|
|
2098
2108
|
...s.settings,
|
|
2099
2109
|
video: {
|
|
@@ -2104,18 +2114,18 @@ const fe = {
|
|
|
2104
2114
|
}),
|
|
2105
2115
|
min: "1000",
|
|
2106
2116
|
max: "50000",
|
|
2107
|
-
disabled:
|
|
2117
|
+
disabled: h
|
|
2108
2118
|
}
|
|
2109
2119
|
)
|
|
2110
2120
|
] }),
|
|
2111
2121
|
/* @__PURE__ */ t("label", { children: [
|
|
2112
|
-
"Keyframe Interval (sec)",
|
|
2122
|
+
n("liveStreaming.keyframeIntervalSec", "Keyframe Interval (sec)"),
|
|
2113
2123
|
/* @__PURE__ */ e(
|
|
2114
2124
|
"input",
|
|
2115
2125
|
{
|
|
2116
2126
|
type: "number",
|
|
2117
2127
|
value: s.settings.video.keyframe,
|
|
2118
|
-
onChange: (i) =>
|
|
2128
|
+
onChange: (i) => g({
|
|
2119
2129
|
settings: {
|
|
2120
2130
|
...s.settings,
|
|
2121
2131
|
video: {
|
|
@@ -2126,20 +2136,20 @@ const fe = {
|
|
|
2126
2136
|
}),
|
|
2127
2137
|
min: "1",
|
|
2128
2138
|
max: "10",
|
|
2129
|
-
disabled:
|
|
2139
|
+
disabled: h
|
|
2130
2140
|
}
|
|
2131
2141
|
)
|
|
2132
2142
|
] })
|
|
2133
2143
|
] }),
|
|
2134
2144
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__setting-section", children: [
|
|
2135
|
-
/* @__PURE__ */ e("h4", { children:
|
|
2145
|
+
/* @__PURE__ */ e("h4", { children: n("liveStreaming.audio", "Audio") }),
|
|
2136
2146
|
/* @__PURE__ */ t("label", { children: [
|
|
2137
|
-
|
|
2147
|
+
n("liveStreaming.sampleRate", "Sample Rate"),
|
|
2138
2148
|
/* @__PURE__ */ t(
|
|
2139
2149
|
"select",
|
|
2140
2150
|
{
|
|
2141
2151
|
value: s.settings.audio.sampleRate,
|
|
2142
|
-
onChange: (i) =>
|
|
2152
|
+
onChange: (i) => g({
|
|
2143
2153
|
settings: {
|
|
2144
2154
|
...s.settings,
|
|
2145
2155
|
audio: {
|
|
@@ -2148,7 +2158,7 @@ const fe = {
|
|
|
2148
2158
|
}
|
|
2149
2159
|
}
|
|
2150
2160
|
}),
|
|
2151
|
-
disabled:
|
|
2161
|
+
disabled: h,
|
|
2152
2162
|
children: [
|
|
2153
2163
|
/* @__PURE__ */ e("option", { value: "44100", children: "44.1 kHz" }),
|
|
2154
2164
|
/* @__PURE__ */ e("option", { value: "48000", children: "48 kHz" })
|
|
@@ -2157,18 +2167,18 @@ const fe = {
|
|
|
2157
2167
|
)
|
|
2158
2168
|
] }),
|
|
2159
2169
|
/* @__PURE__ */ t("label", { children: [
|
|
2160
|
-
"Audio Bitrate (kbps)",
|
|
2170
|
+
n("liveStreaming.audioBitrateKbps", "Audio Bitrate (kbps)"),
|
|
2161
2171
|
/* @__PURE__ */ t(
|
|
2162
2172
|
"select",
|
|
2163
2173
|
{
|
|
2164
2174
|
value: s.settings.audio.bitrate,
|
|
2165
|
-
onChange: (i) =>
|
|
2175
|
+
onChange: (i) => g({
|
|
2166
2176
|
settings: {
|
|
2167
2177
|
...s.settings,
|
|
2168
2178
|
audio: { ...s.settings.audio, bitrate: parseInt(i.target.value) }
|
|
2169
2179
|
}
|
|
2170
2180
|
}),
|
|
2171
|
-
disabled:
|
|
2181
|
+
disabled: h,
|
|
2172
2182
|
children: [
|
|
2173
2183
|
/* @__PURE__ */ e("option", { value: "96", children: "96 kbps" }),
|
|
2174
2184
|
/* @__PURE__ */ e("option", { value: "128", children: "128 kbps" }),
|
|
@@ -2183,7 +2193,7 @@ const fe = {
|
|
|
2183
2193
|
] })
|
|
2184
2194
|
] })
|
|
2185
2195
|
] }),
|
|
2186
|
-
|
|
2196
|
+
h && /* @__PURE__ */ e("footer", { className: "nice-live-streaming__footer", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__footer-stats", children: [
|
|
2187
2197
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
|
|
2188
2198
|
/* @__PURE__ */ e("label", { children: "CPU" }),
|
|
2189
2199
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__value", children: [
|
|
@@ -2192,35 +2202,35 @@ const fe = {
|
|
|
2192
2202
|
] })
|
|
2193
2203
|
] }),
|
|
2194
2204
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
|
|
2195
|
-
/* @__PURE__ */ e("label", { children:
|
|
2205
|
+
/* @__PURE__ */ e("label", { children: n("liveStreaming.memory", "Memory") }),
|
|
2196
2206
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__value", children: [
|
|
2197
2207
|
N.memoryUsage.toFixed(1),
|
|
2198
2208
|
"%"
|
|
2199
2209
|
] })
|
|
2200
2210
|
] }),
|
|
2201
2211
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
|
|
2202
|
-
/* @__PURE__ */ e("label", { children:
|
|
2212
|
+
/* @__PURE__ */ e("label", { children: n("liveStreaming.dropped", "Dropped") }),
|
|
2203
2213
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__value", children: N.droppedFrames })
|
|
2204
2214
|
] }),
|
|
2205
2215
|
/* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
|
|
2206
|
-
/* @__PURE__ */ e("label", { children:
|
|
2216
|
+
/* @__PURE__ */ e("label", { children: n("liveStreaming.peakViewers", "Peak Viewers") }),
|
|
2207
2217
|
/* @__PURE__ */ e("span", { className: "nice-live-streaming__value", children: N.peakViewers })
|
|
2208
2218
|
] })
|
|
2209
2219
|
] }) }),
|
|
2210
2220
|
K && /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-overlay", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal", children: [
|
|
2211
2221
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__modal-header", children: [
|
|
2212
|
-
/* @__PURE__ */ e("h3", { children:
|
|
2222
|
+
/* @__PURE__ */ e("h3", { children: n("liveStreaming.addSource", "Add Source") }),
|
|
2213
2223
|
/* @__PURE__ */ e(
|
|
2214
2224
|
"button",
|
|
2215
2225
|
{
|
|
2216
|
-
"aria-label":
|
|
2226
|
+
"aria-label": n("liveStreaming.close", "Close"),
|
|
2217
2227
|
className: "nice-live-streaming__close-button",
|
|
2218
|
-
onClick: () =>
|
|
2228
|
+
onClick: () => S(!1),
|
|
2219
2229
|
children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
|
|
2220
2230
|
}
|
|
2221
2231
|
)
|
|
2222
2232
|
] }),
|
|
2223
|
-
/* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-content", children: /* @__PURE__ */ e("div", { className: "nice-live-streaming__source-type-grid", children:
|
|
2233
|
+
/* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-content", children: /* @__PURE__ */ e("div", { className: "nice-live-streaming__source-type-grid", children: oe.map((i) => /* @__PURE__ */ t(
|
|
2224
2234
|
"button",
|
|
2225
2235
|
{
|
|
2226
2236
|
className: "nice-live-streaming__source-type-button",
|
|
@@ -2235,11 +2245,11 @@ const fe = {
|
|
|
2235
2245
|
] }) }),
|
|
2236
2246
|
G && /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-overlay", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal", children: [
|
|
2237
2247
|
/* @__PURE__ */ t("div", { className: "nice-live-streaming__modal-header", children: [
|
|
2238
|
-
/* @__PURE__ */ e("h3", { children:
|
|
2248
|
+
/* @__PURE__ */ e("h3", { children: n("liveStreaming.addDestination", "Add Destination") }),
|
|
2239
2249
|
/* @__PURE__ */ e(
|
|
2240
2250
|
"button",
|
|
2241
2251
|
{
|
|
2242
|
-
"aria-label":
|
|
2252
|
+
"aria-label": n("liveStreaming.close", "Close"),
|
|
2243
2253
|
className: "nice-live-streaming__close-button",
|
|
2244
2254
|
onClick: () => W(!1),
|
|
2245
2255
|
children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
|
|
@@ -2262,7 +2272,7 @@ const fe = {
|
|
|
2262
2272
|
] });
|
|
2263
2273
|
};
|
|
2264
2274
|
export {
|
|
2265
|
-
|
|
2266
|
-
|
|
2275
|
+
Te as NiceLiveStreaming,
|
|
2276
|
+
Ee as NiceScreenRecorder,
|
|
2267
2277
|
ze as NiceVideoEditor
|
|
2268
2278
|
};
|