@norskvideo/norsk-studio-alpha 1.27.0-2025-07-09-0fcad3ea

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.
Files changed (160) hide show
  1. package/README.md +10 -0
  2. package/client/info.js +43461 -0
  3. package/client/processor.audioLevel/styles.css +165 -0
  4. package/client/shared/style.css +1627 -0
  5. package/client/shared/tailwind.css +31 -0
  6. package/client/style.css +1074 -0
  7. package/lib/index.d.ts +3 -0
  8. package/lib/index.js +14 -0
  9. package/lib/index.js.map +1 -0
  10. package/lib/info.d.ts +3 -0
  11. package/lib/info.js +44 -0
  12. package/lib/info.js.map +1 -0
  13. package/lib/input.decklink/info.d.ts +3 -0
  14. package/lib/input.decklink/info.js +51 -0
  15. package/lib/input.decklink/info.js.map +1 -0
  16. package/lib/input.decklink/runtime.d.ts +12 -0
  17. package/lib/input.decklink/runtime.js +22 -0
  18. package/lib/input.decklink/runtime.js.map +1 -0
  19. package/lib/input.decklink/types.d.ts +23 -0
  20. package/lib/input.decklink/types.js +3 -0
  21. package/lib/input.decklink/types.js.map +1 -0
  22. package/lib/input.decklink/types.yaml +32 -0
  23. package/lib/input.mp4file/info.d.ts +3 -0
  24. package/lib/input.mp4file/info.js +34 -0
  25. package/lib/input.mp4file/info.js.map +1 -0
  26. package/lib/input.mp4file/runtime.d.ts +14 -0
  27. package/lib/input.mp4file/runtime.js +33 -0
  28. package/lib/input.mp4file/runtime.js.map +1 -0
  29. package/lib/input.mp4file/types.d.ts +23 -0
  30. package/lib/input.mp4file/types.js +3 -0
  31. package/lib/input.mp4file/types.js.map +1 -0
  32. package/lib/input.mp4file/types.yaml +30 -0
  33. package/lib/input.ndi/info.d.ts +3 -0
  34. package/lib/input.ndi/info.js +52 -0
  35. package/lib/input.ndi/info.js.map +1 -0
  36. package/lib/input.ndi/runtime.d.ts +24 -0
  37. package/lib/input.ndi/runtime.js +60 -0
  38. package/lib/input.ndi/runtime.js.map +1 -0
  39. package/lib/input.ndi/source-selection.d.ts +10 -0
  40. package/lib/input.ndi/source-selection.js +84 -0
  41. package/lib/input.ndi/source-selection.js.map +1 -0
  42. package/lib/input.ndi/types.d.ts +52 -0
  43. package/lib/input.ndi/types.js +3 -0
  44. package/lib/input.ndi/types.js.map +1 -0
  45. package/lib/input.ndi/types.yaml +37 -0
  46. package/lib/output.ndi/info.d.ts +8 -0
  47. package/lib/output.ndi/info.js +61 -0
  48. package/lib/output.ndi/info.js.map +1 -0
  49. package/lib/output.ndi/inline-view.d.ts +6 -0
  50. package/lib/output.ndi/inline-view.js +12 -0
  51. package/lib/output.ndi/inline-view.js.map +1 -0
  52. package/lib/output.ndi/runtime.d.ts +14 -0
  53. package/lib/output.ndi/runtime.js +35 -0
  54. package/lib/output.ndi/runtime.js.map +1 -0
  55. package/lib/output.ndi/types.d.ts +35 -0
  56. package/lib/output.ndi/types.js +3 -0
  57. package/lib/output.ndi/types.js.map +1 -0
  58. package/lib/output.ndi/types.yaml +72 -0
  59. package/lib/output.recorder/info.d.ts +10 -0
  60. package/lib/output.recorder/info.js +79 -0
  61. package/lib/output.recorder/info.js.map +1 -0
  62. package/lib/output.recorder/runtime.d.ts +66 -0
  63. package/lib/output.recorder/runtime.js +301 -0
  64. package/lib/output.recorder/runtime.js.map +1 -0
  65. package/lib/output.recorder/types.d.ts +225 -0
  66. package/lib/output.recorder/types.js +3 -0
  67. package/lib/output.recorder/types.js.map +1 -0
  68. package/lib/output.recorder/types.yaml +211 -0
  69. package/lib/processor.actionReplay/info.d.ts +25 -0
  70. package/lib/processor.actionReplay/info.js +77 -0
  71. package/lib/processor.actionReplay/info.js.map +1 -0
  72. package/lib/processor.actionReplay/runtime.d.ts +38 -0
  73. package/lib/processor.actionReplay/runtime.js +225 -0
  74. package/lib/processor.actionReplay/runtime.js.map +1 -0
  75. package/lib/processor.actionReplay/summary.d.ts +4 -0
  76. package/lib/processor.actionReplay/summary.js +76 -0
  77. package/lib/processor.actionReplay/summary.js.map +1 -0
  78. package/lib/processor.actionReplay/types.d.ts +38 -0
  79. package/lib/processor.actionReplay/types.js +3 -0
  80. package/lib/processor.actionReplay/types.js.map +1 -0
  81. package/lib/processor.actionReplay/types.yaml +74 -0
  82. package/lib/processor.audioLevel/info.d.ts +27 -0
  83. package/lib/processor.audioLevel/info.js +61 -0
  84. package/lib/processor.audioLevel/info.js.map +1 -0
  85. package/lib/processor.audioLevel/inline-view.d.ts +4 -0
  86. package/lib/processor.audioLevel/inline-view.js +26 -0
  87. package/lib/processor.audioLevel/inline-view.js.map +1 -0
  88. package/lib/processor.audioLevel/runtime.d.ts +26 -0
  89. package/lib/processor.audioLevel/runtime.js +86 -0
  90. package/lib/processor.audioLevel/runtime.js.map +1 -0
  91. package/lib/processor.audioLevel/summary-view.d.ts +7 -0
  92. package/lib/processor.audioLevel/summary-view.js +37 -0
  93. package/lib/processor.audioLevel/summary-view.js.map +1 -0
  94. package/lib/processor.audioLevel/types.d.ts +42 -0
  95. package/lib/processor.audioLevel/types.js +3 -0
  96. package/lib/processor.audioLevel/types.js.map +1 -0
  97. package/lib/processor.audioLevel/types.yaml +83 -0
  98. package/lib/processor.gemini-poc/info.d.ts +8 -0
  99. package/lib/processor.gemini-poc/info.js +59 -0
  100. package/lib/processor.gemini-poc/info.js.map +1 -0
  101. package/lib/processor.gemini-poc/runtime.d.ts +38 -0
  102. package/lib/processor.gemini-poc/runtime.js +132 -0
  103. package/lib/processor.gemini-poc/runtime.js.map +1 -0
  104. package/lib/processor.gemini-poc/types.d.ts +23 -0
  105. package/lib/processor.gemini-poc/types.js +3 -0
  106. package/lib/processor.gemini-poc/types.js.map +1 -0
  107. package/lib/processor.gemini-poc/types.yaml +43 -0
  108. package/lib/processor.mixMinus/info.d.ts +7 -0
  109. package/lib/processor.mixMinus/info.js +40 -0
  110. package/lib/processor.mixMinus/info.js.map +1 -0
  111. package/lib/processor.mixMinus/runtime.d.ts +23 -0
  112. package/lib/processor.mixMinus/runtime.js +85 -0
  113. package/lib/processor.mixMinus/runtime.js.map +1 -0
  114. package/lib/processor.mixMinus/types.d.ts +18 -0
  115. package/lib/processor.mixMinus/types.js +3 -0
  116. package/lib/processor.mixMinus/types.js.map +1 -0
  117. package/lib/processor.mixMinus/types.yaml +19 -0
  118. package/lib/processor.monetise/info.d.ts +3 -0
  119. package/lib/processor.monetise/info.js +72 -0
  120. package/lib/processor.monetise/info.js.map +1 -0
  121. package/lib/processor.monetise/runtime.d.ts +62 -0
  122. package/lib/processor.monetise/runtime.js +217 -0
  123. package/lib/processor.monetise/runtime.js.map +1 -0
  124. package/lib/processor.monetise/summary.d.ts +7 -0
  125. package/lib/processor.monetise/summary.js +40 -0
  126. package/lib/processor.monetise/summary.js.map +1 -0
  127. package/lib/processor.monetise/types.d.ts +16 -0
  128. package/lib/processor.monetise/types.js +3 -0
  129. package/lib/processor.monetise/types.js.map +1 -0
  130. package/lib/processor.monetise/types.yaml +9 -0
  131. package/lib/processor.whisper-transcribe/info.d.ts +9 -0
  132. package/lib/processor.whisper-transcribe/info.js +46 -0
  133. package/lib/processor.whisper-transcribe/info.js.map +1 -0
  134. package/lib/processor.whisper-transcribe/runtime.d.ts +22 -0
  135. package/lib/processor.whisper-transcribe/runtime.js +70 -0
  136. package/lib/processor.whisper-transcribe/runtime.js.map +1 -0
  137. package/lib/processor.whisper-transcribe/types.d.ts +21 -0
  138. package/lib/processor.whisper-transcribe/types.js +3 -0
  139. package/lib/processor.whisper-transcribe/types.js.map +1 -0
  140. package/lib/processor.whisper-transcribe/types.yaml +28 -0
  141. package/lib/shared/schemas.d.ts +8 -0
  142. package/lib/shared/schemas.js +44 -0
  143. package/lib/shared/schemas.js.map +1 -0
  144. package/lib/test/output.recorder.d.ts +1 -0
  145. package/lib/test/output.recorder.js +186 -0
  146. package/lib/test/output.recorder.js.map +1 -0
  147. package/lib/util.timestamps/info.d.ts +14 -0
  148. package/lib/util.timestamps/info.js +64 -0
  149. package/lib/util.timestamps/info.js.map +1 -0
  150. package/lib/util.timestamps/inline-view.d.ts +6 -0
  151. package/lib/util.timestamps/inline-view.js +95 -0
  152. package/lib/util.timestamps/inline-view.js.map +1 -0
  153. package/lib/util.timestamps/runtime.d.ts +13 -0
  154. package/lib/util.timestamps/runtime.js +51 -0
  155. package/lib/util.timestamps/runtime.js.map +1 -0
  156. package/lib/util.timestamps/types.d.ts +36 -0
  157. package/lib/util.timestamps/types.js +3 -0
  158. package/lib/util.timestamps/types.js.map +1 -0
  159. package/lib/util.timestamps/types.yaml +74 -0
  160. package/package.json +57 -0
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { RuntimeSystem } from "@norskvideo/norsk-studio/lib/extension/runtime-system";
2
+ export declare function registerAll(r: RuntimeSystem): Promise<void>;
3
+ export default registerAll;
package/lib/index.js ADDED
@@ -0,0 +1,14 @@
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.registerAll = registerAll;
7
+ const registration_1 = require("@norskvideo/norsk-studio/lib/extension/registration");
8
+ const path_1 = __importDefault(require("path"));
9
+ async function registerAll(r) {
10
+ r.registerGlobalStylesheet(path_1.default.join(__dirname, "../client/style.css"));
11
+ return (0, registration_1.autoRegisterComponents)(__dirname, path_1.default.join(__dirname, "../client/info.js"), (p) => p.replace('lib', 'client'))(r);
12
+ }
13
+ exports.default = registerAll;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAIA,kCAKC;AATD,sFAA4F;AAE5F,gDAAwB;AAEjB,KAAK,UAAU,WAAW,CAAC,CAAgB;IAChD,CAAC,CAAC,wBAAwB,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxE,OAAO,IAAA,qCAAsB,EAAC,SAAS,EACrC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,EACzC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,kBAAe,WAAW,CAAC"}
package/lib/info.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { BaseConfig, NodeInfo } from "@norskvideo/norsk-studio/lib/extension/client-types";
2
+ import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
3
+ export default function getNodeInfo(r: Registration, type: string): NodeInfo<BaseConfig>;
package/lib/info.js ADDED
@@ -0,0 +1,44 @@
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 = getNodeInfo;
7
+ const InitialisedComponents = {};
8
+ let initialised = false;
9
+ const AllComponents = [];
10
+ function getNodeInfo(r, type) {
11
+ if (!initialised) {
12
+ AllComponents.forEach((f) => {
13
+ const i = f(r);
14
+ InitialisedComponents[i.identifier] = i;
15
+ });
16
+ initialised = true;
17
+ }
18
+ return InitialisedComponents[type];
19
+ }
20
+ const info_1 = __importDefault(require("./input.decklink/info"));
21
+ AllComponents.push((r) => (0, info_1.default)(r));
22
+ const info_2 = __importDefault(require("./input.mp4file/info"));
23
+ AllComponents.push((r) => (0, info_2.default)(r));
24
+ const info_3 = __importDefault(require("./input.ndi/info"));
25
+ AllComponents.push((r) => (0, info_3.default)(r));
26
+ const info_4 = __importDefault(require("./output.ndi/info"));
27
+ AllComponents.push((r) => (0, info_4.default)(r));
28
+ const info_5 = __importDefault(require("./output.recorder/info"));
29
+ AllComponents.push((r) => (0, info_5.default)(r));
30
+ const info_6 = __importDefault(require("./processor.actionReplay/info"));
31
+ AllComponents.push((r) => (0, info_6.default)(r));
32
+ const info_7 = __importDefault(require("./processor.audioLevel/info"));
33
+ AllComponents.push((r) => (0, info_7.default)(r));
34
+ const info_8 = __importDefault(require("./processor.gemini-poc/info"));
35
+ AllComponents.push((r) => (0, info_8.default)(r));
36
+ const info_9 = __importDefault(require("./processor.mixMinus/info"));
37
+ AllComponents.push((r) => (0, info_9.default)(r));
38
+ const info_10 = __importDefault(require("./processor.monetise/info"));
39
+ AllComponents.push((r) => (0, info_10.default)(r));
40
+ const info_11 = __importDefault(require("./processor.whisper-transcribe/info"));
41
+ AllComponents.push((r) => (0, info_11.default)(r));
42
+ const info_12 = __importDefault(require("./util.timestamps/info"));
43
+ AllComponents.push((r) => (0, info_12.default)(r));
44
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../src/info.ts"],"names":[],"mappings":";;;;;AAYA,8BASC;AAdD,MAAM,qBAAqB,GAA4C,EAAE,CAAC;AAC1E,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,aAAa,GAAkD,EAAE,CAAC;AAExE,SAAwB,WAAW,CAAC,CAAe,EAAE,IAAY;IAC/D,IAAG,CAAC,WAAW,EAAE,CAAC;QAChB,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAA;QACF,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,iEAAmD;AACnD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAc,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC9F,gEAAiD;AACjD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAa,EAAC,CAAC,CAAoC,CAA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 import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
+ import type { DeckLinkInputSettings } from "./runtime";
3
+ export default function ({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<DeckLinkInputSettings, object, object, object>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ function default_1({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, }) {
5
+ return defineComponent({
6
+ identifier: 'input.decklink',
7
+ category: 'input',
8
+ name: "DeckLink ingest",
9
+ description: "This component receives video and audio streams from SDI or HDMI sources using Blackmagic DeckLink cards.",
10
+ subscription: {
11
+ accepts: undefined,
12
+ produces: {
13
+ type: "dynamic-streams",
14
+ streams: (cfg) => mappingsToStreams(cfg.streamMappings ?? singleAvStreamMapping(cfg))
15
+ }
16
+ },
17
+ display: (desc) => {
18
+ return {
19
+ cardIndex: desc.config.cardIndex.toString(),
20
+ channelLayout: desc.config.channelLayout.toString(),
21
+ videoConnection: desc.config.videoConnection.toString(),
22
+ };
23
+ },
24
+ configForm: {
25
+ form: {
26
+ cardIndex: { help: "The card index", hint: { type: 'numeric', defaultValue: 0 } },
27
+ channelLayout: {
28
+ help: "The source channel layout",
29
+ hint: {
30
+ type: "select",
31
+ options: channelLayouts().map((ch) => { return { value: ch, display: ch }; }),
32
+ }
33
+ },
34
+ videoConnection: {
35
+ help: "SDI or HDMI", hint: {
36
+ type: 'select', options: [{ value: "sdi", display: "SDI" },
37
+ { value: "hdmi", display: "HDMI" }]
38
+ }
39
+ },
40
+ streamMappings: singleAvStreamMappingForm
41
+ }
42
+ }
43
+ });
44
+ }
45
+ const channelLayouts = () => {
46
+ const ch = [
47
+ "mono", "stereo", "surround", "4.0", "5.0", "5.1", "7.1", "5.1.4", "7.1.4"
48
+ ];
49
+ return ch;
50
+ };
51
+ //# sourceMappingUR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3I;iBACF;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;wBACzB,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;4BAC1D,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;qBACpC;iBACF;gBACD,cAAc,EAAE,yBAAyB;aAC1C;SACF;KACF,CAAC,CAAC;AACP,CAAC;AAED,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAE,GAAoB;QAC1B,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO;KAC3E,CAAA;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { Norsk, DeckLinkInputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
2
+ import { SimpleInputWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
3
+ import { StreamMappingConfiguration } from '@norskvideo/norsk-studio/lib/extension/client-types';
4
+ import { OnCreated, ServerComponentDefinition, ServerComponentSchemas } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
5
+ import type { components } from './types';
6
+ export type DeckLinkInputSettings = components['schemas']['Config'] & Pick<SdkSettings, 'cardIndex' | 'channelLayout' | 'videoConnection'> & {
7
+ streamMappings?: StreamMappingConfiguration;
8
+ };
9
+ export default class DeckLinkInputDefinition implements ServerComponentDefinition<DeckLinkInputSettings, SimpleInputWrapper> {
10
+ create(norsk: Norsk, cfg: DeckLinkInputSettings, cb: OnCreated<SimpleInputWrapper>): Promise<void>;
11
+ schemas(): Promise<ServerComponentSchemas>;
12
+ }
@@ -0,0 +1,22 @@
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
+ const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
7
+ const schemas_1 = require("../shared/schemas");
8
+ const path_1 = __importDefault(require("path"));
9
+ class DeckLinkInputDefinition {
10
+ async create(norsk, cfg, cb) {
11
+ const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => norsk.input.deckLink({ sourceName: cfg.id, ...cfg }));
12
+ await wrapper.initialised;
13
+ cb(wrapper);
14
+ }
15
+ async schemas() {
16
+ return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), {
17
+ config: 'Config'
18
+ });
19
+ }
20
+ }
21
+ exports.default = DeckLinkInputDefinition;
22
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.decklink/runtime.ts"],"names":[],"mappings":";;;;;AACA,kFAAuF;AAGvF,+CAAoD;AACpD,gDAAwB;AAOxB,MAAqB,uBAAuB;IAC1C,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAA0B,EAAE,EAAiC;QACtF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE,CACxD,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,GAAG,EAAE,CAAC,CACrD,CAAA;QACD,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE;YACzD,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;CACF;AAdD,0CAcC"}
@@ -0,0 +1,23 @@
1
+ export type paths = Record<string, never>;
2
+ export type webhooks = Record<string, never>;
3
+ export interface components {
4
+ schemas: {
5
+ Config: {
6
+ id: string;
7
+ displayName: string;
8
+ cardIndex: number;
9
+ channelLayout: "mono" | "stereo" | "surround" | "4.0" | "5.0" | "5.1" | "7.1" | "5.1.4" | "7.1.4";
10
+ videoConnection: string;
11
+ streamMappings?: {
12
+ [key: string]: unknown;
13
+ };
14
+ };
15
+ };
16
+ responses: never;
17
+ parameters: never;
18
+ requestBodies: never;
19
+ headers: never;
20
+ pathItems: never;
21
+ }
22
+ export type $defs = Record<string, never>;
23
+ export type operations = Record<string, never>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/input.decklink/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: DeckLink Input
4
+ version: 1.0.0
5
+
6
+ paths: {}
7
+
8
+ components:
9
+ schemas:
10
+ Config:
11
+ type: object
12
+ required:
13
+ - id
14
+ - displayName
15
+ - cardIndex
16
+ - channelLayout
17
+ - videoConnection
18
+ properties:
19
+ id:
20
+ type: string
21
+ displayName:
22
+ type: string
23
+ cardIndex:
24
+ type: number
25
+ channelLayout:
26
+ type: string
27
+ enum: ["mono", "stereo", "surround", "4.0", "5.0", "5.1", "7.1", "5.1.4", "7.1.4"]
28
+ videoConnection:
29
+ type: string
30
+ streamMappings:
31
+ type: object
32
+ additionalProperties: true
@@ -0,0 +1,3 @@
1
+ import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
+ import type { FileMp4InputSettings } from "./runtime";
3
+ export default function ({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<FileMp4InputSettings, object, object, object>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ function default_1({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, }) {
5
+ return defineComponent({
6
+ identifier: 'input.fileMp4',
7
+ category: 'input',
8
+ name: "MP4 File ingest",
9
+ description: "This component reads from a local MP4 file.",
10
+ subscription: {
11
+ accepts: undefined,
12
+ produces: {
13
+ type: "dynamic-streams",
14
+ streams: (cfg) => mappingsToStreams(cfg.streamMappings ?? singleAvStreamMapping(cfg))
15
+ }
16
+ },
17
+ display: (desc) => {
18
+ return {
19
+ fileName: desc.config.fileName,
20
+ loop: desc.config.loop.toString(),
21
+ startTime: desc.config.startTime === undefined ? "0" : desc.config.startTime.toString(),
22
+ };
23
+ },
24
+ configForm: {
25
+ form: {
26
+ fileName: { help: "The local filename", hint: { type: 'text' } },
27
+ loop: { help: "Whether to loop", hint: { type: "boolean", defaultValue: false } },
28
+ startTime: { help: "The time (in seconds) to start playing from", hint: { type: 'numeric', defaultValue: 0 } },
29
+ streamMappings: singleAvStreamMappingForm
30
+ }
31
+ }
32
+ });
33
+ }
34
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/input.mp4file/info.ts"],"names":[],"mappings":";;AAGA,4BAmCC;AAnCD,mBAAwB,EACtB,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,GACJ;IACb,OAAO,eAAe,CACpB;QACE,UAAU,EAAE,eAAe;QAC3B,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,6CAA6C;QAC1D,YAAY,EAAE;YACZ,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE;gBACR,IAAI,EAAE,iBAAiB;gBACvB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,cAAc,IAAI,qBAAqB,CAAC,GAAG,CAAC,CAAC;aACtF;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO;gBACL,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;gBAC9B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACjC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;aACxF,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,QAAQ,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;gBAChE,IAAI,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,EAAC;gBAChF,SAAS,EAAE,EAAE,IAAI,EAAE,6CAA6C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE;gBAC9G,cAAc,EAAE,yBAAyB;aAC1C;SACF;KACF,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Norsk, FileMp4InputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
2
+ import { SimpleInputWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
3
+ import { StreamMappingConfiguration } from '@norskvideo/norsk-studio/lib/extension/client-types';
4
+ import { OnCreated, ServerComponentDefinition, ServerComponentSchemas } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
5
+ import type { components } from './types';
6
+ export type FileMp4InputSettings = components['schemas']['Config'] & Pick<SdkSettings, 'fileName'> & {
7
+ loop: boolean;
8
+ startTime?: number;
9
+ streamMappings?: StreamMappingConfiguration;
10
+ };
11
+ export default class FileMp4InputDefinition implements ServerComponentDefinition<FileMp4InputSettings, SimpleInputWrapper> {
12
+ create(norsk: Norsk, cfg: FileMp4InputSettings, cb: OnCreated<SimpleInputWrapper>): Promise<void>;
13
+ schemas(): Promise<ServerComponentSchemas>;
14
+ }
@@ -0,0 +1,33 @@
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
+ const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
7
+ const schemas_1 = require("../shared/schemas");
8
+ const path_1 = __importDefault(require("path"));
9
+ class FileMp4InputDefinition {
10
+ async create(norsk, cfg, cb) {
11
+ const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => {
12
+ const input = await norsk.input.fileMp4({
13
+ sourceName: `filemp4-${cfg.id}`,
14
+ start: "paused",
15
+ ...cfg
16
+ });
17
+ if (cfg.startTime !== undefined) {
18
+ input.seek(cfg.startTime * 1000);
19
+ }
20
+ input.play();
21
+ return input;
22
+ });
23
+ await wrapper.initialised;
24
+ cb(wrapper);
25
+ }
26
+ async schemas() {
27
+ return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), {
28
+ config: 'Config'
29
+ });
30
+ }
31
+ }
32
+ exports.default = FileMp4InputDefinition;
33
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.mp4file/runtime.ts"],"names":[],"mappings":";;;;;AACA,kFAAuF;AAGvF,+CAAoD;AACpD,gDAAwB;AASxB,MAAqB,sBAAsB;IACzC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAyB,EAAE,EAAiC;QACrF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;YACxD,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;gBACtC,UAAU,EAAE,WAAW,GAAG,CAAC,EAAE,EAAE;gBAC/B,KAAK,EAAE,QAAQ;gBACf,GAAG,GAAG;aACP,CAAC,CAAC;YAEH,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;gBAChC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;YACnC,CAAC;YACD,KAAK,CAAC,IAAI,EAAE,CAAC;YACb,OAAO,KAAK,CAAC;QACf,CAAC,CACA,CAAA;QACD,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE;YACzD,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,yCAyBC"}
@@ -0,0 +1,23 @@
1
+ export type paths = Record<string, never>;
2
+ export type webhooks = Record<string, never>;
3
+ export interface components {
4
+ schemas: {
5
+ Config: {
6
+ id: string;
7
+ displayName: string;
8
+ fileName: string;
9
+ loop: boolean;
10
+ startTime?: number;
11
+ streamMappings?: {
12
+ [key: string]: unknown;
13
+ };
14
+ };
15
+ };
16
+ responses: never;
17
+ parameters: never;
18
+ requestBodies: never;
19
+ headers: never;
20
+ pathItems: never;
21
+ }
22
+ export type $defs = Record<string, never>;
23
+ export type operations = Record<string, never>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/input.mp4file/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: MP4 File Input
4
+ version: 1.0.0
5
+
6
+ paths: {}
7
+
8
+ components:
9
+ schemas:
10
+ Config:
11
+ type: object
12
+ required:
13
+ - id
14
+ - displayName
15
+ - fileName
16
+ - loop
17
+ properties:
18
+ id:
19
+ type: string
20
+ displayName:
21
+ type: string
22
+ fileName:
23
+ type: string
24
+ loop:
25
+ type: boolean
26
+ startTime:
27
+ type: number
28
+ streamMappings:
29
+ type: object
30
+ additionalProperties: true
@@ -0,0 +1,3 @@
1
+ import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
+ import type { NdiInputSettings } from "./runtime";
3
+ export default function ({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, validation: { Z } }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<NdiInputSettings, object, object, object>;
@@ -0,0 +1,52 @@
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 source_selection_1 = __importDefault(require("./source-selection"));
8
+ function default_1({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, validation: { Z } }) {
9
+ const validation = Z.object({
10
+ name: Z.string().trim().min(2),
11
+ url: Z.string().trim().min(2),
12
+ created: Z.boolean(),
13
+ }).strict();
14
+ return defineComponent({
15
+ identifier: 'input.ndi',
16
+ category: 'input',
17
+ name: "NDI Ingest",
18
+ description: "This component ingests from an NDI source.",
19
+ subscription: {
20
+ accepts: undefined,
21
+ produces: {
22
+ type: "dynamic-streams",
23
+ streams: (cfg) => mappingsToStreams(cfg.streamMappings ?? singleAvStreamMapping(cfg))
24
+ }
25
+ },
26
+ display: (desc) => {
27
+ return {
28
+ ndiSourceName: desc.config.ndiSource.name,
29
+ ndiReceiveName: desc.config.ndiReceiveName
30
+ };
31
+ },
32
+ configForm: {
33
+ form: {
34
+ ndiSource: {
35
+ help: "The source to connect to",
36
+ hint: {
37
+ type: "custom",
38
+ component: source_selection_1.default,
39
+ validation
40
+ }
41
+ },
42
+ ndiReceiveName: { help: "The name to publish this receiver as", hint: { type: "text" } },
43
+ streamMappings: singleAvStreamMappingForm,
44
+ ignoreSourceFrameRate: {
45
+ help: "Ignore the source frame rate",
46
+ hint: { type: 'boolean', defaultValue: false }
47
+ }
48
+ }
49
+ }
50
+ });
51
+ }
52
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/input.ndi/info.ts"],"names":[],"mappings":";;;;;AAKA,4BAqDC;AAxDD,0EAAiD;AAGjD,mBAAwB,EACtB,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,UAAU,EAAE,EAAE,CAAC,EAAE,EAAgB;IAGjC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;KACrB,CAAC,CAAC,MAAM,EAA+D,CAAC;IAEzE,OAAO,eAAe,CACpB;QACE,UAAU,EAAE,WAAW;QACvB,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,4CAA4C;QAEzD,YAAY,EAAE;YACZ,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE;gBACR,IAAI,EAAE,iBAAiB;gBACvB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,cAAc,IAAI,qBAAqB,CAAC,GAAG,CAAC,CAAC;aACtF;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO;gBACL,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI;gBACzC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc;aAC3C,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,SAAS,EAAE;oBACT,IAAI,EAAE,0BAA0B;oBAChC,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,0BAAe;wBAC1B,UAAU;qBACX;iBACF;gBACD,cAAc,EAAE,EAAE,IAAI,EAAE,sCAAsC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;gBACxF,cAAc,EAAE,yBAAyB;gBACzC,qBAAqB,EAAE;oBACrB,IAAI,EAAE,8BAA8B;oBACpC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE;iBAC/C;aACF;SACF;KACF,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Norsk, NdiInputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
2
+ import { SimpleInputWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
3
+ import { OnCreated, ServerComponentDefinition, ServerComponentSchemas, StaticRouteInfo } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
4
+ import { components } from './types';
5
+ import { StreamMappingConfiguration } from '@norskvideo/norsk-studio/lib/extension/client-types';
6
+ export type StudioNdiSource = {
7
+ name: string;
8
+ url: string;
9
+ created: boolean;
10
+ };
11
+ export type NdiInputSettings = Pick<SdkSettings, 'ndiReceiveName'> & {
12
+ id: string;
13
+ displayName: string;
14
+ ndiSource: StudioNdiSource;
15
+ ndiReceiveName: string;
16
+ streamMappings?: StreamMappingConfiguration;
17
+ ignoreSourceFrameRate: boolean;
18
+ };
19
+ export type NdiSource = components['schemas']['ndiSource'];
20
+ export default class NdiInputDefinition implements ServerComponentDefinition<NdiInputSettings, SimpleInputWrapper> {
21
+ create(norsk: Norsk, cfg: NdiInputSettings, cb: OnCreated<SimpleInputWrapper>): Promise<void>;
22
+ staticRoutes(): Promise<StaticRouteInfo[]>;
23
+ schemas(): Promise<ServerComponentSchemas>;
24
+ }
@@ -0,0 +1,60 @@
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
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
7
+ const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
8
+ const api_1 = require("@norskvideo/norsk-studio/lib/server/api");
9
+ const path_1 = __importDefault(require("path"));
10
+ const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
11
+ const schemas_1 = require("../shared/schemas");
12
+ class NdiInputDefinition {
13
+ async create(norsk, cfg, cb) {
14
+ const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => {
15
+ const input = await norsk.input.ndi({
16
+ sourceName: cfg.id,
17
+ ndiReceiveName: cfg.ndiReceiveName,
18
+ ndiSource: cfg.ndiSource.created ? { url: cfg.ndiSource.url } : { name: cfg.ndiSource.name },
19
+ sourceFrameRate: cfg.ignoreSourceFrameRate ? { variable: undefined } : undefined
20
+ });
21
+ return input;
22
+ });
23
+ await wrapper.initialised;
24
+ cb(wrapper);
25
+ }
26
+ async staticRoutes() {
27
+ let sources = [];
28
+ const sourcesDiscovered = (discoveredSources) => {
29
+ sources = discoveredSources.map(({ url, name }) => { return { url, name }; });
30
+ };
31
+ const handleDiscoveryError = async () => {
32
+ (0, logging_1.debuglog)("NDI discovery failed");
33
+ setTimeout(() => {
34
+ startDiscovery().catch(handleDiscoveryError);
35
+ }, 500);
36
+ };
37
+ const startDiscovery = async () => {
38
+ const norsk = await norsk_sdk_1.Norsk.connect();
39
+ await norsk.system.ndiDiscovery({
40
+ showLocalSources: true,
41
+ cb: sourcesDiscovered,
42
+ onClose: handleDiscoveryError
43
+ });
44
+ (0, logging_1.debuglog)("NDI Discovery started");
45
+ };
46
+ await startDiscovery();
47
+ return (0, api_1.defineApi)(path_1.default.join(__dirname, 'types.yaml'), {
48
+ '/sources': {
49
+ get: (_) => async (_req, res) => {
50
+ res.send(JSON.stringify(sources));
51
+ }
52
+ }
53
+ });
54
+ }
55
+ async schemas() {
56
+ return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), { config: 'config' });
57
+ }
58
+ }
59
+ exports.default = NdiInputDefinition;
60
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.ndi/runtime.ts"],"names":[],"mappings":";;;;;AAAA,qDAA0G;AAC1G,kFAAuF;AACvF,iEAAoE;AAGpE,gDAAwB;AAGxB,yEAAuE;AACvE,+CAAoD;AAmBpD,MAAqB,kBAAkB;IACrC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAqB,EAAE,EAAiC;QACjF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAC3C,KAAK,IAAI,EAAE;YACT,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBAClC,UAAU,EAAE,GAAG,CAAC,EAAE;gBAClB,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,EAAC,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI,EAAC;gBACzF,eAAe,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC,CAAC,CAAC,SAAS;aAC/E,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAA;QACJ,MAAM,OAAO,CAAC,WAAW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AC,CAAA;IACN,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EACvD,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,CAAA;IACH,CAAC;CACF;AA5DD,qCA4DC"}
@@ -0,0 +1,10 @@
1
+ import { StaticUrls } from "@norskvideo/norsk-studio/lib/extension/client-types";
2
+ import { StudioNdiSource } from "./runtime";
3
+ type SourceSelectionProps = {
4
+ defaultValue?: StudioNdiSource;
5
+ id: string;
6
+ onChanged: (value: StudioNdiSource) => void;
7
+ urls?: StaticUrls;
8
+ };
9
+ declare function SourceSelection(props: SourceSelectionProps): import("react/jsx-runtime").JSX.Element;
10
+ export default SourceSelection;