@norskvideo/norsk-studio-alpha 1.27.0-2025-12-23-ec7c5041 → 1.27.0-2026-01-08-2828c8f7
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 +19236 -42372
- package/client/style.css +351 -241
- package/lib/info.js +13 -9
- package/lib/info.js.map +1 -1
- package/lib/output.fileMp4/_gen/schema.d.ts +13 -0
- package/lib/output.fileMp4/_gen/schema.js +17 -0
- package/lib/output.fileMp4/_gen/schema.js.map +1 -0
- package/lib/output.fileMp4/_gen/types.d.ts +75 -0
- package/lib/output.fileMp4/_gen/types.js +3 -0
- package/lib/output.fileMp4/_gen/types.js.map +1 -0
- package/lib/output.fileMp4/_gen/zod.d.ts +2 -0
- package/lib/output.fileMp4/_gen/zod.js +34 -0
- package/lib/output.fileMp4/_gen/zod.js.map +1 -0
- package/lib/output.fileMp4/info.d.ts +27 -0
- package/lib/output.fileMp4/info.js +73 -0
- package/lib/output.fileMp4/info.js.map +1 -0
- package/lib/output.fileMp4/inline-view.d.ts +7 -0
- package/lib/output.fileMp4/inline-view.js +8 -0
- package/lib/output.fileMp4/inline-view.js.map +1 -0
- package/lib/output.fileMp4/runtime.d.ts +42 -0
- package/lib/output.fileMp4/runtime.js +109 -0
- package/lib/output.fileMp4/runtime.js.map +1 -0
- package/lib/output.fileMp4/summary-view.d.ts +4 -0
- package/lib/output.fileMp4/summary-view.js +16 -0
- package/lib/output.fileMp4/summary-view.js.map +1 -0
- package/lib/output.fileMp4/types.yaml +75 -0
- package/lib/processor.hardSourceSwitch/_gen/schema.d.ts +16 -0
- package/lib/processor.hardSourceSwitch/_gen/schema.js +20 -0
- package/lib/processor.hardSourceSwitch/_gen/schema.js.map +1 -0
- package/lib/processor.hardSourceSwitch/_gen/types.d.ts +224 -0
- package/lib/processor.hardSourceSwitch/_gen/types.js +3 -0
- package/lib/processor.hardSourceSwitch/_gen/types.js.map +1 -0
- package/lib/processor.hardSourceSwitch/_gen/zod.d.ts +2 -0
- package/lib/processor.hardSourceSwitch/_gen/zod.js +147 -0
- package/lib/processor.hardSourceSwitch/_gen/zod.js.map +1 -0
- package/lib/processor.hardSourceSwitch/fullscreen.d.ts +3 -0
- package/lib/processor.hardSourceSwitch/fullscreen.js +23 -0
- package/lib/processor.hardSourceSwitch/fullscreen.js.map +1 -0
- package/lib/processor.hardSourceSwitch/info.d.ts +69 -0
- package/lib/processor.hardSourceSwitch/info.js +170 -0
- package/lib/processor.hardSourceSwitch/info.js.map +1 -0
- package/lib/processor.hardSourceSwitch/inline-view.d.ts +3 -0
- package/lib/processor.hardSourceSwitch/inline-view.js +8 -0
- package/lib/processor.hardSourceSwitch/inline-view.js.map +1 -0
- package/lib/processor.hardSourceSwitch/runtime.d.ts +77 -0
- package/lib/processor.hardSourceSwitch/runtime.js +430 -0
- package/lib/processor.hardSourceSwitch/runtime.js.map +1 -0
- package/lib/processor.hardSourceSwitch/types.yaml +255 -0
- package/lib/test/output.tams.js +17 -7
- package/lib/test/output.tams.js.map +1 -1
- package/lib/util.agent/fullscreen-view.js +17 -7
- package/lib/util.agent/fullscreen-view.js.map +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
export interface paths {
|
|
2
|
+
"/active-source": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
get: operations["getActiveSource"];
|
|
10
|
+
put: operations["setActiveSource"];
|
|
11
|
+
post?: never;
|
|
12
|
+
delete?: never;
|
|
13
|
+
options?: never;
|
|
14
|
+
head?: never;
|
|
15
|
+
patch?: never;
|
|
16
|
+
trace?: never;
|
|
17
|
+
};
|
|
18
|
+
"/available-sources": {
|
|
19
|
+
parameters: {
|
|
20
|
+
query?: never;
|
|
21
|
+
header?: never;
|
|
22
|
+
path?: never;
|
|
23
|
+
cookie?: never;
|
|
24
|
+
};
|
|
25
|
+
get: operations["getAvailableSources"];
|
|
26
|
+
put?: never;
|
|
27
|
+
post?: never;
|
|
28
|
+
delete?: never;
|
|
29
|
+
options?: never;
|
|
30
|
+
head?: never;
|
|
31
|
+
patch?: never;
|
|
32
|
+
trace?: never;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export type webhooks = Record<string, never>;
|
|
36
|
+
export interface components {
|
|
37
|
+
schemas: {
|
|
38
|
+
Config: {
|
|
39
|
+
id: string;
|
|
40
|
+
displayName: string;
|
|
41
|
+
activeSource?: string;
|
|
42
|
+
outputSource: string;
|
|
43
|
+
maxQueueMs: number;
|
|
44
|
+
failoverTimeoutMs: number;
|
|
45
|
+
notes?: string;
|
|
46
|
+
};
|
|
47
|
+
State: {
|
|
48
|
+
activeSource: string;
|
|
49
|
+
availableSources: {
|
|
50
|
+
sourceName?: string;
|
|
51
|
+
format?: {
|
|
52
|
+
resolution?: string;
|
|
53
|
+
frameRate?: string;
|
|
54
|
+
codec?: string;
|
|
55
|
+
};
|
|
56
|
+
}[];
|
|
57
|
+
outputPreview?: string;
|
|
58
|
+
sourcePreviews?: {
|
|
59
|
+
[key: string]: string;
|
|
60
|
+
};
|
|
61
|
+
formatWarnings?: string[];
|
|
62
|
+
};
|
|
63
|
+
SourceFormat: {
|
|
64
|
+
resolution?: string;
|
|
65
|
+
frameRate?: string;
|
|
66
|
+
codec?: string;
|
|
67
|
+
};
|
|
68
|
+
Events: {
|
|
69
|
+
type: "source-switched";
|
|
70
|
+
source: string;
|
|
71
|
+
previousSource?: string;
|
|
72
|
+
} | {
|
|
73
|
+
type: "format-warning";
|
|
74
|
+
message: string;
|
|
75
|
+
newFormat?: {
|
|
76
|
+
resolution?: string;
|
|
77
|
+
frameRate?: string;
|
|
78
|
+
codec?: string;
|
|
79
|
+
};
|
|
80
|
+
previousFormat?: {
|
|
81
|
+
resolution?: string;
|
|
82
|
+
frameRate?: string;
|
|
83
|
+
codec?: string;
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
type: "source-available";
|
|
87
|
+
source: string;
|
|
88
|
+
format: {
|
|
89
|
+
resolution?: string;
|
|
90
|
+
frameRate?: string;
|
|
91
|
+
codec?: string;
|
|
92
|
+
};
|
|
93
|
+
} | {
|
|
94
|
+
type: "source-unavailable";
|
|
95
|
+
source: string;
|
|
96
|
+
} | {
|
|
97
|
+
type: "preview-url-updated";
|
|
98
|
+
source: string;
|
|
99
|
+
url: string;
|
|
100
|
+
} | {
|
|
101
|
+
type: "error";
|
|
102
|
+
classification: "operational" | "configuration";
|
|
103
|
+
error: string;
|
|
104
|
+
} | {
|
|
105
|
+
type: "automatic-failover";
|
|
106
|
+
failedSource: string;
|
|
107
|
+
newSource: string;
|
|
108
|
+
message?: string;
|
|
109
|
+
};
|
|
110
|
+
Commands: {
|
|
111
|
+
type: "switch-to-source";
|
|
112
|
+
source: string;
|
|
113
|
+
};
|
|
114
|
+
SwitchSourceBody: {
|
|
115
|
+
source: string;
|
|
116
|
+
};
|
|
117
|
+
ActiveSourceResponse: {
|
|
118
|
+
activeSource: string;
|
|
119
|
+
};
|
|
120
|
+
AvailableSourcesResponse: {
|
|
121
|
+
availableSources: {
|
|
122
|
+
sourceName?: string;
|
|
123
|
+
format?: {
|
|
124
|
+
resolution?: string;
|
|
125
|
+
frameRate?: string;
|
|
126
|
+
codec?: string;
|
|
127
|
+
};
|
|
128
|
+
}[];
|
|
129
|
+
};
|
|
130
|
+
ErrorResponse: {
|
|
131
|
+
error: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
responses: never;
|
|
135
|
+
parameters: never;
|
|
136
|
+
requestBodies: never;
|
|
137
|
+
headers: never;
|
|
138
|
+
pathItems: never;
|
|
139
|
+
}
|
|
140
|
+
export type $defs = Record<string, never>;
|
|
141
|
+
export interface operations {
|
|
142
|
+
getActiveSource: {
|
|
143
|
+
parameters: {
|
|
144
|
+
query?: never;
|
|
145
|
+
header?: never;
|
|
146
|
+
path?: never;
|
|
147
|
+
cookie?: never;
|
|
148
|
+
};
|
|
149
|
+
requestBody?: never;
|
|
150
|
+
responses: {
|
|
151
|
+
200: {
|
|
152
|
+
headers: {
|
|
153
|
+
[name: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
content: {
|
|
156
|
+
"application/json": {
|
|
157
|
+
activeSource: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
setActiveSource: {
|
|
164
|
+
parameters: {
|
|
165
|
+
query?: never;
|
|
166
|
+
header?: never;
|
|
167
|
+
path?: never;
|
|
168
|
+
cookie?: never;
|
|
169
|
+
};
|
|
170
|
+
requestBody: {
|
|
171
|
+
content: {
|
|
172
|
+
"application/json": {
|
|
173
|
+
source: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
responses: {
|
|
178
|
+
204: {
|
|
179
|
+
headers: {
|
|
180
|
+
[name: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
content?: never;
|
|
183
|
+
};
|
|
184
|
+
400: {
|
|
185
|
+
headers: {
|
|
186
|
+
[name: string]: unknown;
|
|
187
|
+
};
|
|
188
|
+
content: {
|
|
189
|
+
"application/json": {
|
|
190
|
+
error: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
getAvailableSources: {
|
|
197
|
+
parameters: {
|
|
198
|
+
query?: never;
|
|
199
|
+
header?: never;
|
|
200
|
+
path?: never;
|
|
201
|
+
cookie?: never;
|
|
202
|
+
};
|
|
203
|
+
requestBody?: never;
|
|
204
|
+
responses: {
|
|
205
|
+
200: {
|
|
206
|
+
headers: {
|
|
207
|
+
[name: string]: unknown;
|
|
208
|
+
};
|
|
209
|
+
content: {
|
|
210
|
+
"application/json": {
|
|
211
|
+
availableSources: {
|
|
212
|
+
sourceName?: string;
|
|
213
|
+
format?: {
|
|
214
|
+
resolution?: string;
|
|
215
|
+
frameRate?: string;
|
|
216
|
+
codec?: string;
|
|
217
|
+
};
|
|
218
|
+
}[];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/processor.hardSourceSwitch/_gen/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schemas = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const Config = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
id: zod_1.z.string(),
|
|
8
|
+
displayName: zod_1.z.string(),
|
|
9
|
+
activeSource: zod_1.z.string().optional(),
|
|
10
|
+
outputSource: zod_1.z.string().default("output"),
|
|
11
|
+
maxQueueMs: zod_1.z.number().optional().default(1000),
|
|
12
|
+
failoverTimeoutMs: zod_1.z.number().optional().default(2000),
|
|
13
|
+
notes: zod_1.z.string().optional(),
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
16
|
+
const State = zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
activeSource: zod_1.z.string(),
|
|
19
|
+
availableSources: zod_1.z.array(zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
sourceName: zod_1.z.string(),
|
|
22
|
+
format: zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
resolution: zod_1.z.string(),
|
|
25
|
+
frameRate: zod_1.z.string(),
|
|
26
|
+
codec: zod_1.z.string(),
|
|
27
|
+
})
|
|
28
|
+
.partial()
|
|
29
|
+
.strict(),
|
|
30
|
+
})
|
|
31
|
+
.partial()
|
|
32
|
+
.strict()),
|
|
33
|
+
outputPreview: zod_1.z.string().optional(),
|
|
34
|
+
sourcePreviews: zod_1.z.record(zod_1.z.string()).optional(),
|
|
35
|
+
formatWarnings: zod_1.z.array(zod_1.z.string()).optional(),
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
const SourceFormat = zod_1.z
|
|
39
|
+
.object({ resolution: zod_1.z.string(), frameRate: zod_1.z.string(), codec: zod_1.z.string() })
|
|
40
|
+
.partial()
|
|
41
|
+
.strict();
|
|
42
|
+
const Events = zod_1.z.union([
|
|
43
|
+
zod_1.z
|
|
44
|
+
.object({
|
|
45
|
+
type: zod_1.z.unknown(),
|
|
46
|
+
source: zod_1.z.string(),
|
|
47
|
+
previousSource: zod_1.z.string().optional(),
|
|
48
|
+
})
|
|
49
|
+
.strict(),
|
|
50
|
+
zod_1.z
|
|
51
|
+
.object({
|
|
52
|
+
type: zod_1.z.unknown(),
|
|
53
|
+
message: zod_1.z.string(),
|
|
54
|
+
newFormat: zod_1.z
|
|
55
|
+
.object({
|
|
56
|
+
resolution: zod_1.z.string(),
|
|
57
|
+
frameRate: zod_1.z.string(),
|
|
58
|
+
codec: zod_1.z.string(),
|
|
59
|
+
})
|
|
60
|
+
.partial()
|
|
61
|
+
.strict()
|
|
62
|
+
.optional(),
|
|
63
|
+
previousFormat: zod_1.z
|
|
64
|
+
.object({
|
|
65
|
+
resolution: zod_1.z.string(),
|
|
66
|
+
frameRate: zod_1.z.string(),
|
|
67
|
+
codec: zod_1.z.string(),
|
|
68
|
+
})
|
|
69
|
+
.partial()
|
|
70
|
+
.strict()
|
|
71
|
+
.optional(),
|
|
72
|
+
})
|
|
73
|
+
.strict(),
|
|
74
|
+
zod_1.z
|
|
75
|
+
.object({
|
|
76
|
+
type: zod_1.z.unknown(),
|
|
77
|
+
source: zod_1.z.string(),
|
|
78
|
+
format: zod_1.z
|
|
79
|
+
.object({
|
|
80
|
+
resolution: zod_1.z.string(),
|
|
81
|
+
frameRate: zod_1.z.string(),
|
|
82
|
+
codec: zod_1.z.string(),
|
|
83
|
+
})
|
|
84
|
+
.partial()
|
|
85
|
+
.strict(),
|
|
86
|
+
})
|
|
87
|
+
.strict(),
|
|
88
|
+
zod_1.z.object({ type: zod_1.z.unknown(), source: zod_1.z.string() }).strict(),
|
|
89
|
+
zod_1.z
|
|
90
|
+
.object({ type: zod_1.z.unknown(), source: zod_1.z.string(), url: zod_1.z.string() })
|
|
91
|
+
.strict(),
|
|
92
|
+
zod_1.z
|
|
93
|
+
.object({
|
|
94
|
+
type: zod_1.z.unknown(),
|
|
95
|
+
classification: zod_1.z.unknown(),
|
|
96
|
+
error: zod_1.z.string(),
|
|
97
|
+
})
|
|
98
|
+
.strict(),
|
|
99
|
+
zod_1.z
|
|
100
|
+
.object({
|
|
101
|
+
type: zod_1.z.unknown(),
|
|
102
|
+
failedSource: zod_1.z.string(),
|
|
103
|
+
newSource: zod_1.z.string(),
|
|
104
|
+
message: zod_1.z.string().optional(),
|
|
105
|
+
})
|
|
106
|
+
.strict(),
|
|
107
|
+
]);
|
|
108
|
+
const Commands = zod_1.z
|
|
109
|
+
.object({ type: zod_1.z.unknown(), source: zod_1.z.string() })
|
|
110
|
+
.strict();
|
|
111
|
+
const SwitchSourceBody = zod_1.z
|
|
112
|
+
.object({ source: zod_1.z.string() })
|
|
113
|
+
.strict();
|
|
114
|
+
const ActiveSourceResponse = zod_1.z
|
|
115
|
+
.object({ activeSource: zod_1.z.string() })
|
|
116
|
+
.strict();
|
|
117
|
+
const AvailableSourcesResponse = zod_1.z
|
|
118
|
+
.object({
|
|
119
|
+
availableSources: zod_1.z.array(zod_1.z
|
|
120
|
+
.object({
|
|
121
|
+
sourceName: zod_1.z.string(),
|
|
122
|
+
format: zod_1.z
|
|
123
|
+
.object({
|
|
124
|
+
resolution: zod_1.z.string(),
|
|
125
|
+
frameRate: zod_1.z.string(),
|
|
126
|
+
codec: zod_1.z.string(),
|
|
127
|
+
})
|
|
128
|
+
.partial()
|
|
129
|
+
.strict(),
|
|
130
|
+
})
|
|
131
|
+
.partial()
|
|
132
|
+
.strict()),
|
|
133
|
+
})
|
|
134
|
+
.strict();
|
|
135
|
+
const ErrorResponse = zod_1.z.object({ error: zod_1.z.string() }).strict();
|
|
136
|
+
exports.schemas = {
|
|
137
|
+
Config,
|
|
138
|
+
State,
|
|
139
|
+
SourceFormat,
|
|
140
|
+
Events,
|
|
141
|
+
Commands,
|
|
142
|
+
SwitchSourceBody,
|
|
143
|
+
ActiveSourceResponse,
|
|
144
|
+
AvailableSourcesResponse,
|
|
145
|
+
ErrorResponse,
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.js","sourceRoot":"","sources":["../../../../src/processor.hardSourceSwitch/_gen/zod.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC1C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/C,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACtD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC;KACD,MAAM,EAAE,CACR;AACH,MAAM,KAAK,GAAG,OAAC;KACZ,MAAM,CAAC;IACN,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,gBAAgB,EAAE,OAAC,CAAC,KAAK,CACvB,OAAC;SACE,MAAM,CAAC;QACN,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;QACtB,MAAM,EAAE,OAAC;aACN,MAAM,CA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C,MAAM,EAAE,CAAC;AAElD,QAAA,OAAO,GAA8B;IAChD,MAAM;IACN,KAAK;IACL,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,gBAAgB;IAChB,oBAAoB;IACpB,wBAAwB;IACxB,aAAa;CACd,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HardSourceSwitchState, HardSourceSwitchConfig, HardSourceSwitchCommand } from "./runtime";
|
|
2
|
+
import type { ViewProps } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
|
3
|
+
export default function FullscreenView({ state, config: _config, sendCommand, }: ViewProps<HardSourceSwitchConfig, HardSourceSwitchState, HardSourceSwitchCommand>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = FullscreenView;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
function FullscreenView({ state, config: _config, sendCommand, }) {
|
|
7
|
+
const handleSwitch = (0, react_1.useCallback)((sourceName) => {
|
|
8
|
+
sendCommand({ type: "switch-to-source", source: sourceName });
|
|
9
|
+
}, [sendCommand]);
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "h-full w-full flex flex-col p-4 bg-gray-900 text-white", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1 flex gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold mb-3", children: "Sources" }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4", children: state.availableSources.map((source) => {
|
|
11
|
+
if (!source.sourceName) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const sourceName = source.sourceName;
|
|
15
|
+
const isActive = state.activeSource === sourceName;
|
|
16
|
+
const previewUrl = state.sourcePreviews?.[sourceName];
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `
|
|
18
|
+
relative border-2 rounded-lg overflow-hidden
|
|
19
|
+
${isActive ? "border-green-500" : "border-gray-600"}
|
|
20
|
+
`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "aspect-video bg-gray-800 relative", children: [previewUrl ? ((0, jsx_runtime_1.jsx)("img", { src: previewUrl, alt: `${sourceName} preview`, className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center h-full text-gray-500", children: "Loading..." })), isActive && ((0, jsx_runtime_1.jsx)("div", { className: "absolute top-2 right-2 bg-green-500 text-white px-2 py-1 rounded text-xs font-bold", children: "ACTIVE" }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-3", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-medium mb-2", children: sourceName }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-end", children: !isActive && ((0, jsx_runtime_1.jsx)("button", { onClick: () => handleSwitch(sourceName), className: "px-3 py-1 bg-blue-600 hover:bg-blue-700 rounded text-sm transition", children: "Make Active" })) })] })] }, sourceName));
|
|
21
|
+
}) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "w-96", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold mb-3", children: "Output" }), (0, jsx_runtime_1.jsxs)("div", { className: "border-2 border-blue-500 rounded-lg overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "aspect-video bg-gray-800", children: state.outputPreview ? ((0, jsx_runtime_1.jsx)("img", { src: state.outputPreview, alt: "Output preview", className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center h-full text-gray-500", children: "No output" })) }), (0, jsx_runtime_1.jsx)("div", { className: "p-3 bg-gray-800", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-gray-400", children: ["Active Source:", " ", (0, jsx_runtime_1.jsx)("span", { className: "font-semibold text-white", children: state.activeSource || "None" })] }) })] })] })] }), state.formatWarnings && state.formatWarnings.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-4 bg-yellow-900/50 border border-yellow-600 rounded-lg p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-yellow-400 font-semibold mb-2 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { children: "\u26A0\uFE0F" }), "Format Warnings"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-1 max-h-32 overflow-y-auto", children: state.formatWarnings.map((warning, idx) => ((0, jsx_runtime_1.jsxs)("div", { className: "text-sm text-yellow-200", children: ["\u2022 ", warning] }, idx))) })] }))] }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=fullscreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen.js","sourceRoot":"","sources":["../../../src/processor.hardSourceSwitch/fullscreen.tsx"],"names":[],"mappings":";;AAoBA,iCAkIC;;AAhJD,iCAAoC;AAcpC,SAAwB,cAAc,CAAC,EACrC,KAAK,EACL,MAAM,EAAE,OAAO,EACf,WAAW,GAKZ;IACC,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,UAAkB,EAAE,EAAE;QAErB,WAAW,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAChE,CAAC,EACD,CAAC,WAAW,CAAC,CACd,CAAC;IAEF,OAAO,CACL,iCAAK,SAAS,EAAC,wDAAwD,aACrE,iCAAK,SAAS,EAAC,mBAAmB,aAChC,iCAAK,SAAS,EAAC,QAAQ,aACrB,+BAAI,SAAS,EAAC,4BAA4B,wBAAa,EACvD,gCAAK,SAAS,EAAC,sDAAsD,YAClE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE;oCAGjD,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;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,GACtC,CACH,CAAC,CAAC,CAAC,CACF,gCAAK,SAAS,EAAC,uDAAuD,0BAEhE,CACP,GACG,EACN,gCAAK,SAAS,EAAC,iBAAiB,YAC9B,+BAAG,SAAS,EAAC,uBAAuB,+BACnB,GAAG,EAClB,iCAAM,SAAS,EAAC,0BAA0B,YACvC,KAAK,CAAC,YAAY,IAAI,MAAM,GACxB,IACL,GACA,IACF,IACF,IACF,EAGL,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,CAC1D,iCAAK,SAAS,EAAC,+DAA+D,aAC5E,gCAAI,SAAS,EAAC,4DAA4D,aACxE,4DAAe,uBAEZ,EACL,gCAAK,SAAS,EAAC,oCAAoC,YAChD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAC1C,iCAAe,SAAS,EAAC,yBAAyB,wBAC7C,OAAO,KADF,GAAG,CAEP,CACP,CAAC,GACE,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
|
2
|
+
export default function ({ defineComponent, Av, validation: { Z, SourceName }, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<{
|
|
3
|
+
id: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
activeSource?: string;
|
|
6
|
+
outputSource: string;
|
|
7
|
+
maxQueueMs: number;
|
|
8
|
+
failoverTimeoutMs: number;
|
|
9
|
+
notes?: string;
|
|
10
|
+
}, {
|
|
11
|
+
activeSource: string;
|
|
12
|
+
availableSources: {
|
|
13
|
+
sourceName?: string;
|
|
14
|
+
format?: {
|
|
15
|
+
resolution?: string;
|
|
16
|
+
frameRate?: string;
|
|
17
|
+
codec?: string;
|
|
18
|
+
};
|
|
19
|
+
}[];
|
|
20
|
+
outputPreview?: string;
|
|
21
|
+
sourcePreviews?: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
formatWarnings?: string[];
|
|
25
|
+
}, {
|
|
26
|
+
type: "switch-to-source";
|
|
27
|
+
source: string;
|
|
28
|
+
}, {
|
|
29
|
+
type: "source-switched";
|
|
30
|
+
source: string;
|
|
31
|
+
previousSource?: string;
|
|
32
|
+
} | {
|
|
33
|
+
type: "format-warning";
|
|
34
|
+
message: string;
|
|
35
|
+
newFormat?: {
|
|
36
|
+
resolution?: string;
|
|
37
|
+
frameRate?: string;
|
|
38
|
+
codec?: string;
|
|
39
|
+
};
|
|
40
|
+
previousFormat?: {
|
|
41
|
+
resolution?: string;
|
|
42
|
+
frameRate?: string;
|
|
43
|
+
codec?: string;
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
type: "source-available";
|
|
47
|
+
source: string;
|
|
48
|
+
format: {
|
|
49
|
+
resolution?: string;
|
|
50
|
+
frameRate?: string;
|
|
51
|
+
codec?: string;
|
|
52
|
+
};
|
|
53
|
+
} | {
|
|
54
|
+
type: "source-unavailable";
|
|
55
|
+
source: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "preview-url-updated";
|
|
58
|
+
source: string;
|
|
59
|
+
url: string;
|
|
60
|
+
} | {
|
|
61
|
+
type: "error";
|
|
62
|
+
classification: "operational" | "configuration";
|
|
63
|
+
error: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: "automatic-failover";
|
|
66
|
+
failedSource: string;
|
|
67
|
+
newSource: string;
|
|
68
|
+
message?: string;
|
|
69
|
+
}>;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
7
|
+
const FaSlidersH_1 = require("@react-icons/all-files/fa/FaSlidersH");
|
|
8
|
+
const inline_view_1 = __importDefault(require("./inline-view"));
|
|
9
|
+
const fullscreen_1 = __importDefault(require("./fullscreen"));
|
|
10
|
+
function default_1({ defineComponent, Av, validation: { Z, SourceName }, }) {
|
|
11
|
+
return defineComponent({
|
|
12
|
+
identifier: 'processor.hardSourceSwitch',
|
|
13
|
+
category: 'processor',
|
|
14
|
+
name: "Hard Source Switch",
|
|
15
|
+
description: "Instantly switches between multiple audio and video sources without transcoding",
|
|
16
|
+
searchTags: ["switch", "hard", "source", "program", "cut"],
|
|
17
|
+
llmHints: [
|
|
18
|
+
"Switches between multiple AV sources instantly without transcoding or normalization",
|
|
19
|
+
"Uses hard cuts (no fade) - sources are passed through as-is",
|
|
20
|
+
"Sources can have different formats (resolution/framerate) but downstream may need to handle changes",
|
|
21
|
+
"Each source must have both audio and video streams grouped by sourceName",
|
|
22
|
+
"The activeSource config must match a connected source's sourceName (or omit for auto-selection)",
|
|
23
|
+
"Use processor.smartSourceSwitch if you need format normalization and smooth transitions",
|
|
24
|
+
"Supports automatic failover when active source stops sending frames (configurable via failoverTimeoutMs)",
|
|
25
|
+
"Manual switching available via UI, commands, or API endpoints",
|
|
26
|
+
"Format warnings are raised when switching between different resolutions/framerates",
|
|
27
|
+
"Ideal for switching between cameras or feeds with identical formats",
|
|
28
|
+
"Health monitoring checks frame arrival every second and triggers failover after timeout"
|
|
29
|
+
],
|
|
30
|
+
icon: FaSlidersH_1.FaSlidersH,
|
|
31
|
+
subscription: {
|
|
32
|
+
accepts: {
|
|
33
|
+
type: 'dynamic-streams',
|
|
34
|
+
mode: { type: 'multiple', groupBy: 'sourceName' },
|
|
35
|
+
streams: () => Av.map((media) => ({ media }))
|
|
36
|
+
},
|
|
37
|
+
produces: {
|
|
38
|
+
type: 'simple-stream',
|
|
39
|
+
audio: true,
|
|
40
|
+
video: true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
display: (desc) => {
|
|
44
|
+
return {
|
|
45
|
+
activeSource: desc.config.activeSource || '(auto)',
|
|
46
|
+
outputSource: desc.config.outputSource
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
runtime: {
|
|
50
|
+
initialState: () => ({
|
|
51
|
+
activeSource: '',
|
|
52
|
+
availableSources: [],
|
|
53
|
+
sourcePreviews: {},
|
|
54
|
+
formatWarnings: []
|
|
55
|
+
}),
|
|
56
|
+
handleEvent: (ev, state) => {
|
|
57
|
+
const evType = ev.type;
|
|
58
|
+
switch (evType) {
|
|
59
|
+
case 'source-switched':
|
|
60
|
+
return { ...state, activeSource: ev.source };
|
|
61
|
+
case 'source-available': {
|
|
62
|
+
const existing = state.availableSources.find(s => s.sourceName === ev.source);
|
|
63
|
+
if (!existing) {
|
|
64
|
+
return {
|
|
65
|
+
...state,
|
|
66
|
+
availableSources: [...state.availableSources, {
|
|
67
|
+
sourceName: ev.source,
|
|
68
|
+
format: ev.format
|
|
69
|
+
}]
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return state;
|
|
73
|
+
}
|
|
74
|
+
case 'source-unavailable':
|
|
75
|
+
return {
|
|
76
|
+
...state,
|
|
77
|
+
availableSources: state.availableSources.filter(s => s.sourceName !== ev.source)
|
|
78
|
+
};
|
|
79
|
+
case 'preview-url-updated':
|
|
80
|
+
if (ev.source === 'output') {
|
|
81
|
+
return { ...state, outputPreview: ev.url };
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return {
|
|
85
|
+
...state,
|
|
86
|
+
sourcePreviews: { ...state.sourcePreviews, [ev.source]: ev.url }
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
case 'format-warning': {
|
|
90
|
+
const currentWarnings = state.formatWarnings || [];
|
|
91
|
+
const newWarnings = [ev.message, ...currentWarnings].slice(0, 10);
|
|
92
|
+
return { ...state, formatWarnings: newWarnings };
|
|
93
|
+
}
|
|
94
|
+
case 'error':
|
|
95
|
+
case 'automatic-failover':
|
|
96
|
+
return state;
|
|
97
|
+
default:
|
|
98
|
+
assertUnreachable(evType);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
inline: inline_view_1.default,
|
|
102
|
+
summary: inline_view_1.default,
|
|
103
|
+
fullscreen: fullscreen_1.default
|
|
104
|
+
},
|
|
105
|
+
extraValidation: function (ctx) {
|
|
106
|
+
const config = ctx.config;
|
|
107
|
+
const streams = ctx.subscriptions.flatMap(s => s.expectedStreams);
|
|
108
|
+
const sourceNames = streams
|
|
109
|
+
.map(s => s.sourceName)
|
|
110
|
+
.filter((s) => !!s)
|
|
111
|
+
.filter((s, i, a) => a.indexOf(s) === i);
|
|
112
|
+
if (config.activeSource && !sourceNames.includes(config.activeSource)) {
|
|
113
|
+
ctx.addError(`activeSource '${config.activeSource}' is not in subscriptions. Available sources: ${sourceNames.join(', ')}`);
|
|
114
|
+
}
|
|
115
|
+
if (!config.activeSource && sourceNames.length === 0) {
|
|
116
|
+
ctx.addWarning('No activeSource configured and no sources connected. Component will auto-select first available source when connected.');
|
|
117
|
+
}
|
|
118
|
+
sourceNames.forEach(source => {
|
|
119
|
+
const hasVideo = streams.some(s => s.sourceName === source && s.media === 'video');
|
|
120
|
+
const hasAudio = streams.some(s => s.sourceName === source && s.media === 'audio');
|
|
121
|
+
if (!hasVideo || !hasAudio) {
|
|
122
|
+
ctx.addError(`Source '${source}' must have both audio and video streams`);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
configForm: {
|
|
127
|
+
form: {
|
|
128
|
+
outputSource: {
|
|
129
|
+
help: "Source name for the switched output",
|
|
130
|
+
hint: {
|
|
131
|
+
type: 'text',
|
|
132
|
+
validation: SourceName,
|
|
133
|
+
defaultValue: 'output'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
failoverTimeoutMs: {
|
|
137
|
+
help: "Automatic failover timeout (ms) when active source stops sending frames",
|
|
138
|
+
advanced: true,
|
|
139
|
+
hint: {
|
|
140
|
+
type: 'numeric',
|
|
141
|
+
validation: Z.number().gte(500).lte(30000),
|
|
142
|
+
defaultValue: 2000,
|
|
143
|
+
optional: true
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
maxQueueMs: {
|
|
147
|
+
help: "Maximum queue time (ms) for streams running behind",
|
|
148
|
+
advanced: true,
|
|
149
|
+
hint: {
|
|
150
|
+
type: 'numeric',
|
|
151
|
+
validation: Z.number().gte(0).lte(10000),
|
|
152
|
+
defaultValue: 1000,
|
|
153
|
+
optional: true
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
notes: {
|
|
157
|
+
help: "Optional notes",
|
|
158
|
+
hint: {
|
|
159
|
+
type: 'text',
|
|
160
|
+
optional: true
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function assertUnreachable(_) {
|
|
168
|
+
throw new Error("Didn't expect to get here");
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=info.js.map
|