@norskvideo/norsk-studio-built-ins 1.11.3 → 1.12.0-2025-01-27-b21c8c91
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 +16 -0
- package/client/info.js +1288 -788
- package/client/output.whep/styles.css +9 -0
- package/client/style.css +501 -863
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/info.js +5 -9
- package/lib/info.js.map +1 -1
- package/lib/input.rtmp/info.js +3 -2
- package/lib/input.rtmp/info.js.map +1 -1
- package/lib/input.rtmp/openApi.d.ts +133 -0
- package/lib/input.rtmp/openApi.js +3 -0
- package/lib/input.rtmp/openApi.js.map +1 -0
- package/lib/input.rtmp/runtime.d.ts +24 -5
- package/lib/input.rtmp/runtime.js +166 -60
- package/lib/input.rtmp/runtime.js.map +1 -1
- package/lib/input.rtmp/summary-view.d.ts +3 -5
- package/lib/input.rtmp/summary-view.js +26 -6
- package/lib/input.rtmp/summary-view.js.map +1 -1
- package/lib/input.rtmp/types.yaml +99 -0
- package/lib/input.silence/info.js +4 -3
- package/lib/input.silence/info.js.map +1 -1
- package/lib/input.srt-caller/info.js +7 -6
- package/lib/input.srt-caller/info.js.map +1 -1
- package/lib/input.srt-caller/runtime.d.ts +1 -1
- package/lib/input.srt-listener/info.js +8 -6
- package/lib/input.srt-listener/info.js.map +1 -1
- package/lib/input.srt-listener/openApi.d.ts +133 -0
- package/lib/input.srt-listener/openApi.js +3 -0
- package/lib/input.srt-listener/openApi.js.map +1 -0
- package/lib/input.srt-listener/runtime.d.ts +26 -6
- package/lib/input.srt-listener/runtime.js +168 -57
- package/lib/input.srt-listener/runtime.js.map +1 -1
- package/lib/input.srt-listener/summary-view.d.ts +3 -5
- package/lib/input.srt-listener/summary-view.js +28 -4
- package/lib/input.srt-listener/summary-view.js.map +1 -1
- package/lib/input.srt-listener/types.yaml +99 -0
- package/lib/input.udp-ts/info.d.ts +1 -1
- package/lib/input.udp-ts/info.js +6 -5
- package/lib/input.udp-ts/info.js.map +1 -1
- package/lib/input.udp-ts/runtime.d.ts +1 -1
- package/lib/input.videoTestCard/info.d.ts +1 -1
- package/lib/input.videoTestCard/info.js +15 -5
- package/lib/input.videoTestCard/info.js.map +1 -1
- package/lib/output.autoCmaf/form-views.js +2 -3
- package/lib/output.autoCmaf/form-views.js.map +1 -1
- package/lib/output.autoCmaf/info.d.ts +2 -2
- package/lib/output.autoCmaf/info.js +66 -8
- package/lib/output.autoCmaf/info.js.map +1 -1
- package/lib/output.autoCmaf/runtime.d.ts +29 -9
- package/lib/output.autoCmaf/runtime.js +198 -60
- package/lib/output.autoCmaf/runtime.js.map +1 -1
- package/lib/output.autoCmaf/summary.js +26 -1
- package/lib/output.autoCmaf/summary.js.map +1 -1
- package/lib/output.autoCmaf/types.d.ts +101 -0
- package/lib/output.autoCmaf/types.js +3 -0
- package/lib/output.autoCmaf/types.js.map +1 -0
- package/lib/output.autoCmaf/types.yaml +28 -0
- package/lib/output.preview/info.js +5 -3
- package/lib/output.preview/info.js.map +1 -1
- package/lib/output.preview/inline-view.d.ts +2 -4
- package/lib/output.preview/inline-view.js +8 -4
- package/lib/output.preview/inline-view.js.map +1 -1
- package/lib/output.preview/runtime.d.ts +4 -3
- package/lib/output.preview/runtime.js +29 -18
- package/lib/output.preview/runtime.js.map +1 -1
- package/lib/output.rtmp/info.js +2 -1
- package/lib/output.rtmp/info.js.map +1 -1
- package/lib/output.rtmp/inline-view.js +2 -2
- package/lib/output.rtmp/runtime.d.ts +2 -2
- package/lib/output.rtmp/runtime.js.map +1 -1
- package/lib/output.srt/info.d.ts +2 -2
- package/lib/output.srt/info.js +27 -6
- package/lib/output.srt/info.js.map +1 -1
- package/lib/output.srt/runtime.d.ts +30 -5
- package/lib/output.srt/runtime.js +139 -5
- package/lib/output.srt/runtime.js.map +1 -1
- package/lib/output.srt/types.d.ts +101 -0
- package/lib/output.srt/types.js +3 -0
- package/lib/output.srt/types.js.map +1 -0
- package/lib/output.srt/types.yaml +31 -0
- package/lib/output.statistics/info.js +3 -3
- package/lib/output.statistics/info.js.map +1 -1
- package/lib/output.statistics/inline-view.js +3 -2
- package/lib/output.statistics/inline-view.js.map +1 -1
- package/lib/output.statistics/runtime.d.ts +1 -1
- package/lib/output.statistics/runtime.js.map +1 -1
- package/lib/output.udpTs/info.d.ts +1 -1
- package/lib/output.udpTs/info.js +5 -4
- package/lib/output.udpTs/info.js.map +1 -1
- package/lib/output.udpTs/runtime.d.ts +1 -1
- package/lib/output.whep/info.d.ts +2 -2
- package/lib/output.whep/info.js +49 -1
- package/lib/output.whep/info.js.map +1 -1
- package/lib/output.whep/inline-view.d.ts +4 -0
- package/lib/output.whep/inline-view.js +24 -0
- package/lib/output.whep/inline-view.js.map +1 -0
- package/lib/output.whep/runtime.d.ts +26 -5
- package/lib/output.whep/runtime.js +64 -13
- package/lib/output.whep/runtime.js.map +1 -1
- package/lib/output.whep/types.d.ts +101 -0
- package/lib/output.whep/types.js +3 -0
- package/lib/output.whep/types.js.map +1 -0
- package/lib/output.whep/types.yaml +30 -0
- package/lib/processor.browserOverlay/info.d.ts +2 -2
- package/lib/processor.browserOverlay/info.js +57 -3
- package/lib/processor.browserOverlay/info.js.map +1 -1
- package/lib/processor.browserOverlay/inline-view.d.ts +6 -0
- package/lib/processor.browserOverlay/inline-view.js +8 -0
- package/lib/processor.browserOverlay/inline-view.js.map +1 -0
- package/lib/processor.browserOverlay/openApi.d.ts +174 -0
- package/lib/processor.browserOverlay/openApi.js +3 -0
- package/lib/processor.browserOverlay/openApi.js.map +1 -0
- package/lib/processor.browserOverlay/runtime.d.ts +40 -6
- package/lib/processor.browserOverlay/runtime.js +151 -23
- package/lib/processor.browserOverlay/runtime.js.map +1 -1
- package/lib/processor.browserOverlay/summary-view.d.ts +4 -0
- package/lib/processor.browserOverlay/summary-view.js +27 -0
- package/lib/processor.browserOverlay/summary-view.js.map +1 -0
- package/lib/processor.browserOverlay/types.yaml +65 -0
- package/lib/processor.cascadingSwitch/info.js +5 -4
- package/lib/processor.cascadingSwitch/info.js.map +1 -1
- package/lib/processor.cascadingSwitch/inline-view.js +3 -3
- package/lib/processor.cascadingSwitch/runtime.d.ts +1 -1
- package/lib/processor.cascadingSwitch/runtime.js +2 -2
- package/lib/processor.cascadingSwitch/runtime.js.map +1 -1
- package/lib/processor.fixedLadder/codec-editor.js +2 -2
- package/lib/processor.fixedLadder/codec-editor.js.map +1 -1
- package/lib/processor.fixedLadder/codec-view.js +2 -2
- package/lib/processor.fixedLadder/codec-view.js.map +1 -1
- package/lib/processor.fixedLadder/info.js +11 -9
- package/lib/processor.fixedLadder/info.js.map +1 -1
- package/lib/processor.fixedLadder/rung-view.js +2 -2
- package/lib/processor.fixedLadder/rung-view.js.map +1 -1
- package/lib/processor.onscreenGraphic/image-selection.d.ts +9 -0
- package/lib/{processor.dynamicBug/bug-selection.js → processor.onscreenGraphic/image-selection.js} +10 -10
- package/lib/processor.onscreenGraphic/image-selection.js.map +1 -0
- package/lib/processor.onscreenGraphic/info.d.ts +3 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/info.js +24 -17
- package/lib/processor.onscreenGraphic/info.js.map +1 -0
- package/lib/processor.onscreenGraphic/runtime.d.ts +91 -0
- package/lib/processor.onscreenGraphic/runtime.js +503 -0
- package/lib/processor.onscreenGraphic/runtime.js.map +1 -0
- package/lib/processor.onscreenGraphic/summary-view.d.ts +4 -0
- package/lib/processor.onscreenGraphic/summary-view.js +343 -0
- package/lib/processor.onscreenGraphic/summary-view.js.map +1 -0
- package/lib/processor.onscreenGraphic/types.d.ts +271 -0
- package/lib/processor.onscreenGraphic/types.js +3 -0
- package/lib/processor.onscreenGraphic/types.js.map +1 -0
- package/lib/processor.onscreenGraphic/types.yaml +211 -0
- package/lib/processor.streamKeyOverride/info.d.ts +3 -0
- package/lib/processor.streamKeyOverride/info.js +150 -0
- package/lib/processor.streamKeyOverride/info.js.map +1 -0
- package/lib/processor.streamKeyOverride/runtime.d.ts +54 -0
- package/lib/processor.streamKeyOverride/runtime.js +226 -0
- package/lib/processor.streamKeyOverride/runtime.js.map +1 -0
- package/lib/shared/drm/axinom.d.ts +2 -0
- package/lib/shared/drm/axinom.js +120 -0
- package/lib/shared/drm/axinom.js.map +1 -0
- package/lib/shared/drm/cpix.d.ts +24 -0
- package/lib/shared/drm/cpix.js +97 -0
- package/lib/shared/drm/cpix.js.map +1 -0
- package/lib/shared/drm/ezdrm.d.ts +2 -0
- package/lib/shared/drm/ezdrm.js +26 -0
- package/lib/shared/drm/ezdrm.js.map +1 -0
- package/lib/shared/srt-form-views.js +1 -2
- package/lib/shared/srt-form-views.js.map +1 -1
- package/lib/shared/srt-socket-options.js +6 -6
- package/lib/shared/srt-socket-options.js.map +1 -1
- package/lib/shared/webrtcSettings.js +1 -2
- package/lib/shared/webrtcSettings.js.map +1 -1
- package/lib/test/auto-cmaf.js +25 -17
- package/lib/test/auto-cmaf.js.map +1 -1
- package/lib/test/browser-overlay.js +3 -2
- package/lib/test/browser-overlay.js.map +1 -1
- package/lib/test/{dynamic-bug.js → onscreen-graphic.js} +146 -114
- package/lib/test/onscreen-graphic.js.map +1 -0
- package/lib/test/preview.js +3 -3
- package/lib/test/preview.js.map +1 -1
- package/lib/test/rtmp-input.js +6 -3
- package/lib/test/rtmp-input.js.map +1 -1
- package/lib/test/srt-input-caller.js +5 -5
- package/lib/test/srt-input-caller.js.map +1 -1
- package/lib/test/srt-input-listener.js +99 -18
- package/lib/test/srt-input-listener.js.map +1 -1
- package/lib/test/srt-output.js +13 -5
- package/lib/test/srt-output.js.map +1 -1
- package/lib/test/udp-output.js +11 -4
- package/lib/test/udp-output.js.map +1 -1
- package/lib/test/udp-ts-input.js +2 -2
- package/lib/test/udp-ts-input.js.map +1 -1
- package/lib/test/whep-output.js +11 -5
- package/lib/test/whep-output.js.map +1 -1
- package/lib/{util.latency → util.stats.latency}/info.js +3 -2
- package/lib/util.stats.latency/info.js.map +1 -0
- package/lib/util.stats.latency/inline-view.js.map +1 -0
- package/lib/{util.latency → util.stats.latency}/runtime.d.ts +1 -1
- package/lib/{util.latency → util.stats.latency}/runtime.js +2 -2
- package/lib/util.stats.latency/runtime.js.map +1 -0
- package/lib/util.stats.latency/source-node-selection.js.map +1 -0
- package/package.json +12 -5
- package/lib/processor.dynamicBug/bug-selection.d.ts +0 -9
- package/lib/processor.dynamicBug/bug-selection.js.map +0 -1
- package/lib/processor.dynamicBug/info.d.ts +0 -3
- package/lib/processor.dynamicBug/info.js.map +0 -1
- package/lib/processor.dynamicBug/runtime.d.ts +0 -64
- package/lib/processor.dynamicBug/runtime.js +0 -304
- package/lib/processor.dynamicBug/runtime.js.map +0 -1
- package/lib/processor.dynamicBug/summary-view.d.ts +0 -4
- package/lib/processor.dynamicBug/summary-view.js +0 -60
- package/lib/processor.dynamicBug/summary-view.js.map +0 -1
- package/lib/processor.whisper-transcribe/info.d.ts +0 -3
- package/lib/processor.whisper-transcribe/info.js +0 -43
- package/lib/processor.whisper-transcribe/info.js.map +0 -1
- package/lib/processor.whisper-transcribe/runtime.d.ts +0 -29
- package/lib/processor.whisper-transcribe/runtime.js +0 -83
- package/lib/processor.whisper-transcribe/runtime.js.map +0 -1
- package/lib/test/dynamic-bug.js.map +0 -1
- package/lib/util.latency/info.js.map +0 -1
- package/lib/util.latency/inline-view.js.map +0 -1
- package/lib/util.latency/runtime.js.map +0 -1
- package/lib/util.latency/source-node-selection.js.map +0 -1
- package/lib/util.ma35d/info.d.ts +0 -3
- package/lib/util.ma35d/info.js +0 -78
- package/lib/util.ma35d/info.js.map +0 -1
- package/lib/util.ma35d/inline-view.d.ts +0 -6
- package/lib/util.ma35d/inline-view.js +0 -76
- package/lib/util.ma35d/inline-view.js.map +0 -1
- package/lib/util.ma35d/runtime.d.ts +0 -21
- package/lib/util.ma35d/runtime.js +0 -49
- package/lib/util.ma35d/runtime.js.map +0 -1
- package/lib/util.timestamps/info.d.ts +0 -5
- package/lib/util.timestamps/info.js +0 -86
- package/lib/util.timestamps/info.js.map +0 -1
- package/lib/util.timestamps/inline-view.d.ts +0 -6
- package/lib/util.timestamps/inline-view.js +0 -94
- package/lib/util.timestamps/inline-view.js.map +0 -1
- package/lib/util.timestamps/runtime.d.ts +0 -29
- package/lib/util.timestamps/runtime.js +0 -40
- package/lib/util.timestamps/runtime.js.map +0 -1
- /package/lib/test/{dynamic-bug.d.ts → onscreen-graphic.d.ts} +0 -0
- /package/lib/{util.latency → util.stats.latency}/info.d.ts +0 -0
- /package/lib/{util.latency → util.stats.latency}/inline-view.d.ts +0 -0
- /package/lib/{util.latency → util.stats.latency}/inline-view.js +0 -0
- /package/lib/{util.latency → util.stats.latency}/source-node-selection.d.ts +0 -0
- /package/lib/{util.latency → util.stats.latency}/source-node-selection.js +0 -0
@@ -0,0 +1,174 @@
|
|
1
|
+
export interface paths {
|
2
|
+
"/url": {
|
3
|
+
parameters: {
|
4
|
+
query?: never;
|
5
|
+
header?: never;
|
6
|
+
path?: never;
|
7
|
+
cookie?: never;
|
8
|
+
};
|
9
|
+
get: {
|
10
|
+
parameters: {
|
11
|
+
query?: never;
|
12
|
+
header?: never;
|
13
|
+
path?: never;
|
14
|
+
cookie?: never;
|
15
|
+
};
|
16
|
+
requestBody?: never;
|
17
|
+
responses: {
|
18
|
+
200: {
|
19
|
+
headers: {
|
20
|
+
[name: string]: unknown;
|
21
|
+
};
|
22
|
+
content: {
|
23
|
+
"text/plain": string;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
};
|
27
|
+
};
|
28
|
+
put?: never;
|
29
|
+
post: {
|
30
|
+
parameters: {
|
31
|
+
query?: never;
|
32
|
+
header?: never;
|
33
|
+
path?: never;
|
34
|
+
cookie?: never;
|
35
|
+
};
|
36
|
+
requestBody: {
|
37
|
+
content: {
|
38
|
+
"application/json": {
|
39
|
+
url?: string;
|
40
|
+
};
|
41
|
+
};
|
42
|
+
};
|
43
|
+
responses: never;
|
44
|
+
};
|
45
|
+
delete?: never;
|
46
|
+
options?: never;
|
47
|
+
head?: never;
|
48
|
+
patch?: never;
|
49
|
+
trace?: never;
|
50
|
+
};
|
51
|
+
"/status": {
|
52
|
+
parameters: {
|
53
|
+
query?: never;
|
54
|
+
header?: never;
|
55
|
+
path?: never;
|
56
|
+
cookie?: never;
|
57
|
+
};
|
58
|
+
get: {
|
59
|
+
parameters: {
|
60
|
+
query?: never;
|
61
|
+
header?: never;
|
62
|
+
path?: never;
|
63
|
+
cookie?: never;
|
64
|
+
};
|
65
|
+
requestBody?: never;
|
66
|
+
responses: {
|
67
|
+
200: {
|
68
|
+
headers: {
|
69
|
+
[name: string]: unknown;
|
70
|
+
};
|
71
|
+
content: {
|
72
|
+
"application/json": {
|
73
|
+
enabled?: boolean;
|
74
|
+
};
|
75
|
+
};
|
76
|
+
};
|
77
|
+
};
|
78
|
+
};
|
79
|
+
put?: never;
|
80
|
+
post?: never;
|
81
|
+
delete?: never;
|
82
|
+
options?: never;
|
83
|
+
head?: never;
|
84
|
+
patch?: never;
|
85
|
+
trace?: never;
|
86
|
+
};
|
87
|
+
"/enable": {
|
88
|
+
parameters: {
|
89
|
+
query?: never;
|
90
|
+
header?: never;
|
91
|
+
path?: never;
|
92
|
+
cookie?: never;
|
93
|
+
};
|
94
|
+
get?: never;
|
95
|
+
put?: never;
|
96
|
+
post: {
|
97
|
+
parameters: {
|
98
|
+
query?: never;
|
99
|
+
header?: never;
|
100
|
+
path?: never;
|
101
|
+
cookie?: never;
|
102
|
+
};
|
103
|
+
requestBody?: never;
|
104
|
+
responses: {
|
105
|
+
204: {
|
106
|
+
headers: {
|
107
|
+
[name: string]: unknown;
|
108
|
+
};
|
109
|
+
content?: never;
|
110
|
+
};
|
111
|
+
409: {
|
112
|
+
headers: {
|
113
|
+
[name: string]: unknown;
|
114
|
+
};
|
115
|
+
content?: never;
|
116
|
+
};
|
117
|
+
};
|
118
|
+
};
|
119
|
+
delete?: never;
|
120
|
+
options?: never;
|
121
|
+
head?: never;
|
122
|
+
patch?: never;
|
123
|
+
trace?: never;
|
124
|
+
};
|
125
|
+
"/disable": {
|
126
|
+
parameters: {
|
127
|
+
query?: never;
|
128
|
+
header?: never;
|
129
|
+
path?: never;
|
130
|
+
cookie?: never;
|
131
|
+
};
|
132
|
+
get?: never;
|
133
|
+
put?: never;
|
134
|
+
post: {
|
135
|
+
parameters: {
|
136
|
+
query?: never;
|
137
|
+
header?: never;
|
138
|
+
path?: never;
|
139
|
+
cookie?: never;
|
140
|
+
};
|
141
|
+
requestBody?: never;
|
142
|
+
responses: {
|
143
|
+
204: {
|
144
|
+
headers: {
|
145
|
+
[name: string]: unknown;
|
146
|
+
};
|
147
|
+
content?: never;
|
148
|
+
};
|
149
|
+
409: {
|
150
|
+
headers: {
|
151
|
+
[name: string]: unknown;
|
152
|
+
};
|
153
|
+
content?: never;
|
154
|
+
};
|
155
|
+
};
|
156
|
+
};
|
157
|
+
delete?: never;
|
158
|
+
options?: never;
|
159
|
+
head?: never;
|
160
|
+
patch?: never;
|
161
|
+
trace?: never;
|
162
|
+
};
|
163
|
+
}
|
164
|
+
export type webhooks = Record<string, never>;
|
165
|
+
export interface components {
|
166
|
+
schemas: never;
|
167
|
+
responses: never;
|
168
|
+
parameters: never;
|
169
|
+
requestBodies: never;
|
170
|
+
headers: never;
|
171
|
+
pathItems: never;
|
172
|
+
}
|
173
|
+
export type $defs = Record<string, never>;
|
174
|
+
export type operations = Record<string, never>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"openApi.js","sourceRoot":"","sources":["../../src/processor.browserOverlay/openApi.ts"],"names":[],"mappings":""}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { BrowserInputNode, Norsk, VideoComposeNode, VideoStreamMetadata } from '@norskvideo/norsk-sdk';
|
2
|
-
import { CreatedMediaNode, OnCreated, RelatedMediaNodes, ServerComponentDefinition, StudioNodeSubscriptionSource } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
1
|
+
import { BrowserInputNode, ComposePart, Norsk, VideoComposeNode, VideoStreamMetadata } from '@norskvideo/norsk-sdk';
|
2
|
+
import { CreatedMediaNode, InstanceRouteInfo, OnCreated, RelatedMediaNodes, RuntimeUpdates, ServerComponentDefinition, StudioNodeSubscriptionSource, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
3
3
|
import { HardwareAccelerationType } from '@norskvideo/norsk-studio/lib/shared/config';
|
4
4
|
import { ContextPromiseControl } from '@norskvideo/norsk-studio/lib/runtime/util';
|
5
5
|
export type BrowserOverlayConfig = {
|
@@ -10,24 +10,58 @@ export type BrowserOverlayConfig = {
|
|
10
10
|
displayName: string;
|
11
11
|
url: string;
|
12
12
|
};
|
13
|
-
export
|
14
|
-
|
13
|
+
export type BrowserOverlayState = {
|
14
|
+
currentUrl: string;
|
15
|
+
enabled: boolean;
|
16
|
+
};
|
17
|
+
export type BrowserOverlayCommand = BrowserOverlayChangeUrlCommand | BrowserOverlayEnableCommand | BrowserOverlayDisableCommand;
|
18
|
+
export type BrowserOverlayChangeUrlCommand = {
|
19
|
+
type: 'change-url';
|
20
|
+
url: string;
|
21
|
+
};
|
22
|
+
export type BrowserOverlayEnableCommand = {
|
23
|
+
type: 'enable';
|
24
|
+
};
|
25
|
+
export type BrowserOverlayDisableCommand = {
|
26
|
+
type: 'disable';
|
27
|
+
};
|
28
|
+
export type BrowserOverlayEvent = BrowserOverlayChangedUrlEvent | BrowserOverlayEnabledEvent | BrowserOverlayDisabledEvent;
|
29
|
+
export type BrowserOverlayChangedUrlEvent = {
|
30
|
+
type: 'url-changed';
|
31
|
+
url: string;
|
32
|
+
};
|
33
|
+
export type BrowserOverlayEnabledEvent = {
|
34
|
+
type: 'enabled';
|
35
|
+
};
|
36
|
+
export type BrowserOverlayDisabledEvent = {
|
37
|
+
type: 'disabled';
|
38
|
+
};
|
39
|
+
export default class BrowserOverlayDefinition implements ServerComponentDefinition<BrowserOverlayConfig, BrowserOverlay, BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent> {
|
40
|
+
create(norsk: Norsk, cfg: BrowserOverlayConfig, cb: OnCreated<BrowserOverlay>, runtime: StudioRuntime<BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent>): Promise<void>;
|
41
|
+
handleCommand(node: BrowserOverlay, command: BrowserOverlayCommand): Promise<void>;
|
42
|
+
instanceRoutes(): Promise<InstanceRouteInfo<BrowserOverlayConfig, BrowserOverlay, BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent>[]>;
|
15
43
|
}
|
16
44
|
export declare class BrowserOverlay implements CreatedMediaNode {
|
17
45
|
compose?: VideoComposeNode<"video" | "overlay">;
|
18
46
|
browser?: BrowserInputNode;
|
19
47
|
currentVideo?: VideoStreamMetadata;
|
20
48
|
norsk: Norsk;
|
49
|
+
updates: RuntimeUpdates<BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent>;
|
21
50
|
control: ContextPromiseControl;
|
22
51
|
videoSource?: StudioNodeSubscriptionSource;
|
23
52
|
cfg: BrowserOverlayConfig;
|
24
53
|
initialised: Promise<void>;
|
25
54
|
id: string;
|
26
55
|
relatedMediaNodes: RelatedMediaNodes;
|
27
|
-
|
28
|
-
|
56
|
+
enabledParts: ComposePart<'video' | 'overlay'>[];
|
57
|
+
disabledParts: ComposePart<'video' | 'overlay'>[];
|
58
|
+
static create(norsk: Norsk, cfg: BrowserOverlayConfig, updates: RuntimeUpdates<BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent>): Promise<BrowserOverlay>;
|
59
|
+
constructor(norsk: Norsk, cfg: BrowserOverlayConfig, updates: RuntimeUpdates<BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent>);
|
29
60
|
initialise(): Promise<void>;
|
30
61
|
subscribe(sources: StudioNodeSubscriptionSource[]): void;
|
31
62
|
handleContext(): Promise<void>;
|
32
63
|
close(): Promise<void>;
|
64
|
+
changeUrl(newUrl: string): Promise<void>;
|
65
|
+
enable(): Promise<void>;
|
66
|
+
disable(): Promise<void>;
|
33
67
|
}
|
@@ -1,4 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
exports.BrowserOverlay = void 0;
|
4
7
|
const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
|
@@ -6,11 +9,106 @@ const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-
|
|
6
9
|
const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
|
7
10
|
const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
|
8
11
|
const util_1 = require("@norskvideo/norsk-studio/lib/runtime/util");
|
12
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
13
|
+
const path_1 = __importDefault(require("path"));
|
14
|
+
const json_refs_1 = require("json-refs");
|
15
|
+
const yaml_1 = __importDefault(require("yaml"));
|
16
|
+
const util_2 = require("@norskvideo/norsk-studio/lib/shared/util");
|
9
17
|
class BrowserOverlayDefinition {
|
10
|
-
async create(norsk, cfg, cb) {
|
11
|
-
const node = await BrowserOverlay.create(norsk, cfg);
|
18
|
+
async create(norsk, cfg, cb, runtime) {
|
19
|
+
const node = await BrowserOverlay.create(norsk, cfg, runtime.updates);
|
12
20
|
cb(node);
|
13
21
|
}
|
22
|
+
async handleCommand(node, command) {
|
23
|
+
const commandType = command.type;
|
24
|
+
switch (commandType) {
|
25
|
+
case 'change-url':
|
26
|
+
await node.changeUrl(command.url);
|
27
|
+
break;
|
28
|
+
case 'enable':
|
29
|
+
await node.enable();
|
30
|
+
break;
|
31
|
+
case 'disable':
|
32
|
+
await node.disable();
|
33
|
+
break;
|
34
|
+
default:
|
35
|
+
(0, util_2.assertUnreachable)(commandType);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
async instanceRoutes() {
|
39
|
+
const types = await promises_1.default.readFile(path_1.default.join(__dirname, 'types.yaml'));
|
40
|
+
const root = yaml_1.default.parse(types.toString());
|
41
|
+
const resolved = await (0, json_refs_1.resolveRefs)(root, {}).then((r) => r.resolved);
|
42
|
+
const paths = resolved.paths;
|
43
|
+
const coreInfo = (path, op) => {
|
44
|
+
return {
|
45
|
+
url: path,
|
46
|
+
summary: op.summary,
|
47
|
+
description: op.description,
|
48
|
+
requestBody: op.requestBody,
|
49
|
+
responses: op.responses,
|
50
|
+
};
|
51
|
+
};
|
52
|
+
const get = (path) => {
|
53
|
+
return {
|
54
|
+
...coreInfo(path, paths[path]['get']),
|
55
|
+
method: 'GET',
|
56
|
+
};
|
57
|
+
};
|
58
|
+
const post = (path) => {
|
59
|
+
return {
|
60
|
+
...coreInfo(path, paths[path]['post']),
|
61
|
+
method: 'POST',
|
62
|
+
};
|
63
|
+
};
|
64
|
+
return [
|
65
|
+
{
|
66
|
+
...get('/url'),
|
67
|
+
handler: ({ runtime }) => (async (_req, res) => {
|
68
|
+
res.send(runtime.updates.latest().currentUrl);
|
69
|
+
})
|
70
|
+
},
|
71
|
+
{
|
72
|
+
...post('/url'),
|
73
|
+
handler: ({ runtime }) => (async (req, res) => {
|
74
|
+
runtime.updates.sendCommand({ type: "change-url", url: req.body.url });
|
75
|
+
res.status(204).send();
|
76
|
+
})
|
77
|
+
},
|
78
|
+
{
|
79
|
+
...get('/status'),
|
80
|
+
handler: ({ runtime }) => (async (_req, res) => {
|
81
|
+
res.json({ enabled: runtime.updates.latest().enabled });
|
82
|
+
})
|
83
|
+
},
|
84
|
+
{
|
85
|
+
...post('/enable'),
|
86
|
+
handler: ({ runtime }) => (async (_req, res) => {
|
87
|
+
const latest = runtime.updates.latest();
|
88
|
+
if (latest.enabled) {
|
89
|
+
res.status(309).json({ error: "Browser overlay already enabled" });
|
90
|
+
}
|
91
|
+
else {
|
92
|
+
runtime.updates.sendCommand({ type: "enable" });
|
93
|
+
res.status(204).send();
|
94
|
+
}
|
95
|
+
})
|
96
|
+
},
|
97
|
+
{
|
98
|
+
...post('/disable'),
|
99
|
+
handler: ({ runtime }) => (async (_req, res) => {
|
100
|
+
const latest = runtime.updates.latest();
|
101
|
+
if (!latest.enabled) {
|
102
|
+
res.status(309).json({ error: "Browser overlay already disabled" });
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
runtime.updates.sendCommand({ type: "disable" });
|
106
|
+
res.status(204).send();
|
107
|
+
}
|
108
|
+
})
|
109
|
+
},
|
110
|
+
];
|
111
|
+
}
|
14
112
|
}
|
15
113
|
exports.default = BrowserOverlayDefinition;
|
16
114
|
class BrowserOverlay {
|
@@ -18,24 +116,31 @@ class BrowserOverlay {
|
|
18
116
|
browser;
|
19
117
|
currentVideo;
|
20
118
|
norsk;
|
119
|
+
updates;
|
21
120
|
control = new util_1.ContextPromiseControl(this.handleContext.bind(this));
|
22
121
|
videoSource;
|
23
122
|
cfg;
|
24
123
|
initialised;
|
25
124
|
id;
|
26
125
|
relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
|
27
|
-
|
28
|
-
|
126
|
+
enabledParts;
|
127
|
+
disabledParts;
|
128
|
+
static async create(norsk, cfg, updates) {
|
129
|
+
const node = new BrowserOverlay(norsk, cfg, updates);
|
29
130
|
await node.initialised;
|
30
131
|
return node;
|
31
132
|
}
|
32
|
-
constructor(norsk, cfg) {
|
133
|
+
constructor(norsk, cfg, updates) {
|
33
134
|
this.id = cfg.id;
|
34
135
|
this.cfg = cfg;
|
35
136
|
this.norsk = norsk;
|
137
|
+
this.updates = updates;
|
36
138
|
this.initialised = this.initialise();
|
139
|
+
this.enabledParts = [];
|
140
|
+
this.disabledParts = [];
|
37
141
|
}
|
38
142
|
async initialise() {
|
143
|
+
this.updates.raiseEvent({ type: 'url-changed', url: this.cfg.url });
|
39
144
|
}
|
40
145
|
subscribe(sources) {
|
41
146
|
this.videoSource = sources[0];
|
@@ -62,6 +167,27 @@ class BrowserOverlay {
|
|
62
167
|
}
|
63
168
|
}
|
64
169
|
this.currentVideo = nextVideo;
|
170
|
+
this.enabledParts = [
|
171
|
+
{
|
172
|
+
pin: "video",
|
173
|
+
opacity: 1.0,
|
174
|
+
zIndex: 0,
|
175
|
+
compose: norsk_sdk_1.VideoComposeDefaults.fullscreen()
|
176
|
+
}, {
|
177
|
+
pin: "overlay",
|
178
|
+
opacity: 1.0,
|
179
|
+
zIndex: 1,
|
180
|
+
compose: norsk_sdk_1.VideoComposeDefaults.fullscreen()
|
181
|
+
}
|
182
|
+
];
|
183
|
+
this.disabledParts = [
|
184
|
+
{
|
185
|
+
pin: "video",
|
186
|
+
opacity: 1.0,
|
187
|
+
zIndex: 0,
|
188
|
+
compose: norsk_sdk_1.VideoComposeDefaults.fullscreen()
|
189
|
+
}
|
190
|
+
];
|
65
191
|
if (!this.compose) {
|
66
192
|
const thisCompose = this.compose = await this.norsk.processor.transform.videoCompose({
|
67
193
|
id: `${this.cfg.id}-compose`,
|
@@ -74,33 +200,20 @@ class BrowserOverlay {
|
|
74
200
|
this.relatedMediaNodes.removeOutput(thisCompose);
|
75
201
|
},
|
76
202
|
referenceStream: 'video',
|
77
|
-
referenceResolution: { width: 100, height: 100 },
|
78
203
|
hardwareAcceleration: (0, config_1.contractHardwareAcceleration)(this.cfg.__global.hardware, ["quadra", "nvidia"]),
|
79
|
-
parts:
|
80
|
-
{
|
81
|
-
pin: "video",
|
82
|
-
opacity: 1.0,
|
83
|
-
zIndex: 0,
|
84
|
-
sourceRect: { x: 0, y: 0, width: 100, height: 100 },
|
85
|
-
destRect: { x: 0, y: 0, width: 100, height: 100 }
|
86
|
-
}, {
|
87
|
-
pin: "overlay",
|
88
|
-
opacity: 1.0,
|
89
|
-
zIndex: 1,
|
90
|
-
sourceRect: { x: 0, y: 0, width: 100, height: 100 },
|
91
|
-
destRect: { x: 0, y: 0, width: 100, height: 100 }
|
92
|
-
}
|
93
|
-
],
|
204
|
+
parts: this.enabledParts,
|
94
205
|
outputResolution: { width: nextVideo.width, height: nextVideo.height }
|
95
206
|
});
|
96
207
|
}
|
97
208
|
if (!this.browser) {
|
98
|
-
|
209
|
+
this.browser = await this.norsk.input.browser({
|
99
210
|
onCreate: (n) => {
|
211
|
+
this.browser = n;
|
100
212
|
this.relatedMediaNodes.addInput(n);
|
101
213
|
},
|
102
214
|
onClose: () => {
|
103
|
-
this.
|
215
|
+
if (this.browser)
|
216
|
+
this.relatedMediaNodes.removeInput(this.browser);
|
104
217
|
},
|
105
218
|
id: `${this.cfg.id}-browser`,
|
106
219
|
url: this.cfg.url,
|
@@ -121,6 +234,21 @@ class BrowserOverlay {
|
|
121
234
|
this.browser = undefined;
|
122
235
|
this.compose = undefined;
|
123
236
|
}
|
237
|
+
async changeUrl(newUrl) {
|
238
|
+
this.cfg.url = newUrl;
|
239
|
+
if (this.browser) {
|
240
|
+
this.browser.updateConfig({ url: newUrl });
|
241
|
+
}
|
242
|
+
this.updates.raiseEvent({ type: 'url-changed', url: this.cfg.url });
|
243
|
+
}
|
244
|
+
async enable() {
|
245
|
+
this.compose?.updateConfig({ parts: this.enabledParts });
|
246
|
+
this.updates.raiseEvent({ type: 'enabled' });
|
247
|
+
}
|
248
|
+
async disable() {
|
249
|
+
this.compose?.updateConfig({ parts: this.disabledParts });
|
250
|
+
this.updates.raiseEvent({ type: 'disabled' });
|
251
|
+
}
|
124
252
|
}
|
125
253
|
exports.BrowserOverlay = BrowserOverlay;
|
126
254
|
//# sourceMappingURL=runtime.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/processor.browserOverlay/runtime.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/processor.browserOverlay/runtime.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAsJ;AAEtJ,wFAAiO;AACjO,yEAAuE;AACvE,uEAAoH;AACpH,oEAAkF;AAElF,2DAA6B;AAC7B,gDAAwB;AACxB,yCAAwC;AACxC,gDAAwB;AAExB,mEAA6E;AAoD7E,MAAqB,wBAAwB;IAC3C,KAAK,CAAC,MAAM,CAAC,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AC,CAAA;QACvD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC,CAAA;IAC7C,CAAC;CACF;AApJD,wCAoJC"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { BrowserOverlayConfig, BrowserOverlayState, BrowserOverlayCommand } from "./runtime";
|
2
|
+
import { ViewProps } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
3
|
+
declare function SummaryView({ state, sendCommand }: ViewProps<BrowserOverlayConfig, BrowserOverlayState, BrowserOverlayCommand>): import("react/jsx-runtime").JSX.Element;
|
4
|
+
export default SummaryView;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
4
|
+
const react_1 = require("react");
|
5
|
+
function SummaryView({ state, sendCommand }) {
|
6
|
+
const [url, setUrl] = (0, react_1.useState)(state.currentUrl);
|
7
|
+
const [enabled, setEnabled] = (0, react_1.useState)(state.enabled);
|
8
|
+
const stateChanged = (0, react_1.useMemo)(() => {
|
9
|
+
return url !== state.currentUrl || enabled !== state.enabled;
|
10
|
+
}, [url, enabled]);
|
11
|
+
const buttonClass = "mt-2 mb-5 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";
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 mb-5", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-xl font-bold text-gray-900 dark:text-white", children: "Controls" }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-5", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "url", className: "mb-2 mr-2 text-sm font-medium text-gray-900 dark:text-white", children: "URL" }), (0, jsx_runtime_1.jsx)("input", { type: "email", id: "url", className: "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", value: url, onChange: (e) => setUrl(e.target.value), required: true })] }), (0, jsx_runtime_1.jsx)("div", { className: "mb-5", children: (0, jsx_runtime_1.jsxs)("label", { className: "inline-flex items-center cursor-pointer", children: [(0, jsx_runtime_1.jsx)("span", { className: "me-3 text-sm font-medium text-gray-900 dark:text-gray-300", children: "Enabled" }), (0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: enabled, onChange: (e) => setEnabled(e.target.checked), className: "sr-only peer" }), (0, jsx_runtime_1.jsx)("div", { className: "relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" })] }) }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: `${buttonClass} ${!stateChanged ? 'opacity-50 cursor-not-allowed' : ''}`, disabled: !stateChanged, onClick: () => {
|
13
|
+
if (url !== state.currentUrl) {
|
14
|
+
sendCommand({ type: "change-url", url });
|
15
|
+
}
|
16
|
+
if (enabled !== state.enabled) {
|
17
|
+
if (enabled) {
|
18
|
+
sendCommand({ type: "enable" });
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
sendCommand({ type: "disable" });
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}, children: "Commit" })] }));
|
25
|
+
}
|
26
|
+
exports.default = SummaryView;
|
27
|
+
//# sourceMappingURL=summary-view.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"summary-view.js","sourceRo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AAC,EAAE,SAAS,EAAC,cAAc,GAAE,EAClH,gCAAK,SAAS,EAAC,gfAAgf,GAAO,IAChgB,GACF,EACN,mCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,GAAG,WAAW,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,EAAE,EACnF,QAAQ,EAAE,CAAC,YAAY,EACvB,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,GAAG,KAAK,KAAK,CAAC,UAAU,EAAE,CAAC;wBAC7B,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;oBAC3C,CAAC;oBACD,IAAI,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;wBAC9B,IAAI,OAAO,EAAE,CAAC;4BACZ,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC;wBACjC,CAAC;6BACI,CAAC;4BACJ,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC,CAAC;wBAClC,CAAC;oBACH,CAAC;gBACH,CAAC,uBAGM,IACL,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
openapi: 3.0.0
|
2
|
+
info:
|
3
|
+
title: Browser Overlay Component
|
4
|
+
version: 1.0.0
|
5
|
+
|
6
|
+
paths:
|
7
|
+
/url:
|
8
|
+
get:
|
9
|
+
summary: Returns the current URL
|
10
|
+
description: Returns the current URL that the browser is rendering
|
11
|
+
responses:
|
12
|
+
200:
|
13
|
+
description: Successful operation
|
14
|
+
content:
|
15
|
+
text/plain:
|
16
|
+
schema:
|
17
|
+
type: string
|
18
|
+
post:
|
19
|
+
summary: Update the URL
|
20
|
+
requestBody:
|
21
|
+
description: The new URL to render
|
22
|
+
required: true
|
23
|
+
content:
|
24
|
+
application/json:
|
25
|
+
schema:
|
26
|
+
type: object
|
27
|
+
properties:
|
28
|
+
url:
|
29
|
+
type: string
|
30
|
+
example:
|
31
|
+
url: "www.myoverlay.com"
|
32
|
+
|
33
|
+
/status:
|
34
|
+
get:
|
35
|
+
summary: Get the current status of the browser overlay
|
36
|
+
responses:
|
37
|
+
'200':
|
38
|
+
description: Returns the browser overlay status
|
39
|
+
content:
|
40
|
+
application/json:
|
41
|
+
schema:
|
42
|
+
type: object
|
43
|
+
properties:
|
44
|
+
enabled:
|
45
|
+
type: boolean
|
46
|
+
example:
|
47
|
+
enabled: false
|
48
|
+
/enable:
|
49
|
+
post:
|
50
|
+
summary: Enable the browser overlay
|
51
|
+
responses:
|
52
|
+
204:
|
53
|
+
description: Browser overlay enabled
|
54
|
+
409:
|
55
|
+
description: Browser overlay already enabled
|
56
|
+
|
57
|
+
/disable:
|
58
|
+
post:
|
59
|
+
summary: Disable the browser overlay
|
60
|
+
responses:
|
61
|
+
204:
|
62
|
+
description: Browser overlay disabled
|
63
|
+
409:
|
64
|
+
description: Browser overlay already disabled
|
65
|
+
|
@@ -23,13 +23,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.default = default_1;
|
26
27
|
function default_1({ defineComponent, Av, React, common: { Resolutions, FrameRates }, }) {
|
27
28
|
const SourceSelection = React.lazy(async () => Promise.resolve().then(() => __importStar(require('./source-selection'))));
|
28
29
|
const InlineView = React.lazy(async () => Promise.resolve().then(() => __importStar(require('./inline-view'))));
|
29
30
|
return defineComponent({
|
30
|
-
identifier: 'processor.
|
31
|
+
identifier: 'processor.cascadingSwitch',
|
31
32
|
category: 'processor',
|
32
33
|
name: "Cascading Switch",
|
34
|
+
description: "This component manages multiple A/V (audio and video) sources based on priority, allowing for the configuration of settings such as resolution, frame rate, sample rate, and channel layout.",
|
33
35
|
subscription: {
|
34
36
|
accepts: {
|
35
37
|
type: 'multi-stream',
|
@@ -42,10 +44,10 @@ function default_1({ defineComponent, Av, React, common: { Resolutions, FrameRat
|
|
42
44
|
},
|
43
45
|
extraValidation: function (ctx) {
|
44
46
|
ctx.subscriptions.forEach((s) => {
|
45
|
-
if (!s.
|
47
|
+
if (!s.validatedStreams.select.includes("video")) {
|
46
48
|
ctx.addError(`Subscription to ${s.source} is missing video`);
|
47
49
|
}
|
48
|
-
if (!s.
|
50
|
+
if (!s.validatedStreams.select.includes("audio")) {
|
49
51
|
ctx.addError(`Subscription to ${s.source} is missing audio`);
|
50
52
|
}
|
51
53
|
if (s.streams.type == 'take-all-streams') {
|
@@ -148,7 +150,6 @@ function default_1({ defineComponent, Av, React, common: { Resolutions, FrameRat
|
|
148
150
|
},
|
149
151
|
});
|
150
152
|
}
|
151
|
-
exports.default = default_1;
|
152
153
|
function assertUnreachable(_) {
|
153
154
|
throw new Error("Didn't expect to get here");
|
154
155
|
}
|