camstreamerlib 4.0.0-beta.105 → 4.0.0-beta.106

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.
@@ -1,4 +1,306 @@
1
1
  import z from 'zod';
2
+ export declare const commonRtmpSchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ enabled: z.ZodBoolean;
5
+ active: z.ZodBoolean;
6
+ title: z.ZodString;
7
+ trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
8
+ type: z.ZodLiteral<"manual">;
9
+ ioPort: z.ZodNullable<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ type: "manual";
12
+ ioPort: string | null;
13
+ }, {
14
+ type: "manual";
15
+ ioPort: string | null;
16
+ }>, z.ZodObject<{
17
+ type: z.ZodLiteral<"onetime">;
18
+ startTime: z.ZodNumber;
19
+ stopTime: z.ZodNumber;
20
+ }, "strip", z.ZodTypeAny, {
21
+ type: "onetime";
22
+ startTime: number;
23
+ stopTime: number;
24
+ }, {
25
+ type: "onetime";
26
+ startTime: number;
27
+ stopTime: number;
28
+ }>, z.ZodObject<{
29
+ type: z.ZodLiteral<"recurrent">;
30
+ schedule: z.ZodArray<z.ZodObject<{
31
+ start: z.ZodObject<{
32
+ day: z.ZodNumber;
33
+ timeS: z.ZodNumber;
34
+ }, "strip", z.ZodTypeAny, {
35
+ day: number;
36
+ timeS: number;
37
+ }, {
38
+ day: number;
39
+ timeS: number;
40
+ }>;
41
+ stop: z.ZodObject<{
42
+ day: z.ZodNumber;
43
+ timeS: z.ZodNumber;
44
+ }, "strip", z.ZodTypeAny, {
45
+ day: number;
46
+ timeS: number;
47
+ }, {
48
+ day: number;
49
+ timeS: number;
50
+ }>;
51
+ isActive: z.ZodBoolean;
52
+ }, "strip", z.ZodTypeAny, {
53
+ start: {
54
+ day: number;
55
+ timeS: number;
56
+ };
57
+ stop: {
58
+ day: number;
59
+ timeS: number;
60
+ };
61
+ isActive: boolean;
62
+ }, {
63
+ start: {
64
+ day: number;
65
+ timeS: number;
66
+ };
67
+ stop: {
68
+ day: number;
69
+ timeS: number;
70
+ };
71
+ isActive: boolean;
72
+ }>, "many">;
73
+ }, "strip", z.ZodTypeAny, {
74
+ type: "recurrent";
75
+ schedule: {
76
+ start: {
77
+ day: number;
78
+ timeS: number;
79
+ };
80
+ stop: {
81
+ day: number;
82
+ timeS: number;
83
+ };
84
+ isActive: boolean;
85
+ }[];
86
+ }, {
87
+ type: "recurrent";
88
+ schedule: {
89
+ start: {
90
+ day: number;
91
+ timeS: number;
92
+ };
93
+ stop: {
94
+ day: number;
95
+ timeS: number;
96
+ };
97
+ isActive: boolean;
98
+ }[];
99
+ }>]>;
100
+ video: z.ZodObject<{
101
+ inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
102
+ sourceUrl: z.ZodOptional<z.ZodString>;
103
+ internalVapixParameters: z.ZodString;
104
+ userVapixParameters: z.ZodString;
105
+ streamingProtocol: z.ZodUnion<[z.ZodLiteral<"RTMP">, z.ZodLiteral<"RTMPS">, z.ZodLiteral<"HLS_PUSH">]>;
106
+ streamDelay: z.ZodOptional<z.ZodObject<{
107
+ value: z.ZodNumber;
108
+ unit: z.ZodUnion<[z.ZodLiteral<"seconds">, z.ZodLiteral<"minutes">, z.ZodLiteral<"hours">]>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ value: number;
111
+ unit: "seconds" | "minutes" | "hours";
112
+ }, {
113
+ value: number;
114
+ unit: "seconds" | "minutes" | "hours";
115
+ }>>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ inputType: "RTSP_URL" | "CSw" | "CRS";
118
+ internalVapixParameters: string;
119
+ userVapixParameters: string;
120
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
121
+ sourceUrl?: string | undefined;
122
+ streamDelay?: {
123
+ value: number;
124
+ unit: "seconds" | "minutes" | "hours";
125
+ } | undefined;
126
+ }, {
127
+ inputType: "RTSP_URL" | "CSw" | "CRS";
128
+ internalVapixParameters: string;
129
+ userVapixParameters: string;
130
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
131
+ sourceUrl?: string | undefined;
132
+ streamDelay?: {
133
+ value: number;
134
+ unit: "seconds" | "minutes" | "hours";
135
+ } | undefined;
136
+ }>;
137
+ audio: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
138
+ source: z.ZodLiteral<"none">;
139
+ }, "strip", z.ZodTypeAny, {
140
+ source: "none";
141
+ }, {
142
+ source: "none";
143
+ }>, z.ZodObject<{
144
+ source: z.ZodLiteral<"microphone">;
145
+ audioChannelNbr: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ source: "microphone";
148
+ audioChannelNbr: 1 | 2;
149
+ }, {
150
+ source: "microphone";
151
+ audioChannelNbr: 1 | 2;
152
+ }>, z.ZodObject<{
153
+ source: z.ZodLiteral<"file">;
154
+ fileName: z.ZodString;
155
+ filePath: z.ZodString;
156
+ }, "strip", z.ZodTypeAny, {
157
+ source: "file";
158
+ fileName: string;
159
+ filePath: string;
160
+ }, {
161
+ source: "file";
162
+ fileName: string;
163
+ filePath: string;
164
+ }>, z.ZodObject<{
165
+ source: z.ZodLiteral<"url">;
166
+ fileName: z.ZodString;
167
+ fileUrl: z.ZodString;
168
+ avSyncMsec: z.ZodNumber;
169
+ }, "strip", z.ZodTypeAny, {
170
+ source: "url";
171
+ fileName: string;
172
+ fileUrl: string;
173
+ avSyncMsec: number;
174
+ }, {
175
+ source: "url";
176
+ fileName: string;
177
+ fileUrl: string;
178
+ avSyncMsec: number;
179
+ }>]>;
180
+ } & {
181
+ outputUrl: z.ZodString;
182
+ streamKey: z.ZodString;
183
+ streamIdentifier: z.ZodOptional<z.ZodString>;
184
+ saveToSdCard: z.ZodBoolean;
185
+ statusCameraLed: z.ZodBoolean;
186
+ statusCameraOutput: z.ZodNullable<z.ZodString>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ audio: {
189
+ source: "none";
190
+ } | {
191
+ source: "microphone";
192
+ audioChannelNbr: 1 | 2;
193
+ } | {
194
+ source: "file";
195
+ fileName: string;
196
+ filePath: string;
197
+ } | {
198
+ source: "url";
199
+ fileName: string;
200
+ fileUrl: string;
201
+ avSyncMsec: number;
202
+ };
203
+ video: {
204
+ inputType: "RTSP_URL" | "CSw" | "CRS";
205
+ internalVapixParameters: string;
206
+ userVapixParameters: string;
207
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
208
+ sourceUrl?: string | undefined;
209
+ streamDelay?: {
210
+ value: number;
211
+ unit: "seconds" | "minutes" | "hours";
212
+ } | undefined;
213
+ };
214
+ enabled: boolean;
215
+ id: number;
216
+ active: boolean;
217
+ title: string;
218
+ trigger: {
219
+ type: "manual";
220
+ ioPort: string | null;
221
+ } | {
222
+ type: "onetime";
223
+ startTime: number;
224
+ stopTime: number;
225
+ } | {
226
+ type: "recurrent";
227
+ schedule: {
228
+ start: {
229
+ day: number;
230
+ timeS: number;
231
+ };
232
+ stop: {
233
+ day: number;
234
+ timeS: number;
235
+ };
236
+ isActive: boolean;
237
+ }[];
238
+ };
239
+ statusCameraLed: boolean;
240
+ statusCameraOutput: string | null;
241
+ saveToSdCard: boolean;
242
+ outputUrl: string;
243
+ streamKey: string;
244
+ streamIdentifier?: string | undefined;
245
+ }, {
246
+ audio: {
247
+ source: "none";
248
+ } | {
249
+ source: "microphone";
250
+ audioChannelNbr: 1 | 2;
251
+ } | {
252
+ source: "file";
253
+ fileName: string;
254
+ filePath: string;
255
+ } | {
256
+ source: "url";
257
+ fileName: string;
258
+ fileUrl: string;
259
+ avSyncMsec: number;
260
+ };
261
+ video: {
262
+ inputType: "RTSP_URL" | "CSw" | "CRS";
263
+ internalVapixParameters: string;
264
+ userVapixParameters: string;
265
+ streamingProtocol: "RTMP" | "RTMPS" | "HLS_PUSH";
266
+ sourceUrl?: string | undefined;
267
+ streamDelay?: {
268
+ value: number;
269
+ unit: "seconds" | "minutes" | "hours";
270
+ } | undefined;
271
+ };
272
+ enabled: boolean;
273
+ id: number;
274
+ active: boolean;
275
+ title: string;
276
+ trigger: {
277
+ type: "manual";
278
+ ioPort: string | null;
279
+ } | {
280
+ type: "onetime";
281
+ startTime: number;
282
+ stopTime: number;
283
+ } | {
284
+ type: "recurrent";
285
+ schedule: {
286
+ start: {
287
+ day: number;
288
+ timeS: number;
289
+ };
290
+ stop: {
291
+ day: number;
292
+ timeS: number;
293
+ };
294
+ isActive: boolean;
295
+ }[];
296
+ };
297
+ statusCameraLed: boolean;
298
+ statusCameraOutput: string | null;
299
+ saveToSdCard: boolean;
300
+ outputUrl: string;
301
+ streamKey: string;
302
+ streamIdentifier?: string | undefined;
303
+ }>;
2
304
  export declare const rtmpSchema: z.ZodObject<{
3
305
  id: z.ZodNumber;
4
306
  enabled: z.ZodBoolean;
@@ -178,10 +480,14 @@ export declare const rtmpSchema: z.ZodObject<{
178
480
  avSyncMsec: number;
179
481
  }>]>;
