@norskvideo/norsk-studio-built-ins 1.27.0-2025-07-06-336ac6c6 → 1.27.0-2025-07-08-02bba8fe

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 (106) hide show
  1. package/client/info.js +226 -7
  2. package/client/style.css +8 -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 +204 -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 +80 -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 +136 -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 +257 -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 +79 -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 +28 -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 +177 -104
  35. package/lib/output.autoCmaf/info.js +20 -0
  36. package/lib/output.autoCmaf/info.js.map +1 -1
  37. package/lib/output.autoCmaf/runtime.d.ts +2 -1
  38. package/lib/output.autoCmaf/runtime.js +35 -7
  39. package/lib/output.autoCmaf/runtime.js.map +1 -1
  40. package/lib/output.autoCmaf/types.d.ts +1 -0
  41. package/lib/output.autoCmaf/types.yaml +3 -0
  42. package/lib/output.cmafMultiVariant/runtime.js +2 -2
  43. package/lib/output.cmafMultiVariant/runtime.js.map +1 -1
  44. package/lib/output.cmafPlaylist/info.js +19 -0
  45. package/lib/output.cmafPlaylist/info.js.map +1 -1
  46. package/lib/output.cmafPlaylist/runtime.js +6 -3
  47. package/lib/output.cmafPlaylist/runtime.js.map +1 -1
  48. package/lib/output.cmafPlaylist/types.d.ts +1 -0
  49. package/lib/output.cmafPlaylist/types.yaml +3 -0
  50. package/lib/output.preview/runtime.js +2 -2
  51. package/lib/output.preview/runtime.js.map +1 -1
  52. package/lib/output.statistics/info.d.ts +172 -2
  53. package/lib/output.statistics/types.d.ts +400 -72
  54. package/lib/output.statistics/types.source.yaml +119 -0
  55. package/lib/output.statistics/types.yaml +331 -91
  56. package/lib/output.tsMediaPlaylist/runtime.js +2 -2
  57. package/lib/output.tsMediaPlaylist/runtime.js.map +1 -1
  58. package/lib/output.tsMultiVariant/runtime.js +1 -1
  59. package/lib/output.tsMultiVariant/runtime.js.map +1 -1
  60. package/lib/output.whep/runtime.js +3 -1
  61. package/lib/output.whep/runtime.js.map +1 -1
  62. package/lib/processor.audioEncoder/info.d.ts +10 -2
  63. package/lib/processor.audioEncoder/types.d.ts +23 -12
  64. package/lib/processor.audioEncoder/types.source.yaml +78 -0
  65. package/lib/processor.audioEncoder/types.yaml +101 -29
  66. package/lib/processor.fixedLadder/info.d.ts +182 -7
  67. package/lib/processor.fixedLadder/types.d.ts +619 -19
  68. package/lib/processor.fixedLadder/types.source.yaml +462 -0
  69. package/lib/processor.fixedLadder/types.yaml +334 -115
  70. package/lib/processor.makeProgram/info.d.ts +1 -0
  71. package/lib/processor.makeProgram/info.js +9 -0
  72. package/lib/processor.makeProgram/info.js.map +1 -1
  73. package/lib/processor.makeProgram/runtime.d.ts +2 -1
  74. package/lib/processor.makeProgram/runtime.js +14 -1
  75. package/lib/processor.makeProgram/runtime.js.map +1 -1
  76. package/lib/processor.makeProgram/types.d.ts +1 -0
  77. package/lib/processor.makeProgram/types.yaml +3 -1
  78. package/lib/processor.smartSingleMediaSwitch/info.d.ts +12 -4
  79. package/lib/processor.smartSingleMediaSwitch/types.d.ts +22 -18
  80. package/lib/processor.smartSingleMediaSwitch/types.source.yaml +115 -0
  81. package/lib/processor.smartSingleMediaSwitch/types.yaml +145 -50
  82. package/lib/processor.smartSourceSwitch/info.d.ts +12 -4
  83. package/lib/processor.smartSourceSwitch/types.d.ts +22 -18
  84. package/lib/processor.smartSourceSwitch/types.source.yaml +97 -0
  85. package/lib/processor.smartSourceSwitch/types.yaml +142 -48
  86. package/lib/processor.syncExternalAudio/info.d.ts +1 -0
  87. package/lib/processor.syncExternalAudio/types.d.ts +1 -0
  88. package/lib/processor.zoomTo/info.d.ts +54 -0
  89. package/lib/processor.zoomTo/info.js +172 -0
  90. package/lib/processor.zoomTo/info.js.map +1 -0
  91. package/lib/processor.zoomTo/runtime-types.d.ts +11 -0
  92. package/lib/processor.zoomTo/runtime-types.js +3 -0
  93. package/lib/processor.zoomTo/runtime-types.js.map +1 -0
  94. package/lib/processor.zoomTo/runtime.d.ts +45 -0
  95. package/lib/processor.zoomTo/runtime.js +307 -0
  96. package/lib/processor.zoomTo/runtime.js.map +1 -0
  97. package/lib/processor.zoomTo/types.d.ts +182 -0
  98. package/lib/processor.zoomTo/types.js +3 -0
  99. package/lib/processor.zoomTo/types.js.map +1 -0
  100. package/lib/processor.zoomTo/types.yaml +356 -0
  101. package/lib/test/auto-cmaf.js +7 -4
  102. package/lib/test/auto-cmaf.js.map +1 -1
  103. package/lib/test/zoom-to.d.ts +1 -0
  104. package/lib/test/zoom-to.js +345 -0
  105. package/lib/test/zoom-to.js.map +1 -0
  106. package/package.json +3 -3
