@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,12 +1,43 @@
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 Source Switch Processor Component
4
6
  version: 1.0.0
5
-
6
7
  paths: {}
7
-
8
8
  components:
9
9
  schemas:
10
+ testcardFallback: &a1
11
+ type: object
12
+ properties:
13
+ kind:
14
+ type: string
15
+ enum:
16
+ - testcard
17
+ required:
18
+ - kind
19
+ fileFallback: &a2
20
+ type: object
21
+ properties:
22
+ kind:
23
+ type: string
24
+ enum:
25
+ - file
26
+ filePath:
27
+ type: string
28
+ description: Path to MP4 file to use as fallback
29
+ required:
30
+ - kind
31
+ - filePath
32
+ fallback: &a4
33
+ oneOf:
34
+ - *a1
35
+ - *a2
36
+ discriminator:
37
+ propertyName: kind
38
+ description: Configuration for fallback source when no inputs are available
39
+ default:
40
+ kind: testcard
10
41
  config:
11
42
  type: object
12
43
  properties:
@@ -17,17 +48,117 @@ components:
17
48
  notes:
18
49
  type: string
19
50
  resolution:
20
- $ref: '../../../core/src/types/base.yml#/components/schemas/Resolution'
51
+ type: object
52
+ description: Video resolution with width and height dimensions
53
+ properties:
54
+ width:
55
+ type: integer
56
+ minimum: 1
57
+ description: Width in pixels
58
+ height:
59
+ type: integer
60
+ minimum: 1
61
+ description: Height in pixels
62
+ required:
63
+ - width
64
+ - height
21
65
  frameRate:
22
- $ref: '../../../core/src/types/base.yml#/components/schemas/FrameRate'
66
+ type: object
67
+ properties:
68
+ frames:
69
+ type: integer
70
+ seconds:
71
+ type: integer
72
+ required:
73
+ - frames
74
+ - seconds
23
75
  sampleRate:
24
- $ref: '../../../core/src/types/base.yml#/components/schemas/SampleRate'
76
+ type: integer
77
+ enum:
78
+ - 8000
79
+ - 11025
80
+ - 12000
81
+ - 16000
82
+ - 22050
83
+ - 24000
84
+ - 32000
85
+ - 44100
86
+ - 48000
87
+ - 64000
88
+ - 88200
89
+ - 96000
90
+ description: Possible sample rates in Hz.
91
+ example: 48000
25
92
  channelLayout:
26
- $ref: '../../../core/src/types/base.yml#/components/schemas/ChannelLayout'
93
+ description: Channel layout for an audio stream. Can be one of several string
94
+ presets, an array of channel names, or an object with a single
95
+ property.
96
+ oneOf:
97
+ - type: string
98
+ enum:
99
+ - mono
100
+ - stereo
101
+ - surround
102
+ - "4.0"
103
+ - "5.0"
104
+ - "5.1"
105
+ - "7.1"
106
+ - 5.1.4
107
+ - 7.1.4
108
+ - type: array
109
+ items: &a3
110
+ type: string
111
+ enum:
112
+ - l
113
+ - r
114
+ - c
115
+ - lfe
116
+ - ls
117
+ - rs
118
+ - lc
119
+ - rc
120
+ - lsr
121
+ - rsr
122
+ - cs
123
+ - lsd
124
+ - rsd
125
+ - lss
126
+ - rss
127
+ - lw
128
+ - rw
129
+ - lv
130
+ - rv
131
+ - cv
132
+ - lvr
133
+ - rvr
134
+ - cvr
135
+ - lvss
136
+ - rvss
137
+ - ts
138
+ - lfe2
139
+ - lb
140
+ - rb
141
+ - cb
142
+ - lvs
143
+ - rvs
144
+ - lfe3
145
+ - leos
146
+ - reos
147
+ - hwbcal
148
+ - hwbcar
149
+ - lbs
150
+ - rbs
151
+ - unknown
152
+ - type: object
153
+ properties:
154
+ single: *a3
155
+ required:
156
+ - single
27
157
  sources:
28
158
  type: array
29
159
  items:
30
160
  type: string
161
+ fallback: *a4
31
162
  required:
32
163
  - id
33
164
  - displayName
@@ -36,7 +167,7 @@ components:
36
167
  - sampleRate