180
482
  } & {
181
- type: z.ZodLiteral<"rtmp">;
182
483
  outputUrl: z.ZodString;
183
484
  streamKey: z.ZodString;
184
485
  streamIdentifier: z.ZodOptional<z.ZodString>;
486
+ saveToSdCard: z.ZodBoolean;
487
+ statusCameraLed: z.ZodBoolean;
488
+ statusCameraOutput: z.ZodNullable<z.ZodString>;
489
+ } & {
490
+ type: z.ZodLiteral<"rtmp">;
185
491
  }, "strip", z.ZodTypeAny, {
186
492
  type: "rtmp";
187
493
  audio: {
@@ -235,6 +541,9 @@ export declare const rtmpSchema: z.ZodObject<{
235
541
  isActive: boolean;
236
542
  }[];
237
543
  };
544
+ statusCameraLed: boolean;
545
+ statusCameraOutput: string | null;
546
+ saveToSdCard: boolean;
238
547
  outputUrl: string;
239
548
  streamKey: string;
240
549
  streamIdentifier?: string | undefined;
@@ -291,6 +600,9 @@ export declare const rtmpSchema: z.ZodObject<{
291
600
  isActive: boolean;
292
601
  }[];
293
602
  };
603
+ statusCameraLed: boolean;
604
+ statusCameraOutput: string | null;
605
+ saveToSdCard: boolean;
294
606
  outputUrl: string;
