camstreamerlib 4.0.0-beta.102 → 4.0.0-beta.104

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 (91) hide show
  1. package/cjs/CamOverlayAPI.d.ts +6 -6
  2. package/cjs/CamStreamerAPI.d.ts +308 -305
  3. package/cjs/CamStreamerAPI.js +12 -2
  4. package/cjs/CamSwitcherAPI.js +9 -63
  5. package/cjs/errors/errors.d.ts +4 -3
  6. package/cjs/errors/errors.js +3 -1
  7. package/cjs/index.d.ts +1 -0
  8. package/cjs/index.js +1 -0
  9. package/cjs/internal/constants.d.ts +1 -0
  10. package/cjs/internal/constants.js +2 -1
  11. package/cjs/internal/convertors.d.ts +6 -0
  12. package/cjs/internal/convertors.js +115 -0
  13. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +21 -21
  14. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +2 -2
  15. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +4 -4
  16. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +1672 -1976
  17. package/cjs/types/CamStreamerAPI/churchSchema.d.ts +30 -38
  18. package/cjs/types/CamStreamerAPI/daCastSchema.d.ts +30 -38
  19. package/cjs/types/CamStreamerAPI/dailymotionSchema.d.ts +30 -38
  20. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +30 -38
  21. package/cjs/types/CamStreamerAPI/gameChangerSchema.d.ts +30 -38
  22. package/cjs/types/CamStreamerAPI/hlsPullSchema.d.ts +30 -38
  23. package/cjs/types/CamStreamerAPI/hlsPushSchema.d.ts +30 -38
  24. package/cjs/types/CamStreamerAPI/ibmSchema.d.ts +30 -38
  25. package/cjs/types/CamStreamerAPI/microsoftAzureSchema.d.ts +30 -38
  26. package/cjs/types/CamStreamerAPI/microsoftStreamSchema.d.ts +30 -38
  27. package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +30 -38
  28. package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +18 -18
  29. package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +30 -38
  30. package/cjs/types/CamStreamerAPI/rtmpSchema.js +1 -1
  31. package/cjs/types/CamStreamerAPI/sdCardSchema.d.ts +30 -38
  32. package/cjs/types/CamStreamerAPI/srtSchema.d.ts +30 -38
  33. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +91 -56
  34. package/cjs/types/CamStreamerAPI/streamCommonTypes.js +40 -9
  35. package/cjs/types/CamStreamerAPI/twitchSchema.d.ts +30 -38
  36. package/cjs/types/CamStreamerAPI/vimeoSchema.d.ts +30 -38
  37. package/cjs/types/CamStreamerAPI/windySchema.d.ts +30 -38
  38. package/cjs/types/CamStreamerAPI/wowzaSchema.d.ts +30 -38
  39. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +30 -38
  40. package/cjs/types/CamSwitcherAPI.d.ts +8 -27
  41. package/cjs/types/CamSwitcherAPI.js +2 -9
  42. package/cjs/types/common.d.ts +19 -0
  43. package/cjs/types/common.js +8 -1
  44. package/cjs/types/ws/CamStreamerEvents.d.ts +44 -0
  45. package/cjs/types/ws/CamStreamerEvents.js +5 -0
  46. package/esm/CamStreamerAPI.js +12 -2
  47. package/esm/CamSwitcherAPI.js +8 -62
  48. package/esm/errors/errors.js +3 -1
  49. package/esm/index.js +1 -0
  50. package/esm/internal/constants.js +1 -0
  51. package/esm/internal/convertors.js +108 -0
  52. package/esm/types/CamStreamerAPI/rtmpSchema.js +1 -1
  53. package/esm/types/CamStreamerAPI/streamCommonTypes.js +40 -9
  54. package/esm/types/CamSwitcherAPI.js +1 -8
  55. package/esm/types/common.js +7 -0
  56. package/esm/types/ws/CamStreamerEvents.js +5 -0
  57. package/package.json +1 -1
  58. package/types/CamOverlayAPI.d.ts +6 -6
  59. package/types/CamStreamerAPI.d.ts +308 -305
  60. package/types/errors/errors.d.ts +4 -3
  61. package/types/index.d.ts +1 -0
  62. package/types/internal/constants.d.ts +1 -0
  63. package/types/internal/convertors.d.ts +6 -0
  64. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +21 -21
  65. package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +2 -2
  66. package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +4 -4
  67. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +1672 -1976
  68. package/types/types/CamStreamerAPI/churchSchema.d.ts +30 -38
  69. package/types/types/CamStreamerAPI/daCastSchema.d.ts +30 -38
  70. package/types/types/CamStreamerAPI/dailymotionSchema.d.ts +30 -38
  71. package/types/types/CamStreamerAPI/facebookSchema.d.ts +30 -38
  72. package/types/types/CamStreamerAPI/gameChangerSchema.d.ts +30 -38
  73. package/types/types/CamStreamerAPI/hlsPullSchema.d.ts +30 -38
  74. package/types/types/CamStreamerAPI/hlsPushSchema.d.ts +30 -38
  75. package/types/types/CamStreamerAPI/ibmSchema.d.ts +30 -38
  76. package/types/types/CamStreamerAPI/microsoftAzureSchema.d.ts +30 -38
  77. package/types/types/CamStreamerAPI/microsoftStreamSchema.d.ts +30 -38
  78. package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +30 -38
  79. package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +18 -18
  80. package/types/types/CamStreamerAPI/rtmpSchema.d.ts +30 -38
  81. package/types/types/CamStreamerAPI/sdCardSchema.d.ts +30 -38
  82. package/types/types/CamStreamerAPI/srtSchema.d.ts +30 -38
  83. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +91 -56
  84. package/types/types/CamStreamerAPI/twitchSchema.d.ts +30 -38
  85. package/types/types/CamStreamerAPI/vimeoSchema.d.ts +30 -38
  86. package/types/types/CamStreamerAPI/windySchema.d.ts +30 -38
  87. package/types/types/CamStreamerAPI/wowzaSchema.d.ts +30 -38
  88. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +30 -38
  89. package/types/types/CamSwitcherAPI.d.ts +8 -27
  90. package/types/types/common.d.ts +19 -0
  91. package/types/types/ws/CamStreamerEvents.d.ts +44 -0
