camstreamerlib 4.0.0-beta.2 → 4.0.0-beta.4

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 (162) hide show
  1. package/cjs/CamOverlayAPI.js +176 -0
  2. package/cjs/CamOverlayDrawingAPI.js +235 -0
  3. package/cjs/CamOverlayPainter/Frame.js +301 -0
  4. package/{CamOverlayPainter → cjs/CamOverlayPainter}/Painter.d.ts +14 -3
  5. package/cjs/CamOverlayPainter/Painter.js +171 -0
  6. package/cjs/CamOverlayPainter/ResourceManager.js +46 -0
  7. package/cjs/CamScripterAPI.js +70 -0
  8. package/cjs/CamScripterAPICameraEventsGenerator.js +162 -0
  9. package/cjs/CamStreamerAPI.js +65 -0
  10. package/{CamSwitcherAPI.d.ts → cjs/CamSwitcherAPI.d.ts} +3 -3
  11. package/cjs/CamSwitcherAPI.js +350 -0
  12. package/{CamSwitcherEvents.d.ts → cjs/CamSwitcherEvents.d.ts} +1 -1
  13. package/cjs/CamSwitcherEvents.js +67 -0
  14. package/cjs/CreatePackage.js +106 -0
  15. package/{VapixAPI.d.ts → cjs/VapixAPI.d.ts} +9 -9
  16. package/cjs/VapixAPI.js +462 -0
  17. package/cjs/VapixEvents.js +88 -0
  18. package/cjs/errors/errors.js +79 -0
  19. package/cjs/events/AxisCameraStationEvents.js +48 -0
  20. package/cjs/events/GenetecAgent.js +123 -0
  21. package/cjs/index.d.ts +11 -0
  22. package/cjs/index.js +31 -0
  23. package/cjs/internal/Digest.js +42 -0
  24. package/cjs/internal/ProxyClient.js +44 -0
  25. package/{internal → cjs/internal}/common.d.ts +0 -1
  26. package/cjs/internal/common.js +27 -0
  27. package/cjs/internal/constants.js +4 -0
  28. package/cjs/internal/transformers.js +32 -0
  29. package/cjs/internal/utils.js +46 -0
  30. package/cjs/internal/versionCompare.js +53 -0
  31. package/cjs/node/DefaultClient.js +54 -0
  32. package/cjs/node/HttpRequestSender.js +89 -0
  33. package/cjs/node/HttpServer.js +96 -0
  34. package/cjs/node/WsClient.js +149 -0
  35. package/cjs/node/WsEventClient.js +22 -0
  36. package/cjs/node/index.d.ts +2 -0
  37. package/cjs/node/index.js +7 -0
  38. package/cjs/types/CamOverlayAPI.js +47 -0
  39. package/cjs/types/CamScripterAPI.js +20 -0
  40. package/cjs/types/CamStreamerAPI.js +28 -0
  41. package/cjs/types/CamSwitcherAPI.js +137 -0
  42. package/cjs/types/CamSwitcherEvents.js +62 -0
  43. package/{types → cjs/types}/VapixAPI.d.ts +40 -61
  44. package/cjs/types/VapixAPI.js +130 -0
  45. package/cjs/types/common.js +14 -0
  46. package/cjs/web/DefaultClient.js +20 -0
  47. package/cjs/web/WsClient.js +62 -0
  48. package/cjs/web/index.d.ts +2 -0
  49. package/cjs/web/index.js +7 -0
  50. package/esm/CamOverlayAPI.d.ts +31 -0
  51. package/esm/CamOverlayDrawingAPI.d.ts +86 -0
  52. package/{CamOverlayDrawingAPI.js → esm/CamOverlayDrawingAPI.js} +6 -3
  53. package/esm/CamOverlayPainter/Frame.d.ts +96 -0
  54. package/esm/CamOverlayPainter/Painter.d.ts +48 -0
  55. package/{CamOverlayPainter → esm/CamOverlayPainter}/Painter.js +4 -1
  56. package/esm/CamOverlayPainter/ResourceManager.d.ts +14 -0
  57. package/{CamOverlayPainter → esm/CamOverlayPainter}/ResourceManager.js +6 -10
  58. package/esm/CamScripterAPI.d.ts +19 -0
  59. package/esm/CamScripterAPICameraEventsGenerator.d.ts +74 -0
  60. package/{CamScripterAPICameraEventsGenerator.js → esm/CamScripterAPICameraEventsGenerator.js} +6 -3
  61. package/esm/CamStreamerAPI.d.ts +16 -0
  62. package/esm/CamSwitcherAPI.d.ts +48 -0
  63. package/{CamSwitcherAPI.js → esm/CamSwitcherAPI.js} +19 -23
  64. package/esm/CamSwitcherEvents.d.ts +18 -0
  65. package/{CamSwitcherEvents.js → esm/CamSwitcherEvents.js} +1 -1
  66. package/esm/CreatePackage.d.ts +1 -0
  67. package/esm/VapixAPI.d.ts +66 -0
  68. package/{VapixAPI.js → esm/VapixAPI.js} +20 -16
  69. package/esm/VapixEvents.d.ts +43 -0
  70. package/{VapixEvents.js → esm/VapixEvents.js} +3 -3
  71. package/esm/errors/errors.d.ts +34 -0
  72. package/esm/events/AxisCameraStationEvents.d.ts +9 -0
  73. package/esm/events/GenetecAgent.d.ts +174 -0
  74. package/esm/index.d.ts +11 -0
  75. package/esm/index.js +11 -0
  76. package/esm/internal/Digest.d.ts +4 -0
  77. package/{internal → esm/internal}/Digest.js +6 -6
  78. package/esm/internal/ProxyClient.d.ts +11 -0
  79. package/esm/internal/common.d.ts +39 -0
  80. package/{internal → esm/internal}/common.js +0 -3
  81. package/esm/internal/constants.d.ts +1 -0
  82. package/esm/internal/transformers.d.ts +5 -0
  83. package/esm/internal/utils.d.ts +11 -0
  84. package/esm/internal/versionCompare.d.ts +6 -0
  85. package/esm/node/DefaultClient.d.ts +15 -0
  86. package/{node → esm/node}/DefaultClient.js +1 -1
  87. package/esm/node/HttpRequestSender.d.ts +28 -0
  88. package/esm/node/HttpServer.d.ts +21 -0
  89. package/{node → esm/node}/HttpServer.js +1 -1
  90. package/esm/node/WsClient.d.ts +39 -0
  91. package/esm/node/WsEventClient.d.ts +13 -0
  92. package/esm/node/index.d.ts +2 -0
  93. package/esm/node/index.js +2 -0
  94. package/esm/types/CamOverlayAPI.d.ts +188 -0
  95. package/esm/types/CamScripterAPI.d.ts +67 -0
  96. package/esm/types/CamStreamerAPI.d.ts +139 -0
  97. package/esm/types/CamSwitcherAPI.d.ts +814 -0
  98. package/esm/types/CamSwitcherEvents.d.ts +491 -0
  99. package/esm/types/VapixAPI.d.ts +1683 -0
  100. package/{types → esm/types}/VapixAPI.js +10 -12
  101. package/esm/types/common.d.ts +37 -0
  102. package/esm/web/DefaultClient.d.ts +6 -0
  103. package/esm/web/WsClient.d.ts +13 -0
  104. package/esm/web/index.d.ts +2 -0
  105. package/esm/web/index.js +2 -0
  106. package/package.json +6 -5
  107. package/README.md +0 -97
  108. /package/{CamOverlayAPI.d.ts → cjs/CamOverlayAPI.d.ts} +0 -0
  109. /package/{CamOverlayDrawingAPI.d.ts → cjs/CamOverlayDrawingAPI.d.ts} +0 -0
  110. /package/{CamOverlayPainter → cjs/CamOverlayPainter}/Frame.d.ts +0 -0
  111. /package/{CamOverlayPainter → cjs/CamOverlayPainter}/ResourceManager.d.ts +0 -0
  112. /package/{CamScripterAPI.d.ts → cjs/CamScripterAPI.d.ts} +0 -0
  113. /package/{CamScripterAPICameraEventsGenerator.d.ts → cjs/CamScripterAPICameraEventsGenerator.d.ts} +0 -0
  114. /package/{CamStreamerAPI.d.ts → cjs/CamStreamerAPI.d.ts} +0 -0
  115. /package/{CreatePackage.d.ts → cjs/CreatePackage.d.ts} +0 -0
  116. /package/{VapixEvents.d.ts → cjs/VapixEvents.d.ts} +0 -0
  117. /package/{errors → cjs/errors}/errors.d.ts +0 -0
  118. /package/{events → cjs/events}/AxisCameraStationEvents.d.ts +0 -0
  119. /package/{events → cjs/events}/GenetecAgent.d.ts +0 -0
  120. /package/{internal → cjs/internal}/Digest.d.ts +0 -0
  121. /package/{internal → cjs/internal}/ProxyClient.d.ts +0 -0
  122. /package/{internal → cjs/internal}/constants.d.ts +0 -0
  123. /package/{internal → cjs/internal}/transformers.d.ts +0 -0
  124. /package/{internal → cjs/internal}/utils.d.ts +0 -0
  125. /package/{internal → cjs/internal}/versionCompare.d.ts +0 -0
  126. /package/{node → cjs/node}/DefaultClient.d.ts +0 -0
  127. /package/{node → cjs/node}/HttpRequestSender.d.ts +0 -0
  128. /package/{node → cjs/node}/HttpServer.d.ts +0 -0
  129. /package/{node → cjs/node}/WsClient.d.ts +0 -0
  130. /package/{node → cjs/node}/WsEventClient.d.ts +0 -0
  131. /package/{types → cjs/types}/CamOverlayAPI.d.ts +0 -0
  132. /package/{types → cjs/types}/CamScripterAPI.d.ts +0 -0
  133. /package/{types → cjs/types}/CamStreamerAPI.d.ts +0 -0
  134. /package/{types → cjs/types}/CamSwitcherAPI.d.ts +0 -0
  135. /package/{types/CamswitcherEvents.d.ts → cjs/types/CamSwitcherEvents.d.ts} +0 -0
  136. /package/{types → cjs/types}/common.d.ts +0 -0
  137. /package/{web → cjs/web}/DefaultClient.d.ts +0 -0
  138. /package/{web → cjs/web}/WsClient.d.ts +0 -0
  139. /package/{CamOverlayAPI.js → esm/CamOverlayAPI.js} +0 -0
  140. /package/{CamOverlayPainter → esm/CamOverlayPainter}/Frame.js +0 -0
  141. /package/{CamScripterAPI.js → esm/CamScripterAPI.js} +0 -0
  142. /package/{CamStreamerAPI.js → esm/CamStreamerAPI.js} +0 -0
  143. /package/{CreatePackage.js → esm/CreatePackage.js} +0 -0
  144. /package/{errors → esm/errors}/errors.js +0 -0
  145. /package/{events → esm/events}/AxisCameraStationEvents.js +0 -0
  146. /package/{events → esm/events}/GenetecAgent.js +0 -0
  147. /package/{internal → esm/internal}/ProxyClient.js +0 -0
  148. /package/{internal → esm/internal}/constants.js +0 -0
  149. /package/{internal → esm/internal}/transformers.js +0 -0
  150. /package/{internal → esm/internal}/utils.js +0 -0
  151. /package/{internal → esm/internal}/versionCompare.js +0 -0
  152. /package/{node → esm/node}/HttpRequestSender.js +0 -0
  153. /package/{node → esm/node}/WsClient.js +0 -0
  154. /package/{node → esm/node}/WsEventClient.js +0 -0
  155. /package/{types → esm/types}/CamOverlayAPI.js +0 -0
  156. /package/{types → esm/types}/CamScripterAPI.js +0 -0
  157. /package/{types → esm/types}/CamStreamerAPI.js +0 -0
  158. /package/{types → esm/types}/CamSwitcherAPI.js +0 -0
  159. /package/{types/CamswitcherEvents.js → esm/types/CamSwitcherEvents.js} +0 -0
  160. /package/{types → esm/types}/common.js +0 -0
  161. /package/{web → esm/web}/DefaultClient.js +0 -0
  162. /package/{web → esm/web}/WsClient.js +0 -0
