@norskvideo/norsk-studio-built-ins 1.27.0-2025-03-11-6b63bfb6 → 1.27.0-2025-03-14-ed70a41a

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 (116) hide show
  1. package/client/info.js +216 -223
  2. package/lib/info.js +6 -4
  3. package/lib/info.js.map +1 -1
  4. package/lib/input.rtmp/info.js +3 -12
  5. package/lib/input.rtmp/info.js.map +1 -1
  6. package/lib/input.silence/info.d.ts +1 -1
  7. package/lib/input.silence/info.js +6 -3
  8. package/lib/input.silence/info.js.map +1 -1
  9. package/lib/input.silence/runtime.js +1 -1
  10. package/lib/input.silence/runtime.js.map +1 -1
  11. package/lib/input.srt-caller/info.js +5 -2
  12. package/lib/input.srt-caller/info.js.map +1 -1
  13. package/lib/input.srt-listener/info.d.ts +1 -1
  14. package/lib/input.srt-listener/info.js +4 -13
  15. package/lib/input.srt-listener/info.js.map +1 -1
  16. package/lib/input.udp-ts/info.d.ts +1 -1
  17. package/lib/input.udp-ts/info.js +6 -3
  18. package/lib/input.udp-ts/info.js.map +1 -1
  19. package/lib/input.videoTestCard/info.d.ts +1 -1
  20. package/lib/input.videoTestCard/info.js +6 -3
  21. package/lib/input.videoTestCard/info.js.map +1 -1
  22. package/lib/output.autoCmaf/info.js +5 -4
  23. package/lib/output.autoCmaf/info.js.map +1 -1
  24. package/lib/output.autoCmaf/runtime.d.ts +4 -6
  25. package/lib/output.autoCmaf/runtime.js +19 -41
  26. package/lib/output.autoCmaf/runtime.js.map +1 -1
  27. package/lib/output.preview/info.js +6 -19
  28. package/lib/output.preview/info.js.map +1 -1
  29. package/lib/output.preview/runtime.d.ts +4 -9
  30. package/lib/output.preview/runtime.js +24 -35
  31. package/lib/output.preview/runtime.js.map +1 -1
  32. package/lib/output.rtmp/info.d.ts +1 -1
  33. package/lib/output.rtmp/info.js +4 -3
  34. package/lib/output.rtmp/info.js.map +1 -1
  35. package/lib/output.rtmp/runtime.d.ts +4 -7
  36. package/lib/output.rtmp/runtime.js +34 -52
  37. package/lib/output.rtmp/runtime.js.map +1 -1
  38. package/lib/output.srt/info.js +3 -2
  39. package/lib/output.srt/info.js.map +1 -1
  40. package/lib/output.srt/runtime.d.ts +5 -7
  41. package/lib/output.srt/runtime.js +15 -35
  42. package/lib/output.srt/runtime.js.map +1 -1
  43. package/lib/output.statistics/info.js +2 -2
  44. package/lib/output.statistics/info.js.map +1 -1
  45. package/lib/output.udpTs/info.js +3 -2
  46. package/lib/output.udpTs/info.js.map +1 -1
  47. package/lib/output.whep/info.js +4 -3
  48. package/lib/output.whep/info.js.map +1 -1
  49. package/lib/output.whep/runtime.d.ts +5 -7
  50. package/lib/output.whep/runtime.js +24 -44
  51. package/lib/output.whep/runtime.js.map +1 -1
  52. package/lib/processor.audioEncoder/info.d.ts +1 -1
  53. package/lib/processor.audioEncoder/info.js +5 -5
  54. package/lib/processor.audioEncoder/info.js.map +1 -1
  55. package/lib/processor.browserOverlay/info.d.ts +1 -1
  56. package/lib/processor.browserOverlay/info.js +5 -5
  57. package/lib/processor.browserOverlay/info.js.map +1 -1
  58. package/lib/processor.browserOverlay/runtime.d.ts +2 -6
  59. package/lib/processor.browserOverlay/runtime.js +7 -14
  60. package/lib/processor.browserOverlay/runtime.js.map +1 -1
  61. package/lib/processor.cascadingSwitch/info.js +8 -6
  62. package/lib/processor.cascadingSwitch/info.js.map +1 -1
  63. package/lib/processor.cascadingSwitch/runtime.d.ts +2 -2
  64. package/lib/processor.cascadingSwitch/runtime.js +3 -3
  65. package/lib/processor.cascadingSwitch/runtime.js.map +1 -1
  66. package/lib/processor.fixedLadder/info.d.ts +1 -1
  67. package/lib/processor.fixedLadder/info.js +5 -19
  68. package/lib/processor.fixedLadder/info.js.map +1 -1
  69. package/lib/processor.makeProgram/info.d.ts +4 -0
  70. package/lib/processor.makeProgram/info.js +84 -0
  71. package/lib/processor.makeProgram/info.js.map +1 -0
  72. package/lib/processor.makeProgram/runtime.d.ts +33 -0
  73. package/lib/processor.makeProgram/runtime.js +65 -0
  74. package/lib/processor.makeProgram/runtime.js.map +1 -0
  75. package/lib/processor.onscreenGraphic/info.d.ts +1 -1
  76. package/lib/processor.onscreenGraphic/info.js +5 -5
  77. package/lib/processor.onscreenGraphic/info.js.map +1 -1
  78. package/lib/processor.onscreenGraphic/runtime.d.ts +3 -6
  79. package/lib/processor.onscreenGraphic/runtime.js +14 -21
  80. package/lib/processor.onscreenGraphic/runtime.js.map +1 -1
  81. package/lib/processor.streamKeyOverride/info.d.ts +1 -0
  82. package/lib/processor.streamKeyOverride/info.js +23 -76
  83. package/lib/processor.streamKeyOverride/info.js.map +1 -1
  84. package/lib/processor.streamKeyOverride/runtime.d.ts +6 -28
  85. package/lib/processor.streamKeyOverride/runtime.js +26 -188
  86. package/lib/processor.streamKeyOverride/runtime.js.map +1 -1
  87. package/lib/processor.videoDecoder/info.d.ts +1 -1
  88. package/lib/processor.videoDecoder/info.js +5 -5
  89. package/lib/processor.videoDecoder/info.js.map +1 -1
  90. package/lib/test/auto-cmaf.js +9 -7
  91. package/lib/test/auto-cmaf.js.map +1 -1
  92. package/lib/test/browser-overlay.js +12 -11
  93. package/lib/test/browser-overlay.js.map +1 -1
  94. package/lib/test/cascading-switch.js +16 -13
  95. package/lib/test/cascading-switch.js.map +1 -1
  96. package/lib/test/fixed-ladder.js +9 -7
  97. package/lib/test/fixed-ladder.js.map +1 -1
  98. package/lib/test/onscreen-graphic.js +23 -23
  99. package/lib/test/onscreen-graphic.js.map +1 -1
  100. package/lib/test/preview.js +9 -8
  101. package/lib/test/preview.js.map +1 -1
  102. package/lib/test/rtmp-input.js +23 -17
  103. package/lib/test/rtmp-input.js.map +1 -1
  104. package/lib/test/rtmp-output.js +28 -19
  105. package/lib/test/rtmp-output.js.map +1 -1
  106. package/lib/test/srt-input-caller.js +4 -4
  107. package/lib/test/srt-input-caller.js.map +1 -1
  108. package/lib/test/srt-input-listener.js +37 -26
  109. package/lib/test/srt-input-listener.js.map +1 -1
  110. package/lib/test/srt-output.js +10 -8
  111. package/lib/test/srt-output.js.map +1 -1
  112. package/lib/test/udp-output.js +4 -4
  113. package/lib/test/udp-output.js.map +1 -1
  114. package/lib/test/whep-output.js +10 -8
  115. package/lib/test/whep-output.js.map +1 -1
  116. package/package.json +3 -3