@@ -98,30 +98,22 @@ export declare const sdCardSchema: z.ZodObject<{
98
98
  }[];
99
99
  }>]>;
100
100
  inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
101
- internalVapixParameters: z.ZodObject<{
102
- camera: z.ZodString;
103
- resolution: z.ZodOptional<z.ZodString>;
104
- compression: z.ZodOptional<z.ZodNumber>;
105
- fps: z.ZodOptional<z.ZodNumber>;
106
- videobitrate: z.ZodOptional<z.ZodNumber>;
107
- videomaxbitrate: z.ZodOptional<z.ZodNumber>;
108
- audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
101
+ inputUrl: z.ZodString;
102
+ internalVapixParameters: z.ZodString;
103
+ userVapixParameters: z.ZodString;
104
+ streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
105
+ streamDelay: z.ZodObject<{
106
+ enabled: z.ZodBoolean;
107
+ timeS: z.ZodNumber;
108
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
109
109
  }, "strip", z.ZodTypeAny, {
110
- camera: string;
111
- resolution?: string | undefined;
112
- compression?: number | undefined;
113
- audio?: 0 | 1 | undefined;
114
- fps?: number | undefined;
115
- videobitrate?: number | undefined;
116
- videomaxbitrate?: number | undefined;
110
+ enabled: boolean;
111
+ timeS: number;
112
+ unit: "seconds" | "minutes" | "hours";
117
113
  }, {
118
- camera: string;
119
- resolution?: string | undefined;
120
- compression?: number | undefined;
121
- audio?: 0 | 1 | undefined;
122
- fps?: number | undefined;
123
- videobitrate?: number | undefined;
124
- videomaxbitrate?: number | undefined;
114
+ enabled: boolean;
115
+ timeS: number;
116
+ unit: "seconds" | "minutes" | "hours";
125
117
  }>;
126
118
  audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
127
119
  source: z.ZodLiteral<"none">;
@@ -211,14 +203,14 @@ export declare const sdCardSchema: z.ZodObject<{
211
203
  }[];
212
204
  };
213
205
  inputType: "RTSP_URL" | "CSw" | "CRS";