@@ -0,0 +1,97 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Smart Source 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: string
31
+ required:
32
+ - id
33
+ - displayName
34
+ - resolution
35
+ - frameRate
36
+ - sampleRate
37
+ - channelLayout
38
+ - sources
39
+
40
+ state:
41
+ type: object
42
+ properties:
43
+ activeSource:
44
+ type: string
45
+ availableSources:
46
+ type: array
47
+ items:
48
+ type: string
49
+ required:
50
+ - activeSource
51
+ - availableSources
52
+
53
+ Commands:
54
+ type: object
55
+ description: Currently no commands are implemented
56
+
57
+ Events:
58
+ 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
@@ -2,9 +2,7 @@ openapi: 3.0.0
2
2
  info:
3
3
  title: Smart Source Switch Processor Component
4
4
  version: 1.0.0
5
-
6
5
  paths: {}
7
-
8
6
  components:
9
7
  schemas:
10
8
  config:
@@ -17,13 +15,112 @@ components:
17
15
  notes:
18
16
  type: string
19
17
  resolution:
20
- $ref: '../../../core/src/types/base.yml#/components/schemas/Resolution'
18
+ type: object
19
+ description: Video resolution with width and height dimensions
20
+ properties:
21
+ width:
22
+ type: integer
23
+ minimum: 1
24
+ description: Width in pixels
25
+ height:
26
+ type: integer
27
+ minimum: 1
28
+ description: Height in pixels
29
+ required:
30
+ - width
31
+ - height
21
32
  frameRate:
22
- $ref: '../../../core/src/types/base.yml#/components/schemas/FrameRate'
33
+ type: object
34
+ properties:
35
+ frames:
36
+ type: integer
37
+ seconds:
38
+ type: integer
39
+ required:
40
+ - frames
41
+ - seconds
23
42
  sampleRate:
24
- $ref: '../../../core/src/types/base.yml#/components/schemas/SampleRate'
43
+ type: integer
44
+ enum:
45
+ - 8000
46
+ - 11025
47
+ - 12000
48
+ - 16000
49
+ - 22050
50
+ - 24000
51
+ - 32000
52
+ - 44100
53
+ - 48000
54
+ - 64000
55
+ - 88200
56
+ - 96000
57
+ description: Possible sample rates in Hz.
58
+ example: 48000
25
59
  channelLayout:
26
- $ref: '../../../core/src/types/base.yml#/components/schemas/ChannelLayout'
60
+ description: Channel layout for an audio stream. Can be one of several string
61
+ presets, an array of channel names, or an object with a single
62
+ property.
63
+ oneOf:
64
+ - type: string
65
+ enum:
66
+ - mono
67
+ - stereo
68
+ - surround
69
+ - "4.0"
70
+ - "5.0"
71
+ - "5.1"
72
+ - "7.1"
73
+ - 5.1.4
74
+ - 7.1.4
75
+ - type: array
76
+ items: &a1
77
+ type: string
78
+ enum:
79
+ - l
80
+ - r
81
+ - c
82
+ - lfe
83
+ - ls
84
+ - rs
85
+ - lc
86
+ - rc
87
+ - lsr
88
+ - rsr
89
+ - cs
90
+ - lsd
91
+ - rsd
92
+ - lss
93
+ - rss
94
+ - lw
95
+ - rw
96
+ - lv
97
+ - rv
98
+ - cv
99
+ - lvr
100
+ - rvr
101
+ - cvr
102
+ - lvss
103
+ - rvss
104
+ - ts
105
+ - lfe2
106
+ - lb
107
+ - rb
108
+ - cb
109
+ - lvs
110
+ - rvs
111
+ - lfe3
112
+ - leos
113
+ - reos
114
+ - hwbcal
115
+ - hwbcar
116
+ - lbs
117
+ - rbs
118
+ - unknown
119
+ - type: object
120
+ properties:
121
+ single: *a1
122
+ required:
123
+ - single
27
124
  sources:
