@norskvideo/norsk-studio-built-ins 1.27.0-2025-07-06-336ac6c6 → 1.27.0-2025-07-09-f9b24945

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 (135) hide show
  1. package/client/info.js +665 -284
  2. package/client/style.css +46 -0
  3. package/lib/info.js +3 -1
  4. package/lib/info.js.map +1 -1
  5. package/lib/input.rtmp/info.d.ts +20 -1
  6. package/lib/input.rtmp/runtime.d.ts +20 -1
  7. package/lib/input.rtmp/types.d.ts +47 -27
  8. package/lib/input.rtmp/types.source.yaml +319 -0
  9. package/lib/input.rtmp/types.yaml +206 -131
  10. package/lib/input.silence/info.d.ts +4 -2
  11. package/lib/input.silence/types.d.ts +4 -7
  12. package/lib/input.silence/types.source.yaml +27 -0
  13. package/lib/input.silence/types.yaml +82 -4
  14. package/lib/input.srt-caller/info.d.ts +41 -4
  15. package/lib/input.srt-caller/types.d.ts +51 -43
  16. package/lib/input.srt-caller/types.source.yaml +70 -0
  17. package/lib/input.srt-caller/types.yaml +138 -24
  18. package/lib/input.srt-listener/info.d.ts +41 -4
  19. package/lib/input.srt-listener/runtime.d.ts +34 -3
  20. package/lib/input.srt-listener/types.d.ts +74 -44
  21. package/lib/input.srt-listener/types.source.yaml +329 -0
  22. package/lib/input.srt-listener/types.yaml +259 -132
  23. package/lib/input.udp-ts/info.d.ts +20 -1
  24. package/lib/input.udp-ts/types.d.ts +20 -25
  25. package/lib/input.udp-ts/types.source.yaml +40 -0
  26. package/lib/input.udp-ts/types.yaml +81 -3
  27. package/lib/input.videoTestCard/info.d.ts +8 -2
  28. package/lib/input.videoTestCard/types.d.ts +8 -10
  29. package/lib/input.videoTestCard/types.source.yaml +32 -0
  30. package/lib/input.videoTestCard/types.yaml +30 -6
  31. package/lib/input.whip/info.d.ts +7 -1
  32. package/lib/input.whip/types.d.ts +44 -28
  33. package/lib/input.whip/types.source.yaml +190 -0
  34. package/lib/input.whip/types.yaml +179 -104
  35. package/lib/output.autoCmaf/fullscreen.js +46 -1
  36. package/lib/output.autoCmaf/fullscreen.js.map +1 -1
  37. package/lib/output.autoCmaf/info.js +20 -0
  38. package/lib/output.autoCmaf/info.js.map +1 -1
  39. package/lib/output.autoCmaf/inline-view.d.ts +3 -2
  40. package/lib/output.autoCmaf/inline-view.js +72 -2
  41. package/lib/output.autoCmaf/inline-view.js.map +1 -1
  42. package/lib/output.autoCmaf/runtime.d.ts +2 -1
  43. package/lib/output.autoCmaf/runtime.js +41 -11
  44. package/lib/output.autoCmaf/runtime.js.map +1 -1
  45. package/lib/output.autoCmaf/types.d.ts +2 -0
  46. package/lib/output.autoCmaf/types.yaml +6 -0
  47. package/lib/output.cmafMultiVariant/runtime.js +2 -2
  48. package/lib/output.cmafMultiVariant/runtime.js.map +1 -1
  49. package/lib/output.cmafPlaylist/info.js +19 -0
  50. package/lib/output.cmafPlaylist/info.js.map +1 -1
  51. package/lib/output.cmafPlaylist/runtime.js +6 -3
  52. package/lib/output.cmafPlaylist/runtime.js.map +1 -1
  53. package/lib/output.cmafPlaylist/types.d.ts +1 -0
  54. package/lib/output.cmafPlaylist/types.yaml +3 -0
  55. package/lib/output.preview/inline-view.js +1 -1
  56. package/lib/output.preview/inline-view.js.map +1 -1
  57. package/lib/output.preview/runtime.js +2 -2
  58. package/lib/output.preview/runtime.js.map +1 -1
  59. package/lib/output.statistics/info.d.ts +172 -2
  60. package/lib/output.statistics/types.d.ts +400 -72
  61. package/lib/output.statistics/types.source.yaml +119 -0
  62. package/lib/output.statistics/types.yaml +333 -91
  63. package/lib/output.tsMediaPlaylist/runtime.js +2 -2
  64. package/lib/output.tsMediaPlaylist/runtime.js.map +1 -1
  65. package/lib/output.tsMultiVariant/runtime.js +1 -1
  66. package/lib/output.tsMultiVariant/runtime.js.map +1 -1
  67. package/lib/output.whep/runtime.js +3 -1
  68. package/lib/output.whep/runtime.js.map +1 -1
  69. package/lib/processor.audioEncoder/info.d.ts +10 -2
  70. package/lib/processor.audioEncoder/types.d.ts +23 -12
  71. package/lib/processor.audioEncoder/types.source.yaml +78 -0
  72. package/lib/processor.audioEncoder/types.yaml +103 -29
  73. package/lib/processor.browserOverlay/info.js +5 -3
  74. package/lib/processor.browserOverlay/info.js.map +1 -1
  75. package/lib/processor.browserOverlay/runtime.d.ts +2 -1
  76. package/lib/processor.browserOverlay/runtime.js +16 -2
  77. package/lib/processor.browserOverlay/runtime.js.map +1 -1
  78. package/lib/processor.fixedLadder/info.d.ts +182 -7
  79. package/lib/processor.fixedLadder/types.d.ts +619 -19
  80. package/lib/processor.fixedLadder/types.source.yaml +462 -0
  81. package/lib/processor.fixedLadder/types.yaml +336 -115
  82. package/lib/processor.makeProgram/info.d.ts +1 -0
  83. package/lib/processor.makeProgram/info.js +9 -0
  84. package/lib/processor.makeProgram/info.js.map +1 -1
  85. package/lib/processor.makeProgram/runtime.d.ts +2 -1
  86. package/lib/processor.makeProgram/runtime.js +14 -1
  87. package/lib/processor.makeProgram/runtime.js.map +1 -1
  88. package/lib/processor.makeProgram/types.d.ts +1 -0
  89. package/lib/processor.makeProgram/types.yaml +3 -1
  90. package/lib/processor.smartSingleMediaSwitch/info.d.ts +12 -4
  91. package/lib/processor.smartSingleMediaSwitch/types.d.ts +22 -18
  92. package/lib/processor.smartSingleMediaSwitch/types.source.yaml +115 -0
  93. package/lib/processor.smartSingleMediaSwitch/types.yaml +147 -50
  94. package/lib/processor.smartSourceSwitch/form-views.d.ts +6 -0
  95. package/lib/processor.smartSourceSwitch/form-views.js +11 -0
  96. package/lib/processor.smartSourceSwitch/form-views.js.map +1 -0
  97. package/lib/processor.smartSourceSwitch/info.d.ts +18 -4
  98. package/lib/processor.smartSourceSwitch/info.js +30 -0
  99. package/lib/processor.smartSourceSwitch/info.js.map +1 -1
  100. package/lib/processor.smartSourceSwitch/inline-view.js +9 -8
  101. package/lib/processor.smartSourceSwitch/inline-view.js.map +1 -1
  102. package/lib/processor.smartSourceSwitch/runtime.d.ts +4 -1
  103. package/lib/processor.smartSourceSwitch/runtime.js +56 -27
  104. package/lib/processor.smartSourceSwitch/runtime.js.map +1 -1
  105. package/lib/processor.smartSourceSwitch/types.d.ts +41 -18
  106. package/lib/processor.smartSourceSwitch/types.source.yaml +129 -0
  107. package/lib/processor.smartSourceSwitch/types.yaml +177 -48
  108. package/lib/processor.syncExternalAudio/info.d.ts +1 -0
  109. package/lib/processor.syncExternalAudio/types.d.ts +1 -0
  110. package/lib/processor.videoDecoder/info.js +4 -2
  111. package/lib/processor.videoDecoder/info.js.map +1 -1
  112. package/lib/processor.zoomTo/info.d.ts +54 -0
  113. package/lib/processor.zoomTo/info.js +174 -0
  114. package/lib/processor.zoomTo/info.js.map +1 -0
  115. package/lib/processor.zoomTo/runtime-types.d.ts +11 -0
  116. package/lib/processor.zoomTo/runtime-types.js +3 -0
  117. package/lib/processor.zoomTo/runtime-types.js.map +1 -0
  118. package/lib/processor.zoomTo/runtime.d.ts +45 -0
  119. package/lib/processor.zoomTo/runtime.js +323 -0
  120. package/lib/processor.zoomTo/runtime.js.map +1 -0
  121. package/lib/processor.zoomTo/types.d.ts +182 -0
  122. package/lib/processor.zoomTo/types.js +3 -0
  123. package/lib/processor.zoomTo/types.js.map +1 -0
  124. package/lib/processor.zoomTo/types.yaml +356 -0
  125. package/lib/test/auto-cmaf.js +7 -4
  126. package/lib/test/auto-cmaf.js.map +1 -1
  127. package/lib/test/smart-source-switch.js +117 -2
  128. package/lib/test/smart-source-switch.js.map +1 -1
  129. package/lib/test/zoom-to.d.ts +1 -0
  130. package/lib/test/zoom-to.js +345 -0
  131. package/lib/test/zoom-to.js.map +1 -0
  132. package/package.json +5 -5
  133. package/lib/output.autoCmaf/summary.d.ts +0 -6
  134. package/lib/output.autoCmaf/summary.js +0 -57
  135. package/lib/output.autoCmaf/summary.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.makeProgram/info.ts"],"names":[],"mappings":";;AAKA,4BAuFC;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AC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;qBACpC;iBACF;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,4EAA4E;oBAClF,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE;wBACJ,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,IAAI;wBACd,YAAY,EAAE,GAAG;wBACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;qBACpC;iBACF;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,oCAAoC;oBAC1C,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,YAAY,EAAE,SAAS;wBACvB,QAAQ,EAAE,IAAI;qBACf;iBACF;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,mIAAmI;oBACzI,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE;wBACJ,IAAI,EAAE,SAAS;wBACf,YAAY,EAAE,IAAI;qBACnB;iBACF;gBACD,KAAK,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;aACtF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,iBAAiB,CAAC,CAAQ;IACxC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Norsk, StreamKey, StreamKeyOverrideNode } from '@norskvideo/norsk-sdk';