214
- internalVapixParameters: {
215
- camera: string;
216
- resolution?: string | undefined;
217
- compression?: number | undefined;
218
- audio?: 0 | 1 | undefined;
219
- fps?: number | undefined;
220
- videobitrate?: number | undefined;
221
- videomaxbitrate?: number | undefined;
206
+ inputUrl: string;
207
+ internalVapixParameters: string;
208
+ userVapixParameters: string;
209
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
210
+ streamDelay: {
211
+ enabled: boolean;
212
+ timeS: number;
213
+ unit: "seconds" | "minutes" | "hours";
222
214
  };
223
215
  }, {
224
216
  type: "sd_card";
@@ -263,13 +255,13 @@ export declare const sdCardSchema: z.ZodObject<{
263
255
  }[];
264
256
  };
265
257
  inputType: "RTSP_URL" | "CSw" | "CRS";
266
- internalVapixParameters: {
267
- camera: string;
268
- resolution?: string | undefined;
269
- compression?: number | undefined;
270
- audio?: 0 | 1 | undefined;
271
- fps?: number | undefined;
272
- videobitrate?: number | undefined;
273
- videomaxbitrate?: number | undefined;
258
+ inputUrl: string;
259
+ internalVapixParameters: string;
260
+ userVapixParameters: string;
261
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
262
+ streamDelay: {
263
+ enabled: boolean;
264
+ timeS: number;
265
+ unit: "seconds" | "minutes" | "hours";
274
266
  };
275
267
  }>;
@@ -98,30 +98,22 @@ export declare const srtSchema: z.ZodObject<{
98
98
  }[];
99
99
  }>]>;
100
100
  inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
101
- internalVapixParameters: z.ZodObject<{
102
- camera: z.ZodString;
103
- resolution: z.ZodOptional<z.ZodString>;
104
- compression: z.ZodOptional<z.ZodNumber>;
105
- fps: z.ZodOptional<z.ZodNumber>;
106
- videobitrate: z.ZodOptional<z.ZodNumber>;
107
- videomaxbitrate: z.ZodOptional<z.ZodNumber>;
108
- audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
101
+ inputUrl: z.ZodString;
102
+ internalVapixParameters: z.ZodString;
103
+ userVapixParameters: z.ZodString;
104
+ streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
105
+ streamDelay: z.ZodObject<{
106
+ enabled: z.ZodBoolean;
107
+ timeS: z.ZodNumber;
108
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
109
109
  }, "strip", z.ZodTypeAny, {
110
- camera: string;
111
- resolution?: string | undefined;
112
- compression?: number | undefined;
113
- audio?: 0 | 1 | undefined;
114
- fps?: number | undefined;
115
- videobitrate?: number | undefined;
116
- videomaxbitrate?: number | undefined;
110
+ enabled: boolean;
111
+ timeS: number;
112
+ unit: "seconds" | "minutes" | "hours";
117
113
  }, {
118
- camera: string;
119
- resolution?: string | undefined;
120
- compression?: number | undefined;
121
- audio?: 0 | 1 | undefined;
122
- fps?: number | undefined;
123
- videobitrate?: number | undefined;
124
- videomaxbitrate?: number | undefined;
114
+ enabled: boolean;
115
+ timeS: number;
116
+ unit: "seconds" | "minutes" | "hours";
125
117
  }>;
126
118
  audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
127
119
  source: z.ZodLiteral<"none">;
@@ -211,14 +203,14 @@ export declare const srtSchema: z.ZodObject<{
211
203
  }[];
212
204
  };
213
205
  inputType: "RTSP_URL" | "CSw" | "CRS";
214
- internalVapixParameters: {
215
- camera: string;
216
- resolution?: string | undefined;
217
- compression?: number | undefined;
218
- audio?: 0 | 1 | undefined;
219
- fps?: number | undefined;
220
- videobitrate?: number | undefined;
221
- videomaxbitrate?: number | undefined;
206
+ inputUrl: string;
207
+ internalVapixParameters: string;
208
+ userVapixParameters: string;
209
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
210
+ streamDelay: {
211
+ enabled: boolean;
212
+ timeS: number;
213
+ unit: "seconds" | "minutes" | "hours";
222
214
  };
223
215
  }, {
224
216
  type: "srt";
@@ -263,13 +255,13 @@ export declare const srtSchema: z.ZodObject<{
263
255
  }[];
264
256
  };
