@norskvideo/norsk-studio-aws 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/client/info.js +793 -0
- package/client/shared/style.css +1627 -0
- package/client/shared/tailwind.css +31 -0
- package/client/style.css +1155 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/info.d.ts +3 -0
- package/lib/info.js +26 -0
- package/lib/info.js.map +1 -0
- package/lib/input.mediaconnect/flow-selection.d.ts +9 -0
- package/lib/input.mediaconnect/flow-selection.js +40 -0
- package/lib/input.mediaconnect/flow-selection.js.map +1 -0
- package/lib/input.mediaconnect/info.d.ts +3 -0
- package/lib/input.mediaconnect/info.js +70 -0
- package/lib/input.mediaconnect/info.js.map +1 -0
- package/lib/input.mediaconnect/node-view.d.ts +6 -0
- package/lib/input.mediaconnect/node-view.js +38 -0
- package/lib/input.mediaconnect/node-view.js.map +1 -0
- package/lib/input.mediaconnect/output-selection.d.ts +9 -0
- package/lib/input.mediaconnect/output-selection.js +55 -0
- package/lib/input.mediaconnect/output-selection.js.map +1 -0
- package/lib/input.mediaconnect/runtime.d.ts +24 -0
- package/lib/input.mediaconnect/runtime.js +141 -0
- package/lib/input.mediaconnect/runtime.js.map +1 -0
- package/lib/output.medialive/channel-selection.d.ts +9 -0
- package/lib/output.medialive/channel-selection.js +40 -0
- package/lib/output.medialive/channel-selection.js.map +1 -0
- package/lib/output.medialive/fullscreen.d.ts +6 -0
- package/lib/output.medialive/fullscreen.js +31 -0
- package/lib/output.medialive/fullscreen.js.map +1 -0
- package/lib/output.medialive/info.d.ts +3 -0
- package/lib/output.medialive/info.js +111 -0
- package/lib/output.medialive/info.js.map +1 -0
- package/lib/output.medialive/inline.d.ts +6 -0
- package/lib/output.medialive/inline.js +30 -0
- package/lib/output.medialive/inline.js.map +1 -0
- package/lib/output.medialive/input-selection.d.ts +9 -0
- package/lib/output.medialive/input-selection.js +58 -0
- package/lib/output.medialive/input-selection.js.map +1 -0
- package/lib/output.medialive/node-view.d.ts +6 -0
- package/lib/output.medialive/node-view.js +36 -0
- package/lib/output.medialive/node-view.js.map +1 -0
- package/lib/output.medialive/runtime.d.ts +34 -0
- package/lib/output.medialive/runtime.js +142 -0
- package/lib/output.medialive/runtime.js.map +1 -0
- package/lib/output.medialive/url-selection.d.ts +9 -0
- package/lib/output.medialive/url-selection.js +45 -0
- package/lib/output.medialive/url-selection.js.map +1 -0
- package/lib/processor.aws-transcribe/info.d.ts +3 -0
- package/lib/processor.aws-transcribe/info.js +81 -0
- package/lib/processor.aws-transcribe/info.js.map +1 -0
- package/lib/processor.aws-transcribe/runtime.d.ts +39 -0
- package/lib/processor.aws-transcribe/runtime.js +164 -0
- package/lib/processor.aws-transcribe/runtime.js.map +1 -0
- package/lib/processor.aws-transcribe/transcribe-language-selection.d.ts +9 -0
- package/lib/processor.aws-transcribe/transcribe-language-selection.js +40 -0
- package/lib/processor.aws-transcribe/transcribe-language-selection.js.map +1 -0
- package/lib/processor.aws-transcribe/translate-language-selection.d.ts +9 -0
- package/lib/processor.aws-transcribe/translate-language-selection.js +40 -0
- package/lib/processor.aws-transcribe/translate-language-selection.js.map +1 -0
- package/package.json +52 -0
package/client/info.js
ADDED
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
|
|
34
|
+
// external-global-plugin:react
|
|
35
|
+
var require_react = __commonJS({
|
|
36
|
+
"external-global-plugin:react"(exports, module) {
|
|
37
|
+
module.exports = window.React;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// external-global-plugin:react/jsx-runtime
|
|
42
|
+
var require_jsx_runtime = __commonJS({
|
|
43
|
+
"external-global-plugin:react/jsx-runtime"(exports, module) {
|
|
44
|
+
module.exports = window.ReactJsx;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// build/input.mediaconnect/flow-selection.js
|
|
49
|
+
var flow_selection_exports = {};
|
|
50
|
+
__export(flow_selection_exports, {
|
|
51
|
+
default: () => flow_selection_default
|
|
52
|
+
});
|
|
53
|
+
function FlowSelection(props) {
|
|
54
|
+
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
55
|
+
(0, import_react.useEffect)(() => {
|
|
56
|
+
const fn = async () => {
|
|
57
|
+
const result = await fetch("components/input.mediaconnect/flows");
|
|
58
|
+
if (result.ok && result.body) {
|
|
59
|
+
const flows2 = await result.json();
|
|
60
|
+
setFlows(flows2);
|
|
61
|
+
setLoading(false);
|
|
62
|
+
if (props.defaultValue)
|
|
63
|
+
props.onChanged(props.defaultValue);
|
|
64
|
+
} else {
|
|
65
|
+
const text = await result.text();
|
|
66
|
+
throw new Error(text);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
fn().catch(console.error);
|
|
70
|
+
}, []);
|
|
71
|
+
const [flows, setFlows] = (0, import_react.useState)([]);
|
|
72
|
+
if (loading) {
|
|
73
|
+
return (0, import_jsx_runtime.jsx)("div", { children: "Loading.." });
|
|
74
|
+
}
|
|
75
|
+
if (flows.length == 0) {
|
|
76
|
+
return (0, import_jsx_runtime.jsx)("div", { children: "No flows loaded" });
|
|
77
|
+
}
|
|
78
|
+
return (0, import_jsx_runtime.jsx)("div", { children: (0, import_jsx_runtime.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime.jsx)("option", { value: "", children: "---" }, "empty"), flows.map((o, i) => {
|
|
79
|
+
const val = o.FlowArn;
|
|
80
|
+
return (0, import_jsx_runtime.jsxs)("option", { value: val, children: ["-", o.Description] }, i);
|
|
81
|
+
})] }) });
|
|
82
|
+
function myOnChange(e) {
|
|
83
|
+
props.onChanged(e.target.value);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
var import_jsx_runtime, import_react, flow_selection_default;
|
|
87
|
+
var init_flow_selection = __esm({
|
|
88
|
+
"build/input.mediaconnect/flow-selection.js"() {
|
|
89
|
+
"use strict";
|
|
90
|
+
import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
91
|
+
import_react = __toESM(require_react());
|
|
92
|
+
flow_selection_default = FlowSelection;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// build/input.mediaconnect/output-selection.js
|
|
97
|
+
var output_selection_exports = {};
|
|
98
|
+
__export(output_selection_exports, {
|
|
99
|
+
default: () => output_selection_default
|
|
100
|
+
});
|
|
101
|
+
function OutputSelection(props) {
|
|
102
|
+
const [loading, setLoading] = (0, import_react2.useState)(true);
|
|
103
|
+
const [flow, setFlow] = (0, import_react2.useState)(void 0);
|
|
104
|
+
(0, import_react2.useEffect)(() => {
|
|
105
|
+
const fn = async () => {
|
|
106
|
+
setLoading(true);
|
|
107
|
+
if (props.latest.flowArn) {
|
|
108
|
+
const result = await fetch("components/input.mediaconnect/flows/" + props.latest.flowArn);
|
|
109
|
+
if (result.ok && result.body) {
|
|
110
|
+
const flow2 = await result.json();
|
|
111
|
+
setFlow(flow2);
|
|
112
|
+
setLoading(false);
|
|
113
|
+
const firstOutput2 = flow2.Outputs?.[0]?.OutputArn;
|
|
114
|
+
if (firstOutput2 && flow2.Outputs?.length == 1 && firstOutput2 !== props.defaultValue) {
|
|
115
|
+
props.onChanged(firstOutput2);
|
|
116
|
+
} else if (props.defaultValue) {
|
|
117
|
+
props.onChanged(props.defaultValue);
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
const text = await result.text();
|
|
121
|
+
throw new Error(text);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
fn().catch(console.error);
|
|
126
|
+
}, [props.latest.flowArn]);
|
|
127
|
+
if (loading) {
|
|
128
|
+
return (0, import_jsx_runtime2.jsx)("div", { children: "..." });
|
|
129
|
+
}
|
|
130
|
+
if (flow == void 0) {
|
|
131
|
+
return (0, import_jsx_runtime2.jsx)("div", { children: "..." });
|
|
132
|
+
}
|
|
133
|
+
if (!flow.Outputs) {
|
|
134
|
+
return (0, import_jsx_runtime2.jsx)("div", { children: "Flow has no outputs" });
|
|
135
|
+
}
|
|
136
|
+
const firstOutput = flow.Outputs?.[0]?.OutputArn;
|
|
137
|
+
if (firstOutput && flow.Outputs.length == 1) {
|
|
138
|
+
return (0, import_jsx_runtime2.jsxs)("div", { children: [flow.Outputs[0].ListenerAddress ?? "", ":", flow.Outputs[0].Port ?? 0] });
|
|
139
|
+
}
|
|
140
|
+
return (0, import_jsx_runtime2.jsx)("div", { children: (0, import_jsx_runtime2.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime2.jsx)("option", { value: "", children: "---" }, "empty"), flow.Outputs.map((o, i) => {
|
|
141
|
+
const val = o.OutputArn;
|
|
142
|
+
return (0, import_jsx_runtime2.jsxs)("option", { value: val, children: [o.Name, "-", o.Description] }, i);
|
|
143
|
+
})] }) });
|
|
144
|
+
function myOnChange(e) {
|
|
145
|
+
props.onChanged(e.target.value);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
var import_jsx_runtime2, import_react2, output_selection_default;
|
|
149
|
+
var init_output_selection = __esm({
|
|
150
|
+
"build/input.mediaconnect/output-selection.js"() {
|
|
151
|
+
"use strict";
|
|
152
|
+
import_jsx_runtime2 = __toESM(require_jsx_runtime());
|
|
153
|
+
import_react2 = __toESM(require_react());
|
|
154
|
+
output_selection_default = OutputSelection;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// build/input.mediaconnect/node-view.js
|
|
159
|
+
var node_view_exports = {};
|
|
160
|
+
__export(node_view_exports, {
|
|
161
|
+
default: () => node_view_default
|
|
162
|
+
});
|
|
163
|
+
function NodeView(props) {
|
|
164
|
+
const [loading, setLoading] = (0, import_react3.useState)(true);
|
|
165
|
+
const [flow, setFlow] = (0, import_react3.useState)(void 0);
|
|
166
|
+
(0, import_react3.useEffect)(() => {
|
|
167
|
+
if (!props.node.config.flowArn)
|
|
168
|
+
return;
|
|
169
|
+
const fn = async () => {
|
|
170
|
+
const result = await fetch("components/input.mediaconnect/flows/" + props.node.config.flowArn);
|
|
171
|
+
if (result.ok && result.body) {
|
|
172
|
+
const flow2 = await result.json();
|
|
173
|
+
setFlow(flow2);
|
|
174
|
+
setLoading(false);
|
|
175
|
+
} else {
|
|
176
|
+
const text = await result.text();
|
|
177
|
+
throw new Error(text);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
fn().catch(console.error);
|
|
181
|
+
}, [props.node.config.flowArn]);
|
|
182
|
+
const output = flow?.Outputs?.find((o) => o.OutputArn == props.node.config.outputArn);
|
|
183
|
+
if (loading) {
|
|
184
|
+
return (0, import_jsx_runtime3.jsx)("div", { children: "..." });
|
|
185
|
+
}
|
|
186
|
+
if (!flow) {
|
|
187
|
+
return (0, import_jsx_runtime3.jsx)("div", { children: "[Error: Failed to load flow]" });
|
|
188
|
+
}
|
|
189
|
+
if (!output) {
|
|
190
|
+
return (0, import_jsx_runtime3.jsx)("div", { children: "[Error: Missing output on flow]" });
|
|
191
|
+
}
|
|
192
|
+
return (0, import_jsx_runtime3.jsxs)("div", { children: [(0, import_jsx_runtime3.jsxs)("div", { children: ["Name: ", flow.Name] }), (0, import_jsx_runtime3.jsxs)("div", { children: ["Description: ", flow.Description] }), (0, import_jsx_runtime3.jsxs)("div", { children: ["Protocol: ", output.Transport?.Protocol] }), (0, import_jsx_runtime3.jsxs)("div", { children: ["Address: ", output.ListenerAddress] }), (0, import_jsx_runtime3.jsxs)("div", { children: ["Port: ", output.Port] })] });
|
|
193
|
+
}
|
|
194
|
+
var import_jsx_runtime3, import_react3, node_view_default;
|
|
195
|
+
var init_node_view = __esm({
|
|
196
|
+
"build/input.mediaconnect/node-view.js"() {
|
|
197
|
+
"use strict";
|
|
198
|
+
import_jsx_runtime3 = __toESM(require_jsx_runtime());
|
|
199
|
+
import_react3 = __toESM(require_react());
|
|
200
|
+
node_view_default = NodeView;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// build/output.medialive/channel-selection.js
|
|
205
|
+
var channel_selection_exports = {};
|
|
206
|
+
__export(channel_selection_exports, {
|
|
207
|
+
default: () => channel_selection_default
|
|
208
|
+
});
|
|
209
|
+
function ChannelSelection(props) {
|
|
210
|
+
const [loading, setLoading] = (0, import_react5.useState)(true);
|
|
211
|
+
(0, import_react5.useEffect)(() => {
|
|
212
|
+
const fn = async () => {
|
|
213
|
+
const result = await fetch("components/output.medialive/channels");
|
|
214
|
+
if (result.ok && result.body) {
|
|
215
|
+
const channels2 = await result.json();
|
|
216
|
+
setChannels(channels2);
|
|
217
|
+
setLoading(false);
|
|
218
|
+
if (props.defaultValue)
|
|
219
|
+
props.onChanged(props.defaultValue);
|
|
220
|
+
} else {
|
|
221
|
+
const text = await result.text();
|
|
222
|
+
throw new Error(text);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
fn().catch(console.error);
|
|
226
|
+
}, []);
|
|
227
|
+
const [channels, setChannels] = (0, import_react5.useState)([]);
|
|
228
|
+
if (loading) {
|
|
229
|
+
return (0, import_jsx_runtime4.jsx)("div", { children: "Loading.." });
|
|
230
|
+
}
|
|
231
|
+
if (channels.length == 0) {
|
|
232
|
+
return (0, import_jsx_runtime4.jsx)("div", { children: "No channels loaded" });
|
|
233
|
+
}
|
|
234
|
+
return (0, import_jsx_runtime4.jsx)("div", { children: (0, import_jsx_runtime4.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime4.jsx)("option", { value: "", children: "---" }, "empty"), channels.map((o, i) => {
|
|
235
|
+
const val = o.Id;
|
|
236
|
+
return (0, import_jsx_runtime4.jsx)("option", { value: val, children: o.Name }, i);
|
|
237
|
+
})] }) });
|
|
238
|
+
function myOnChange(e) {
|
|
239
|
+
props.onChanged(e.target.value);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
var import_jsx_runtime4, import_react5, channel_selection_default;
|
|
243
|
+
var init_channel_selection = __esm({
|
|
244
|
+
"build/output.medialive/channel-selection.js"() {
|
|
245
|
+
"use strict";
|
|
246
|
+
import_jsx_runtime4 = __toESM(require_jsx_runtime());
|
|
247
|
+
import_react5 = __toESM(require_react());
|
|
248
|
+
channel_selection_default = ChannelSelection;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// build/output.medialive/input-selection.js
|
|
253
|
+
var input_selection_exports = {};
|
|
254
|
+
__export(input_selection_exports, {
|
|
255
|
+
default: () => input_selection_default
|
|
256
|
+
});
|
|
257
|
+
function inputSelection(props) {
|
|
258
|
+
const [loading, setLoading] = (0, import_react6.useState)(true);
|
|
259
|
+
const [channels, setChannels] = (0, import_react6.useState)(void 0);
|
|
260
|
+
const [channel, setChannel] = (0, import_react6.useState)(void 0);
|
|
261
|
+
(0, import_react6.useEffect)(() => {
|
|
262
|
+
console.log("Loading channels for input", props);
|
|
263
|
+
const fn = async () => {
|
|
264
|
+
setLoading(true);
|
|
265
|
+
const result = await fetch("components/output.medialive/channels");
|
|
266
|
+
if (result.ok && result.body) {
|
|
267
|
+
const channels2 = await result.json();
|
|
268
|
+
setChannels(channels2);
|
|
269
|
+
setLoading(false);
|
|
270
|
+
if (props.defaultValue)
|
|
271
|
+
props.onChanged(props.defaultValue);
|
|
272
|
+
} else {
|
|
273
|
+
const text = await result.text();
|
|
274
|
+
throw new Error(text);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
fn().catch(console.error);
|
|
278
|
+
}, []);
|
|
279
|
+
(0, import_react6.useEffect)(() => {
|
|
280
|
+
const channel2 = channels?.find((c) => c.Id == props.latest.channelId);
|
|
281
|
+
setChannel(channel2);
|
|
282
|
+
const firstInput2 = channel2?.InputAttachments?.[0]?.InputId;
|
|
283
|
+
if (firstInput2 && channel2?.InputAttachments?.length == 1 && firstInput2 !== props.defaultValue) {
|
|
284
|
+
props.onChanged(firstInput2);
|
|
285
|
+
}
|
|
286
|
+
}, [channels, props.latest.channelId]);
|
|
287
|
+
if (loading) {
|
|
288
|
+
return (0, import_jsx_runtime5.jsx)("div", { children: "..." });
|
|
289
|
+
}
|
|
290
|
+
if (channel == void 0) {
|
|
291
|
+
return (0, import_jsx_runtime5.jsx)("div", { children: "..." });
|
|
292
|
+
}
|
|
293
|
+
if (!channel.InputAttachments) {
|
|
294
|
+
return (0, import_jsx_runtime5.jsx)("div", { children: "Channel has no inputs" });
|
|
295
|
+
}
|
|
296
|
+
const firstInput = channel.InputAttachments?.[0];
|
|
297
|
+
if (firstInput && channel.InputAttachments.length == 1) {
|
|
298
|
+
return (0, import_jsx_runtime5.jsx)("div", { children: firstInput.InputAttachmentName });
|
|
299
|
+
}
|
|
300
|
+
return (0, import_jsx_runtime5.jsx)("div", { children: (0, import_jsx_runtime5.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime5.jsx)("option", { value: "", children: "---" }, "empty"), channel.InputAttachments.map((o, i) => {
|
|
301
|
+
const val = o.InputId;
|
|
302
|
+
return (0, import_jsx_runtime5.jsx)("option", { value: val, children: o.InputAttachmentName }, i);
|
|
303
|
+
})] }) });
|
|
304
|
+
function myOnChange(e) {
|
|
305
|
+
props.onChanged(e.target.value);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
var import_jsx_runtime5, import_react6, input_selection_default;
|
|
309
|
+
var init_input_selection = __esm({
|
|
310
|
+
"build/output.medialive/input-selection.js"() {
|
|
311
|
+
"use strict";
|
|
312
|
+
import_jsx_runtime5 = __toESM(require_jsx_runtime());
|
|
313
|
+
import_react6 = __toESM(require_react());
|
|
314
|
+
input_selection_default = inputSelection;
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
// build/output.medialive/url-selection.js
|
|
319
|
+
var url_selection_exports = {};
|
|
320
|
+
__export(url_selection_exports, {
|
|
321
|
+
default: () => url_selection_default
|
|
322
|
+
});
|
|
323
|
+
function UrlSelection(props) {
|
|
324
|
+
const [loading, setLoading] = (0, import_react7.useState)(true);
|
|
325
|
+
const [input, setInput] = (0, import_react7.useState)(void 0);
|
|
326
|
+
(0, import_react7.useEffect)(() => {
|
|
327
|
+
const fn = async () => {
|
|
328
|
+
setLoading(true);
|
|
329
|
+
if (props.latest.inputId) {
|
|
330
|
+
const result = await fetch("components/output.medialive/inputs/" + props.latest.inputId);
|
|
331
|
+
if (result.ok && result.body) {
|
|
332
|
+
const flow = await result.json();
|
|
333
|
+
setInput(flow);
|
|
334
|
+
setLoading(false);
|
|
335
|
+
if (props.defaultValue !== void 0)
|
|
336
|
+
props.onChanged(props.defaultValue);
|
|
337
|
+
} else {
|
|
338
|
+
const text = await result.text();
|
|
339
|
+
throw new Error(text);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
fn().catch(console.error);
|
|
344
|
+
}, [props.latest.inputId]);
|
|
345
|
+
if (loading) {
|
|
346
|
+
return (0, import_jsx_runtime6.jsx)("div", { children: "..." });
|
|
347
|
+
}
|
|
348
|
+
if (input == void 0) {
|
|
349
|
+
return (0, import_jsx_runtime6.jsx)("div", { children: "..." });
|
|
350
|
+
}
|
|
351
|
+
if (!input.Destinations) {
|
|
352
|
+
return (0, import_jsx_runtime6.jsx)("div", { children: "Input has no destinations" });
|
|
353
|
+
}
|
|
354
|
+
return (0, import_jsx_runtime6.jsx)("div", { children: (0, import_jsx_runtime6.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime6.jsx)("option", { value: "", children: "---" }, "empty"), input.Destinations.map((o, i) => {
|
|
355
|
+
return (0, import_jsx_runtime6.jsx)("option", { value: i, children: o.Url }, i);
|
|
356
|
+
})] }) });
|
|
357
|
+
function myOnChange(e) {
|
|
358
|
+
props.onChanged(parseInt(e.target.value, 10));
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
var import_jsx_runtime6, import_react7, url_selection_default;
|
|
362
|
+
var init_url_selection = __esm({
|
|
363
|
+
"build/output.medialive/url-selection.js"() {
|
|
364
|
+
"use strict";
|
|
365
|
+
import_jsx_runtime6 = __toESM(require_jsx_runtime());
|
|
366
|
+
import_react7 = __toESM(require_react());
|
|
367
|
+
url_selection_default = UrlSelection;
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
// build/output.medialive/node-view.js
|
|
372
|
+
var node_view_exports2 = {};
|
|
373
|
+
__export(node_view_exports2, {
|
|
374
|
+
default: () => node_view_default2
|
|
375
|
+
});
|
|
376
|
+
function NodeView2(props) {
|
|
377
|
+
const [loading, setLoading] = (0, import_react8.useState)(true);
|
|
378
|
+
const [channel, setChannel] = (0, import_react8.useState)(void 0);
|
|
379
|
+
const [input, setInput] = (0, import_react8.useState)(void 0);
|
|
380
|
+
(0, import_react8.useEffect)(() => {
|
|
381
|
+
if (!props.node.config.channelId)
|
|
382
|
+
return;
|
|
383
|
+
if (!props.node.config.inputId)
|
|
384
|
+
return;
|
|
385
|
+
const fn = async () => {
|
|
386
|
+
const channels = await fetch("components/output.medialive/channels").then(async (f) => f.json());
|
|
387
|
+
const input2 = await fetch("components/output.medialive/inputs/" + props.node.config.inputId).then(async (f) => f.json());
|
|
388
|
+
const channel2 = channels.find((c) => c.Id == props.node.config.channelId);
|
|
389
|
+
setChannel(channel2);
|
|
390
|
+
setInput(input2);
|
|
391
|
+
setLoading(false);
|
|
392
|
+
};
|
|
393
|
+
fn().catch(console.error);
|
|
394
|
+
}, [props.node.config.channelId, props.node.config.inputId]);
|
|
395
|
+
if (loading) {
|
|
396
|
+
return (0, import_jsx_runtime7.jsx)("div", { children: "..." });
|
|
397
|
+
}
|
|
398
|
+
if (!channel) {
|
|
399
|
+
return (0, import_jsx_runtime7.jsx)("div", { children: "[Error: Failed to load channel]" });
|
|
400
|
+
}
|
|
401
|
+
if (!input) {
|
|
402
|
+
return (0, import_jsx_runtime7.jsx)("div", { children: "[Error: Missing input on channel]" });
|
|
403
|
+
}
|
|
404
|
+
return (0, import_jsx_runtime7.jsxs)("div", { children: [(0, import_jsx_runtime7.jsxs)("div", { children: ["Name: ", channel.Name] }), (0, import_jsx_runtime7.jsxs)("div", { children: ["Input: ", input.Name] }), (0, import_jsx_runtime7.jsxs)("div", { children: ["Url: ", input.Destinations?.[props.node.config.destinationIndex].Url] })] });
|
|
405
|
+
}
|
|
406
|
+
var import_jsx_runtime7, import_react8, node_view_default2;
|
|
407
|
+
var init_node_view2 = __esm({
|
|
408
|
+
"build/output.medialive/node-view.js"() {
|
|
409
|
+
"use strict";
|
|
410
|
+
import_jsx_runtime7 = __toESM(require_jsx_runtime());
|
|
411
|
+
import_react8 = __toESM(require_react());
|
|
412
|
+
node_view_default2 = NodeView2;
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
// external-global-plugin:hls.js
|
|
417
|
+
var require_hls = __commonJS({
|
|
418
|
+
"external-global-plugin:hls.js"(exports, module) {
|
|
419
|
+
module.exports = window.HlsJs;
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// build/output.medialive/inline.js
|
|
424
|
+
var inline_exports = {};
|
|
425
|
+
__export(inline_exports, {
|
|
426
|
+
default: () => inline_default
|
|
427
|
+
});
|
|
428
|
+
function InlineView({ state, config }) {
|
|
429
|
+
const url = state.url;
|
|
430
|
+
const id = config.id;
|
|
431
|
+
(0, import_react9.useEffect)(() => {
|
|
432
|
+
if (!url)
|
|
433
|
+
return;
|
|
434
|
+
const element = document.getElementById(`${id}-video`);
|
|
435
|
+
if (import_hls.default.isSupported()) {
|
|
436
|
+
const hls = new import_hls.default();
|
|
437
|
+
hls.loadSource(url);
|
|
438
|
+
hls.attachMedia(element);
|
|
439
|
+
} else if (element.canPlayType("application/vnd.apple.mpegurl")) {
|
|
440
|
+
element.src = url;
|
|
441
|
+
}
|
|
442
|
+
}, [state.url]);
|
|
443
|
+
if (!url)
|
|
444
|
+
return (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: "..." });
|
|
445
|
+
return (0, import_jsx_runtime8.jsx)("div", { className: "preview-outer-container", children: (0, import_jsx_runtime8.jsx)("video", { autoPlay: true, muted: true, id: `${id}-video` }) });
|
|
446
|
+
}
|
|
447
|
+
var import_jsx_runtime8, import_react9, import_hls, inline_default;
|
|
448
|
+
var init_inline = __esm({
|
|
449
|
+
"build/output.medialive/inline.js"() {
|
|
450
|
+
"use strict";
|
|
451
|
+
import_jsx_runtime8 = __toESM(require_jsx_runtime());
|
|
452
|
+
import_react9 = __toESM(require_react());
|
|
453
|
+
import_hls = __toESM(require_hls());
|
|
454
|
+
inline_default = InlineView;
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
// build/output.medialive/fullscreen.js
|
|
459
|
+
var fullscreen_exports = {};
|
|
460
|
+
__export(fullscreen_exports, {
|
|
461
|
+
default: () => fullscreen_default
|
|
462
|
+
});
|
|
463
|
+
function FullscreenView({ state, config }) {
|
|
464
|
+
const url = state.url;
|
|
465
|
+
const id = config.id;
|
|
466
|
+
(0, import_react10.useEffect)(() => {
|
|
467
|
+
if (!url)
|
|
468
|
+
return;
|
|
469
|
+
const element = document.getElementById(`${id}-video`);
|
|
470
|
+
if (import_hls2.default.isSupported()) {
|
|
471
|
+
const hls = new import_hls2.default();
|
|
472
|
+
hls.loadSource(url);
|
|
473
|
+
hls.attachMedia(element);
|
|
474
|
+
} else if (element.canPlayType("application/vnd.apple.mpegurl")) {
|
|
475
|
+
element.src = url;
|
|
476
|
+
}
|
|
477
|
+
}, [state.url]);
|
|
478
|
+
if (!url)
|
|
479
|
+
return (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: "..." });
|
|
480
|
+
{
|
|
481
|
+
}
|
|
482
|
+
return (0, import_jsx_runtime9.jsx)("div", { children: (0, import_jsx_runtime9.jsx)("video", { controls: true, autoPlay: true, muted: true, id: `${id}-video` }) });
|
|
483
|
+
}
|
|
484
|
+
var import_jsx_runtime9, import_react10, import_hls2, fullscreen_default;
|
|
485
|
+
var init_fullscreen = __esm({
|
|
486
|
+
"build/output.medialive/fullscreen.js"() {
|
|
487
|
+
"use strict";
|
|
488
|
+
import_jsx_runtime9 = __toESM(require_jsx_runtime());
|
|
489
|
+
import_react10 = __toESM(require_react());
|
|
490
|
+
import_hls2 = __toESM(require_hls());
|
|
491
|
+
fullscreen_default = FullscreenView;
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
// build/processor.aws-transcribe/transcribe-language-selection.js
|
|
496
|
+
var transcribe_language_selection_exports = {};
|
|
497
|
+
__export(transcribe_language_selection_exports, {
|
|
498
|
+
default: () => transcribe_language_selection_default
|
|
499
|
+
});
|
|
500
|
+
function TranscribeLanguageSelection(props) {
|
|
501
|
+
const [loading, setLoading] = (0, import_react12.useState)(true);
|
|
502
|
+
(0, import_react12.useEffect)(() => {
|
|
503
|
+
const fn = async () => {
|
|
504
|
+
const result = await fetch("components/processor.aws-transcribe/languages");
|
|
505
|
+
if (result.ok && result.body) {
|
|
506
|
+
const languages2 = await result.json();
|
|
507
|
+
setLanguages(languages2.transcribe);
|
|
508
|
+
setLoading(false);
|
|
509
|
+
if (props.defaultValue)
|
|
510
|
+
props.onChanged(props.defaultValue);
|
|
511
|
+
} else {
|
|
512
|
+
const text = await result.text();
|
|
513
|
+
throw new Error(text);
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
fn().catch(console.error);
|
|
517
|
+
}, []);
|
|
518
|
+
const [languages, setLanguages] = (0, import_react12.useState)([]);
|
|
519
|
+
if (loading) {
|
|
520
|
+
return (0, import_jsx_runtime10.jsx)("div", { children: "Loading.." });
|
|
521
|
+
}
|
|
522
|
+
if (languages.length == 0) {
|
|
523
|
+
return (0, import_jsx_runtime10.jsx)("div", { children: "No flows loaded" });
|
|
524
|
+
}
|
|
525
|
+
return (0, import_jsx_runtime10.jsx)("div", { children: (0, import_jsx_runtime10.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime10.jsx)("option", { value: "", children: "---" }, "empty"), languages.map((o, i) => {
|
|
526
|
+
const val = o.code;
|
|
527
|
+
return (0, import_jsx_runtime10.jsxs)("option", { value: val, children: [o.name, " (", o.code, ")"] }, i);
|
|
528
|
+
})] }) });
|
|
529
|
+
function myOnChange(e) {
|
|
530
|
+
props.onChanged(e.target.value);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
var import_jsx_runtime10, import_react12, transcribe_language_selection_default;
|
|
534
|
+
var init_transcribe_language_selection = __esm({
|
|
535
|
+
"build/processor.aws-transcribe/transcribe-language-selection.js"() {
|
|
536
|
+
"use strict";
|
|
537
|
+
import_jsx_runtime10 = __toESM(require_jsx_runtime());
|
|
538
|
+
import_react12 = __toESM(require_react());
|
|
539
|
+
transcribe_language_selection_default = TranscribeLanguageSelection;
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
// build/processor.aws-transcribe/translate-language-selection.js
|
|
544
|
+
var translate_language_selection_exports = {};
|
|
545
|
+
__export(translate_language_selection_exports, {
|
|
546
|
+
default: () => translate_language_selection_default
|
|
547
|
+
});
|
|
548
|
+
function TranslateLanguageSelection(props) {
|
|
549
|
+
const [loading, setLoading] = (0, import_react13.useState)(true);
|
|
550
|
+
(0, import_react13.useEffect)(() => {
|
|
551
|
+
const fn = async () => {
|
|
552
|
+
const result = await fetch("components/processor.aws-transcribe/languages");
|
|
553
|
+
if (result.ok && result.body) {
|
|
554
|
+
const languages2 = await result.json();
|
|
555
|
+
setLanguages(languages2.translate);
|
|
556
|
+
setLoading(false);
|
|
557
|
+
if (props.defaultValue)
|
|
558
|
+
props.onChanged(props.defaultValue);
|
|
559
|
+
} else {
|
|
560
|
+
const text = await result.text();
|
|
561
|
+
throw new Error(text);
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
fn().catch(console.error);
|
|
565
|
+
}, []);
|
|
566
|
+
const [languages, setLanguages] = (0, import_react13.useState)([]);
|
|
567
|
+
if (loading) {
|
|
568
|
+
return (0, import_jsx_runtime11.jsx)("div", { children: "Loading.." });
|
|
569
|
+
}
|
|
570
|
+
if (languages.length == 0) {
|
|
571
|
+
return (0, import_jsx_runtime11.jsx)("div", { children: "No flows loaded" });
|
|
572
|
+
}
|
|
573
|
+
return (0, import_jsx_runtime11.jsx)("div", { children: (0, import_jsx_runtime11.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime11.jsx)("option", { value: "", children: "---" }, "empty"), languages.map((o, i) => {
|
|
574
|
+
const val = o.code;
|
|
575
|
+
return (0, import_jsx_runtime11.jsxs)("option", { value: val, children: [o.name, " (", o.code, ")"] }, i);
|
|
576
|
+
})] }) });
|
|
577
|
+
function myOnChange(e) {
|
|
578
|
+
props.onChanged(e.target.value);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
var import_jsx_runtime11, import_react13, translate_language_selection_default;
|
|
582
|
+
var init_translate_language_selection = __esm({
|
|
583
|
+
"build/processor.aws-transcribe/translate-language-selection.js"() {
|
|
584
|
+
"use strict";
|
|
585
|
+
import_jsx_runtime11 = __toESM(require_jsx_runtime());
|
|
586
|
+
import_react13 = __toESM(require_react());
|
|
587
|
+
translate_language_selection_default = TranslateLanguageSelection;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
// build/input.mediaconnect/info.js
|
|
592
|
+
var import_react4 = __toESM(require_react());
|
|
593
|
+
function info_default({ defineComponent, Av, validation: { Z } }) {
|
|
594
|
+
const FlowSelection2 = import_react4.default.lazy(async () => Promise.resolve().then(() => (init_flow_selection(), flow_selection_exports)));
|
|
595
|
+
const OutputSelection2 = import_react4.default.lazy(async () => Promise.resolve().then(() => (init_output_selection(), output_selection_exports)));
|
|
596
|
+
const NodeView3 = import_react4.default.lazy(async () => Promise.resolve().then(() => (init_node_view(), node_view_exports)));
|
|
597
|
+
return defineComponent({
|
|
598
|
+
identifier: "input.mediaconnect",
|
|
599
|
+
category: "input",
|
|
600
|
+
name: "Media Connect Input",
|
|
601
|
+
subscription: {
|
|
602
|
+
produces: {
|
|
603
|
+
type: "single-stream",
|
|
604
|
+
// for now anyway
|
|
605
|
+
media: Av
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
designtime: {
|
|
609
|
+
node: NodeView3
|
|
610
|
+
},
|
|
611
|
+
configForm: {
|
|
612
|
+
form: {
|
|
613
|
+
flowArn: {
|
|
614
|
+
help: "The flow to connect to",
|
|
615
|
+
hint: {
|
|
616
|
+
type: "custom",
|
|
617
|
+
component: FlowSelection2,
|
|
618
|
+
validation: Z.string().min(1, "Choosing a flow is mandatory")
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
outputArn: {
|
|
622
|
+
help: "Output of the flow to be used",
|
|
623
|
+
hint: {
|
|
624
|
+
type: "custom",
|
|
625
|
+
component: OutputSelection2,
|
|
626
|
+
validation: Z.string().min(1, "Choosing an output is mandatory")
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
// build/output.medialive/info.js
|
|
635
|
+
var import_react11 = __toESM(require_react());
|
|
636
|
+
function info_default2({ defineComponent, validation: { Z }, All }) {
|
|
637
|
+
const ChannelSelection2 = import_react11.default.lazy(async () => Promise.resolve().then(() => (init_channel_selection(), channel_selection_exports)));
|
|
638
|
+
const InputSelection = import_react11.default.lazy(async () => Promise.resolve().then(() => (init_input_selection(), input_selection_exports)));
|
|
639
|
+
const UrlSelection2 = import_react11.default.lazy(async () => Promise.resolve().then(() => (init_url_selection(), url_selection_exports)));
|
|
640
|
+
const NodeView3 = import_react11.default.lazy(async () => Promise.resolve().then(() => (init_node_view2(), node_view_exports2)));
|
|
641
|
+
const InlineView2 = import_react11.default.lazy(async () => Promise.resolve().then(() => (init_inline(), inline_exports)));
|
|
642
|
+
const FullscreenView2 = import_react11.default.lazy(async () => Promise.resolve().then(() => (init_fullscreen(), fullscreen_exports)));
|
|
643
|
+
return defineComponent({
|
|
644
|
+
identifier: "output.medialive",
|
|
645
|
+
category: "output",
|
|
646
|
+
name: "Media Live Output",
|
|
647
|
+
subscription: {
|
|
648
|
+
accepts: {
|
|
649
|
+
type: "multi-stream",
|
|
650
|
+
media: All
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
extraValidation: function(ctx) {
|
|
654
|
+
const audioStreams = ctx.subscriptions.filter((s) => s.streams.select.includes("audio"));
|
|
655
|
+
const videoStreams = ctx.subscriptions.filter((s) => s.streams.select.includes("video"));
|
|
656
|
+
if (audioStreams.length == 0) {
|
|
657
|
+
ctx.addWarning("Output has no audio, is this intentional");
|
|
658
|
+
}
|
|
659
|
+
if (videoStreams.length == 0) {
|
|
660
|
+
ctx.addWarning("Output has no video, is this intentional");
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
designtime: {
|
|
664
|
+
node: NodeView3
|
|
665
|
+
},
|
|
666
|
+
runtime: {
|
|
667
|
+
initialState: () => ({
|
|
668
|
+
url: void 0
|
|
669
|
+
}),
|
|
670
|
+
handleEvent: (ev, state) => {
|
|
671
|
+
const evType = ev.type;
|
|
672
|
+
switch (evType) {
|
|
673
|
+
case "url-located":
|
|
674
|
+
return { ...state, url: ev.url };
|
|
675
|
+
default:
|
|
676
|
+
assertUnreachable(evType);
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
inline: InlineView2,
|
|
680
|
+
fullscreen: FullscreenView2
|
|
681
|
+
},
|
|
682
|
+
configForm: {
|
|
683
|
+
form: {
|
|
684
|
+
channelId: {
|
|
685
|
+
help: "The channel to output to",
|
|
686
|
+
hint: {
|
|
687
|
+
type: "custom",
|
|
688
|
+
component: ChannelSelection2,
|
|
689
|
+
validation: Z.string().min(1, "Choosing a channel is mandatory")
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
inputId: {
|
|
693
|
+
help: "The input of the channel to output to",
|
|
694
|
+
hint: {
|
|
695
|
+
type: "custom",
|
|
696
|
+
component: InputSelection,
|
|
697
|
+
validation: Z.string().min(1, "Choosing an input is mandatory")
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
destinationIndex: {
|
|
701
|
+
help: "The publish URL to output to",
|
|
702
|
+
hint: {
|
|
703
|
+
type: "custom",
|
|
704
|
+
defaultValue: 0,
|
|
705
|
+
component: UrlSelection2,
|
|
706
|
+
validation: Z.number().min(0, "Choosing a url is mandatory")
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
function assertUnreachable(_) {
|
|
714
|
+
throw new Error("Didn't expect to get here");
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// build/processor.aws-transcribe/info.js
|
|
718
|
+
var import_react14 = __toESM(require_react());
|
|
719
|
+
function info_default3({ defineComponent, Av, Subtitle, validation: { LanguageTagWithCountry, LanguageTagOptionalCountry, Z } }) {
|
|
720
|
+
const TranscribeLanguageSelection2 = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_transcribe_language_selection(), transcribe_language_selection_exports)));
|
|
721
|
+
const TranslateLanguageSelection2 = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_translate_language_selection(), translate_language_selection_exports)));
|
|
722
|
+
return defineComponent({
|
|
723
|
+
identifier: "processor.aws-transcribe",
|
|
724
|
+
category: "processor",
|
|
725
|
+
name: "AWS Transcribe",
|
|
726
|
+
subscription: {
|
|
727
|
+
// Must have video AND audio?
|
|
728
|
+
// Or is video optional?
|
|
729
|
+
// either way, we only want one of each
|
|
730
|
+
// and we want QUCV to respect our choice
|
|
731
|
+
accepts: {
|
|
732
|
+
type: "single-stream",
|
|
733
|
+
media: Av
|
|
734
|
+
// video because we'll use the id of it..
|
|
735
|
+
},
|
|
736
|
+
produces: {
|
|
737
|
+
type: "fixed-list",
|
|
738
|
+
possibleMedia: Subtitle,
|
|
739
|
+
keys: (cfg) => [{
|
|
740
|
+
key: "subs",
|
|
741
|
+
display: "Subtitle",
|
|
742
|
+
media: Subtitle
|
|
743
|
+
}].concat(cfg.targetLanguage ? [{
|
|
744
|
+
key: "subs-translated",
|
|
745
|
+
display: "Translated Subtitle",
|
|
746
|
+
media: Subtitle
|
|
747
|
+
}] : []),
|
|
748
|
+
selector: (selection, metadata) => metadata.filter((x) => selection.includes(x.streamKey.renditionName)).map((x) => x.streamKey)
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
extraValidation: function(ctx) {
|
|
752
|
+
const video = ctx.videoInputs();
|
|
753
|
+
const audio = ctx.audioInputs();
|
|
754
|
+
if (video.length !== 1) {
|
|
755
|
+
ctx.addError("AWS Transcribe requires a single video stream to use as a reference");
|
|
756
|
+
}
|
|
757
|
+
if (audio.length !== 1) {
|
|
758
|
+
ctx.addError("AWS Transcribe requires a single audio stream to transcribe");
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
display: (_desc) => {
|
|
762
|
+
const result = {};
|
|
763
|
+
return result;
|
|
764
|
+
},
|
|
765
|
+
configForm: {
|
|
766
|
+
form: {
|
|
767
|
+
language: { help: "Source language to transcribe", hint: { type: "custom", component: TranscribeLanguageSelection2, defaultValue: "en-US", validation: LanguageTagWithCountry } },
|
|
768
|
+
targetLanguage: { help: "Target language to translate to (optional).", hint: { type: "custom", component: TranslateLanguageSelection2, defaultValue: "", validation: Z.union([LanguageTagOptionalCountry, Z.string().length(0)]) } }
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// build/info.js
|
|
775
|
+
var InitialisedComponents = {};
|
|
776
|
+
var initialised = false;
|
|
777
|
+
var AllComponents = [];
|
|
778
|
+
function getNodeInfo(r, type) {
|
|
779
|
+
if (!initialised) {
|
|
780
|
+
AllComponents.forEach((f) => {
|
|
781
|
+
const i = f(r);
|
|
782
|
+
InitialisedComponents[i.identifier] = i;
|
|
783
|
+
});
|
|
784
|
+
initialised = true;
|
|
785
|
+
}
|
|
786
|
+
return InitialisedComponents[type];
|
|
787
|
+
}
|
|
788
|
+
AllComponents.push((r) => info_default(r));
|
|
789
|
+
AllComponents.push((r) => info_default2(r));
|
|
790
|
+
AllComponents.push((r) => info_default3(r));
|
|
791
|
+
export {
|
|
792
|
+
getNodeInfo as default
|
|
793
|
+
};
|