@norskvideo/norsk-studio-source-switcher 1.15.0 → 1.26.0-2025-02-19-e81e84b9
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/client/info.js +30 -17
- package/client/tailwind.css +14 -865
- package/lib/fullscreen-view.js +3 -0
- package/lib/fullscreen-view.js.map +1 -1
- package/lib/info.js +8 -3
- package/lib/info.js.map +1 -1
- package/lib/inline-view.js +3 -3
- package/lib/runtime.js +41 -28
- package/lib/runtime.js.map +1 -1
- package/lib/summary-view.js +6 -4
- package/lib/summary-view.js.map +1 -1
- package/lib/test/runtime.js +2 -1
- package/lib/test/runtime.js.map +1 -1
- package/package.json +6 -5
package/client/info.js
CHANGED
@@ -45,9 +45,9 @@ var require_jsx_runtime = __commonJS({
|
|
45
45
|
}
|
46
46
|
});
|
47
47
|
|
48
|
-
// node_modules/@norskvideo/norsk-studio/lib/shared/shared-views.js
|
48
|
+
// ../../node_modules/@norskvideo/norsk-studio/lib/shared/shared-views.js
|
49
49
|
var require_shared_views = __commonJS({
|
50
|
-
"node_modules/@norskvideo/norsk-studio/lib/shared/shared-views.js"(exports) {
|
50
|
+
"../../node_modules/@norskvideo/norsk-studio/lib/shared/shared-views.js"(exports) {
|
51
51
|
"use strict";
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
53
53
|
exports.GlobalIceServerView = GlobalIceServerView;
|
@@ -58,17 +58,17 @@ var require_shared_views = __commonJS({
|
|
58
58
|
return (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-3 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "URL" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-2", children: i.url }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Reported URL" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-2", children: i.reportedUrl ?? "" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Username" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-2", children: i.username ?? "" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Password" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-2", children: i.credential ?? "" })] });
|
59
59
|
}
|
60
60
|
function EzDrmConfigView(i) {
|
61
|
-
return (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-2 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-span-2 node-editor-helper-text", children: "For Encryption (required)" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Token" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i
|
61
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-2 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-span-2 node-editor-helper-text", children: "For Encryption (required)" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Token" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i?.token?.trim() ? "Yes" : "No" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-2 node-editor-helper-text", children: "For Local Preview (optional)" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "pX" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i?.pX?.trim() ? "Yes" : "No" })] });
|
62
62
|
}
|
63
63
|
function AxinomConfigView(i) {
|
64
|
-
return (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-2 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-span-2 node-editor-helper-text", children: "For Encryption (required)" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Tenant ID" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i
|
64
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-2 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-span-2 node-editor-helper-text", children: "For Encryption (required)" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Tenant ID" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i?.tenantId?.trim() ? "Yes" : "No" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Management Key" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i?.managementKey?.trim() ? "Yes" : "No" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-2 node-editor-helper-text", children: "For Local Preview (optional)" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Communication ID" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i?.comKeyId?.trim() ? "Yes" : "No" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: "Communication Key" }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: i?.comKey?.trim() ? "Yes" : "No" })] });
|
65
65
|
}
|
66
66
|
}
|
67
67
|
});
|
68
68
|
|
69
|
-
// node_modules/@norskvideo/norsk-studio/lib/shared/config.js
|
69
|
+
// ../../node_modules/@norskvideo/norsk-studio/lib/shared/config.js
|
70
70
|
var require_config = __commonJS({
|
71
|
-
"node_modules/@norskvideo/norsk-studio/lib/shared/config.js"(exports) {
|
71
|
+
"../../node_modules/@norskvideo/norsk-studio/lib/shared/config.js"(exports) {
|
72
72
|
"use strict";
|
73
73
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
74
74
|
if (k2 === void 0)
|
@@ -138,7 +138,8 @@ var require_config = __commonJS({
|
|
138
138
|
help: "Optional URL of the STUN/TURN server as accessed by the client (if different to the above)",
|
139
139
|
hint: {
|
140
140
|
type: "text",
|
141
|
-
validation: f.validation.IceServer
|
141
|
+
validation: Z.union([Z.literal(""), f.validation.IceServer]).optional(),
|
142
|
+
optional: true
|
142
143
|
}
|
143
144
|
},
|
144
145
|
username: {
|
@@ -189,6 +190,7 @@ var require_config = __commonJS({
|
|
189
190
|
help: "The last six digits of your Widevine Profile ID",
|
190
191
|
hint: {
|
191
192
|
envOverride: true,
|
193
|
+
defaultValue: "",
|
192
194
|
type: "text"
|
193
195
|
}
|
194
196
|
}
|
@@ -229,6 +231,7 @@ var require_config = __commonJS({
|
|
229
231
|
help: "Communication Key ID from your Axinom DRM account",
|
230
232
|
hint: {
|
231
233
|
envOverride: true,
|
234
|
+
defaultValue: "",
|
232
235
|
type: "text"
|
233
236
|
}
|
234
237
|
},
|
@@ -236,6 +239,7 @@ var require_config = __commonJS({
|
|
236
239
|
help: "Communication Key from your Axinom DRM account",
|
237
240
|
hint: {
|
238
241
|
envOverride: true,
|
242
|
+
defaultValue: "",
|
239
243
|
type: "text"
|
240
244
|
}
|
241
245
|
}
|
@@ -260,6 +264,7 @@ var require_config = __commonJS({
|
|
260
264
|
form: {
|
261
265
|
help: "Where available, use the specified hardware for encodes/compose operations",
|
262
266
|
hint: {
|
267
|
+
envOverride: true,
|
263
268
|
type: "select",
|
264
269
|
optional: true,
|
265
270
|
options: [
|
@@ -300,9 +305,9 @@ var init_inline_view = __esm({
|
|
300
305
|
"build/inline-view.js"() {
|
301
306
|
"use strict";
|
302
307
|
import_jsx_runtime = __toESM(require_jsx_runtime());
|
303
|
-
activeClasses = "active text-green-
|
304
|
-
availableClasses = "available text-green-
|
305
|
-
inactiveClasses = "inactive text-orange-
|
308
|
+
activeClasses = "active text-green-500 dark:text-green-300";
|
309
|
+
availableClasses = "available text-green-500 dark:text-green-300";
|
310
|
+
inactiveClasses = "inactive text-orange-500 dark:text-orange-300";
|
306
311
|
inline_view_default = InlineView;
|
307
312
|
}
|
308
313
|
});
|
@@ -344,7 +349,7 @@ function SummaryView({ state, config, sendCommand }) {
|
|
344
349
|
initialLoad,
|
345
350
|
state.players
|
346
351
|
]);
|
347
|
-
return (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [(0, import_jsx_runtime2.jsx)("h5", { children: "Sources" }), (0, import_jsx_runtime2.jsx)("ul", { children: state.knownSources.map((s, i) => state.activeSource.id == s.id && state.activeSource.key == s.key ? (0, import_jsx_runtime2.jsxs)("li", { className: activeClasses2, children: [s.key ?? s.id, " <--"] }, i) : state.availableSources.find((a) => s.id == a.id && s.key == a.key) ? (0, import_jsx_runtime2.jsxs)("li", { className: availableClasses2, children: [s.key ?? s.id, " (available)"] }, i) : (0, import_jsx_runtime2.jsxs)("li", { className: inactiveClasses2, children: [s.key ?? s.id, " (inactive)"] }, i)) }), (0, import_jsx_runtime2.
|
352
|
+
return (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [(0, import_jsx_runtime2.jsx)("h5", { children: "Sources" }), (0, import_jsx_runtime2.jsx)("ul", { children: state.knownSources.map((s, i) => state.activeSource.id == s.id && state.activeSource.key == s.key ? (0, import_jsx_runtime2.jsxs)("li", { className: activeClasses2, children: [s.key ?? s.id, " <--"] }, i) : state.availableSources.find((a) => s.id == a.id && s.key == a.key) ? (0, import_jsx_runtime2.jsxs)("li", { className: availableClasses2, children: [s.key ?? s.id, " (available)"] }, i) : (0, import_jsx_runtime2.jsxs)("li", { className: inactiveClasses2, children: [s.key ?? s.id, " (inactive)"] }, i)) }), config.enablePreviews ? (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [(0, import_jsx_runtime2.jsx)("h4", { children: previewSource ? previewSource.key ?? previewSource.id : "Preview" }), (0, import_jsx_runtime2.jsx)("div", { id: `${config.id}-preview` })] }) : null, (0, import_jsx_runtime2.jsx)("label", { htmlFor: "select-preview", className: "mt-2", children: "Source" }), (0, import_jsx_runtime2.jsxs)("select", { id: "select-preview", className: "mt-2 node-editor-select-input", onChange: (e) => {
|
348
353
|
setPreviewSource(JSON.parse(e.currentTarget.value));
|
349
354
|
}, children: [(0, import_jsx_runtime2.jsx)("option", { selected: previewSource === void 0, children: "---" }), state.availableSources.map((s, i) => (0, import_jsx_runtime2.jsx)("option", { selected: previewSource == s, value: JSON.stringify(s), children: s.key ?? s.id }, i))] }), previewSource ? (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "mt-2 mb-2 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800", onClick: (e) => {
|
350
355
|
e.preventDefault();
|
@@ -359,9 +364,9 @@ var init_summary_view = __esm({
|
|
359
364
|
import_jsx_runtime2 = __toESM(require_jsx_runtime());
|
360
365
|
import_react = __toESM(require_react());
|
361
366
|
import_webrtc_client = __toESM(require_webrtc_client());
|
362
|
-
activeClasses2 = "active text-green-
|
363
|
-
availableClasses2 = "available text-green-
|
364
|
-
inactiveClasses2 = "inactive text-orange-
|
367
|
+
activeClasses2 = "active text-green-500 dark:text-green-300";
|
368
|
+
availableClasses2 = "available text-green-500 dark:text-green-300";
|
369
|
+
inactiveClasses2 = "inactive text-orange-500 dark:text-orange-300";
|
365
370
|
currentClient = void 0;
|
366
371
|
summary_view_default = SummaryView;
|
367
372
|
}
|
@@ -2883,6 +2888,9 @@ async function maybeCreatePlayer(created, source, url) {
|
|
2883
2888
|
}
|
2884
2889
|
}
|
2885
2890
|
function FullScreenView(multiCamera) {
|
2891
|
+
if (!multiCamera.config.enablePreviews) {
|
2892
|
+
return (0, import_jsx_runtime3.jsx)("div", { id: "camera-control-container", className: "bg-gray-50 dark:bg-gray-900", children: (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-col h-full gap-4 2xl:mx-40 md:mx-6", children: "Previews are not enabled, so full screen view is unavailable" }) });
|
2893
|
+
}
|
2886
2894
|
const [state, setState] = (0, import_react2.useState)({ createdClient: [], livePreviewSource: void 0, overlays: [] });
|
2887
2895
|
const overlayRefs = (0, import_react2.useRef)([]);
|
2888
2896
|
const refLivePreviewVideo = (0, import_react2.useRef)(null);
|
@@ -3221,10 +3229,10 @@ function info_default(R) {
|
|
3221
3229
|
},
|
3222
3230
|
extraValidation: (ctx) => {
|
3223
3231
|
ctx.subscriptions.forEach((s) => {
|
3224
|
-
if (s.
|
3232
|
+
if (s.validatedStreams.select.includes("audio") && s.validatedStreams.select.includes("video")) {
|
3225
3233
|
return;
|
3226
3234
|
}
|
3227
|
-
ctx.addError("Each subscription for Source Switcher must contain both video *and* audio, subscription to " + s.source + " only contains " + s.
|
3235
|
+
ctx.addError("Each subscription for Source Switcher must contain both video *and* audio, subscription to " + s.source + " only contains " + s.validatedStreams.select.join(","));
|
3228
3236
|
});
|
3229
3237
|
},
|
3230
3238
|
display: (desc) => {
|
@@ -3286,6 +3294,10 @@ function info_default(R) {
|
|
3286
3294
|
hardware: (0, import_config.HardwareSelection)()
|
3287
3295
|
},
|
3288
3296
|
form: {
|
3297
|
+
enablePreviews: {
|
3298
|
+
help: "Are previews auomatically created for all inputs and output",
|
3299
|
+
hint: { type: "boolean", defaultValue: false }
|
3300
|
+
},
|
3289
3301
|
resolution: {
|
3290
3302
|
help: "All video will be normalised to this resolution",
|
3291
3303
|
hint: { type: "select", options: Resolutions, defaultValue: { width: 1920, height: 1080 } }
|
@@ -3315,7 +3327,8 @@ function info_default(R) {
|
|
3315
3327
|
{ value: "stereo", display: "Stereo" }
|
3316
3328
|
]
|
3317
3329
|
}
|
3318
|
-
}
|
3330
|
+
},
|
3331
|
+
notes: { help: "Notes about this component", hint: { type: "text", optional: true } }
|
3319
3332
|
}
|
3320
3333
|
}
|
3321
3334
|
});
|