265
257
  inputType: "RTSP_URL" | "CSw" | "CRS";
266
- internalVapixParameters: {
267
- camera: string;
268
- resolution?: string | undefined;
269
- compression?: number | undefined;
270
- audio?: 0 | 1 | undefined;
271
- fps?: number | undefined;
272
- videobitrate?: number | undefined;
273
- videomaxbitrate?: number | undefined;
258
+ inputUrl: string;
259
+ internalVapixParameters: string;
260
+ userVapixParameters: string;
261
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
262
+ streamDelay: {
263
+ enabled: boolean;
264
+ timeS: number;
265
+ unit: "seconds" | "minutes" | "hours";
274
266
  };
275
267
  }>;
@@ -142,30 +142,73 @@ export type TStreamTriggerType = TStreamTrigger['type'];
142
142
  export type TTriggerSchedule = z.infer<typeof scheduleSchema>;
143
143
  export declare const streamInputTypeSchema: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
144
144
  export type TStreamInputType = z.infer<typeof streamInputTypeSchema>;
145
+ export declare const streamingProtocolTypeSchema: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
146
+ export type TStreamingProtocolType = z.infer<typeof streamingProtocolTypeSchema>;
147
+ export declare const videoCodecSchema: z.ZodUnion<[z.ZodLiteral<"h264">, z.ZodLiteral<"h265">, z.ZodLiteral<"av1">]>;
148
+ export type TVideoCodec = z.infer<typeof videoCodecSchema>;
149
+ export declare const overlaysSchema: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"application">, z.ZodLiteral<"">, z.ZodLiteral<"off">]>;
150
+ export type TOverlays = z.infer<typeof overlaysSchema>;
151
+ export declare const streamDelaySchema: z.ZodObject<{
152
+ enabled: z.ZodBoolean;
153
+ timeS: z.ZodNumber;
154
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ enabled: boolean;
157
+ timeS: number;
158
+ unit: "seconds" | "minutes" | "hours";
159
+ }, {
160
+ enabled: boolean;
161
+ timeS: number;
162
+ unit: "seconds" | "minutes" | "hours";
163
+ }>;
164
+ export type TStreamDelay = z.infer<typeof streamDelaySchema>;
165
+ export type TStreamDelayUnit = TStreamDelay['unit'];
145
166
  export declare const internalVapixParametersSchema: z.ZodObject<{
167
+ bitrateMode: z.ZodUnion<[z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
168
+ maximumBitRate: z.ZodNumber;
169
+ retentionTime: z.ZodNumber;
170
+ bitRateLimit: z.ZodNumber;
171
+ } & {
146
172
  camera: z.ZodString;
147
- resolution: z.ZodOptional<z.ZodString>;
148
- compression: z.ZodOptional<z.ZodNumber>;
149
- fps: z.ZodOptional<z.ZodNumber>;
150
- videobitrate: z.ZodOptional<z.ZodNumber>;
151
- videomaxbitrate: z.ZodOptional<z.ZodNumber>;
152
- audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
173
+ resolution: z.ZodString;
174
+ fps: z.ZodNumber;
175
+ compression: z.ZodNumber;
176
+ govLength: z.ZodNumber;
177
+ videoCodec: z.ZodUnion<[z.ZodLiteral<"h264">, z.ZodLiteral<"h265">, z.ZodLiteral<"av1">]>;
178
+ h264Profile: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"high">, z.ZodLiteral<"main">, z.ZodLiteral<"baseline">]>>;
179
+ audio: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
180
+ nbrOfChannels: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
181
+ overlays: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"application">, z.ZodLiteral<"">, z.ZodLiteral<"off">]>>;
153
182
  }, "strip", z.ZodTypeAny, {
154
183
  camera: string;
155
- resolution?: string | undefined;
156
- compression?: number | undefined;
157
- audio?: 0 | 1 | undefined;
158
- fps?: number | undefined;
159
- videobitrate?: number | undefined;
160
- videomaxbitrate?: number | undefined;
184
+ resolution: string;
185
+ compression: number;
186
+ bitrateMode: "VBR" | "MBR" | "ABR";
187
+ maximumBitRate: number;
188
+ retentionTime: number;
189
+ bitRateLimit: number;
190
+ audio: 0 | 1;
191
+ fps: number;
192
+ govLength: number;
193
+ videoCodec: "h264" | "h265" | "av1";
194
+ overlays?: "" | "text" | "all" | "image" | "application" | "off" | undefined;
195
+ h264Profile?: "high" | "main" | "baseline" | undefined;
196
+ nbrOfChannels?: 1 | 2 | undefined;
161
197
  }, {
162
198
  camera: string;
163
- resolution?: string | undefined;
164
- compression?: number | undefined;
165
- audio?: 0 | 1 | undefined;
166
- fps?: number | undefined;
167
- videobitrate?: number | undefined;
168
- videomaxbitrate?: number | undefined;
199
+ resolution: string;
200
+ compression: number;
201
+ bitrateMode: "VBR" | "MBR" | "ABR";
202
+ maximumBitRate: number;
203
+ retentionTime: number;
204
+ bitRateLimit: number;
205
+ audio: 0 | 1;
206
+ fps: number;
207
+ govLength: number;
208
+ videoCodec: "h264" | "h265" | "av1";
209
+ overlays?: "" | "text" | "all" | "image" | "application" | "off" | undefined;
210
+ h264Profile?: "high" | "main" | "baseline" | undefined;
211
+ nbrOfChannels?: 1 | 2 | undefined;
169
212
  }>;