1
+ import { Norsk, StreamKey, StreamKeyOverrideNode, StreamSyncNode } from '@norskvideo/norsk-sdk';
2
2
  import { CreatedMediaNode, OnCreated, RelatedMediaNodes, ServerComponentDefinition, StudioComponentInputStream, ServerComponentSchemas } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
3
3
  import { components } from './types';
4
4
  export type StreamKeyOverrideConfig = components['schemas']['config'];
@@ -19,6 +19,7 @@ export declare class StreamKeyOverride implements CreatedMediaNode {
19
19
  initialised: Promise<void>;
20
20
  id: string;
21
21
  relatedMediaNodes: RelatedMediaNodes;
22
+ sync?: StreamSyncNode;
22
23
  static create(norsk: Norsk, cfg: StreamKeyOverrideConfig): Promise<StreamKeyOverride>;
23
24
  constructor(norsk: Norsk, cfg: StreamKeyOverrideConfig);
24
25
  initialise(): Promise<void>;
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.StreamKeyOverride = void 0;
7
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
7
8
  const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
8
9
  const path_1 = __importDefault(require("path"));
9
10
  const schemas_1 = require("../shared/schemas");
@@ -26,6 +27,7 @@ class StreamKeyOverride {
26
27
  initialised;
27
28
  id;
28
29
  relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
30
+ sync;
29
31
  static async create(norsk, cfg) {
30
32
  const node = new StreamKeyOverride(norsk, cfg);
31
33
  await node.initialised;
@@ -38,6 +40,12 @@ class StreamKeyOverride {
38
40
  this.initialised = this.initialise();
39
41
  }
40
42
  async initialise() {
43
+ if (this.cfg.sync) {
44
+ this.sync = await this.norsk.processor.transform.streamSync({
45
+ id: `${this.cfg.id}-sync`,
46
+ injectDiscontinuities: true
47
+ });
48
+ }
41
49
  }
42
50
  async subscribe(inputs) {
43
51
  if (this.mapping.length == 0) {
@@ -47,6 +55,7 @@ class StreamKeyOverride {
47
55
  node: undefined
48
56
  }));
49
57
  }
58
+ const nodes = [];
50
59
  await Promise.all(this.mapping.map(async (mapping, i) => {
51
60
  const input = inputs[i];
52
61
  if (!input.metadata) {
@@ -63,11 +72,15 @@ class StreamKeyOverride {
63
72
  id: `${this.id} -sko - ${i} `,
64
73
  streamKey: mapping.to
65
74
  });
66
- this.relatedMediaNodes.addOutput(mapping.node);
75
+ if (!this.sync) {
76
+ this.relatedMediaNodes.addOutput(mapping.node);
77
+ }
67
78
  this.relatedMediaNodes.addInput(mapping.node);
68
79
  }
69
80
  mapping.node.subscribe([input.select()]);
81
+ nodes.push(mapping.node);
70
82
  }));
83
+ this.sync?.subscribe(nodes.map((source) => ({ source, sourceSelector: norsk_sdk_1.selectAll })), (ctx) => ctx.streams.length === inputs.length);
71
84
  }