@@ -0,0 +1,491 @@
1
+ import { z } from 'zod';
2
+ declare const cswEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3
+ type: z.ZodLiteral<"authorization">;
4
+ state: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ type: "authorization";
7
+ state: string;
8
+ }, {
9
+ type: "authorization";
10
+ state: string;
11
+ }>, z.ZodObject<{
12
+ type: z.ZodLiteral<"PlaylistSwitch">;
13
+ playlist_name: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ type: "PlaylistSwitch";
16
+ playlist_name: string;
17
+ }, {
18
+ type: "PlaylistSwitch";
19
+ playlist_name: string;
20
+ }>, z.ZodObject<{
21
+ type: z.ZodLiteral<"StreamAvailable">;
22
+ stream_name: z.ZodString;
23
+ state: z.ZodBoolean;
24
+ }, "strip", z.ZodTypeAny, {
25
+ type: "StreamAvailable";
26
+ stream_name: string;
27
+ state: boolean;
28
+ }, {
29
+ type: "StreamAvailable";
30
+ stream_name: string;
31
+ state: boolean;
32
+ }>, z.ZodObject<{
33
+ type: z.ZodLiteral<"StreamSwitchAudio">;
34
+ stream_name: z.ZodOptional<z.ZodString>;
35
+ clip_name: z.ZodOptional<z.ZodString>;
36
+ master_audio: z.ZodBoolean;
37
+ }, "strip", z.ZodTypeAny, {
38
+ type: "StreamSwitchAudio";
39
+ master_audio: boolean;
40
+ stream_name?: string | undefined;
41
+ clip_name?: string | undefined;
42
+ }, {
43
+ type: "StreamSwitchAudio";
44
+ master_audio: boolean;
45
+ stream_name?: string | undefined;
46
+ clip_name?: string | undefined;
47
+ }>, z.ZodObject<{
48
+ type: z.ZodLiteral<"StreamSwitchAudioError">;
49
+ stream_name: z.ZodOptional<z.ZodString>;
50
+ clip_name: z.ZodOptional<z.ZodString>;
51
+ master_audio: z.ZodBoolean;
52
+ }, "strip", z.ZodTypeAny, {
53
+ type: "StreamSwitchAudioError";
54
+ master_audio: boolean;
55
+ stream_name?: string | undefined;
56
+ clip_name?: string | undefined;
57
+ }, {
58
+ type: "StreamSwitchAudioError";
59
+ master_audio: boolean;
60
+ stream_name?: string | undefined;
61
+ clip_name?: string | undefined;
62
+ }>, z.ZodObject<{
63
+ type: z.ZodLiteral<"StreamSwitchVideo">;
64
+ playlist_active_stream: z.ZodNumber;
65
+ stream_name: z.ZodOptional<z.ZodString>;
66
+ playlist_name: z.ZodOptional<z.ZodString>;
67
+ clip_name: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ type: "StreamSwitchVideo";
70
+ playlist_active_stream: number;
71
+ stream_name?: string | undefined;
72
+ clip_name?: string | undefined;
73
+ playlist_name?: string | undefined;
74
+ }, {
75
+ type: "StreamSwitchVideo";
76
+ playlist_active_stream: number;
77
+ stream_name?: string | undefined;
78
+ clip_name?: string | undefined;
79
+ playlist_name?: string | undefined;
80
+ }>, z.ZodObject<{
81
+ type: z.ZodLiteral<"PlaylistQueueChange">;
82
+ queue: z.ZodArray<z.ZodString, "many">;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "PlaylistQueueChange";
85
+ queue: string[];
86
+ }, {
87
+ type: "PlaylistQueueChange";
88
+ queue: string[];
89
+ }>, z.ZodObject<{
90
+ type: z.ZodLiteral<"ClipUpload">;
91
+ clip_name: z.ZodOptional<z.ZodString>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ type: "ClipUpload";
94
+ clip_name?: string | undefined;
95
+ }, {
96
+ type: "ClipUpload";
97
+ clip_name?: string | undefined;
98
+ }>, z.ZodObject<{
99
+ type: z.ZodLiteral<"SwitcherStop">;
100
+ default_playlist_id: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ type: "SwitcherStop";
103
+ default_playlist_id?: string | undefined;
104
+ }, {
105
+ type: "SwitcherStop";
106
+ default_playlist_id?: string | undefined;
107
+ }>, z.ZodObject<{
108
+ type: z.ZodLiteral<"SwitcherStart">;
109
+ default_playlist_id: z.ZodOptional<z.ZodString>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ type: "SwitcherStart";
112
+ default_playlist_id?: string | undefined;
113
+ }, {
114
+ type: "SwitcherStart";
115
+ default_playlist_id?: string | undefined;
116
+ }>, z.ZodObject<{
117
+ type: z.ZodLiteral<"MediaServerStarted">;
118
+ }, "strip", z.ZodTypeAny, {
119
+ type: "MediaServerStarted";
120
+ }, {
121
+ type: "MediaServerStarted";
122
+ }>, z.ZodObject<{
123
+ type: z.ZodLiteral<"ClipRemove">;
124
+ clip_name: z.ZodString;
125
+ }, "strip", z.ZodTypeAny, {
126
+ type: "ClipRemove";
127
+ clip_name: string;
128
+ }, {
129
+ type: "ClipRemove";
130
+ clip_name: string;
131
+ }>]>;
132
+ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
133
+ type: z.ZodLiteral<"init">;
134
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
135
+ type: z.ZodLiteral<"authorization">;
136
+ state: z.ZodString;
137
+ }, "strip", z.ZodTypeAny, {
138
+ type: "authorization";
139
+ state: string;
140
+ }, {
141
+ type: "authorization";
142
+ state: string;
143
+ }>, z.ZodObject<{
144
+ type: z.ZodLiteral<"PlaylistSwitch">;
145
+ playlist_name: z.ZodString;
146
+ }, "strip", z.ZodTypeAny, {
147
+ type: "PlaylistSwitch";
148
+ playlist_name: string;
149
+ }, {
150
+ type: "PlaylistSwitch";
151
+ playlist_name: string;
152
+ }>, z.ZodObject<{
153
+ type: z.ZodLiteral<"StreamAvailable">;
154
+ stream_name: z.ZodString;
155
+ state: z.ZodBoolean;
156
+ }, "strip", z.ZodTypeAny, {
157
+ type: "StreamAvailable";
158
+ stream_name: string;
159
+ state: boolean;
160
+ }, {
161
+ type: "StreamAvailable";
162
+ stream_name: string;
163
+ state: boolean;
164
+ }>, z.ZodObject<{
165
+ type: z.ZodLiteral<"StreamSwitchAudio">;
166
+ stream_name: z.ZodOptional<z.ZodString>;
167
+ clip_name: z.ZodOptional<z.ZodString>;
168
+ master_audio: z.ZodBoolean;
169
+ }, "strip", z.ZodTypeAny, {
170
+ type: "StreamSwitchAudio";
171
+ master_audio: boolean;
172
+ stream_name?: string | undefined;
173
+ clip_name?: string | undefined;
174
+ }, {
175
+ type: "StreamSwitchAudio";
176
+ master_audio: boolean;
177
+ stream_name?: string | undefined;
178
+ clip_name?: string | undefined;
179
+ }>, z.ZodObject<{
180
+ type: z.ZodLiteral<"StreamSwitchAudioError">;
181
+ stream_name: z.ZodOptional<z.ZodString>;
182
+ clip_name: z.ZodOptional<z.ZodString>;
183
+ master_audio: z.ZodBoolean;
184
+ }, "strip", z.ZodTypeAny, {
185
+ type: "StreamSwitchAudioError";
186
+ master_audio: boolean;
187
+ stream_name?: string | undefined;
188
+ clip_name?: string | undefined;
189
+ }, {
190
+ type: "StreamSwitchAudioError";
191
+ master_audio: boolean;
192
+ stream_name?: string | undefined;
193
+ clip_name?: string | undefined;
194
+ }>, z.ZodObject<{
195
+ type: z.ZodLiteral<"StreamSwitchVideo">;
196
+ playlist_active_stream: z.ZodNumber;
197
+ stream_name: z.ZodOptional<z.ZodString>;
198
+ playlist_name: z.ZodOptional<z.ZodString>;
199
+ clip_name: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ type: "StreamSwitchVideo";
202
+ playlist_active_stream: number;
203
+ stream_name?: string | undefined;
204
+ clip_name?: string | undefined;
205
+ playlist_name?: string | undefined;
206
+ }, {
207
+ type: "StreamSwitchVideo";
208
+ playlist_active_stream: number;
209
+ stream_name?: string | undefined;
210
+ clip_name?: string | undefined;
211
+ playlist_name?: string | undefined;
212
+ }>, z.ZodObject<{
213
+ type: z.ZodLiteral<"PlaylistQueueChange">;
214
+ queue: z.ZodArray<z.ZodString, "many">;
215
+ }, "strip", z.ZodTypeAny, {
216
+ type: "PlaylistQueueChange";
217
+ queue: string[];
218
+ }, {
219
+ type: "PlaylistQueueChange";
220
+ queue: string[];
221
+ }>, z.ZodObject<{
222
+ type: z.ZodLiteral<"ClipUpload">;
223
+ clip_name: z.ZodOptional<z.ZodString>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ type: "ClipUpload";
226
+ clip_name?: string | undefined;
227
+ }, {
228
+ type: "ClipUpload";
229
+ clip_name?: string | undefined;
230
+ }>, z.ZodObject<{
231
+ type: z.ZodLiteral<"SwitcherStop">;
232
+ default_playlist_id: z.ZodOptional<z.ZodString>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ type: "SwitcherStop";
235
+ default_playlist_id?: string | undefined;
236
+ }, {
237
+ type: "SwitcherStop";
238
+ default_playlist_id?: string | undefined;
239
+ }>, z.ZodObject<{
240
+ type: z.ZodLiteral<"SwitcherStart">;
241
+ default_playlist_id: z.ZodOptional<z.ZodString>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: "SwitcherStart";
244
+ default_playlist_id?: string | undefined;
245
+ }, {
246
+ type: "SwitcherStart";
247
+ default_playlist_id?: string | undefined;
248
+ }>, z.ZodObject<{
249
+ type: z.ZodLiteral<"MediaServerStarted">;
250
+ }, "strip", z.ZodTypeAny, {
251
+ type: "MediaServerStarted";
252
+ }, {
253
+ type: "MediaServerStarted";
254
+ }>, z.ZodObject<{
255
+ type: z.ZodLiteral<"ClipRemove">;
256
+ clip_name: z.ZodString;
257
+ }, "strip", z.ZodTypeAny, {
258
+ type: "ClipRemove";
259
+ clip_name: string;
260
+ }, {
261
+ type: "ClipRemove";
262
+ clip_name: string;
263
+ }>]>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ type: "init";
266
+ data: {
267
+ type: "authorization";
268
+ state: string;
269
+ } | {
270
+ type: "PlaylistSwitch";
271
+ playlist_name: string;
272
+ } | {
273
+ type: "StreamAvailable";
274
+ stream_name: string;
275
+ state: boolean;
276
+ } | {
277
+ type: "StreamSwitchAudio";
278
+ master_audio: boolean;
279
+ stream_name?: string | undefined;
280
+ clip_name?: string | undefined;
281
+ } | {
282
+ type: "StreamSwitchAudioError";
283
+ master_audio: boolean;
284
+ stream_name?: string | undefined;
285
+ clip_name?: string | undefined;
286
+ } | {
287
+ type: "StreamSwitchVideo";
288
+ playlist_active_stream: number;
289
+ stream_name?: string | undefined;
290
+ clip_name?: string | undefined;
291
+ playlist_name?: string | undefined;
292
+ } | {
293
+ type: "PlaylistQueueChange";
294
+ queue: string[];
295
+ } | {
296
+ type: "ClipUpload";
297
+ clip_name?: string | undefined;
298
+ } | {
299
+ type: "SwitcherStop";
300
+ default_playlist_id?: string | undefined;
301
+ } | {
302
+ type: "SwitcherStart";
303
+ default_playlist_id?: string | undefined;
304
+ } | {
305
+ type: "MediaServerStarted";
306
+ } | {
307
+ type: "ClipRemove";
308
+ clip_name: string;
309
+ };
310
+ }, {
311
+ type: "init";
312
+ data: {
313
+ type: "authorization";
314
+ state: string;
315
+ } | {
316
+ type: "PlaylistSwitch";
317
+ playlist_name: string;
318
+ } | {
319
+ type: "StreamAvailable";
320
+ stream_name: string;
321
+ state: boolean;
322
+ } | {
323
+ type: "StreamSwitchAudio";
324
+ master_audio: boolean;
325
+ stream_name?: string | undefined;
326
+ clip_name?: string | undefined;
327
+ } | {
328
+ type: "StreamSwitchAudioError";
329
+ master_audio: boolean;
330
+ stream_name?: string | undefined;
331
+ clip_name?: string | undefined;
332
+ } | {
333
+ type: "StreamSwitchVideo";
334
+ playlist_active_stream: number;
335
+ stream_name?: string | undefined;
336
+ clip_name?: string | undefined;
337
+ playlist_name?: string | undefined;
338
+ } | {
339
+ type: "PlaylistQueueChange";
340
+ queue: string[];
341
+ } | {
342
+ type: "ClipUpload";
343
+ clip_name?: string | undefined;
344
+ } | {
345
+ type: "SwitcherStop";
346
+ default_playlist_id?: string | undefined;
347
+ } | {
348
+ type: "SwitcherStart";
349
+ default_playlist_id?: string | undefined;
350
+ } | {
351
+ type: "MediaServerStarted";
352
+ } | {
353
+ type: "ClipRemove";
354
+ clip_name: string;
355
+ };
356
+ }>, z.ZodObject<{
357
+ type: z.ZodLiteral<"authorization">;
358
+ state: z.ZodString;
359
+ }, "strip", z.ZodTypeAny, {
360
+ type: "authorization";
361
+ state: string;
362
+ }, {
363
+ type: "authorization";
364
+ state: string;
365
+ }>, z.ZodObject<{
366
+ type: z.ZodLiteral<"PlaylistSwitch">;
367
+ playlist_name: z.ZodString;
368
+ }, "strip", z.ZodTypeAny, {
369
+ type: "PlaylistSwitch";
370
+ playlist_name: string;
371
+ }, {
372
+ type: "PlaylistSwitch";
373
+ playlist_name: string;
374
+ }>, z.ZodObject<{
375
+ type: z.ZodLiteral<"StreamAvailable">;
376
+ stream_name: z.ZodString;
377
+ state: z.ZodBoolean;
378
+ }, "strip", z.ZodTypeAny, {
379
+ type: "StreamAvailable";
380
+ stream_name: string;
381
+ state: boolean;
382
+ }, {
383
+ type: "StreamAvailable";
384
+ stream_name: string;
385
+ state: boolean;
386
+ }>, z.ZodObject<{
387
+ type: z.ZodLiteral<"StreamSwitchAudio">;
388
+ stream_name: z.ZodOptional<z.ZodString>;
389
+ clip_name: z.ZodOptional<z.ZodString>;
390
+ master_audio: z.ZodBoolean;
391
+ }, "strip", z.ZodTypeAny, {
392
+ type: "StreamSwitchAudio";
393
+ master_audio: boolean;
394
+ stream_name?: string | undefined;
395
+ clip_name?: string | undefined;
396
+ }, {
397
+ type: "StreamSwitchAudio";
398
+ master_audio: boolean;
399
+ stream_name?: string | undefined;
400
+ clip_name?: string | undefined;
401
+ }>, z.ZodObject<{
402
+ type: z.ZodLiteral<"StreamSwitchAudioError">;
403
+ stream_name: z.ZodOptional<z.ZodString>;
404
+ clip_name: z.ZodOptional<z.ZodString>;
405
+ master_audio: z.ZodBoolean;
406
+ }, "strip", z.ZodTypeAny, {
407
+ type: "StreamSwitchAudioError";
408
+ master_audio: boolean;
409
+ stream_name?: string | undefined;
410
+ clip_name?: string | undefined;
411
+ }, {
412
+ type: "StreamSwitchAudioError";
413
+ master_audio: boolean;
414
+ stream_name?: string | undefined;
415
+ clip_name?: string | undefined;
416
+ }>, z.ZodObject<{
417
+ type: z.ZodLiteral<"StreamSwitchVideo">;
418
+ playlist_active_stream: z.ZodNumber;
419
+ stream_name: z.ZodOptional<z.ZodString>;
420
+ playlist_name: z.ZodOptional<z.ZodString>;
421
+ clip_name: z.ZodOptional<z.ZodString>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ type: "StreamSwitchVideo";
424
+ playlist_active_stream: number;
425
+ stream_name?: string | undefined;
426
+ clip_name?: string | undefined;
427
+ playlist_name?: string | undefined;
428
+ }, {
429
+ type: "StreamSwitchVideo";
430
+ playlist_active_stream: number;
431
+ stream_name?: string | undefined;
432
+ clip_name?: string | undefined;
433
+ playlist_name?: string | undefined;
434
+ }>, z.ZodObject<{
435
+ type: z.ZodLiteral<"PlaylistQueueChange">;
436
+ queue: z.ZodArray<z.ZodString, "many">;
437
+ }, "strip", z.ZodTypeAny, {
438
+ type: "PlaylistQueueChange";
439
+ queue: string[];
440
+ }, {
441
+ type: "PlaylistQueueChange";
442
+ queue: string[];
443
+ }>, z.ZodObject<{
444
+ type: z.ZodLiteral<"ClipUpload">;
445
+ clip_name: z.ZodOptional<z.ZodString>;
446
+ }, "strip", z.ZodTypeAny, {
447
+ type: "ClipUpload";
448
+ clip_name?: string | undefined;
449
+ }, {
450
+ type: "ClipUpload";
451
+ clip_name?: string | undefined;
452
+ }>, z.ZodObject<{
453
+ type: z.ZodLiteral<"SwitcherStop">;
454
+ default_playlist_id: z.ZodOptional<z.ZodString>;
455
+ }, "strip", z.ZodTypeAny, {
456
+ type: "SwitcherStop";
457
+ default_playlist_id?: string | undefined;
458
+ }, {
459
+ type: "SwitcherStop";
460
+ default_playlist_id?: string | undefined;
461
+ }>, z.ZodObject<{
462
+ type: z.ZodLiteral<"SwitcherStart">;
463
+ default_playlist_id: z.ZodOptional<z.ZodString>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ type: "SwitcherStart";
466
+ default_playlist_id?: string | undefined;
467
+ }, {
468
+ type: "SwitcherStart";
469
+ default_playlist_id?: string | undefined;
470
+ }>, z.ZodObject<{
471
+ type: z.ZodLiteral<"MediaServerStarted">;
472
+ }, "strip", z.ZodTypeAny, {
473
+ type: "MediaServerStarted";
474
+ }, {
475
+ type: "MediaServerStarted";
476
+ }>, z.ZodObject<{
477
+ type: z.ZodLiteral<"ClipRemove">;
478
+ clip_name: z.ZodString;
479
+ }, "strip", z.ZodTypeAny, {
480
+ type: "ClipRemove";
481
+ clip_name: string;
482
+ }, {
483
+ type: "ClipRemove";
484
+ clip_name: string;
485
+ }>]>;
486
+ export type TCamSwitcherEvent = z.infer<typeof cswEventsDataSchema>;
487
+ export type TCamSwitcherEventType = TCamSwitcherEvent['type'];
488
+ export type TCamSwitcherEventOfType<T extends TCamSwitcherEventType> = Extract<TCamSwitcherEvent, {
489
+ type: T;
490
+ }>;
491
+ export {};