170
213
  export type TInternalVapixParameters = z.infer<typeof internalVapixParametersSchema>;
171
214
  export declare const streamAudioSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
@@ -317,30 +360,22 @@ export declare const streamCommonSchema: z.ZodObject<{
317
360
  }[];
318
361
  }>]>;
319
362
  inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
320
- internalVapixParameters: z.ZodObject<{
321
- camera: z.ZodString;
322
- resolution: z.ZodOptional<z.ZodString>;
323
- compression: z.ZodOptional<z.ZodNumber>;
324
- fps: z.ZodOptional<z.ZodNumber>;
325
- videobitrate: z.ZodOptional<z.ZodNumber>;
326
- videomaxbitrate: z.ZodOptional<z.ZodNumber>;
327
- audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
363
+ inputUrl: z.ZodString;
364
+ internalVapixParameters: z.ZodString;
365
+ userVapixParameters: z.ZodString;
366
+ streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
367
+ streamDelay: z.ZodObject<{
368
+ enabled: z.ZodBoolean;
369
+ timeS: z.ZodNumber;
370
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
328
371
  }, "strip", z.ZodTypeAny, {
329
- camera: string;
330
- resolution?: string | undefined;
331
- compression?: number | undefined;
332
- audio?: 0 | 1 | undefined;
333
- fps?: number | undefined;
334
- videobitrate?: number | undefined;
335
- videomaxbitrate?: number | undefined;
372
+ enabled: boolean;
373
+ timeS: number;
374
+ unit: "seconds" | "minutes" | "hours";
336
375
  }, {
337
- camera: string;
338
- resolution?: string | undefined;
339
- compression?: number | undefined;
340
- audio?: 0 | 1 | undefined;
341
- fps?: number | undefined;
342
- videobitrate?: number | undefined;
343
- videomaxbitrate?: number | undefined;
376
+ enabled: boolean;
377
+ timeS: number;
378
+ unit: "seconds" | "minutes" | "hours";
344
379
  }>;
345
380
  audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
346
381
  source: z.ZodLiteral<"none">;
@@ -427,14 +462,14 @@ export declare const streamCommonSchema: z.ZodObject<{
427
462
  }[];
428
463
  };
429
464
  inputType: "RTSP_URL" | "CSw" | "CRS";