28
125
  type: array
29
126
  items:
@@ -36,7 +133,6 @@ components:
36
133
  - sampleRate
37
134
  - channelLayout
38
135
  - sources
39
-
40
136
  state:
41
137
  type: object
42
138
  properties:
@@ -49,49 +145,47 @@ components:
49
145
  required:
50
146
  - activeSource
51
147
  - availableSources
52
-
53
148
  Commands:
54
149
  type: object
55
150
  description: Currently no commands are implemented
56
-
57
151
  Events:
58
152
  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
153
+ - &a2
154
+ type: object
155
+ properties:
156
+ type:
157
+ type: string
158
+ enum:
159
+ - active-source-changed
160
+ activeSource:
161
+ type: string
162
+ required:
163
+ - type
164
+ - activeSource
165
+ - &a3
166
+ type: object
167
+ properties:
168
+ type:
169
+ type: string
170
+ enum:
171
+ - source-online
172
+ source:
173
+ type: string
174
+ required:
175
+ - type
176
+ - source
177
+ - &a4
178
+ type: object
179
+ properties:
180
+ type:
181
+ type: string
182
+ enum:
183
+ - source-offline
184
+ source:
185
+ type: string
186
+ required:
187
+ - type
188
+ - source
189
+ ActiveSourceChangedEvent: *a2
190
+ SourceOnlineEvent: *a3
191
+ SourceOfflineEvent: *a4
@@ -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;
@@ -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,172 @@
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: "simple-stream",
18
+ video: true,
19
+ },
20
+ },
21
+ extraValidation: function (ctx) {
22
+ ctx.requireVideo(1);
23
+ const { offsetX, offsetY, width, height } = ctx.config;
24
+ if (offsetX + width > 100) {
25
+ ctx.addError("Crop region extends beyond right edge (offsetX + width > 100%)");
26
+ }
27
+ if (offsetY + height > 100) {
28
+ ctx.addError("Crop region extends beyond bottom edge (offsetY + height > 100%)");
29
+ }
30
+ },
31
+ display: (desc) => {
32
+ const { offsetX, offsetY, width, height } = desc.config;
33
+ return {
34
+ default: `${width}×${height}% @ ${offsetX},${offsetY}%`,
35
+ };
36
+ },
37
+ runtime: {
38
+ initialState: () => ({
39
+ currentOffsetX: 0,
40
+ currentOffsetY: 0,
41
+ currentWidth: 100,
42
+ currentHeight: 100,
43
+ targetOffsetX: 0,
44
+ targetOffsetY: 0,
45
+ targetWidth: 100,
46
+ targetHeight: 100,
47
+ transitioning: false,
48
+ hasInputVideo: false,
49
+ inputVideoResolution: undefined,
50
+ inputVideoFrameRate: undefined,
51
+ inputVideoAspectRatio: undefined
52
+ }),
53
+ handleEvent: (ev, state) => {
54
+ const evType = ev.type;
55
+ switch (evType) {
56
+ case "zoom-updated":
57
+ return {
58
+ ...state,
59
+ currentOffsetX: ev.currentOffsetX,
60
+ currentOffsetY: ev.currentOffsetY,
61
+ currentWidth: ev.currentWidth,
62
+ currentHeight: ev.currentHeight,
63
+ targetOffsetX: ev.targetOffsetX,
64
+ targetOffsetY: ev.targetOffsetY,
65
+ targetWidth: ev.targetWidth,
66
+ targetHeight: ev.targetHeight,
67
+ transitioning: ev.transitioning
68
+ };
69
+ case "transition-complete":
70
+ return { ...state, transitioning: false };
71
+ case "input-video-changed":
72
+ return {
73
+ ...state,
74
+ hasInputVideo: ev.hasInputVideo,
75
+ inputVideoResolution: ev.inputVideoResolution,
76
+ inputVideoFrameRate: ev.inputVideoFrameRate,
77
+ inputVideoAspectRatio: ev.inputVideoAspectRatio
78
+ };
79
+ default:
80
+ assertUnreachable(evType);
81
+ }
82
+ }
83
+ },
84
+ configForm: {
85
+ global: {
86
+ hardware: (0, config_1.HardwareSelection)(),
87
+ },
88
+ form: {
89
+ offsetX: {
90
+ help: "Horizontal offset of crop region as percentage (0-100)",
91
+ hint: {
92
+ type: "numeric",
93
+ validation: Z.number().min(0).max(100),
94
+ defaultValue: 0,
95
+ },
96
+ },
97
+ offsetY: {
98
+ help: "Vertical offset of crop region as percentage (0-100)",
99
+ hint: {
100
+ type: "numeric",
101
+ validation: Z.number().min(0).max(100),
102
+ defaultValue: 0,
103
+ },
104
+ },
105
+ width: {
106
+ help: "Width of crop region as percentage (1-100)",
107
+ hint: {
108
+ type: "numeric",
109
+ validation: Z.number().min(1).max(100),
110
+ defaultValue: 100,
111
+ },
112
+ },
113
+ height: {
114
+ help: "Height of crop region as percentage (1-100)",
115
+ hint: {
116
+ type: "numeric",
117
+ validation: Z.number().min(1).max(100),
118
+ defaultValue: 100,
119
+ },
120
+ },
121
+ outputResolution: {
122
+ help: "Output resolution (fixed after initialization)",
123
+ hint: {
124
+ type: "select",
125
+ defaultValue: { width: 1920, height: 1080 },
126
+ options: [
127
+ { value: { width: 1280, height: 720 }, display: "1280×720 (HD)" },
128
+ { value: { width: 1920, height: 1080 }, display: "1920×1080 (Full HD)" },
129
+ { value: { width: 3840, height: 2160 }, display: "3840×2160 (4K)" },
130
+ { value: { width: 1920, height: 1200 }, display: "1920×1200 (WUXGA)" },
131
+ { value: { width: 2560, height: 1440 }, display: "2560×1440 (QHD)" },
132
+ ],
133
+ },
134
+ },
135
+ transitionDurationMs: {
136
+ help: "Duration for zoom transitions in milliseconds",
137
+ hint: {
138
+ type: "numeric",
139
+ validation: Z.number().min(0).max(5000),
140
+ defaultValue: 300,
141
+ optional: true,
142
+ },
143
+ },
144
+ transitionEasing: {
145
+ help: "Easing function for smooth transitions",
146
+ hint: {
147
+ type: "select",
148
+ defaultValue: "ease_in_out",
149
+ options: [
150
+ { value: "linear", display: "Linear" },
151
+ { value: "ease_in", display: "Ease In" },
152
+ { value: "ease_out", display: "Ease Out" },
153
+ { value: "ease_in_out", display: "Ease In-Out" },
154
+ ],
155
+ optional: true,
156
+ },
157
+ },
158
+ notes: {
159
+ help: "Notes about this component",
160
+ hint: {
161
+ type: "text",
162
+ optional: true,
163
+ },
164
+ },
165
+ },
166
+ },
167
+ });
168
+ }
169
+ function assertUnreachable(_) {
170
+ throw new Error("Didn't expect to get here");
171
+ }
172
+ //# sourceMappingURL=info.js.map
@@ -0,0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D;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, 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
+ currentOffsetX: number;
21
+ currentOffsetY: number;
22
+ currentWidth: number;
23
+ currentHeight: number;
24
+ targetOffsetX: number;
25
+ targetOffsetY: number;
26
+ targetWidth: number;
27
+ targetHeight: number;
28
+ transitioning: boolean;
29
+ static create(norsk: Norsk, cfg: ZoomToConfig, updates: RuntimeUpdates<ZoomToState, ZoomToCommand, ZoomToEvent>): Promise<ZoomTo>;
30
+ constructor(norsk: Norsk, cfg: ZoomToConfig, updates: RuntimeUpdates<ZoomToState, ZoomToCommand, ZoomToEvent>);
31
+ initialise(): Promise<void>;
32
+ private updateZoomState;
33
+ private updateVideoState;
34
+ subscribe(sources: StudioComponentInputStream[]): Promise<void>;
35
+ handleContext(): Promise<void>;
36
+ private createVideoPart;
37
+ private doSubs;
38
+ updateZoom(command: ZoomToCommand): Promise<void>;
39
+ close(): Promise<void>;
40
+ }
41
+ declare module '@norskvideo/norsk-studio/lib/extension/runtime-types' {
42
+ interface RuntimeState {
43
+ [key: string]: ZoomToState;
44
+ }
45
+ }