72
85
  }
73
86
  exports.StreamKeyOverride = StreamKeyOverride;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/processor.makeProgram/runtime.ts"],"names":[],"mappings":";;;;;;AAEA,wFAAqM;AAErM,gDAAwB;AACxB,+CAAoD;AAIpD,MAAqB,2BAA2B;IAC9C,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAA4B,EAAE,EAAgC;QACvF,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACxD,EAAE,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAC/D,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,CAAA;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAZD,8CAYC;AAKD,MAAa,iBAAiB;IAC5B,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC;IACf,KAAK,CAAQ;IACb,OAAO,GAAc,EAAE,CAAC;IAExB,GAAG,CAA0B;IAC7B,WAAW,CAAgB;IAC3B,EAAE,CAAS;IACX,iBAAiB,GAAsB,IAAI,iCAAiB,EAAE,CAAC;IAE/D,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAA4B;QAC5D,MAAM,IAAI,GAAG,IAAI,iBAAiB,CAA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AAE,EAAE,GAAG,IAAI,CAAC,EAAE,WAAW,CAAC,GAAG;oBAC7B,SAAS,EAAE,OAAO,CAAC,EAAE;iBACtB,CAAC,CAAA;gBACF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;oBACf,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACjD,CAAC;gBACD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACxC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,qBAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,CAAA;IACrI,CAAC;;AApEH,8CAsEC"}