430
- internalVapixParameters: {
431
- camera: string;
432
- resolution?: string | undefined;
433
- compression?: number | undefined;
434
- audio?: 0 | 1 | undefined;
435
- fps?: number | undefined;
436
- videobitrate?: number | undefined;
437
- videomaxbitrate?: number | undefined;
465
+ inputUrl: string;
466
+ internalVapixParameters: string;
467
+ userVapixParameters: string;
468
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
469
+ streamDelay: {
470
+ enabled: boolean;
471
+ timeS: number;
472
+ unit: "seconds" | "minutes" | "hours";
438
473
  };
439
474
  }, {
440
475
  audio: {
@@ -478,14 +513,14 @@ export declare const streamCommonSchema: z.ZodObject<{
478
513
  }[];
479
514
  };
480
515
  inputType: "RTSP_URL" | "CSw" | "CRS";
481
- internalVapixParameters: {
482
- camera: string;
483
- resolution?: string | undefined;
484
- compression?: number | undefined;
485
- audio?: 0 | 1 | undefined;
486
- fps?: number | undefined;
487
- videobitrate?: number | undefined;
488
- videomaxbitrate?: number | undefined;
516
+ inputUrl: string;
517
+ internalVapixParameters: string;
518
+ userVapixParameters: string;
519
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
520
+ streamDelay: {
521
+ enabled: boolean;
522
+ timeS: number;
523
+ unit: "seconds" | "minutes" | "hours";
489
524
  };
490
525
  }>;
491
526
  export type TCommonStream = z.infer<typeof streamCommonSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.streamCommonSchema = exports.streamAudioSchema = exports.internalVapixParametersSchema = exports.streamInputTypeSchema = exports.streamTriggerSchema = exports.streamTypeSchema = void 0;
3
+ exports.streamCommonSchema = exports.streamAudioSchema = exports.internalVapixParametersSchema = exports.streamDelaySchema = exports.overlaysSchema = exports.videoCodecSchema = exports.streamingProtocolTypeSchema = exports.streamInputTypeSchema = exports.streamTriggerSchema = exports.streamTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const common_1 = require("../common");
6
6
  exports.streamTypeSchema = zod_1.z.union([
@@ -47,14 +47,41 @@ exports.streamTriggerSchema = zod_1.z.discriminatedUnion('type', [
47
47
  }),
48
48
  ]);
49
49
  exports.streamInputTypeSchema = zod_1.z.union([zod_1.z.literal('CSw'), zod_1.z.literal('CRS'), zod_1.z.literal('RTSP_URL')]);
50
- exports.internalVapixParametersSchema = zod_1.z.object({
50
+ exports.streamingProtocolTypeSchema = zod_1.z.union([zod_1.z.literal('RTMP'), zod_1.z.literal('RTMPS'), zod_1.z.literal('HLS_PUSH')]);
51
+ exports.videoCodecSchema = zod_1.z.union([zod_1.z.literal('h264'), zod_1.z.literal('h265'), zod_1.z.literal('av1')]);
52
+ exports.overlaysSchema = zod_1.z.union([
53
+ zod_1.z.literal('all'),
54
+ zod_1.z.literal('text'),
55
+ zod_1.z.literal('image'),
56
+ zod_1.z.literal('application'),
57
+ zod_1.z.literal(''),
58
+ zod_1.z.literal('off'),
59
+ ]);
60
+ exports.streamDelaySchema = zod_1.z.object({
61
+ enabled: zod_1.z.boolean(),
62
+ timeS: zod_1.z.number().int(),
63
+ unit: zod_1.z.union([zod_1.z.literal('seconds'), zod_1.z.literal('minutes'), zod_1.z.literal('hours')]),
64
+ });
65
+ exports.internalVapixParametersSchema = common_1.bitrateVapixParamsSchema.extend({
51
66
  camera: zod_1.z.string(),
52
- resolution: zod_1.z.string().optional(),
53
- compression: zod_1.z.number().optional(),
54
- fps: zod_1.z.number().int().optional(),
55
- videobitrate: zod_1.z.number().int().optional(),
56
- videomaxbitrate: zod_1.z.number().int().optional(),
57
- audio: common_1.booleanSchema.optional(),
67
+ resolution: zod_1.z.string(),
68
+ fps: zod_1.z.number().int(),
69
+ compression: zod_1.z.number().int(),
70
+ govLength: zod_1.z.number().int(),
71
+ videoCodec: exports.videoCodecSchema,
72
+ h264Profile: common_1.h264ProfileSchema.optional(),
73
+ audio: common_1.booleanSchema,
74
+ nbrOfChannels: zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2)]).optional(),
75
+ overlays: zod_1.z
76
+ .union([
77
+ zod_1.z.literal('all'),
78
+ zod_1.z.literal('text'),
79
+ zod_1.z.literal('image'),
80
+ zod_1.z.literal('application'),
81
+ zod_1.z.literal(''),
82
+ zod_1.z.literal('off'),
83
+ ])
84
+ .optional(),
58
85
  });