295
607
  streamKey: string;
296
608
  streamIdentifier?: string | undefined;
@@ -3,12 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.rtmpSchema = void 0;
6
+ exports.rtmpSchema = exports.commonRtmpSchema = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const streamCommonTypes_1 = require("./streamCommonTypes");
9
- exports.rtmpSchema = streamCommonTypes_1.streamCommonSchema.extend({
10
- type: zod_1.default.literal('rtmp'),
9
+ exports.commonRtmpSchema = streamCommonTypes_1.streamCommonSchema.extend({
11
10
  outputUrl: zod_1.default.string(),
12
11
  streamKey: zod_1.default.string(),
13
12
  streamIdentifier: zod_1.default.string().optional(),
13
+ saveToSdCard: zod_1.default.boolean(),
14
+ statusCameraLed: zod_1.default.boolean(),
15
+ statusCameraOutput: zod_1.default.string().nullable(),
16
+ });
17
+ exports.rtmpSchema = exports.commonRtmpSchema.extend({
18
+ type: zod_1.default.literal('rtmp'),
14
19
  });
@@ -189,7 +189,7 @@ export declare const youtubeSchema: z.ZodObject<{
189
189
  dvr: z.ZodBoolean;
190
190
  saveToSdCard: z.ZodBoolean;
191
191
  statusCameraLed: z.ZodBoolean;
192
- statusCameraOutput: z.ZodString;
192
+ statusCameraOutput: z.ZodNullable<z.ZodString>;
193
193
  hasWatchdogs: z.ZodBoolean;
194
194
  countdown: z.ZodBoolean;
195
195
  enableManualControl: z.ZodBoolean;
@@ -247,7 +247,7 @@ export declare const youtubeSchema: z.ZodObject<{
247
247
  }[];
248
248
  };
249
249
  statusCameraLed: boolean;
250
- statusCameraOutput: string;
250
+ statusCameraOutput: string | null;
251
251
  saveToSdCard: boolean;
252
252
  tags: string[];
253
253
  streamPrivacy: "public" | "unlisted" | "private";
@@ -314,7 +314,7 @@ export declare const youtubeSchema: z.ZodObject<{
314
314
  }[];
315
315
  };
316
316
  statusCameraLed: boolean;
317
- statusCameraOutput: string;
317
+ statusCameraOutput: string | null;
318
318
  saveToSdCard: boolean;
319
319
  tags: string[];
320
320
  streamPrivacy: "public" | "unlisted" | "private";
@@ -18,7 +18,7 @@ exports.youtubeSchema = streamCommonTypes_1.streamCommonSchema.extend({
18
18
  dvr: zod_1.default.boolean(),
19
19
  saveToSdCard: zod_1.default.boolean(),
20
20
  statusCameraLed: zod_1.default.boolean(),
21
- statusCameraOutput: zod_1.default.string(),
21
+ statusCameraOutput: zod_1.default.string().nullable(),
22
22
  hasWatchdogs: zod_1.default.boolean(),
23
23
  countdown: zod_1.default.boolean(),
24
24
  enableManualControl: zod_1.default.boolean(),
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
- import { streamCommonSchema } from './streamCommonTypes';
3
- export const gameChangerSchema = streamCommonSchema.extend({
2
+ import { commonRtmpSchema } from './rtmpSchema';
3
+ export const gameChangerSchema = commonRtmpSchema.extend({
4
4
  type: z.literal('game_changer'),
5
5
  });
@@ -3,6 +3,7 @@ export * from './streamCommonTypes';
3
3
  export * from './facebookSchema';
4
4
  export * from './mpegDvbSchema';
5
5
  export * from './rtmpSchema';
6
+ export * from './gameChangerSchema';
6
7
  export * from './sdCardSchema';
7
8
  export * from './windySchema';
8
9
  export * from './youtubeSchema';
@@ -16,6 +16,6 @@ export const mpegDvbSchema = streamCommonSchema.extend({
16
16
  providerName: z.string(),
17
17
  serviceName: z.string(),
18
18
  statusCameraLed: z.boolean(),
19
- statusCameraOutput: z.string(),
19
+ statusCameraOutput: z.string().nullable(),
20
20
  saveToSdCard: z.boolean(),
21
21
  });
@@ -1,8 +1,13 @@
1
1
  import z from 'zod';
2
2
  import { streamCommonSchema } from './streamCommonTypes';
3
- export const rtmpSchema = streamCommonSchema.extend({
4
- type: z.literal('rtmp'),
3
+ export const commonRtmpSchema = streamCommonSchema.extend({
5
4
  outputUrl: z.string(),
6
5
  streamKey: z.string(),
7
6
  streamIdentifier: z.string().optional(),
7
+ saveToSdCard: z.boolean(),
8
+ statusCameraLed: z.boolean(),
9
+ statusCameraOutput: z.string().nullable(),
10
+ });
11
+ export const rtmpSchema = commonRtmpSchema.extend({
12
+ type: z.literal('rtmp'),
8
13
  });
@@ -12,7 +12,7 @@ export const youtubeSchema = streamCommonSchema.extend({
12
12
  dvr: z.boolean(),
13
13
  saveToSdCard: z.boolean(),
14
14
  statusCameraLed: z.boolean(),
15
- statusCameraOutput: z.string(),
15
+ statusCameraOutput: z.string().nullable(),
16
16
  hasWatchdogs: z.boolean(),
17
17
  countdown: z.boolean(),
18
18
  enableManualControl: z.boolean(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.105",
3
+ "version": "4.0.0-beta.106",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -132,7 +132,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
132
132
  providerName: string;
133
133
  serviceName: string;
134
134
  statusCameraLed: boolean;
135
- statusCameraOutput: string;
135
+ statusCameraOutput: string | null;
136
136
  saveToSdCard: boolean;
137
137
  } | {
138
138
  type: "rtmp";
@@ -187,6 +187,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
187
187
  isActive: boolean;
188
188
  }[];
189
189
  };
190
+ statusCameraLed: boolean;
191
+ statusCameraOutput: string | null;
192
+ saveToSdCard: boolean;
190
193
  outputUrl: string;
191
194
  streamKey: string;
192
195
  streamIdentifier?: string | undefined;
@@ -350,7 +353,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
350
353
  }[];
351
354
  };
352
355
  statusCameraLed: boolean;
353
- statusCameraOutput: string;
356
+ statusCameraOutput: string | null;
354
357
  saveToSdCard: boolean;
355
358
  tags: string[];
356
359
  streamPrivacy: "public" | "unlisted" | "private";
@@ -1052,6 +1055,12 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1052
1055
  isActive: boolean;
1053
1056
  }[];
1054
1057
  };
1058
+ statusCameraLed: boolean;
1059
+ statusCameraOutput: string | null;
1060
+ saveToSdCard: boolean;
1061
+ outputUrl: string;
1062
+ streamKey: string;
1063
+ streamIdentifier?: string | undefined;
1055
1064
  })[]>;
1056
1065
  setStreamList(streamList: TStreamList['streamList'], options?: THttpRequestOptions): Promise<void>;
1057
1066
  getStream(streamId: number, options?: THttpRequestOptions): Promise<{
@@ -1174,7 +1183,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1174
1183
  providerName: string;
1175
1184
  serviceName: string;
1176
1185
  statusCameraLed: boolean;
1177
- statusCameraOutput: string;
1186
+ statusCameraOutput: string | null;
1178
1187
  saveToSdCard: boolean;
1179
1188
  } | {
1180
1189
  type: "rtmp";
@@ -1229,6 +1238,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1229
1238
  isActive: boolean;
1230
1239
  }[];
1231
1240
  };
1241
+ statusCameraLed: boolean;
1242
+ statusCameraOutput: string | null;
1243
+ saveToSdCard: boolean;
1232
1244
  outputUrl: string;
1233
1245
  streamKey: string;
1234
1246
  streamIdentifier?: string | undefined;
@@ -1392,7 +1404,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
1392
1404
  }[];
1393
1405
  };
1394
1406
  statusCameraLed: boolean;
1395
- statusCameraOutput: string;
1407
+ statusCameraOutput: string | null;
1396
1408
  saveToSdCard: boolean;
1397
1409
  tags: string[];
1398
1410
  streamPrivacy: "public" | "unlisted" | "private";
@@ -2094,6 +2106,12 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
2094
2106
  isActive: boolean;
2095
2107
  }[];
2096
2108
  };
2109
+ statusCameraLed: boolean;
2110
+ statusCameraOutput: string | null;
2111
+ saveToSdCard: boolean;
2112
+ outputUrl: string;
2113
+ streamKey: string;
2114
+ streamIdentifier?: string | undefined;
2097
2115
  }>;
2098
2116
  setStream(streamId: number, streamData: TStream, options?: THttpRequestOptions): Promise<void>;
2099
2117
  isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;