camstreamerlib 4.0.35 → 4.0.36-c07c9c1
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/cjs/CamSwitcherAPI.d.ts +1 -0
- package/cjs/CamSwitcherAPI.js +2 -0
- package/cjs/PlaneTrackerAPI.d.ts +42 -9
- package/cjs/VapixAPI.js +15 -11
- package/cjs/VapixAPI.test.d.ts +1 -0
- package/cjs/VapixAPI.test.js +146 -0
- package/cjs/types/CamSwitcherAPI.d.ts +3 -0
- package/cjs/types/CamSwitcherAPI.js +1 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +205 -26
- package/cjs/types/PlaneTrackerAPI.js +60 -16
- package/cjs/types/PlaneTrackerAPI.test.d.ts +1 -0
- package/cjs/types/PlaneTrackerAPI.test.js +90 -0
- package/cjs/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/esm/CamSwitcherAPI.js +2 -0
- package/esm/VapixAPI.js +16 -12
- package/esm/VapixAPI.test.js +144 -0
- package/esm/types/CamSwitcherAPI.js +1 -0
- package/esm/types/PlaneTrackerAPI.js +60 -16
- package/esm/types/PlaneTrackerAPI.test.js +88 -0
- package/package.json +107 -107
- package/types/CamSwitcherAPI.d.ts +1 -0
- package/types/PlaneTrackerAPI.d.ts +42 -9
- package/types/VapixAPI.test.d.ts +1 -0
- package/types/types/CamSwitcherAPI.d.ts +3 -0
- package/types/types/PlaneTrackerAPI.d.ts +205 -26
- package/types/types/PlaneTrackerAPI.test.d.ts +1 -0
- package/types/types/ws/CamSwitcherEvents.d.ts +8 -8
|
@@ -56,6 +56,8 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
56
56
|
}>;
|
|
57
57
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
58
58
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
59
|
+
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
60
|
+
export type TDroneLabelOption = z.infer<typeof droneLabelOptionsSchema>;
|
|
59
61
|
export declare const cameraSettingsSchema: z.ZodObject<{
|
|
60
62
|
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">]>>;
|
|
61
63
|
adsbSource: z.ZodDefault<z.ZodObject<{
|
|
@@ -119,16 +121,67 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
119
121
|
nightSkyCalibrationFocusValue?: number | undefined;
|
|
120
122
|
focusCalibrationPoints?: string | undefined;
|
|
121
123
|
}>>;
|
|
122
|
-
cameraConfig: z.ZodDefault<z.ZodObject<{
|
|
124
|
+
cameraConfig: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
125
|
+
aircraft: z.ZodObject<{
|
|
126
|
+
defaultCaptureSizeMeters: z.ZodNumber;
|
|
127
|
+
captureSizeExtensionMeters: z.ZodNumber;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
defaultCaptureSizeMeters: number;
|
|
130
|
+
captureSizeExtensionMeters: number;
|
|
131
|
+
}, {
|
|
132
|
+
defaultCaptureSizeMeters: number;
|
|
133
|
+
captureSizeExtensionMeters: number;
|
|
134
|
+
}>;
|
|
135
|
+
drone: z.ZodDefault<z.ZodObject<{
|
|
136
|
+
defaultCaptureSizeMeters: z.ZodNumber;
|
|
137
|
+
captureSizeExtensionMeters: z.ZodNumber;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
defaultCaptureSizeMeters: number;
|
|
140
|
+
captureSizeExtensionMeters: number;
|
|
141
|
+
}, {
|
|
142
|
+
defaultCaptureSizeMeters: number;
|
|
143
|
+
captureSizeExtensionMeters: number;
|
|
144
|
+
}>>;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
aircraft: {
|
|
147
|
+
defaultCaptureSizeMeters: number;
|
|
148
|
+
captureSizeExtensionMeters: number;
|
|
149
|
+
};
|
|
150
|
+
drone: {
|
|
151
|
+
defaultCaptureSizeMeters: number;
|
|
152
|
+
captureSizeExtensionMeters: number;
|
|
153
|
+
};
|
|
154
|
+
}, {
|
|
155
|
+
aircraft: {
|
|
156
|
+
defaultCaptureSizeMeters: number;
|
|
157
|
+
captureSizeExtensionMeters: number;
|
|
158
|
+
};
|
|
159
|
+
drone?: {
|
|
160
|
+
defaultCaptureSizeMeters: number;
|
|
161
|
+
captureSizeExtensionMeters: number;
|
|
162
|
+
} | undefined;
|
|
163
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
123
164
|
defaultCaptureSizeMeters: z.ZodDefault<z.ZodNumber>;
|
|
124
165
|
captureSizeExtensionMeters: z.ZodDefault<z.ZodNumber>;
|
|
125
|
-
}, "
|
|
166
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
167
|
defaultCaptureSizeMeters: number;
|
|
127
168
|
captureSizeExtensionMeters: number;
|
|
128
169
|
}, {
|
|
129
170
|
defaultCaptureSizeMeters?: number | undefined;
|
|
130
171
|
captureSizeExtensionMeters?: number | undefined;
|
|
131
|
-
}
|
|
172
|
+
}>, {
|
|
173
|
+
aircraft: {
|
|
174
|
+
defaultCaptureSizeMeters: number;
|
|
175
|
+
captureSizeExtensionMeters: number;
|
|
176
|
+
};
|
|
177
|
+
drone: {
|
|
178
|
+
defaultCaptureSizeMeters: number;
|
|
179
|
+
captureSizeExtensionMeters: number;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
defaultCaptureSizeMeters?: number | undefined;
|
|
183
|
+
captureSizeExtensionMeters?: number | undefined;
|
|
184
|
+
}>]>>;
|
|
132
185
|
stream: z.ZodDefault<z.ZodObject<{
|
|
133
186
|
width: z.ZodNumber;
|
|
134
187
|
height: z.ZodNumber;
|
|
@@ -334,7 +387,61 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
334
387
|
port?: number | undefined;
|
|
335
388
|
priority?: number | undefined;
|
|
336
389
|
}>>;
|
|
337
|
-
identificationLabel: z.ZodDefault<z.ZodObject<{
|
|
390
|
+
identificationLabel: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
391
|
+
aircraft: z.ZodObject<{
|
|
392
|
+
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
393
|
+
secondRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
394
|
+
thirdRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
395
|
+
fourthRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
396
|
+
opacity: z.ZodNumber;
|
|
397
|
+
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
399
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
400
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
401
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
402
|
+
opacity: number;
|
|
403
|
+
}, {
|
|
404
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
405
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
406
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
407
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
408
|
+
opacity: number;
|
|
409
|
+
}>;
|
|
410
|
+
drone: z.ZodDefault<z.ZodObject<{
|
|
411
|
+
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
412
|
+
opacity: z.ZodNumber;
|
|
413
|
+
}, "strip", z.ZodTypeAny, {
|
|
414
|
+
firstRow: "blank" | "remote_id";
|
|
415
|
+
opacity: number;
|
|
416
|
+
}, {
|
|
417
|
+
firstRow: "blank" | "remote_id";
|
|
418
|
+
opacity: number;
|
|
419
|
+
}>>;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
aircraft: {
|
|
422
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
423
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
424
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
425
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
426
|
+
opacity: number;
|
|
427
|
+
};
|
|
428
|
+
drone: {
|
|
429
|
+
firstRow: "blank" | "remote_id";
|
|
430
|
+
opacity: number;
|
|
431
|
+
};
|
|
432
|
+
}, {
|
|
433
|
+
aircraft: {
|
|
434
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
435
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
436
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
437
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
438
|
+
opacity: number;
|
|
439
|
+
};
|
|
440
|
+
drone?: {
|
|
441
|
+
firstRow: "blank" | "remote_id";
|
|
442
|
+
opacity: number;
|
|
443
|
+
} | undefined;
|
|
444
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
338
445
|
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
339
446
|
secondRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
340
447
|
thirdRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
@@ -352,7 +459,25 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
352
459
|
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
353
460
|
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
354
461
|
opacity: number;
|
|
355
|
-
}
|
|
462
|
+
}>, {
|
|
463
|
+
aircraft: {
|
|
464
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
465
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
466
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
467
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
468
|
+
opacity: number;
|
|
469
|
+
};
|
|
470
|
+
drone: {
|
|
471
|
+
firstRow: "blank" | "remote_id";
|
|
472
|
+
opacity: number;
|
|
473
|
+
};
|
|
474
|
+
}, {
|
|
475
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
476
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
477
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
478
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
479
|
+
opacity: number;
|
|
480
|
+
}>]>>;
|
|
356
481
|
acs: z.ZodDefault<z.ZodObject<{
|
|
357
482
|
protocol: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodLiteral<"https_insecure">]>;
|
|
358
483
|
ip: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
|
|
@@ -447,8 +572,23 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
447
572
|
focusCalibrationPoints: string;
|
|
448
573
|
};
|
|
449
574
|
cameraConfig: {
|
|
450
|
-
|
|
451
|
-
|
|
575
|
+
aircraft: {
|
|
576
|
+
defaultCaptureSizeMeters: number;
|
|
577
|
+
captureSizeExtensionMeters: number;
|
|
578
|
+
};
|
|
579
|
+
drone: {
|
|
580
|
+
defaultCaptureSizeMeters: number;
|
|
581
|
+
captureSizeExtensionMeters: number;
|
|
582
|
+
};
|
|
583
|
+
} | {
|
|
584
|
+
aircraft: {
|
|
585
|
+
defaultCaptureSizeMeters: number;
|
|
586
|
+
captureSizeExtensionMeters: number;
|
|
587
|
+
};
|
|
588
|
+
drone: {
|
|
589
|
+
defaultCaptureSizeMeters: number;
|
|
590
|
+
captureSizeExtensionMeters: number;
|
|
591
|
+
};
|
|
452
592
|
};
|
|
453
593
|
stream: {
|
|
454
594
|
width: number;
|
|
@@ -501,11 +641,29 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
501
641
|
priority: number;
|
|
502
642
|
};
|
|
503
643
|
identificationLabel: {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
644
|
+
aircraft: {
|
|
645
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
646
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
647
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
648
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
649
|
+
opacity: number;
|
|
650
|
+
};
|
|
651
|
+
drone: {
|
|
652
|
+
firstRow: "blank" | "remote_id";
|
|
653
|
+
opacity: number;
|
|
654
|
+
};
|
|
655
|
+
} | {
|
|
656
|
+
aircraft: {
|
|
657
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
658
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
659
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
660
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
661
|
+
opacity: number;
|
|
662
|
+
};
|
|
663
|
+
drone: {
|
|
664
|
+
firstRow: "blank" | "remote_id";
|
|
665
|
+
opacity: number;
|
|
666
|
+
};
|
|
509
667
|
};
|
|
510
668
|
acs: {
|
|
511
669
|
ip: string;
|
|
@@ -581,6 +739,15 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
581
739
|
focusCalibrationPoints?: string | undefined;
|
|
582
740
|
} | undefined;
|
|
583
741
|
cameraConfig?: {
|
|
742
|
+
aircraft: {
|
|
743
|
+
defaultCaptureSizeMeters: number;
|
|
744
|
+
captureSizeExtensionMeters: number;
|
|
745
|
+
};
|
|
746
|
+
drone?: {
|
|
747
|
+
defaultCaptureSizeMeters: number;
|
|
748
|
+
captureSizeExtensionMeters: number;
|
|
749
|
+
} | undefined;
|
|
750
|
+
} | {
|
|
584
751
|
defaultCaptureSizeMeters?: number | undefined;
|
|
585
752
|
captureSizeExtensionMeters?: number | undefined;
|
|
586
753
|
} | undefined;
|
|
@@ -664,6 +831,18 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
664
831
|
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
665
832
|
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
666
833
|
opacity: number;
|
|
834
|
+
} | {
|
|
835
|
+
aircraft: {
|
|
836
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
837
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
838
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
839
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
840
|
+
opacity: number;
|
|
841
|
+
};
|
|
842
|
+
drone?: {
|
|
843
|
+
firstRow: "blank" | "remote_id";
|
|
844
|
+
opacity: number;
|
|
845
|
+
} | undefined;
|
|
667
846
|
} | undefined;
|
|
668
847
|
acs?: {
|
|
669
848
|
ip: string;
|
|
@@ -1196,11 +1375,11 @@ declare const categoryDescriptorSchema: z.ZodObject<{
|
|
|
1196
1375
|
}, "strip", z.ZodTypeAny, {
|
|
1197
1376
|
categoryId: string;
|
|
1198
1377
|
uiName: string;
|
|
1199
|
-
icon: "unknown" | "small" | "
|
|
1378
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1200
1379
|
}, {
|
|
1201
1380
|
categoryId: string;
|
|
1202
1381
|
uiName: string;
|
|
1203
|
-
icon: "unknown" | "small" | "
|
|
1382
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1204
1383
|
}>;
|
|
1205
1384
|
export type TCategoryDescriptor = z.infer<typeof categoryDescriptorSchema>;
|
|
1206
1385
|
declare const domainDescriptorSchema: z.ZodObject<{
|
|
@@ -1213,27 +1392,27 @@ declare const domainDescriptorSchema: z.ZodObject<{
|
|
|
1213
1392
|
}, "strip", z.ZodTypeAny, {
|
|
1214
1393
|
categoryId: string;
|
|
1215
1394
|
uiName: string;
|
|
1216
|
-
icon: "unknown" | "small" | "
|
|
1395
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1217
1396
|
}, {
|
|
1218
1397
|
categoryId: string;
|
|
1219
1398
|
uiName: string;
|
|
1220
|
-
icon: "unknown" | "small" | "
|
|
1399
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1221
1400
|
}>, "many">;
|
|
1222
1401
|
}, "strip", z.ZodTypeAny, {
|
|
1223
1402
|
uiName: string;
|
|
1224
|
-
icon: "unknown" | "small" | "
|
|
1403
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1225
1404
|
categoryList: {
|
|
1226
1405
|
categoryId: string;
|
|
1227
1406
|
uiName: string;
|
|
1228
|
-
icon: "unknown" | "small" | "
|
|
1407
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1229
1408
|
}[];
|
|
1230
1409
|
}, {
|
|
1231
1410
|
uiName: string;
|
|
1232
|
-
icon: "unknown" | "small" | "
|
|
1411
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1233
1412
|
categoryList: {
|
|
1234
1413
|
categoryId: string;
|
|
1235
1414
|
uiName: string;
|
|
1236
|
-
icon: "unknown" | "small" | "
|
|
1415
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1237
1416
|
}[];
|
|
1238
1417
|
}>;
|
|
1239
1418
|
export type TDomainDescriptor = z.infer<typeof domainDescriptorSchema>;
|
|
@@ -1247,27 +1426,27 @@ export declare const domainListSchema: z.ZodRecord<z.ZodEnum<["adsb", "remoteId"
|
|
|
1247
1426
|
}, "strip", z.ZodTypeAny, {
|
|
1248
1427
|
categoryId: string;
|
|
1249
1428
|
uiName: string;
|
|
1250
|
-
icon: "unknown" | "small" | "
|
|
1429
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1251
1430
|
}, {
|
|
1252
1431
|
categoryId: string;
|
|
1253
1432
|
uiName: string;
|
|
1254
|
-
icon: "unknown" | "small" | "
|
|
1433
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1255
1434
|
}>, "many">;
|
|
1256
1435
|
}, "strip", z.ZodTypeAny, {
|
|
1257
1436
|
uiName: string;
|
|
1258
|
-
icon: "unknown" | "small" | "
|
|
1437
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1259
1438
|
categoryList: {
|
|
1260
1439
|
categoryId: string;
|
|
1261
1440
|
uiName: string;
|
|
1262
|
-
icon: "unknown" | "small" | "
|
|
1441
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1263
1442
|
}[];
|
|
1264
1443
|
}, {
|
|
1265
1444
|
uiName: string;
|
|
1266
|
-
icon: "unknown" | "small" | "
|
|
1445
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1267
1446
|
categoryList: {
|
|
1268
1447
|
categoryId: string;
|
|
1269
1448
|
uiName: string;
|
|
1270
|
-
icon: "unknown" | "small" | "
|
|
1449
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1271
1450
|
}[];
|
|
1272
1451
|
}>>;
|
|
1273
1452
|
export type TDomainList = z.infer<typeof domainListSchema>;
|
|
@@ -35,13 +35,59 @@ const labelOptionsSchema = zod_1.z.union([
|
|
|
35
35
|
zod_1.z.literal('flight_number'),
|
|
36
36
|
zod_1.z.literal('icao'),
|
|
37
37
|
]);
|
|
38
|
-
const
|
|
38
|
+
const aircraftIdentificationLabelSchema = zod_1.z.object({
|
|
39
39
|
firstRow: labelOptionsSchema,
|
|
40
40
|
secondRow: labelOptionsSchema,
|
|
41
41
|
thirdRow: labelOptionsSchema,
|
|
42
42
|
fourthRow: labelOptionsSchema,
|
|
43
|
-
opacity: zod_1.z.number().
|
|
43
|
+
opacity: zod_1.z.number().nonnegative(),
|
|
44
44
|
});
|
|
45
|
+
const droneLabelOptionsSchema = zod_1.z.union([zod_1.z.literal('blank'), zod_1.z.literal('remote_id')]);
|
|
46
|
+
const droneIdentificationLabelSchema = zod_1.z.object({
|
|
47
|
+
firstRow: droneLabelOptionsSchema,
|
|
48
|
+
opacity: zod_1.z.number().nonnegative(),
|
|
49
|
+
});
|
|
50
|
+
const DEFAULT_DRONE_IDENTIFICATION_LABEL = {
|
|
51
|
+
firstRow: 'remote_id',
|
|
52
|
+
opacity: 30,
|
|
53
|
+
};
|
|
54
|
+
const identificationLabelSchema = zod_1.z.union([
|
|
55
|
+
zod_1.z.object({
|
|
56
|
+
aircraft: aircraftIdentificationLabelSchema,
|
|
57
|
+
drone: droneIdentificationLabelSchema.default(DEFAULT_DRONE_IDENTIFICATION_LABEL),
|
|
58
|
+
}),
|
|
59
|
+
aircraftIdentificationLabelSchema.transform((aircraft) => ({
|
|
60
|
+
aircraft,
|
|
61
|
+
drone: { ...DEFAULT_DRONE_IDENTIFICATION_LABEL },
|
|
62
|
+
})),
|
|
63
|
+
]);
|
|
64
|
+
const captureConfigSchema = zod_1.z.object({
|
|
65
|
+
defaultCaptureSizeMeters: zod_1.z.number().positive(),
|
|
66
|
+
captureSizeExtensionMeters: zod_1.z.number().positive(),
|
|
67
|
+
});
|
|
68
|
+
const DEFAULT_CAPTURE_CONFIG = {
|
|
69
|
+
defaultCaptureSizeMeters: 120,
|
|
70
|
+
captureSizeExtensionMeters: 80,
|
|
71
|
+
};
|
|
72
|
+
const cameraConfigSchema = zod_1.z.union([
|
|
73
|
+
zod_1.z.object({
|
|
74
|
+
aircraft: captureConfigSchema,
|
|
75
|
+
drone: captureConfigSchema.default(() => ({ ...DEFAULT_CAPTURE_CONFIG })),
|
|
76
|
+
}),
|
|
77
|
+
zod_1.z
|
|
78
|
+
.object({
|
|
79
|
+
defaultCaptureSizeMeters: zod_1.z.number().positive().default(DEFAULT_CAPTURE_CONFIG.defaultCaptureSizeMeters),
|
|
80
|
+
captureSizeExtensionMeters: zod_1.z
|
|
81
|
+
.number()
|
|
82
|
+
.positive()
|
|
83
|
+
.default(DEFAULT_CAPTURE_CONFIG.captureSizeExtensionMeters),
|
|
84
|
+
})
|
|
85
|
+
.strict()
|
|
86
|
+
.transform((captureConfig) => ({
|
|
87
|
+
aircraft: captureConfig,
|
|
88
|
+
drone: { ...captureConfig },
|
|
89
|
+
})),
|
|
90
|
+
]);
|
|
45
91
|
exports.cameraSettingsSchema = zod_1.z.object({
|
|
46
92
|
units: zod_1.z.union([zod_1.z.literal('metric'), zod_1.z.literal('imperial')]).default('imperial'),
|
|
47
93
|
adsbSource: zod_1.z
|
|
@@ -79,15 +125,10 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
79
125
|
nightSkyCalibrationFocusValue: 9000,
|
|
80
126
|
focusCalibrationPoints: '',
|
|
81
127
|
}),
|
|
82
|
-
cameraConfig:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
.default({
|
|
88
|
-
defaultCaptureSizeMeters: 120,
|
|
89
|
-
captureSizeExtensionMeters: 80,
|
|
90
|
-
}),
|
|
128
|
+
cameraConfig: cameraConfigSchema.default(() => ({
|
|
129
|
+
aircraft: { ...DEFAULT_CAPTURE_CONFIG },
|
|
130
|
+
drone: { ...DEFAULT_CAPTURE_CONFIG },
|
|
131
|
+
})),
|
|
91
132
|
stream: zod_1.z
|
|
92
133
|
.object({
|
|
93
134
|
width: zod_1.z.number().positive(),
|
|
@@ -198,11 +239,14 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
198
239
|
port: 80,
|
|
199
240
|
}),
|
|
200
241
|
identificationLabel: identificationLabelSchema.default({
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
242
|
+
aircraft: {
|
|
243
|
+
firstRow: 'icao',
|
|
244
|
+
secondRow: 'call_sign',
|
|
245
|
+
thirdRow: 'blank',
|
|
246
|
+
fourthRow: 'blank',
|
|
247
|
+
opacity: 30,
|
|
248
|
+
},
|
|
249
|
+
drone: DEFAULT_DRONE_IDENTIFICATION_LABEL,
|
|
206
250
|
}),
|
|
207
251
|
acs: exports.connectionSchema
|
|
208
252
|
.extend({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const PlaneTrackerAPI_1 = require("./PlaneTrackerAPI");
|
|
4
|
+
const globals_1 = require("@jest/globals");
|
|
5
|
+
const AIRCRAFT_LABEL = {
|
|
6
|
+
firstRow: 'icao',
|
|
7
|
+
secondRow: 'call_sign',
|
|
8
|
+
thirdRow: 'blank',
|
|
9
|
+
fourthRow: 'registration',
|
|
10
|
+
opacity: 50,
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_DRONE_LABEL = { firstRow: 'remote_id', opacity: 30 };
|
|
13
|
+
(0, globals_1.describe)('cameraSettingsSchema identificationLabel', () => {
|
|
14
|
+
(0, globals_1.test)('defaults both aircraft and drone labels', () => {
|
|
15
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).identificationLabel).toEqual({
|
|
16
|
+
aircraft: {
|
|
17
|
+
firstRow: 'icao',
|
|
18
|
+
secondRow: 'call_sign',
|
|
19
|
+
thirdRow: 'blank',
|
|
20
|
+
fourthRow: 'blank',
|
|
21
|
+
opacity: 30,
|
|
22
|
+
},
|
|
23
|
+
drone: DEFAULT_DRONE_LABEL,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
(0, globals_1.test)('parses the aircraft and drone label', () => {
|
|
27
|
+
const identificationLabel = { aircraft: AIRCRAFT_LABEL, drone: { firstRow: 'blank', opacity: 70 } };
|
|
28
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel }).identificationLabel).toEqual(identificationLabel);
|
|
29
|
+
});
|
|
30
|
+
(0, globals_1.test)('defaults a missing drone label', () => {
|
|
31
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: { aircraft: AIRCRAFT_LABEL } }).identificationLabel).toEqual({ aircraft: AIRCRAFT_LABEL, drone: DEFAULT_DRONE_LABEL });
|
|
32
|
+
});
|
|
33
|
+
(0, globals_1.test)('converts the legacy flat label to the aircraft label', () => {
|
|
34
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: AIRCRAFT_LABEL }).identificationLabel).toEqual({
|
|
35
|
+
aircraft: AIRCRAFT_LABEL,
|
|
36
|
+
drone: DEFAULT_DRONE_LABEL,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
(0, globals_1.test)('returns an independent drone label for each legacy parse', () => {
|
|
40
|
+
const first = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: AIRCRAFT_LABEL });
|
|
41
|
+
first.identificationLabel.drone.opacity = 90;
|
|
42
|
+
const second = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: AIRCRAFT_LABEL });
|
|
43
|
+
(0, globals_1.expect)(second.identificationLabel.drone).toEqual(DEFAULT_DRONE_LABEL);
|
|
44
|
+
});
|
|
45
|
+
(0, globals_1.test)('rejects an unknown drone label row', () => {
|
|
46
|
+
const identificationLabel = { aircraft: AIRCRAFT_LABEL, drone: { firstRow: 'icao', opacity: 30 } };
|
|
47
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ identificationLabel }).success).toBe(false);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const CAPTURE_CONFIG = { defaultCaptureSizeMeters: 50, captureSizeExtensionMeters: 20 };
|
|
51
|
+
const DEFAULT_CAPTURE_CONFIG = { defaultCaptureSizeMeters: 120, captureSizeExtensionMeters: 80 };
|
|
52
|
+
(0, globals_1.describe)('cameraSettingsSchema cameraConfig', () => {
|
|
53
|
+
(0, globals_1.test)('defaults both aircraft and drone capture config', () => {
|
|
54
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).cameraConfig).toEqual({
|
|
55
|
+
aircraft: DEFAULT_CAPTURE_CONFIG,
|
|
56
|
+
drone: DEFAULT_CAPTURE_CONFIG,
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
(0, globals_1.test)('parses independent aircraft and drone capture config', () => {
|
|
60
|
+
const cameraConfig = {
|
|
61
|
+
aircraft: CAPTURE_CONFIG,
|
|
62
|
+
drone: { defaultCaptureSizeMeters: 5, captureSizeExtensionMeters: 3 },
|
|
63
|
+
};
|
|
64
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig }).cameraConfig).toEqual(cameraConfig);
|
|
65
|
+
});
|
|
66
|
+
(0, globals_1.test)('defaults a missing drone capture config', () => {
|
|
67
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig: { aircraft: CAPTURE_CONFIG } }).cameraConfig).toEqual({
|
|
68
|
+
aircraft: CAPTURE_CONFIG,
|
|
69
|
+
drone: DEFAULT_CAPTURE_CONFIG,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
(0, globals_1.test)('copies the legacy flat capture config to both aircraft and drone', () => {
|
|
73
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig: CAPTURE_CONFIG }).cameraConfig).toEqual({
|
|
74
|
+
aircraft: CAPTURE_CONFIG,
|
|
75
|
+
drone: CAPTURE_CONFIG,
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
(0, globals_1.test)('returns independent aircraft and drone objects', () => {
|
|
79
|
+
const legacy = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig: CAPTURE_CONFIG }).cameraConfig;
|
|
80
|
+
legacy.drone.defaultCaptureSizeMeters = 1;
|
|
81
|
+
(0, globals_1.expect)(legacy.aircraft).toEqual(CAPTURE_CONFIG);
|
|
82
|
+
const first = PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).cameraConfig;
|
|
83
|
+
first.drone.defaultCaptureSizeMeters = 1;
|
|
84
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).cameraConfig.drone).toEqual(DEFAULT_CAPTURE_CONFIG);
|
|
85
|
+
});
|
|
86
|
+
(0, globals_1.test)('rejects a non-positive drone capture size', () => {
|
|
87
|
+
const cameraConfig = { aircraft: CAPTURE_CONFIG, drone: { ...CAPTURE_CONFIG, defaultCaptureSizeMeters: 0 } };
|
|
88
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -54,15 +54,15 @@ declare const cswEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
55
|
type: "StreamSwitchVideoError";
|
|
56
56
|
playlist_name: string;
|
|
57
|
-
playlist_active_stream: number;
|
|
58
57
|
info: string;
|
|
58
|
+
playlist_active_stream: number;
|
|
59
59
|
stream_name?: string | undefined;
|
|
60
60
|
clip_name?: string | undefined;
|
|
61
61
|
}, {
|
|
62
62
|
type: "StreamSwitchVideoError";
|
|
63
63
|
playlist_name: string;
|
|
64
|
-
playlist_active_stream: number;
|
|
65
64
|
info: string;
|
|
65
|
+
playlist_active_stream: number;
|
|
66
66
|
stream_name?: string | undefined;
|
|
67
67
|
clip_name?: string | undefined;
|
|
68
68
|
}>, z.ZodObject<{
|
|
@@ -207,15 +207,15 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
207
207
|
}, "strip", z.ZodTypeAny, {
|
|
208
208
|
type: "StreamSwitchVideoError";
|
|
209
209
|
playlist_name: string;
|
|
210
|
-
playlist_active_stream: number;
|
|
211
210
|
info: string;
|
|
211
|
+
playlist_active_stream: number;
|
|
212
212
|
stream_name?: string | undefined;
|
|
213
213
|
clip_name?: string | undefined;
|
|
214
214
|
}, {
|
|
215
215
|
type: "StreamSwitchVideoError";
|
|
216
216
|
playlist_name: string;
|
|
217
|
-
playlist_active_stream: number;
|
|
218
217
|
info: string;
|
|
218
|
+
playlist_active_stream: number;
|
|
219
219
|
stream_name?: string | undefined;
|
|
220
220
|
clip_name?: string | undefined;
|
|
221
221
|
}>, z.ZodObject<{
|
|
@@ -323,8 +323,8 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
323
323
|
} | {
|
|
324
324
|
type: "StreamSwitchVideoError";
|
|
325
325
|
playlist_name: string;
|
|
326
|
-
playlist_active_stream: number;
|
|
327
326
|
info: string;
|
|
327
|
+
playlist_active_stream: number;
|
|
328
328
|
stream_name?: string | undefined;
|
|
329
329
|
clip_name?: string | undefined;
|
|
330
330
|
} | {
|
|
@@ -376,8 +376,8 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
376
376
|
} | {
|
|
377
377
|
type: "StreamSwitchVideoError";
|
|
378
378
|
playlist_name: string;
|
|
379
|
-
playlist_active_stream: number;
|
|
380
379
|
info: string;
|
|
380
|
+
playlist_active_stream: number;
|
|
381
381
|
stream_name?: string | undefined;
|
|
382
382
|
clip_name?: string | undefined;
|
|
383
383
|
} | {
|
|
@@ -464,15 +464,15 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
464
464
|
}, "strip", z.ZodTypeAny, {
|
|
465
465
|
type: "StreamSwitchVideoError";
|
|
466
466
|
playlist_name: string;
|
|
467
|
-
playlist_active_stream: number;
|
|
468
467
|
info: string;
|
|
468
|
+
playlist_active_stream: number;
|
|
469
469
|
stream_name?: string | undefined;
|
|
470
470
|
clip_name?: string | undefined;
|
|
471
471
|
}, {
|
|
472
472
|
type: "StreamSwitchVideoError";
|
|
473
473
|
playlist_name: string;
|
|
474
|
-
playlist_active_stream: number;
|
|
475
474
|
info: string;
|
|
475
|
+
playlist_active_stream: number;
|
|
476
476
|
stream_name?: string | undefined;
|
|
477
477
|
clip_name?: string | undefined;
|
|
478
478
|
}>, z.ZodObject<{
|
package/esm/CamSwitcherAPI.js
CHANGED
|
@@ -153,6 +153,7 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
153
153
|
audio: {
|
|
154
154
|
sampleRate: data.audioSampleRate,
|
|
155
155
|
channelCount: data.audioChannelCount,
|
|
156
|
+
bitrate: data.audioBitrate,
|
|
156
157
|
},
|
|
157
158
|
keyboard: data.keyboard,
|
|
158
159
|
};
|
|
@@ -204,6 +205,7 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
204
205
|
const settings = {
|
|
205
206
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
206
207
|
audioChannelCount: saveData.audio?.channelCount,
|
|
208
|
+
audioBitrate: saveData.audio?.bitrate,
|
|
207
209
|
keyboard: saveData.keyboard,
|
|
208
210
|
fps: saveData.video.fps,
|
|
209
211
|
resolution: saveData.video.resolution,
|