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