37
168
  - channelLayout
38
169
  - sources
39
-
170
+ - fallback
40
171
  state:
41
172
  type: object
42
173
  properties:
@@ -49,49 +180,47 @@ components:
49
180
  required:
50
181
  - activeSource
51
182
  - availableSources
52
-
53
183
  Commands:
54
184
  type: object
55
185
  description: Currently no commands are implemented
56
-
57
186
  Events:
58
187
  oneOf:
59
- - $ref: '#/components/schemas/ActiveSourceChangedEvent'
60
- - $ref: '#/components/schemas/SourceOnlineEvent'
61
- - $ref: '#/components/schemas/SourceOfflineEvent'
62
-
63
- ActiveSourceChangedEvent:
64
- type: object
65
- properties:
66
- type:
67
- type: string
68
- enum: ["active-source-changed"]
69
- activeSource:
70
- type: string
71
- required:
72
- - type
73
- - activeSource
74
-
75
- SourceOnlineEvent:
76
- type: object
77
- properties:
78
- type:
79
- type: string
80
- enum: ["source-online"]
81
- source:
82
- type: string
83
- required:
84
- - type
85
- - source
86
-
87
- SourceOfflineEvent:
88
- type: object
89
- properties:
90
- type:
91
- type: string
92
- enum: ["source-offline"]
93
- source:
94
- type: string
95
- required:
96
- - type
97
- - source
188
+ - &a5
189
+ type: object
190
+ properties:
191
+ type:
192
+ type: string
193
+ enum:
194
+ - active-source-changed
195
+ activeSource:
196
+ type: string
197
+ required:
198
+ - type
199
+ - activeSource
200
+ - &a6
201
+ type: object
202
+ properties:
203
+ type:
204
+ type: string
205
+ enum:
206
+ - source-online
207
+ source:
208
+ type: string
209
+ required:
210
+ - type
211
+ - source
212
+ - &a7
213
+ type: object
214
+ properties:
215
+ type:
216
+ type: string
217
+ enum:
218
+ - source-offline
219
+ source:
220
+ type: string
221
+ required:
222
+ - type
223
+ - source
224
+ ActiveSourceChangedEvent: *a5
225
+ SourceOnlineEvent: *a6
226
+ SourceOfflineEvent: *a7
@@ -4,6 +4,7 @@ export default function (R: Registration): import("@norskvideo/norsk-studio/lib/
4
4
  displayName: string;
5
5
  delayMs: number;
6
6
  initialSyncMs: number;
7
+ whepPort?: number;
7
8
  }, {
8
9
  primaryWhepUrl?: string;
9
10
  commentaryWhepUrl?: string;
@@ -84,6 +84,7 @@ export interface components {
84
84
  displayName: string;
85
85
  delayMs: number;
86
86
  initialSyncMs: number;
87
+ whepPort?: number;
87
88
  };
88
89
  State: {
89
90
  primaryWhepUrl?: string;
@@ -15,8 +15,10 @@ function default_1({ defineComponent, }) {
15
15
  video: true
16
16
  },
17
17
  produces: {
18
- type: 'simple-stream',
19
- video: true
18
+ type: 'dynamic-streams',
19
+ streams: (_, input) => {
20
+ return input;
21
+ }
20
22
  },
21
23
  },
22
24
  display: ({ config }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.videoDecoder/info.ts"],"names":[],"mappings":";;AAIA,4BA8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,EAAE,EAAE;aACtF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
+ import type { ZoomToConfig } from "./runtime-types";
3
+ export default function ({ defineComponent, validation: { Z }, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<ZoomToConfig, {
4
+ currentOffsetX?: number;
5
+ currentOffsetY?: number;
6
+ currentWidth?: number;
7
+ currentHeight?: number;
8
+ targetOffsetX?: number;
9
+ targetOffsetY?: number;
10
+ targetWidth?: number;
11
+ targetHeight?: number;
12
+ inputVideoResolution?: import("./types").components["schemas"]["resolution"];
13
+ inputVideoFrameRate?: import("./types").components["schemas"]["frameRate"];
14
+ inputVideoAspectRatio?: number;
15
+ transitioning?: boolean;
16
+ hasInputVideo?: boolean;
17
+ }, {
18
+ type: "update-zoom";
19
+ mode: "percentage";
20
+ offsetX: number;
21
+ offsetY: number;
22
+ width: number;
23
+ height: number;
24
+ transitionDurationMs: number;
25
+ transitionEasing: "linear" | "ease_in" | "ease_out" | "ease_in_out";
26
+ } | {
27
+ type: "update-zoom";
28
+ mode: "pixel";
29
+ offsetXPx: number;
30
+ offsetYPx: number;
31
+ widthPx: number;
32
+ heightPx: number;
33
+ transitionDurationMs: number;
34
+ transitionEasing: "linear" | "ease_in" | "ease_out" | "ease_in_out";
35
+ }, {
36
+ type: "zoom-updated";
37
+ currentOffsetX: number;
38
+ currentOffsetY: number;
39
+ currentWidth: number;
40
+ currentHeight: number;
41
+ targetOffsetX: number;
42
+ targetOffsetY: number;
43
+ targetWidth: number;
44
+ targetHeight: number;
45
+ transitioning: boolean;
46
+ } | {
47
+ type: "input-video-changed";
48
+ hasInputVideo: boolean;
49
+ inputVideoResolution?: import("./types").components["schemas"]["resolution"];
50
+ inputVideoFrameRate?: import("./types").components["schemas"]["frameRate"];
51
+ inputVideoAspectRatio?: number;
52
+ } | {
53
+ type: "transition-complete";
54
+ }>;
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
5
+ function default_1({ defineComponent, validation: { Z }, }) {
6
+ return defineComponent({
7
+ identifier: "processor.zoomTo",
8
+ name: "Zoom To",
9
+ category: "processor",
10
+ description: "Crop and scale video with percentage or pixel-based zoom controls",
11
+ subscription: {
12
+ accepts: {
13
+ type: "simple-stream",
14
+ video: true,
15
+ },
16
+ produces: {
17
+ type: 'dynamic-streams',
18
+ streams: (_, input) => {
19
+ return input;
20
+ }
21
+ },
22
+ },
23
+ extraValidation: function (ctx) {
24
+ ctx.requireVideo(1);
25
+ const { offsetX, offsetY, width, height } = ctx.config;
26
+ if (offsetX + width > 100) {
27
+ ctx.addError("Crop region extends beyond right edge (offsetX + width > 100%)");
28
+ }
29
+ if (offsetY + height > 100) {
30
+ ctx.addError("Crop region extends beyond bottom edge (offsetY + height > 100%)");
31
+ }
32
+ },
33
+ display: (desc) => {
34
+ const { offsetX, offsetY, width, height } = desc.config;
35
+ return {
36
+ default: `${width}×${height}% @ ${offsetX},${offsetY}%`,
37
+ };
38
+ },
39
+ runtime: {
40
+ initialState: () => ({
41
+ currentOffsetX: 0,
42
+ currentOffsetY: 0,
43
+ currentWidth: 100,
44
+ currentHeight: 100,
45
+ targetOffsetX: 0,
46
+ targetOffsetY: 0,
47
+ targetWidth: 100,
48
+ targetHeight: 100,
49
+ transitioning: false,
50
+ hasInputVideo: false,
51
+ inputVideoResolution: undefined,
52
+ inputVideoFrameRate: undefined,
53
+ inputVideoAspectRatio: undefined
54
+ }),
55
+ handleEvent: (ev, state) => {
56
+ const evType = ev.type;
57
+ switch (evType) {
58
+ case "zoom-updated":
59
+ return {
60
+ ...state,
61
+ currentOffsetX: ev.currentOffsetX,
62
+ currentOffsetY: ev.currentOffsetY,
63
+ currentWidth: ev.currentWidth,
64
+ currentHeight: ev.currentHeight,
65
+ targetOffsetX: ev.targetOffsetX,
66
+ targetOffsetY: ev.targetOffsetY,
67
+ targetWidth: ev.targetWidth,
68
+ targetHeight: ev.targetHeight,
69
+ transitioning: ev.transitioning
70
+ };
71
+ case "transition-complete":
72
+ return { ...state, transitioning: false };
73
+ case "input-video-changed":
74
+ return {
75
+ ...state,
76
+ hasInputVideo: ev.hasInputVideo,
77
+ inputVideoResolution: ev.inputVideoResolution,
78
+ inputVideoFrameRate: ev.inputVideoFrameRate,
79
+ inputVideoAspectRatio: ev.inputVideoAspectRatio
80
+ };
81
+ default:
82
+ assertUnreachable(evType);
83
+ }
84
+ }
85
+ },
86
+ configForm: {
87
+ global: {
88
+ hardware: (0, config_1.HardwareSelection)(),
89
+ },
90
+ form: {
91
+ offsetX: {
92
+ help: "Horizontal offset of crop region as percentage (0-100)",
93
+ hint: {
94
+ type: "numeric",
95
+ validation: Z.number().min(0).max(100),
96
+ defaultValue: 0,
97
+ },
98
+ },
99
+ offsetY: {
100
+ help: "Vertical offset of crop region as percentage (0-100)",
101
+ hint: {
102
+ type: "numeric",
103
+ validation: Z.number().min(0).max(100),
104
+ defaultValue: 0,
105
+ },
106
+ },
107
+ width: {
108
+ help: "Width of crop region as percentage (1-100)",
109
+ hint: {
110
+ type: "numeric",
111
+ validation: Z.number().min(1).max(100),
112
+ defaultValue: 100,
113
+ },
114
+ },
115
+ height: {
116
+ help: "Height of crop region as percentage (1-100)",
117
+ hint: {
118
+ type: "numeric",
119
+ validation: Z.number().min(1).max(100),
120
+ defaultValue: 100,
121
+ },
122
+ },
123
+ outputResolution: {
124
+ help: "Output resolution (fixed after initialization)",
125
+ hint: {
126
+ type: "select",
127
+ defaultValue: { width: 1920, height: 1080 },
128
+ options: [
129
+ { value: { width: 1280, height: 720 }, display: "1280×720 (HD)" },
130
+ { value: { width: 1920, height: 1080 }, display: "1920×1080 (Full HD)" },
131
+ { value: { width: 3840, height: 2160 }, display: "3840×2160 (4K)" },
132
+ { value: { width: 1920, height: 1200 }, display: "1920×1200 (WUXGA)" },
133
+ { value: { width: 2560, height: 1440 }, display: "2560×1440 (QHD)" },
134
+ ],
135
+ },
136
+ },
137
+ transitionDurationMs: {
138
+ help: "Duration for zoom transitions in milliseconds",
139
+ hint: {
140
+ type: "numeric",
141
+ validation: Z.number().min(0).max(5000),
142
+ defaultValue: 300,
143
+ optional: true,
144
+ },
145
+ },
146
+ transitionEasing: {
147
+ help: "Easing function for smooth transitions",
148
+ hint: {
149
+ type: "select",
150
+ defaultValue: "ease_in_out",
151
+ options: [
152
+ { value: "linear", display: "Linear" },
153
+ { value: "ease_in", display: "Ease In" },
154
+ { value: "ease_out", display: "Ease Out" },
155
+ { value: "ease_in_out", display: "Ease In-Out" },
156
+ ],
157
+ optional: true,
158
+ },
159
+ },
160
+ notes: {
161
+ help: "Notes about this component",
162
+ hint: {
163
+ type: "text",
164
+ optional: true,
165
+ },
166
+ },
167
+ },
168
+ },
169
+ });
170
+ }
171
+ function assertUnreachable(_) {
172
+ throw new Error("Didn't expect to get here");
173
+ }
174
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.zoomTo/info.ts"],"names":[],"mappings":";;AAIA,4BA0KC;AA5KD,uEAA+E;AAE/E,mBAAwB,EACtB,eAAe,EACf,UAAU,EAAE,EAAE,CAAC,EAAE,GACJ;IACb,OAAO,eAAe,CAAwD;QAC5E,UAAU,EAAE,kBAAkB;QAC9B,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,mEAAmE;QAChF,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,IAAI;aACZ;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,iBAAiB;gBACvB,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;oBACpB,OAAO,KAAK,CAAA;gBACd,CAAC;aACF;SACF;QACD,eAAe,EAAE,UAA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EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;yBACrE;qBACF;iBACF;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,+CAA+C;oBACrD,IAAI,EAAE;wBACJ,IAAI,EAAE,SAAS;wBACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;wBACvC,YAAY,EAAE,GAAG;wBACjB,QAAQ,EAAE,IAAI;qBACf;iBACF;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,wCAAwC;oBAC9C,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,YAAY,EAAE,aAAa;wBAC3B,OAAO,EAAE;4BACP,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE;4BACtC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE;4BACxC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;4BAC1C,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE;yBACjD;wBACD,QAAQ,EAAE,IAAI;qBACf;iBACF;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,4BAA4B;oBAClC,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACf;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { components, paths } from "./types";
2
+ import type { HardwareAccelerationType } from "@norskvideo/norsk-studio/lib/shared/config";
3
+ export type ZoomToConfig = components['schemas']['zoomToConfig'] & {
4
+ __global: {
5
+ hardware?: HardwareAccelerationType;
6
+ };
7
+ };
8
+ export type ZoomToState = components['schemas']['zoomToState'];
9
+ export type ZoomToCommand = components['schemas']['zoomToCommand'];
10
+ export type ZoomToEvent = components['schemas']['zoomToEvent'];
11
+ export type ZoomToApi = paths;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=runtime-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-types.js","sourceRoot":"","sources":["../../src/processor.zoomTo/runtime-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ import { Norsk, StreamKeyOverrideNode, VideoComposeNode, VideoStreamMetadata } from '@norskvideo/norsk-sdk';
2
+ import { CreatedMediaNode, InstanceRouteInfo, OnCreated, RelatedMediaNodes, RuntimeUpdates, ServerComponentDefinition, ServerComponentSchemas, StudioComponentInputStream, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
3
+ import { ZoomToConfig, ZoomToState, ZoomToCommand, ZoomToEvent } from './runtime-types';
4
+ export default class ZoomToDefinition implements ServerComponentDefinition<ZoomToConfig, ZoomTo, ZoomToState, ZoomToCommand, ZoomToEvent> {
5
+ create(norsk: Norsk, cfg: ZoomToConfig, cb: OnCreated<ZoomTo>, runtime: StudioRuntime<ZoomToState, ZoomToCommand, ZoomToEvent>): Promise<void>;
6
+ handleCommand(node: ZoomTo, command: ZoomToCommand): Promise<void>;
7
+ schemas(): Promise<ServerComponentSchemas>;
8
+ instanceRoutes(): Promise<InstanceRouteInfo<ZoomToConfig, ZoomTo, ZoomToState, ZoomToCommand, ZoomToEvent>[]>;
9
+ }
10
+ export declare class ZoomTo implements CreatedMediaNode {
11
+ id: string;
12
+ relatedMediaNodes: RelatedMediaNodes;
13
+ norsk: Norsk;
14
+ cfg: ZoomToConfig;
15
+ videoSource?: StudioComponentInputStream;
16
+ composeNode?: VideoComposeNode<"video">;
17
+ initialised: Promise<void>;
18
+ updates: RuntimeUpdates<ZoomToState, ZoomToCommand, ZoomToEvent>;
19
+ currentVideo?: VideoStreamMetadata;
20
+ output?: StreamKeyOverrideNode;
21
+ currentOffsetX: number;
22
+ currentOffsetY: number;
23
+ currentWidth: number;
24
+ currentHeight: number;
25
+ targetOffsetX: number;
26
+ targetOffsetY: number;
27
+ targetWidth: number;
28
+ targetHeight: number;
29
+ transitioning: boolean;
30
+ static create(norsk: Norsk, cfg: ZoomToConfig, updates: RuntimeUpdates<ZoomToState, ZoomToCommand, ZoomToEvent>): Promise<ZoomTo>;
31
+ constructor(norsk: Norsk, cfg: ZoomToConfig, updates: RuntimeUpdates<ZoomToState, ZoomToCommand, ZoomToEvent>);
32
+ initialise(): Promise<void>;
33
+ private updateZoomState;
34
+ private updateVideoState;
35
+ subscribe(sources: StudioComponentInputStream[]): Promise<void>;
36
+ handleContext(): Promise<void>;
37
+ private createVideoPart;
38
+ private doSubs;
39
+ updateZoom(command: ZoomToCommand): Promise<void>;
40
+ }
41
+ declare module '@norskvideo/norsk-studio/lib/extension/runtime-types' {
42
+ interface RuntimeState {
43
+ [key: string]: ZoomToState;
44
+ }
45
+ }