camstreamerlib 4.0.0-beta.1 → 4.0.0-beta.2
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.
- package/VapixAPI.js +2 -3
- package/internal/utils.js +1 -1
- package/package.json +1 -1
- package/types/CamswitcherEvents.d.ts +33 -0
- package/types/CamswitcherEvents.js +4 -0
- package/types/VapixAPI.d.ts +7 -7
- package/types/VapixAPI.js +1 -1
package/VapixAPI.js
CHANGED
|
@@ -158,11 +158,10 @@ export class VapixAPI {
|
|
|
158
158
|
if (captureMode === undefined) {
|
|
159
159
|
throw new MaxFPSError('CAPTURE_MODE_NOT_FOUND');
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
if (isNaN(maxFps)) {
|
|
161
|
+
if (isNullish(captureMode.maxFPS)) {
|
|
163
162
|
throw new MaxFPSError('FPS_NOT_SPECIFIED');
|
|
164
163
|
}
|
|
165
|
-
return
|
|
164
|
+
return captureMode.maxFPS;
|
|
166
165
|
}
|
|
167
166
|
async getTimezone(proxy = null) {
|
|
168
167
|
const data = { apiVersion: '1.0', method: 'getDateTimeInfo' };
|
package/internal/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -119,6 +119,15 @@ declare const cswEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
119
119
|
type: "MediaServerStarted";
|
|
120
120
|
}, {
|
|
121
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;
|
|
122
131
|
}>]>;
|
|
123
132
|
export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
124
133
|
type: z.ZodLiteral<"init">;
|
|
@@ -242,6 +251,15 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
242
251
|
type: "MediaServerStarted";
|
|
243
252
|
}, {
|
|
244
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;
|
|
245
263
|
}>]>;
|
|
246
264
|
}, "strip", z.ZodTypeAny, {
|
|
247
265
|
type: "init";
|
|
@@ -285,6 +303,9 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
285
303
|
default_playlist_id?: string | undefined;
|
|
286
304
|
} | {
|
|
287
305
|
type: "MediaServerStarted";
|
|
306
|
+
} | {
|
|
307
|
+
type: "ClipRemove";
|
|
308
|
+
clip_name: string;
|
|
288
309
|
};
|
|
289
310
|
}, {
|
|
290
311
|
type: "init";
|
|
@@ -328,6 +349,9 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
328
349
|
default_playlist_id?: string | undefined;
|
|
329
350
|
} | {
|
|
330
351
|
type: "MediaServerStarted";
|
|
352
|
+
} | {
|
|
353
|
+
type: "ClipRemove";
|
|
354
|
+
clip_name: string;
|
|
331
355
|
};
|
|
332
356
|
}>, z.ZodObject<{
|
|
333
357
|
type: z.ZodLiteral<"authorization">;
|
|
@@ -449,6 +473,15 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
449
473
|
type: "MediaServerStarted";
|
|
450
474
|
}, {
|
|
451
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;
|
|
452
485
|
}>]>;
|
|
453
486
|
export type TCamSwitcherEvent = z.infer<typeof cswEventsDataSchema>;
|
|
454
487
|
export type TCamSwitcherEventType = TCamSwitcherEvent['type'];
|
|
@@ -48,6 +48,10 @@ const cswEventsDataSchema = z.discriminatedUnion('type', [
|
|
|
48
48
|
z.object({
|
|
49
49
|
type: z.literal('MediaServerStarted'),
|
|
50
50
|
}),
|
|
51
|
+
z.object({
|
|
52
|
+
type: z.literal('ClipRemove'),
|
|
53
|
+
clip_name: z.string(),
|
|
54
|
+
}),
|
|
51
55
|
]);
|
|
52
56
|
export const cswEventsSchema = z.discriminatedUnion('type', [
|
|
53
57
|
z.object({ type: z.literal('init'), data: cswEventsDataSchema }),
|
package/types/VapixAPI.d.ts
CHANGED
|
@@ -1513,25 +1513,25 @@ export declare const maxFpsResponseSchema: z.ZodObject<{
|
|
|
1513
1513
|
channel: z.ZodNumber;
|
|
1514
1514
|
captureMode: z.ZodArray<z.ZodObject<{
|
|
1515
1515
|
enabled: z.ZodBoolean;
|
|
1516
|
-
maxFPS: z.
|
|
1516
|
+
maxFPS: z.ZodOptional<z.ZodNumber>;
|
|
1517
1517
|
}, "strip", z.ZodTypeAny, {
|
|
1518
1518
|
enabled: boolean;
|
|
1519
|
-
maxFPS
|
|
1519
|
+
maxFPS?: number | undefined;
|
|
1520
1520
|
}, {
|
|
1521
1521
|
enabled: boolean;
|
|
1522
|
-
maxFPS
|
|
1522
|
+
maxFPS?: number | undefined;
|
|
1523
1523
|
}>, "many">;
|
|
1524
1524
|
}, "strip", z.ZodTypeAny, {
|
|
1525
1525
|
channel: number;
|
|
1526
1526
|
captureMode: {
|
|
1527
1527
|
enabled: boolean;
|
|
1528
|
-
maxFPS
|
|
1528
|
+
maxFPS?: number | undefined;
|
|
1529
1529
|
}[];
|
|
1530
1530
|
}, {
|
|
1531
1531
|
channel: number;
|
|
1532
1532
|
captureMode: {
|
|
1533
1533
|
enabled: boolean;
|
|
1534
|
-
maxFPS
|
|
1534
|
+
maxFPS?: number | undefined;
|
|
1535
1535
|
}[];
|
|
1536
1536
|
}>, "many">;
|
|
1537
1537
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1539,7 +1539,7 @@ export declare const maxFpsResponseSchema: z.ZodObject<{
|
|
|
1539
1539
|
channel: number;
|
|
1540
1540
|
captureMode: {
|
|
1541
1541
|
enabled: boolean;
|
|
1542
|
-
maxFPS
|
|
1542
|
+
maxFPS?: number | undefined;
|
|
1543
1543
|
}[];
|
|
1544
1544
|
}[];
|
|
1545
1545
|
}, {
|
|
@@ -1547,7 +1547,7 @@ export declare const maxFpsResponseSchema: z.ZodObject<{
|
|
|
1547
1547
|
channel: number;
|
|
1548
1548
|
captureMode: {
|
|
1549
1549
|
enabled: boolean;
|
|
1550
|
-
maxFPS
|
|
1550
|
+
maxFPS?: number | undefined;
|
|
1551
1551
|
}[];
|
|
1552
1552
|
}[];
|
|
1553
1553
|
}>;
|
package/types/VapixAPI.js
CHANGED