package/client/info.js CHANGED
@@ -4956,41 +4956,53 @@ var require_client_types = __commonJS({
4956
4956
  exports.RegistrationConsts = exports.Subtitle = exports.Playlist = exports.Video = exports.Audio = exports.Av = exports.All = void 0;
4957
4957
  exports.subscriptionMedia = subscriptionMedia;
4958
4958
  exports.outputMedia = outputMedia;
4959
+ exports.simpleToMedia = simpleToMedia;
4960
+ exports.outputStreamComponents = outputStreamComponents;
4959
4961
  exports.inputMedia = inputMedia;
4960
4962
  exports.discriminatedForm = discriminatedForm3;
4961
- exports.All = ["video", "audio", "subtitle"];
4963
+ exports.All = ["video", "audio", "subtitle", "ancillary"];
4962
4964
  exports.Av = ["video", "audio"];
4963
4965
  exports.Audio = ["audio"];
4964
4966
  exports.Video = ["video"];
4965
4967
  exports.Playlist = ["playlist"];
4966
4968
  exports.Subtitle = ["subtitle"];
4967
4969
  function subscriptionMedia(s) {
4968
- return s.streams.select;
4970
+ if (!s)
4971
+ return [];
4972
+ return s.streams.filter.map((f) => f.media);
4973
+ }
4974
+ function outputMedia(s, cfg, inputs) {
4975
+ const components = outputStreamComponents(s, cfg, inputs);
4976
+ return [...new Set(components.map((s2) => s2.media)).values()];
4969
4977
  }
4970
- function outputMedia(s) {
4978
+ function simpleToMedia(stream) {
4979
+ const keys = Object.keys(stream);
4980
+ return exports.All.filter((media) => {
4981
+ return keys.includes(media);
4982
+ });
4983
+ }
4984
+ function outputStreamComponents(s, cfg, inputs) {
4971
4985
  if (!s)
4972
4986
  return [];
4973
4987
  const t = s.type;
4974
4988
  switch (t) {
4975
- case "single-stream":
4976
- return s.media;
4977
- case "multi-stream":
4978
- return s.media;
4979
- case "fixed-list":
4980
- return s.possibleMedia;
4989
+ case "simple-stream":
4990
+ return simpleToMedia(s).map((media) => ({ media }));
4991
+ case "dynamic-streams":
4992
+ return s.streams(cfg, inputs);
4981
4993
  default:
4982
4994
  (0, util_1.assertUnreachable)(t);
4983
4995
  }
4984
4996
  }
4985
- function inputMedia(s) {
4997
+ function inputMedia(s, cfg) {
4986
4998
  if (!s)
4987
4999
  return [];
4988
5000
  const t = s.type;
4989
5001
  switch (t) {
4990
- case "multi-stream":
4991
- return s.media;
4992
- case "single-stream":
4993
- return s.media;
5002
+ case "dynamic-streams":
5003
+ return s.streams(cfg).map((s2) => s2.media);
5004
+ case "simple-stream":
5005
+ return simpleToMedia(s);
4994
5006
  default:
4995
5007
  (0, util_1.assertUnreachable)(t);
4996
5008
  }
@@ -5438,10 +5450,9 @@ function info_default14({ defineComponent, All }) {
5438
5450
  name: "Statistics",
5439
5451
  description: "This component accepts multiple media streams, captures and reports metrics or statistical data related to the media streams.",
5440
5452
  subscription: {
5441
- // No validation required
5442
5453
  accepts: {
5443
- type: "multi-stream",
5444
- media: All
5454
+ type: "dynamic-streams",
5455
+ streams: () => All.map((media) => ({ media }))
5445
5456
  }
5446
5457
  },
5447
5458
  display: (_desc) => {
@@ -20610,18 +20621,9 @@ function info_default({ defineComponent, Av, validation: { Z, Port, SourceName,
20610
20621
  subscription: {
20611
20622
  accepts: void 0,
20612
20623
  produces: {
20613
- type: "fixed-list",
20614
- possibleMedia: Av,
20615
- keys: (cfg) => cfg.streamNames.map((s) => ({
20616
- key: s,
20617
- display: s,
20618
- media: Av
20619
- })),
20620
- selector: (selection, metadata) => {
20621
- return metadata.filter((m) => {
20622
- return selection.includes(m.streamKey.sourceName);
20623
- }).map((s) => s.streamKey);
20624
- }
20624
+ type: "dynamic-streams",
20625
+ groupBy: "sourceName",
20626
+ streams: (cfg) => Av.flatMap((media) => cfg.streamNames.map((s) => ({ media, sourceName: s })))
20625
20627
  }
20626
20628
  },
20627
20629
  display: (desc) => {
@@ -20685,7 +20687,7 @@ function assertUnreachable(_) {
20685
20687
  }
20686
20688
 
20687
20689
  // build/input.silence/info.js
20688
- function info_default2({ defineComponent, Audio }) {
20690
+ function info_default2({ defineComponent }) {
20689
20691
  return defineComponent({
20690
20692
  identifier: "input.silence",
20691
20693
  category: "input",
@@ -20693,8 +20695,11 @@ function info_default2({ defineComponent, Audio }) {
20693
20695
  description: "A component that produces silent audio streams with configurable sample rate and channel layout.",
20694
20696
  subscription: {
20695
20697
  produces: {
20696
- type: "single-stream",
20697
- media: Audio
20698
+ type: "dynamic-streams",
20699
+ streams: (cfg) => [{
20700
+ sourceName: cfg.id,
20701
+ media: "audio"
20702
+ }]
20698
20703
  }
20699
20704
  },
20700
20705
  display: (desc) => {
@@ -20800,8 +20805,11 @@ function info_default3({ defineComponent, Av, validation }) {
20800
20805
  subscription: {
20801
20806
  accepts: void 0,
20802
20807
  produces: {
20803
- type: "single-stream",
20804
- media: Av
20808
+ type: "dynamic-streams",
20809
+ streams: (cfg) => Av.map((media) => ({
20810
+ sourceName: cfg.id,
20811
+ media
20812
+ }))
20805
20813
  }
20806
20814
  },
20807
20815
  display: (desc) => {
@@ -20841,7 +20849,7 @@ function info_default3({ defineComponent, Av, validation }) {
20841
20849
  var import_react3 = __toESM(require_react());
20842
20850
  var InlineView4 = import_react3.default.lazy(async () => Promise.resolve().then(() => (init_inline_view2(), inline_view_exports2)));
20843
20851
  var SummaryView4 = import_react3.default.lazy(async () => Promise.resolve().then(() => (init_summary_view2(), summary_view_exports2)));
20844
- function info_default4({ defineComponent, Av, validation }) {
20852
+ function info_default4({ defineComponent, All, validation }) {
20845
20853
  const { Z, Port, Hostname, SourceName, SrtPassphrase, unique } = validation;
20846
20854
  const SocketConfiguration2 = import_react3.default.lazy(async () => {
20847
20855
  const views = await Promise.resolve().then(() => (init_srt_form_views(), srt_form_views_exports));
@@ -20855,18 +20863,9 @@ function info_default4({ defineComponent, Av, validation }) {
20855
20863
  subscription: {
20856
20864
  accepts: void 0,
20857
20865
  produces: {
20858
- type: "fixed-list",
20859
- possibleMedia: Av,
20860
- keys: (cfg) => cfg.streamIds.map((s) => ({
20861
- key: s,
20862
- display: s,
20863
- media: Av
20864
- })),
20865
- selector: (selection, metadata) => {
20866
- return metadata.filter((m) => {
20867
- return selection.includes(m.streamKey.sourceName);
20868
- }).map((s) => s.streamKey);
20869
- }
20866
+ type: "dynamic-streams",
20867
+ groupBy: "sourceName",
20868
+ streams: (cfg) => All.flatMap((media) => cfg.streamIds.map((s) => ({ media, sourceName: s })))
20870
20869
  }
20871
20870
  },
20872
20871
  display: (desc) => {
@@ -20974,7 +20973,7 @@ function assertUnreachable2(_) {
20974
20973
  }
20975
20974
 
20976
20975
  // build/input.udp-ts/info.js
20977
- function info_default5({ defineComponent, Av, validation: { Z, Port, Hostname, SourceName, unique } }) {
20976
+ function info_default5({ defineComponent, All, validation: { Z, Port, Hostname, SourceName, unique } }) {
20978
20977
  return defineComponent({
20979
20978
  identifier: "input.udp-ts",
20980
20979
  category: "input",
@@ -20983,8 +20982,11 @@ function info_default5({ defineComponent, Av, validation: { Z, Port, Hostname, S
20983
20982
  subscription: {
20984
20983
  accepts: void 0,
20985
20984
  produces: {
20986
- type: "single-stream",
20987
- media: Av
20985
+ type: "dynamic-streams",
20986
+ streams: (cfg) => All.map((media) => ({
20987
+ sourceName: cfg.sourceName,
20988
+ media
20989
+ }))
20988
20990
  }
20989
20991
  },
20990
20992
  display: (desc) => {
@@ -21008,7 +21010,7 @@ function info_default5({ defineComponent, Av, validation: { Z, Port, Hostname, S
21008
21010
  }
21009
21011
 
21010
21012
  // build/input.videoTestCard/info.js
21011
- function info_default6({ defineComponent, Video, validation: { SourceName, unique }, common: { Resolutions, FrameRates } }) {
21013
+ function info_default6({ defineComponent, validation: { SourceName, unique }, common: { Resolutions, FrameRates } }) {
21012
21014
  return defineComponent({
21013
21015
  identifier: "input.videoTestCard",
21014
21016
  category: "input",
@@ -21017,8 +21019,11 @@ function info_default6({ defineComponent, Video, validation: { SourceName, uniqu
21017
21019
  subscription: {
21018
21020
  accepts: void 0,
21019
21021
  produces: {
21020
- type: "single-stream",
21021
- media: Video
21022
+ type: "dynamic-streams",
21023
+ streams: (cfg) => [{
21024
+ sourceName: cfg.sourceName,
21025
+ media: "video"
21026
+ }]
21022
21027
  }
21023
21028
  },
21024
21029
  display: (desc) => {
@@ -21086,21 +21091,19 @@ function info_default7(R) {
21086
21091
  name: "Auto CMAF",
21087
21092
  description: "This component handles the creation of CMAF outputs from multiple video and audio streams.",
21088
21093
  subscription: {
21089
- // Again, accept anything
21090
- // but reject the same stream twice
21091
- // this is probably important given the amount of places we split audio/video
21092
21094
  accepts: {
21093
- type: "multi-stream",
21094
- media: All
21095
+ type: "dynamic-streams",
21096
+ mode: "any",
21097
+ streams: () => All.map((media) => ({ media }))
21095
21098
  }
21096
21099
  },
21097
21100
  extraValidation: (ctx) => {
21098
- const audioStreams = ctx.subscriptions.filter((s) => s.validatedStreams.select.includes("audio"));
21101
+ const audioStreams = ctx.subscriptions.filter((s) => s.streams.filter.find((f) => f.media == "audio"));
21099
21102
  if (audioStreams.length == 0) {
21100
21103
  ctx.addError("AutoPlaylist requires at least one audio stream");
21101
21104
  }
21102
21105
  const uniqueVideoStreamNodes = ctx.subscriptions.reduce((acc, s) => {
21103
- if (s.validatedStreams.select.includes("video")) {
21106
+ if (s.streams.filter.find((f) => f.media == "video")) {
21104
21107
  if (!acc.includes(s.source)) {
21105
21108
  acc.push(s.source);
21106
21109
  }
@@ -21403,21 +21406,17 @@ function info_default9(r) {
21403
21406
  }
21404
21407
  });
21405
21408
  }
21406
- function defineRtmpOutputComponent({ defineComponent, Av }, settings) {
21409
+ function defineRtmpOutputComponent({ defineComponent }, settings) {
21407
21410
  const SummaryView12 = import_react6.default.lazy(async () => Promise.resolve().then(() => (init_summary_view4(), summary_view_exports4)));
21408
21411
  const InlineView15 = import_react6.default.lazy(async () => Promise.resolve().then(() => (init_inline_view4(), inline_view_exports4)));
21409
21412
  return defineComponent({
21410
21413
  ...settings,
21411
21414
  category: "output",
21412
21415
  subscription: {
21413
- // No validation?
21414
- // Accept either *just* audio, or *just* video, or audio *and* video
21415
- // there can only be one of each though
21416
- // The selection of these things should determine the subscriptionValidation callback
21417
- // requireAV or just 'cool cool cool'
21418
21416
  accepts: {
21419
- type: "single-stream",
21420
- media: Av
21417
+ type: "simple-stream",
21418
+ audio: true,
21419
+ video: true
21421
21420
  }
21422
21421
  },
21423
21422
  display: (_desc) => {
@@ -21517,7 +21516,7 @@ function info_default11(r) {
21517
21516
  var import_react8 = __toESM(require_react());
21518
21517
  var import_config2 = __toESM(require_config());
21519
21518
  function info_default12(R) {
21520
- const { defineComponent, Av, validation: { JitterBuffer } } = R;
21519
+ const { defineComponent, validation: { JitterBuffer } } = R;
21521
21520
  const InlineView15 = import_react8.default.lazy(async () => Promise.resolve().then(() => (init_inline_view5(), inline_view_exports5)));
21522
21521
  return defineComponent({
21523
21522
  identifier: "output.preview",
@@ -21526,28 +21525,15 @@ function info_default12(R) {
21526
21525
  description: "Preview allows for the real-time preview of media streams. It provides a way to visualize and monitor the output from various media sources before final processing or distribution.",
21527
21526
  subscription: {
21528
21527
  accepts: {
21529
- type: "single-stream",
21530
- media: Av
21528
+ type: "simple-stream",
21529
+ audio: true,
21530
+ video: true
21531
21531
  },
21532
21532
  produces: void 0
21533
21533
  },
21534
21534
  extraValidation: (ctx) => {
21535
- const video = ctx.subscriptions.filter((s) => s.validatedStreams.select.includes("video"));
21536
- const audio = ctx.subscriptions.filter((s) => s.validatedStreams.select.includes("audio"));
21537
- if (video.length == 1 && audio.length == 1)
21538
- return;
21539
- if (video.length == 0) {
21540
- ctx.addError("Preview requires a video subscription in order to work");
21541
- }
21542
- if (audio.length == 0) {
21543
- ctx.addError("Preview requires an audio subscription in order to work");
21544
- }
21545
- if (video.length > 1) {
21546
- ctx.addError("Preview cannot work with more than one video subscription");
21547
- }
21548
- if (audio.length > 1) {
21549
- ctx.addError("Preview cannot work with more than one audio subscription");
21550
- }
21535
+ ctx.requireVideo(1);
21536
+ ctx.requireAudio(1);
21551
21537
  },
21552
21538
  display: (_desc) => {
21553
21539
  return {};
@@ -21624,11 +21610,10 @@ function info_default13(registration) {
21624
21610
  name: "SRT Egest",
21625
21611
  description: "This component manages the sending of SRT (Secure Reliable Transport) streams. It allows you to configure various settings to control how the SRT output is handled, including connection details, buffer settings, and delay options.",
21626
21612
  subscription: {
21627
- // No validation?
21628
- // Streams have to be unique? That's a stretch goal
21629
21613
  accepts: {
21630
- type: "multi-stream",
21631
- media: All
21614
+ type: "dynamic-streams",
21615
+ mode: "any",
21616
+ streams: () => All.map((media) => ({ media }))
21632
21617
  }
21633
21618
  },
21634
21619
  display: (desc) => {
@@ -21753,11 +21738,10 @@ function info_default16({ defineComponent, All, validation: { Port, Hostname, Ji
21753
21738
  name: "UDP TS Egest",
21754
21739
  description: "This component outputs multiple media streams over UDP in TS (Transport Stream) format. It accepts multiple input streams and sends them to a specified IP address and port.",
21755
21740
  subscription: {
21756
- // Just works with no validation
21757
- // although uniqueness again, stretch goal
21758
21741
  accepts: {
21759
- type: "multi-stream",
21760
- media: All
21742
+ type: "dynamic-streams",
21743
+ mode: "any",
21744
+ streams: () => All.map((media) => ({ media }))
21761
21745
  }
21762
21746
  },
21763
21747
  display: (desc) => {
@@ -21787,7 +21771,7 @@ function info_default16({ defineComponent, All, validation: { Port, Hostname, Ji
21787
21771
  var import_config3 = __toESM(require_config());
21788
21772
  var import_react12 = __toESM(require_react());
21789
21773
  function info_default17(R) {
21790
- const { defineComponent, Av, validation: { JitterBuffer } } = R;
21774
+ const { defineComponent, validation: { JitterBuffer } } = R;
21791
21775
  const InlineView15 = import_react12.default.lazy(async () => Promise.resolve().then(() => (init_inline_view8(), inline_view_exports8)));
21792
21776
  const SummaryView12 = import_react12.default.lazy(async () => Promise.resolve().then(() => (init_summary_view6(), summary_view_exports6)));
21793
21777
  return defineComponent({
@@ -21796,14 +21780,10 @@ function info_default17(R) {
21796
21780
  name: "WHEP Egest",
21797
21781
  description: "This component allows us to use WebRTC egress for outputs.",
21798
21782
  subscription: {
21799
- // No validation?
21800
- // Accept either *just* audio, or *just* video, or audio *and* video
21801
- // there can only be one of each though
21802
- // The selection of these things should determine the subscriptionValidation callback
21803
- // requireAV or just 'cool cool cool'
21804
21783
  accepts: {
21805
- type: "single-stream",
21806
- media: Av
21784
+ type: "simple-stream",
21785
+ audio: true,
21786
+ video: true
21807
21787
  }
21808
21788
  },
21809
21789
  display: (_desc) => {
@@ -21882,7 +21862,7 @@ function info_default18(r) {
21882
21862
  // build/processor.audioEncoder/info.js
21883
21863
  var import_client_types2 = __toESM(require_client_types());
21884
21864
  var import_react13 = __toESM(require_react());
21885
- function info_default19({ defineComponent, Audio, validation: { Z } }) {
21865
+ function info_default19({ defineComponent, validation: { Z } }) {
21886
21866
  const format = (stat) => Math.floor(stat).toLocaleString("en-US", { maximumFractionDigits: 0 });
21887
21867
  const Hz = (v) => ({ display: `${format(v)}Hz`, value: v });
21888
21868
  return defineComponent({
@@ -21892,12 +21872,12 @@ function info_default19({ defineComponent, Audio, validation: { Z } }) {
21892
21872
  description: "Explicit audio encode.",
21893
21873
  subscription: {
21894
21874
  accepts: {
21895
- type: "single-stream",
21896
- media: Audio
21875
+ type: "simple-stream",
21876
+ audio: true
21897
21877
  },
21898
21878
  produces: {
21899
- type: "single-stream",
21900
- media: Audio
21879
+ type: "simple-stream",
21880
+ audio: true
21901
21881
  }
21902
21882
  },
21903
21883
  display: ({ config }) => {
@@ -22015,7 +21995,7 @@ var import_config4 = __toESM(require_config());
22015
21995
  var import_react15 = __toESM(require_react());
22016
21996
  var SummaryView10 = import_react15.default.lazy(async () => Promise.resolve().then(() => (init_summary_view7(), summary_view_exports7)));
22017
21997
  var InlineView12 = import_react15.default.lazy(async () => Promise.resolve().then(() => (init_inline_view9(), inline_view_exports9)));
22018
- function info_default20({ defineComponent, Video, validation: { Z } }) {
21998
+ function info_default20({ defineComponent, validation: { Z } }) {
22019
21999
  return defineComponent({
22020
22000
  identifier: "processor.browserOverlay",
22021
22001
  category: "processor",
@@ -22024,12 +22004,12 @@ function info_default20({ defineComponent, Video, validation: { Z } }) {
22024
22004
  subscription: {
22025
22005
  // Only accept a single video stream
22026
22006
  accepts: {
22027
- type: "single-stream",
22028
- media: Video
22007
+ type: "simple-stream",
22008
+ video: true
22029
22009
  },
22030
22010
  produces: {
22031
- type: "single-stream",
22032
- media: Video
22011
+ type: "simple-stream",
22012
+ video: true
22033
22013
  }
22034
22014
  },
22035
22015
  extraValidation: function(ctx) {
@@ -22086,23 +22066,23 @@ function info_default21({ defineComponent, Av, React: React15, common: { Resolut
22086
22066
  name: "Cascading Switch",
22087
22067
  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.",
22088
22068
  subscription: {
22089
- // This needs to change anyway
22090
- // but it'll be the same as MCS
22091
22069
  accepts: {
22092
- type: "multi-stream",
22093
- media: Av
22070
+ type: "dynamic-streams",
22071
+ mode: { type: "multiple", groupBy: "sourceName" },
22072
+ streams: () => Av.map((media) => ({ media }))
22094
22073
  },
22095
22074
  produces: {
22096
- type: "single-stream",
22097
- media: Av
22075
+ type: "simple-stream",
22076
+ audio: true,
22077
+ video: true
22098
22078
  }
22099
22079
  },
22100
22080
  extraValidation: function(ctx) {
22101
22081
  ctx.subscriptions.forEach((s) => {
22102
- if (!s.validatedStreams.select.includes("video")) {
22082
+ if (!s.streams.filter.find((f) => f.media == "video")) {
22103
22083
  ctx.addError(`Subscription to ${s.source} is missing video`);
22104
22084
  }
22105
- if (!s.validatedStreams.select.includes("audio")) {
22085
+ if (!s.streams.filter.find((f) => f.media == "audio")) {
22106
22086
  ctx.addError(`Subscription to ${s.source} is missing audio`);
22107
22087
  }
22108
22088
  if (s.streams.type == "take-all-streams") {
@@ -22217,7 +22197,7 @@ function assertUnreachable10(_) {
22217
22197
  // build/processor.fixedLadder/info.js
22218
22198
  var import_react18 = __toESM(require_react());
22219
22199
  var import_config5 = __toESM(require_config());
22220
- function info_default22({ defineComponent, Video, common: { FrameRates } }) {
22200
+ function info_default22({ defineComponent, common: { FrameRates } }) {
22221
22201
  const RungView = import_react18.default.lazy(async () => Promise.resolve().then(() => (init_rung_view(), rung_view_exports)));
22222
22202
  const CodecEditor3 = import_react18.default.lazy(async () => Promise.resolve().then(() => (init_codec_editor(), codec_editor_exports)));
22223
22203
  const CodecView = import_react18.default.lazy(async () => Promise.resolve().then(() => (init_codec_view(), codec_view_exports)));
@@ -22229,24 +22209,12 @@ function info_default22({ defineComponent, Video, common: { FrameRates } }) {
22229
22209
  subscription: {
22230
22210
  // Only accept a single video stream
22231
22211
  accepts: {
22232
- type: "single-stream",
22233
- media: Video
22212
+ type: "simple-stream",
22213
+ video: true
22234
22214
  },
22235
22215
  produces: {
22236
- possibleMedia: Video,
22237
- type: "fixed-list",
22238
- keys: (cfg) => {
22239
- return cfg.rungs.map((r) => {
22240
- return {
22241
- key: r.name,
22242
- display: r.name,
22243
- media: Video
22244
- };
22245
- });
22246
- },
22247
- selector: (selection, metadata) => {
22248
- return metadata.filter((s) => s.streamKey && selection.includes(s.streamKey?.renditionName)).map((r) => r.streamKey).filter((r) => !!r);
22249
- }
22216
+ type: "dynamic-streams",
22217
+ streams: (cfg) => cfg.rungs.map((r) => ({ media: "video", renditionName: r.name }))
22250
22218
  }
22251
22219
  },
22252
22220
  extraValidation: function(ctx) {
@@ -22554,10 +22522,88 @@ function assertUnreachable11(_) {
22554
22522
  throw new Error("Didn't expect to get here");
22555
22523
  }
22556
22524
 
22525
+ // build/processor.makeProgram/info.js
22526
+ function info_default23({ defineComponent, All, validation: { Z } }) {
22527
+ return defineComponent({
22528
+ identifier: "processor.makeProgram",
22529
+ category: "processor",
22530
+ name: "Make Program",
22531
+ description: "Group unrelated streams together into a single program, incrementing stream-id for each input",
22532
+ subscription: {
22533
+ accepts: {
22534
+ type: "dynamic-streams",
22535
+ mode: "any",
22536
+ streams: () => All.map((media) => ({ media }))
22537
+ },
22538
+ produces: {
22539
+ type: "dynamic-streams",
22540
+ streams: (cfg, inputs) => {
22541
+ return inputs?.map((s, i) => {
22542
+ const output = { ...s };
22543
+ output.programNumber = cfg.programNumber;
22544
+ output.sourceName = cfg.sourceName;
22545
+ output.streamId = cfg.startingStreamId + i;
22546
+ if (cfg.renditionName)
22547
+ output.renditionName = cfg.renditionName;
22548
+ return output;
22549
+ }) ?? [];
22550
+ }
22551
+ }
22552
+ },
22553
+ display: ({ config }) => {
22554
+ const disp = {};
22555
+ disp.sourceName = config.sourceName;
22556
+ disp.programNumber = String(config.programNumber);
22557
+ disp.startingStreamId = String(config.startingStreamId);
22558
+ if (config.renditionName) {
22559
+ disp.renditionName = config.renditionName;
22560
+ }
22561
+ return disp;
22562
+ },
22563
+ extraValidation: (_ctx) => {
22564
+ },
22565
+ configForm: {
22566
+ form: {
22567
+ sourceName: {
22568
+ help: "Source name for the new program",
22569
+ hint: {
22570
+ type: "text",
22571
+ optional: false
22572
+ }
22573
+ },
22574
+ programNumber: {
22575
+ help: "Program number for the new program",
22576
+ hint: {
22577
+ type: "numeric",
22578
+ optional: false,
22579
+ validation: Z.number().min(1).int().optional()
22580
+ }
22581
+ },
22582
+ startingStreamId: {
22583
+ help: "The start stream",
22584
+ hint: {
22585
+ type: "numeric",
22586
+ optional: true,
22587
+ validation: Z.number().min(1).int().optional()
22588
+ }
22589
+ },
22590
+ renditionName: {
22591
+ help: "The rendition name for each stream",
22592
+ hint: {
22593
+ type: "text",
22594
+ optional: true
22595
+ }
22596
+ },
22597
+ notes: { help: "Notes about this component", hint: { type: "text", optional: true } }
22598
+ }
22599
+ }
22600
+ });
22601
+ }
22602
+
22557
22603
  // build/processor.onscreenGraphic/info.js
22558
22604
  var import_config6 = __toESM(require_config());
22559
22605
  var import_react21 = __toESM(require_react());
22560
- function info_default23({ defineComponent, Video }) {
22606
+ function info_default24({ defineComponent }) {
22561
22607
  const GraphicSelection2 = import_react21.default.lazy(async () => Promise.resolve().then(() => (init_image_selection(), image_selection_exports)));
22562
22608
  const SummaryView12 = import_react21.default.lazy(async () => Promise.resolve().then(() => (init_summary_view8(), summary_view_exports8)));
22563
22609
  return defineComponent({
@@ -22568,12 +22614,12 @@ function info_default23({ defineComponent, Video }) {
22568
22614
  subscription: {
22569
22615
  // Only accept a single video stream
22570
22616
  accepts: {
22571
- type: "single-stream",
22572
- media: Video
22617
+ type: "simple-stream",
22618
+ video: true
22573
22619
  },
22574
22620
  produces: {
22575
- type: "single-stream",
22576
- media: Video
22621
+ type: "simple-stream",
22622
+ video: true
22577
22623
  }
22578
22624
  },
22579
22625
  extraValidation: function(ctx) {
@@ -22638,48 +22684,38 @@ function assertUnreachable13(_) {
22638
22684
  }
22639
22685
 
22640
22686
  // build/processor.streamKeyOverride/info.js
22641
- function info_default24({ defineComponent, All, validation: { Z } }) {
22687
+ function info_default25({ defineComponent, All, validation: { Z } }) {
22642
22688
  return defineComponent({
22643
22689
  identifier: "processor.streamKeyOverride",
22644
22690
  category: "processor",
22645
22691
  name: "Stream Key Override",
22646
- description: "Override stream keys for several streams at once, setting some components of the keys and optionally incrementing stream ID.",
22692
+ description: "Override stream keys for several streams at once, optionally setting one or more properties.",
22647
22693
  subscription: {
22648
22694
  accepts: {
22649
- type: "multi-stream",
22650
- media: All
22695
+ type: "dynamic-streams",
22696
+ mode: "any",
22697
+ streams: () => All.map((media) => ({ media }))
22651
22698
  },
22652
22699
  produces: {
22653
- type: "fixed-list",
22654
- possibleMedia: All,
22655
- keys: (cfg, subs) => {
22656
- const outputs = subs.flatMap((sub) => {
22657
- const sourceNode = sub.document.components[sub.source];
22658
- if (!sourceNode)
22659
- return [];
22660
- const produces = sourceNode.info.subscription.produces;
22661
- if (produces?.type === "fixed-list") {
22662
- return produces.keys(sourceNode.config, sourceNode.subscriptions).map((sel) => ({ ...sel, key: `${sourceNode.id}-${sel.key}`, display: `${sourceNode.config.displayName}: ${sel.display}` }));
22663
- } else {
22664
- return [{ key: `${sourceNode.id}`, display: `${sourceNode.config.displayName}`, media: produces ? produces.media : All }];
22665
- }
22666
- });
22667
- if (cfg.output === "merged") {
22668
- const media = Array.from(new Set(outputs.flatMap((x) => x.media)));
22669
- return [{ key: `merged`, display: "Merged", media }];
22670
- }
22671
- return outputs;
22672
- },
22673
- selector: () => {
22674
- console.error("Use selectOutputs from process.streamKeyOverride/runtime.ts, not selector from info.ts");
22675
- return [];
22700
+ type: "dynamic-streams",
22701
+ streams: (cfg, inputs) => {
22702
+ return inputs?.map((s) => {
22703
+ const output = { ...s };
22704
+ if (cfg.programNumber)
22705
+ output.programNumber = cfg.programNumber;
22706
+ if (cfg.sourceName)
22707
+ output.sourceName = cfg.sourceName;
22708
+ if (cfg.streamId)
22709
+ output.streamId = cfg.streamId;
22710
+ if (cfg.renditionName)
22711
+ output.renditionName = cfg.renditionName;
22712
+ return output;
22713
+ }) ?? [];
22676
22714
  }
22677
22715
  }
22678
22716
  },
22679
22717
  display: ({ config }) => {
22680
22718
  const disp = {};
22681
- disp.mode = config.mode || "simple";
22682
- disp.output = config.output || "individually-selectable";
22683
22719
  if (config.sourceName) {
22684
22720
  disp.sourceName = config.sourceName;
22685
22721
  }
@@ -22696,57 +22732,13 @@ function info_default24({ defineComponent, All, validation: { Z } }) {
22696
22732
  },
22697
22733
  extraValidation: (ctx) => {
22698
22734
  const { config, subscriptions } = ctx;
22699
- if ((config.mode || "simple") == "simple" && config.sourceName && config.programNumber !== void 0 && config.streamId !== void 0 && config.renditionName) {
22735
+ if (config.sourceName && config.programNumber !== void 0 && config.streamId !== void 0 && config.renditionName) {
22700
22736
  if (subscriptions.length > 1)
22701
22737
  ctx.addError("A fully specified stream key override must only subscribe to one stream, or use a mode other than simple");
22702
22738
  }
22703
- if (config.mode === "by-media-type" && config.streamId === void 0) {
22704
- ctx.addError("You must specify the starting streamId for a by-media-type stream key override");
22705
- }
22706
- if (config.output === "merged" && !config.sourceName) {
22707
- ctx.addError("You must specify a sourceName for a single merged output");
22708
- }
22709
22739
  },
22710
22740
  configForm: {
22711
22741
  form: {
22712
- mode: {
22713
- help: "Multi-stream behavior",
22714
- hint: {
22715
- type: "select",
22716
- defaultValue: "simple",
22717
- options: [
22718
- {
22719
- display: "Override values directly",
22720
- value: "simple"
22721
- },
22722
- {
22723
- display: "Increment stream ID by media type (video, audio, ...)",
22724
- value: "by-media-type"
22725
- },
22726
- {
22727
- display: "Increment stream ID per program in order of subscription",
22728
- value: "in-order"
22729
- }
22730
- ]
22731
- }
22732
- },
22733
- output: {
22734
- help: "Output individual streams or a single merged stream",
22735
- hint: {
22736
- type: "select",
22737
- defaultValue: "individually-selectable",
22738
- options: [
22739
- {
22740
- display: "Individual inputs can be selected in the output",
22741
- value: "individually-selectable"
22742
- },
22743
- {
22744
- display: "The outputs are merged into a single stream",
22745
- value: "merged"
22746
- }
22747
- ]
22748
- }
22749
- },
22750
22742
  sourceName: {
22751
22743
  help: "Override source name",
22752
22744
  hint: {
@@ -22784,7 +22776,7 @@ function info_default24({ defineComponent, All, validation: { Z } }) {
22784
22776
  }
22785
22777
 
22786
22778
  // build/processor.videoDecoder/info.js
22787
- function info_default25({ defineComponent, Video }) {
22779
+ function info_default26({ defineComponent }) {
22788
22780
  return defineComponent({
22789
22781
  identifier: "processor.videoDecoder",
22790
22782
  category: "processor",
@@ -22792,12 +22784,12 @@ function info_default25({ defineComponent, Video }) {
22792
22784
  description: "Explicit video decode.",
22793
22785
  subscription: {
22794
22786
  accepts: {
22795
- type: "single-stream",
22796
- media: Video
22787
+ type: "simple-stream",
22788
+ video: true
22797
22789
  },
22798
22790
  produces: {
22799
- type: "single-stream",
22800
- media: Video
22791
+ type: "simple-stream",
22792
+ video: true
22801
22793
  }
22802
22794
  },
22803
22795
  display: ({ config }) => {
@@ -22831,7 +22823,7 @@ function info_default25({ defineComponent, Video }) {
22831
22823
 
22832
22824
  // build/util.stats.latency/info.js
22833
22825
  var import_react23 = __toESM(require_react());
22834
- function info_default26(R) {
22826
+ function info_default27(R) {
22835
22827
  const { defineComponent } = R;
22836
22828
  const InlineView15 = import_react23.default.lazy(async () => Promise.resolve().then(() => (init_inline_view11(), inline_view_exports11)));
22837
22829
  const SourceNodeSelection2 = import_react23.default.lazy(async () => Promise.resolve().then(() => (init_source_node_selection(), source_node_selection_exports)));
@@ -22961,6 +22953,7 @@ AllComponents.push((r) => info_default23(r));
22961
22953
  AllComponents.push((r) => info_default24(r));
22962
22954
  AllComponents.push((r) => info_default25(r));
22963
22955
  AllComponents.push((r) => info_default26(r));
22956
+ AllComponents.push((r) => info_default27(r));
22964
22957
  export {
22965
22958
  getNodeInfo as default
22966
22959
  };