59
86
  exports.streamAudioSchema = zod_1.z.discriminatedUnion('source', [
60
87
  zod_1.z.object({
@@ -80,6 +107,10 @@ exports.streamCommonSchema = zod_1.z.object({
80
107
  title: zod_1.z.string(),
81
108
  trigger: exports.streamTriggerSchema,
82
109
  inputType: exports.streamInputTypeSchema,
83
- internalVapixParameters: exports.internalVapixParametersSchema,
110
+ inputUrl: zod_1.z.string(),
111
+ internalVapixParameters: zod_1.z.string(),
112
+ userVapixParameters: zod_1.z.string(),
113
+ streamingProtocol: exports.streamingProtocolTypeSchema,
114
+ streamDelay: exports.streamDelaySchema,
84
115
  audio: exports.streamAudioSchema,
85
116
  });
@@ -98,30 +98,22 @@ export declare const twitchSchema: z.ZodObject<{
98
98
  }[];
99
99
  }>]>;
100
100
  inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
101
- internalVapixParameters: z.ZodObject<{
102
- camera: z.ZodString;
103
- resolution: z.ZodOptional<z.ZodString>;
104
- compression: z.ZodOptional<z.ZodNumber>;
105
- fps: z.ZodOptional<z.ZodNumber>;
106
- videobitrate: z.ZodOptional<z.ZodNumber>;
107
- videomaxbitrate: z.ZodOptional<z.ZodNumber>;
108
- audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
101
+ inputUrl: z.ZodString;
102
+ internalVapixParameters: z.ZodString;
103
+ userVapixParameters: z.ZodString;
104
+ streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
105
+ streamDelay: z.ZodObject<{
106
+ enabled: z.ZodBoolean;
107
+ timeS: z.ZodNumber;
108
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
109
109
  }, "strip", z.ZodTypeAny, {
110
- camera: string;
111
- resolution?: string | undefined;
112
- compression?: number | undefined;
113
- audio?: 0 | 1 | undefined;
114
- fps?: number | undefined;
115
- videobitrate?: number | undefined;
116
- videomaxbitrate?: number | undefined;
110
+ enabled: boolean;
111
+ timeS: number;
112
+ unit: "seconds" | "minutes" | "hours";
117
113
  }, {
118
- camera: string;
119
- resolution?: string | undefined;
120
- compression?: number | undefined;
121
- audio?: 0 | 1 | undefined;
122
- fps?: number | undefined;
123
- videobitrate?: number | undefined;
124
- videomaxbitrate?: number | undefined;
114
+ enabled: boolean;
115
+ timeS: number;
116
+ unit: "seconds" | "minutes" | "hours";
125
117
  }>;
126
118
  audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
127
119
  source: z.ZodLiteral<"none">;
@@ -211,14 +203,14 @@ export declare const twitchSchema: z.ZodObject<{
211
203
  }[];
212
204
  };
213
205
  inputType: "RTSP_URL" | "CSw" | "CRS";
214
- internalVapixParameters: {
215
- camera: string;
216
- resolution?: string | undefined;
217
- compression?: number | undefined;
218
- audio?: 0 | 1 | undefined;
219
- fps?: number | undefined;
220
- videobitrate?: number | undefined;
221
- videomaxbitrate?: number | undefined;
206
+ inputUrl: string;
207
+ internalVapixParameters: string;
208
+ userVapixParameters: string;
209
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
210
+ streamDelay: {
211
+ enabled: boolean;
212
+ timeS: number;
213
+ unit: "seconds" | "minutes" | "hours";
222
214
  };
223
215
  }, {
224
216
  type: "twitch";
@@ -263,13 +255,13 @@ export declare const twitchSchema: z.ZodObject<{
263
255
  }[];
264
256
  };
265
257
  inputType: "RTSP_URL" | "CSw" | "CRS";
266
- internalVapixParameters: {
267
- camera: string;
268
- resolution?: string | undefined;
269
- compression?: number | undefined;
270
- audio?: 0 | 1 | undefined;
271
- fps?: number | undefined;
272
- videobitrate?: number | undefined;
273
- videomaxbitrate?: number | undefined;
258
+ inputUrl: string;
259
+ internalVapixParameters: string;
260
+ userVapixParameters: string;
261
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
262
+ streamDelay: {
263
+ enabled: boolean;
264
+ timeS: number;
265
+ unit: "seconds" | "minutes" | "hours";
274
266
  };
275
267
  }>;
@@ -98,30 +98,22 @@ export declare const vimeoSchema: z.ZodObject<{
98
98
  }[];
99
99
  }>]>;