@@ -9,6 +9,7 @@ export interface components {
9
9
  programNumber: number;
10
10
  startingStreamId: number;
11
11
  renditionName?: string;
12
+ sync?: boolean;
12
13
  notes?: string;
13
14
  };
14
15
  };
@@ -24,6 +24,8 @@ components:
24
24
  minimum: 1
25
25
  renditionName:
26
26
  type: string
27
+ sync:
28
+ type: boolean
27
29
  notes:
28
30
  type: string
29
31
  required:
@@ -31,4 +33,4 @@ components:
31
33
  - displayName
32
34
  - sourceName
33
35
  - programNumber
34
- - startingStreamId
36
+ - startingStreamId
@@ -3,10 +3,18 @@ export default function ({ defineComponent, All, common: { Resolutions, FrameRat
3
3
  id: string;
4
4
  displayName: string;
5
5
  notes?: string;
6
- resolution: import("./types").components["schemas"]["Resolution"];
7
- frameRate: import("./types").components["schemas"]["FrameRate"];
8
- sampleRate: import("./types").components["schemas"]["SampleRate"];
9
- channelLayout: import("./types").components["schemas"]["ChannelLayout"];
6
+ resolution: {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ frameRate: {
11
+ frames: number;
12
+ seconds: number;
13
+ };
14
+ sampleRate: 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
15
+ channelLayout: ("mono" | "stereo" | "surround" | "4.0" | "5.0" | "5.1" | "7.1" | "5.1.4" | "7.1.4") | ("l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown")[] | {
16
+ single: "l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown";
17
+ };
10
18
  sources: {
11
19
  media: "video" | "audio";
12
20
  sourceName?: string;
@@ -6,10 +6,18 @@ export interface components {
6
6
  id: string;
7
7
  displayName: string;
8
8
  notes?: string;
9
- resolution: components["schemas"]["Resolution"];
10
- frameRate: components["schemas"]["FrameRate"];
11
- sampleRate: components["schemas"]["SampleRate"];
12
- channelLayout: components["schemas"]["ChannelLayout"];
9
+ resolution: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ frameRate: {
14
+ frames: number;
15
+ seconds: number;
16
+ };
17
+ sampleRate: 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
18
+ channelLayout: ("mono" | "stereo" | "surround" | "4.0" | "5.0" | "5.1" | "7.1" | "5.1.4" | "7.1.4") | ("l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown")[] | {
19
+ single: "l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown";
20
+ };
13
21
  sources: {
14
22
  media: "video" | "audio";
15
23
  sourceName?: string;
@@ -24,7 +32,16 @@ export interface components {
24
32
  availableSources: number[];
25
33
  };
26
34
  Commands: Record<string, never>;
27
- Events: components["schemas"]["ActiveSourceChangedEvent"] | components["schemas"]["SourceOnlineEvent"] | components["schemas"]["SourceOfflineEvent"];
35
+ Events: {
36
+ type: "active-source-changed";
37
+ activeSourceIndex: number;
38
+ } | {
39
+ type: "source-online";
40
+ sourceIndex: number;
41
+ } | {
42
+ type: "source-offline";
43
+ sourceIndex: number;
44
+ };
28
45
  ActiveSourceChangedEvent: {
29
46
  type: "active-source-changed";
30
47
  activeSourceIndex: number;
@@ -37,19 +54,6 @@ export interface components {
37
54
  type: "source-offline";
38
55
  sourceIndex: number;
39
56
  };
40
- Resolution: {
41
- width: number;
42
- height: number;
43
- };
44
- FrameRate: {
45
- frames: number;
46
- seconds: number;
47
- };
48
- SampleRate: 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
49
- ChannelName: "l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown";
50
- ChannelLayout: ("mono" | "stereo" | "surround" | "4.0" | "5.0" | "5.1" | "7.1" | "5.1.4" | "7.1.4") | components["schemas"]["ChannelName"][] | {
51
- single: components["schemas"]["ChannelName"];
52
- };
53
57
  };
54
58
  responses: never;
55
59
  parameters: never;
@@ -0,0 +1,115 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Smart Single Media Switch Processor Component
4
+ version: 1.0.0
5
+
6
+ paths: {}
7
+
8
+ components:
9
+ schemas:
10
+ config:
11
+ type: object
12
+ properties:
13
+ id:
14
+ type: string
15
+ displayName:
16
+ type: string
17
+ notes:
18
+ type: string
19
+ resolution:
20
+ $ref: '../../../core/src/types/base.yml#/components/schemas/Resolution'
21
+ frameRate:
22
+ $ref: '../../../core/src/types/base.yml#/components/schemas/FrameRate'
23
+ sampleRate:
24
+ $ref: '../../../core/src/types/base.yml#/components/schemas/SampleRate'
25
+ channelLayout:
26
+ $ref: '../../../core/src/types/base.yml#/components/schemas/ChannelLayout'
27
+ sources:
28
+ type: array
29
+ items:
30
+ type: object
31
+ properties:
32
+ media:
33
+ type: string
34
+ enum: ["video", "audio"]
35
+ sourceName:
36
+ type: string
37
+ programNumber:
38
+ type: integer
39
+ streamId:
40
+ type: integer
41
+ renditionName:
42
+ type: string
43
+ displayName:
44
+ type: string
45
+ required:
46
+ - media
47
+ - displayName
48
+ required:
49
+ - id
50
+ - displayName
51
+ - resolution
52
+ - frameRate
53
+ - sampleRate
54
+ - channelLayout
55
+ - sources
56
+
57
+ state:
58
+ type: object
59
+ properties:
60
+ activeSource:
61
+ type: integer
62
+ availableSources:
63
+ type: array
64
+ items:
65
+ type: integer
66
+ required:
67
+ - activeSource
68
+ - availableSources
69
+
70
+ Commands:
71
+ type: object
72
+ description: Currently no commands are implemented
73
+
74
+ Events:
75
+ oneOf:
76
+ - $ref: '#/components/schemas/ActiveSourceChangedEvent'
77
+ - $ref: '#/components/schemas/SourceOnlineEvent'
78
+ - $ref: '#/components/schemas/SourceOfflineEvent'
79
+
80
+ ActiveSourceChangedEvent:
81
+ type: object
82
+ properties:
83
+ type:
84
+ type: string
85
+ enum: ["active-source-changed"]
86
+ activeSourceIndex:
87
+ type: integer
88
+ required:
89
+ - type
90
+ - activeSourceIndex
91
+
92
+ SourceOnlineEvent:
93
+ type: object
94
+ properties:
95
+ type:
96
+ type: string
97
+ enum: ["source-online"]
98
+ sourceIndex:
99
+ type: integer
100
+ required:
101
+ - type
102
+ - sourceIndex
103
+
104
+ SourceOfflineEvent:
105
+ type: object
106
+ properties:
107
+ type:
108
+ type: string
109
+ enum: ["source-offline"]
110
+ sourceIndex:
111
+ type: integer
112
+ required:
113
+ - type
114
+ - sourceIndex
115
+
@@ -1,10 +1,10 @@
1
+ # This file has been generated, please edit types.source.yaml instead
2
+
1
3
  openapi: 3.0.0
2
4
  info:
3
5
  title: Smart Single Media Switch Processor Component
4
6
  version: 1.0.0
5
-
6
7
  paths: {}
7
-
8
8
  components:
9
9
  schemas:
10
10
  config:
@@ -17,13 +17,112 @@ components:
17
17
  notes:
18
18
  type: string
19
19
  resolution:
20
- $ref: '../../../core/src/types/base.yml#/components/schemas/Resolution'
20
+ type: object
21
+ description: Video resolution with width and height dimensions
22
+ properties:
23
+ width:
24
+ type: integer
25
+ minimum: 1
26
+ description: Width in pixels
27
+ height:
28
+ type: integer
29
+ minimum: 1
30
+ description: Height in pixels
31
+ required:
32
+ - width
33
+ - height
21
34
  frameRate:
22
- $ref: '../../../core/src/types/base.yml#/components/schemas/FrameRate'
35
+ type: object
36
+ properties:
37
+ frames:
38
+ type: integer
39
+ seconds:
40
+ type: integer
41
+ required:
42
+ - frames
43
+ - seconds
23
44
  sampleRate:
24
- $ref: '../../../core/src/types/base.yml#/components/schemas/SampleRate'
45
+ type: integer
46
+ enum:
47
+ - 8000
48
+ - 11025
49
+ - 12000
50
+ - 16000
51
+ - 22050
52
+ - 24000
53
+ - 32000
54
+ - 44100
55
+ - 48000
56
+ - 64000
57
+ - 88200
58
+ - 96000
59
+ description: Possible sample rates in Hz.
60
+ example: 48000
25
61
  channelLayout:
26
- $ref: '../../../core/src/types/base.yml#/components/schemas/ChannelLayout'
62
+ description: Channel layout for an audio stream. Can be one of several string
63
+ presets, an array of channel names, or an object with a single
64
+ property.
65
+ oneOf:
66
+ - type: string
67
+ enum:
68
+ - mono
69
+ - stereo
70
+ - surround
71
+ - "4.0"
72
+ - "5.0"
73
+ - "5.1"
74
+ - "7.1"
75
+ - 5.1.4
76
+ - 7.1.4
77
+ - type: array
78
+ items: &a1
79
+ type: string
80
+ enum:
81
+ - l
82
+ - r
83
+ - c
84
+ - lfe
85
+ - ls
86
+ - rs
87
+ - lc
88
+ - rc
89
+ - lsr
90
+ - rsr
91
+ - cs
92
+ - lsd
93
+ - rsd
94
+ - lss
95
+ - rss
96
+ - lw
97
+ - rw
98
+ - lv
99
+ - rv
100
+ - cv
101
+ - lvr
102
+ - rvr
103
+ - cvr
104
+ - lvss
105
+ - rvss
106
+ - ts
107
+ - lfe2
108
+ - lb
109
+ - rb
110
+ - cb
111
+ - lvs
112
+ - rvs
113
+ - lfe3
114
+ - leos
115
+ - reos
116
+ - hwbcal
117
+ - hwbcar
118
+ - lbs
119
+ - rbs
120
+ - unknown
121
+ - type: object
122
+ properties:
123
+ single: *a1
124
+ required:
125
+ - single
27
126
  sources:
28
127
  type: array
29
128
  items:
@@ -31,7 +130,9 @@ components:
31
130
  properties:
32
131
  media:
33
132
  type: string
34
- enum: ["video", "audio"]
133
+ enum:
134
+ - video
135
+ - audio
35
136
  sourceName:
36
137
  type: string
37
138
  programNumber:
@@ -53,7 +154,6 @@ components:
53
154
  - sampleRate
54
155
  - channelLayout
55
156
  - sources
56
-
57
157
  state:
58
158
  type: object
59
159
  properties:
@@ -66,50 +166,47 @@ components:
66
166
  required:
67
167
  - activeSource
68
168
  - availableSources
69
-
70
169
  Commands:
71
170
  type: object
72
171
  description: Currently no commands are implemented
73
-
74
172
  Events:
75
173
  oneOf:
76
- - $ref: '#/components/schemas/ActiveSourceChangedEvent'
77
- - $ref: '#/components/schemas/SourceOnlineEvent'
78
- - $ref: '#/components/schemas/SourceOfflineEvent'
79
-
80
- ActiveSourceChangedEvent:
81
- type: object
82
- properties:
83
- type:
84
- type: string
85
- enum: ["active-source-changed"]
86
- activeSourceIndex:
87
- type: integer
88
- required:
89
- - type
90
- - activeSourceIndex
91
-
92
- SourceOnlineEvent:
93
- type: object
94
- properties:
95
- type:
96
- type: string
97
- enum: ["source-online"]
98
- sourceIndex:
99
- type: integer
100
- required:
101
- - type
102
- - sourceIndex
103
-
104
- SourceOfflineEvent:
105
- type: object
106
- properties:
107
- type:
108
- type: string
109
- enum: ["source-offline"]
110
- sourceIndex:
111
- type: integer
112
- required:
113
- - type
114
- - sourceIndex
115
-
174
+ - &a2
175
+ type: object
176
+ properties:
177
+ type:
178
+ type: string
179
+ enum:
180
+ - active-source-changed
181
+ activeSourceIndex:
182
+ type: integer
183
+ required:
184
+ - type
185
+ - activeSourceIndex
186
+ - &a3
187
+ type: object
188
+ properties:
189
+ type:
190
+ type: string
191
+ enum:
192
+ - source-online
193
+ sourceIndex:
194
+ type: integer
195
+ required:
196
+ - type
197
+ - sourceIndex
198
+ - &a4
199
+ type: object
200
+ properties:
201
+ type:
202
+ type: string
203
+ enum:
204
+ - source-offline
205
+ sourceIndex:
206
+ type: integer
207
+ required:
208
+ - type
209
+ - sourceIndex
210
+ ActiveSourceChangedEvent: *a2
211
+ SourceOnlineEvent: *a3
212
+ SourceOfflineEvent: *a4
@@ -0,0 +1,6 @@
1
+ export default function FallbackConfiguration(cfg: {
2
+ kind: 'testcard';
3
+ } | {
4
+ kind: 'file';
5
+ filePath: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = FallbackConfiguration;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ function FallbackConfiguration(cfg) {
6
+ if (cfg.kind === 'file') {
7
+ return (0, jsx_runtime_1.jsx)("div", { className: "text-sm", children: cfg.filePath || 'No file specified' });
8
+ }
9
+ return (0, jsx_runtime_1.jsx)("div", { className: "text-sm", children: "Test Card" });
10
+ }
11
+ //# sourceMappingURL=form-views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-views.js","sourceRoot":"","sources":["../../src/processor.smartSourceSwitch/form-views.tsx"],"names":[],"mappings":";;AAAA,wCAKC;;AALD,SAAwB,qBAAqB,CAAC,GAA8D;IAC1G,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACxB,OAAO,gCAAK,SAAS,EAAC,SAAS,YAAE,GAAG,CAAC,QAAQ,IAAI,mBAAmB,GAAO,CAAC;IAC9E,CAAC;IACD,OAAO,gCAAK,SAAS,EAAC,SAAS,0BAAgB,CAAC;AAClD,CAAC"}
@@ -3,11 +3,25 @@ export default function ({ defineComponent, Av, common: { Resolutions, FrameRate
3
3
  id: string;
4
4
  displayName: string;
5
5
  notes?: string;
6
- resolution: import("./types").components["schemas"]["Resolution"];
7
- frameRate: import("./types").components["schemas"]["FrameRate"];
8
- sampleRate: import("./types").components["schemas"]["SampleRate"];
9
- channelLayout: import("./types").components["schemas"]["ChannelLayout"];
6
+ resolution: {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ frameRate: {
11
+ frames: number;
12
+ seconds: number;
13
+ };
14
+ sampleRate: 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
15
+ channelLayout: ("mono" | "stereo" | "surround" | "4.0" | "5.0" | "5.1" | "7.1" | "5.1.4" | "7.1.4") | ("l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown")[] | {
16
+ single: "l" | "r" | "c" | "lfe" | "ls" | "rs" | "lc" | "rc" | "lsr" | "rsr" | "cs" | "lsd" | "rsd" | "lss" | "rss" | "lw" | "rw" | "lv" | "rv" | "cv" | "lvr" | "rvr" | "cvr" | "lvss" | "rvss" | "ts" | "lfe2" | "lb" | "rb" | "cb" | "lvs" | "rvs" | "lfe3" | "leos" | "reos" | "hwbcal" | "hwbcar" | "lbs" | "rbs" | "unknown";
17
+ };
10
18
  sources: string[];
19
+ fallback: {
20
+ kind: "testcard";
21
+ } | {
22
+ kind: "file";
23
+ filePath: string;
24
+ };
11
25
  }, {
12
26
  activeSource: string;
13
27
  availableSources: string[];
@@ -7,6 +7,8 @@ exports.default = default_1;
7
7
  const source_selection_1 = __importDefault(require("./source-selection"));
8
8
  const inline_view_1 = __importDefault(require("./inline-view"));
9
9
  const FaSlidersH_1 = require("@react-icons/all-files/fa/FaSlidersH");
10
+ const client_types_1 = require("@norskvideo/norsk-studio/lib/extension/client-types");
11
+ const form_views_1 = __importDefault(require("./form-views"));
10
12
  function default_1({ defineComponent, Av, common: { Resolutions, FrameRates }, }) {
11
13
  function patchConfigFromSubscription(cfg, sub) {
12
14
  const potentiallyNewSources = sub.expectedStreams.map((s) => s.sourceName).filter((s) => !!s);
@@ -144,6 +146,34 @@ function default_1({ defineComponent, Av, common: { Resolutions, FrameRates }, }
144
146
  defaultValue: []
145
147
  }
146
148
  },
149
+ fallback: {
150
+ help: "Configuration for fallback source when no inputs are available",
151
+ advanced: true,
152
+ hint: {
153
+ type: 'form-pick',
154
+ envOverride: true,
155
+ defaultValue: { kind: 'testcard' },
156
+ form: client_types_1.discriminatedForm.kind({
157
+ testcard: {
158
+ display: "Test Card",
159
+ form: {}
160
+ },
161
+ file: {
162
+ display: "MP4 File",
163
+ form: {
164
+ filePath: {
165
+ help: "Path to MP4 file to use as fallback",
166
+ hint: {
167
+ type: 'text',
168
+ envOverride: true
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }),
174
+ view: form_views_1.default
175
+ }
176
+ },
147
177
  notes: { help: "Notes about this component", hint: { type: 'text', optional: true } },
148
178
  },
149
179
  },