100
100
  inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
101
- internalVapixParameters: z.ZodObject<{
102
- camera: z.ZodString;
103
- resolution: z.ZodOptional<z.ZodString>;
104
- compression: z.ZodOptional<z.ZodNumber>;
105
- fps: z.ZodOptional<z.ZodNumber>;
106
- videobitrate: z.ZodOptional<z.ZodNumber>;
107
- videomaxbitrate: z.ZodOptional<z.ZodNumber>;
108
- audio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
101
+ inputUrl: z.ZodString;
102
+ internalVapixParameters: z.ZodString;
103
+ userVapixParameters: z.ZodString;
104
+ streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
105
+ streamDelay: z.ZodObject<{
106
+ enabled: z.ZodBoolean;
107
+ timeS: z.ZodNumber;
108
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
109
109
  }, "strip", z.ZodTypeAny, {
110
- camera: string;
111
- resolution?: string | undefined;
112
- compression?: number | undefined;
113
- audio?: 0 | 1 | undefined;
114
- fps?: number | undefined;
115
- videobitrate?: number | undefined;
116
- videomaxbitrate?: number | undefined;
110
+ enabled: boolean;
111
+ timeS: number;
112
+ unit: "seconds" | "minutes" | "hours";
117
113
  }, {
118
- camera: string;
119
- resolution?: string | undefined;
120
- compression?: number | undefined;
121
- audio?: 0 | 1 | undefined;
122
- fps?: number | undefined;
123
- videobitrate?: number | undefined;
124
- videomaxbitrate?: number | undefined;
114
+ enabled: boolean;
115
+ timeS: number;
116
+ unit: "seconds" | "minutes" | "hours";
125
117
  }>;
126
118
  audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
127
119
  source: z.ZodLiteral<"none">;
@@ -211,14 +203,14 @@ export declare const vimeoSchema: z.ZodObject<{
211
203
  }[];
212
204
  };
213
205
  inputType: "RTSP_URL" | "CSw" | "CRS";
214
- internalVapixParameters: {
215
- camera: string;
216
- resolution?: string | undefined;
217
- compression?: number | undefined;
218
- audio?: 0 | 1 | undefined;
219
- fps?: number | undefined;
220
- videobitrate?: number | undefined;
221
- videomaxbitrate?: number | undefined;
206
+ inputUrl: string;
207
+ internalVapixParameters: string;
208
+ userVapixParameters: string;
209
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
210
+ streamDelay: {
211
+ enabled: boolean;
212
+ timeS: number;
213
+ unit: "seconds" | "minutes" | "hours";
222
214
  };
223
215
  }, {
224
216
  type: "vimeo";
@@ -263,13 +255,13 @@ export declare const vimeoSchema: z.ZodObject<{
263
255
  }[];
264
256
  };
265
257
  inputType: "RTSP_URL" | "CSw" | "CRS";
266
- internalVapixParameters: {
267
- camera: string;
268
- resolution?: string | undefined;
269
- compression?: number | undefined;
270
- audio?: 0 | 1 | undefined;
271
- fps?: number | undefined;
272
- videobitrate?: number | undefined;
273
- videomaxbitrate?: number | undefined;
258
+ inputUrl: string;
259
+ internalVapixParameters: string;
260
+ userVapixParameters: string;
261
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
262
+ streamDelay: {
263
+ enabled: boolean;
264
+ timeS: number;
265
+ unit: "seconds" | "minutes" | "hours";
274
266
  };
275
267
  }>;