camstreamerlib 4.0.32 → 4.0.33-55dd1f0
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/README.md +9 -0
- package/cjs/PlaneTrackerAPI.js +2 -1
- package/cjs/browser.index.d.ts +2 -0
- package/cjs/browser.index.js +18 -0
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +47 -0
- package/cjs/types/ws/PlaneTrackerEvents.js +15 -1
- package/cjs/ws/PlaneTrackerEvents.d.ts +1 -1
- package/cjs/ws/PlaneTrackerEvents.js +2 -2
- package/cjs/ws/PlaneTrackerEvents.test.d.ts +1 -0
- package/cjs/ws/PlaneTrackerEvents.test.js +27 -0
- package/esm/PlaneTrackerAPI.js +2 -1
- package/esm/browser.index.js +2 -0
- package/esm/types/ws/PlaneTrackerEvents.js +14 -0
- package/esm/ws/PlaneTrackerEvents.js +3 -3
- package/esm/ws/PlaneTrackerEvents.test.js +25 -0
- package/examples/README.md +43 -0
- package/examples/camstreamerlib.js +13201 -0
- package/examples/camswitcher-events.html +137 -0
- package/examples/planetracker-events.html +186 -0
- package/examples/utils/example.css +102 -0
- package/package.json +107 -103
- package/types/browser.index.d.ts +2 -0
- package/types/types/ws/PlaneTrackerEvents.d.ts +47 -0
- package/types/ws/PlaneTrackerEvents.d.ts +1 -1
- package/types/ws/PlaneTrackerEvents.test.d.ts +1 -0
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
declare const wsApiFlightDataSchema: z.ZodObject<{
|
|
3
3
|
targetId: z.ZodString;
|
|
4
4
|
icao: z.ZodString;
|
|
5
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
5
6
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
6
7
|
categoryId: z.ZodString;
|
|
7
8
|
groupId: z.ZodOptional<z.ZodString>;
|
|
@@ -50,6 +51,7 @@ declare const wsApiFlightDataSchema: z.ZodObject<{
|
|
|
50
51
|
emitterCategory: number;
|
|
51
52
|
emergencyState: boolean;
|
|
52
53
|
emergencyStatusMessage: string;
|
|
54
|
+
callsign?: string | undefined;
|
|
53
55
|
groupId?: string | undefined;
|
|
54
56
|
}, {
|
|
55
57
|
icao: string;
|
|
@@ -74,6 +76,7 @@ declare const wsApiFlightDataSchema: z.ZodObject<{
|
|
|
74
76
|
signalQuality: number;
|
|
75
77
|
emergencyState: boolean;
|
|
76
78
|
emergencyStatusMessage: string;
|
|
79
|
+
callsign?: string | undefined;
|
|
77
80
|
groupId?: string | undefined;
|
|
78
81
|
emitterCategorySet?: number | undefined;
|
|
79
82
|
emitterCategory?: number | undefined;
|
|
@@ -117,6 +120,21 @@ declare const apiUserSchema: z.ZodObject<{
|
|
|
117
120
|
userName: string;
|
|
118
121
|
userPriority: number;
|
|
119
122
|
}>;
|
|
123
|
+
export declare const USER_PRIORITY_MIN = 1;
|
|
124
|
+
export declare const USER_PRIORITY_MAX = 255;
|
|
125
|
+
export declare const apiUserInputSchema: z.ZodObject<{} & {
|
|
126
|
+
userId: z.ZodString;
|
|
127
|
+
userName: z.ZodString;
|
|
128
|
+
userPriority: z.ZodNumber;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
userId: string;
|
|
131
|
+
userName: string;
|
|
132
|
+
userPriority: number;
|
|
133
|
+
}, {
|
|
134
|
+
userId: string;
|
|
135
|
+
userName: string;
|
|
136
|
+
userPriority: number;
|
|
137
|
+
}>;
|
|
120
138
|
export type TEventType = 'CAMERA_POSITION' | 'TRACKING_START' | 'TRACKING_STOP' | 'FLIGHT_LIST' | 'USER_ACTION' | 'CONNECTED_USERS' | 'FORCE_TRACKING_STATUS' | 'API_LOCK_STATUS';
|
|
121
139
|
export declare enum EUserActions {
|
|
122
140
|
TRACK_ICAO = "trackIcao.cgi",
|
|
@@ -163,6 +181,7 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
163
181
|
type: z.ZodLiteral<"TRACKING_START">;
|
|
164
182
|
icao: z.ZodString;
|
|
165
183
|
targetId: z.ZodString;
|
|
184
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
166
185
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
167
186
|
categoryId: z.ZodString;
|
|
168
187
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -171,12 +190,14 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
171
190
|
targetId: string;
|
|
172
191
|
domain: "adsb" | "remoteId";
|
|
173
192
|
categoryId: string;
|
|
193
|
+
callsign?: string | undefined;
|
|
174
194
|
}, {
|
|
175
195
|
type: "TRACKING_START";
|
|
176
196
|
icao: string;
|
|
177
197
|
targetId: string;
|
|
178
198
|
domain: "adsb" | "remoteId";
|
|
179
199
|
categoryId: string;
|
|
200
|
+
callsign?: string | undefined;
|
|
180
201
|
}>, z.ZodObject<{
|
|
181
202
|
type: z.ZodLiteral<"TRACKING_STOP">;
|
|
182
203
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -188,6 +209,7 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
188
209
|
list: z.ZodArray<z.ZodObject<{
|
|
189
210
|
targetId: z.ZodString;
|
|
190
211
|
icao: z.ZodString;
|
|
212
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
191
213
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
192
214
|
categoryId: z.ZodString;
|
|
193
215
|
groupId: z.ZodOptional<z.ZodString>;
|
|
@@ -236,6 +258,7 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
236
258
|
emitterCategory: number;
|
|
237
259
|
emergencyState: boolean;
|
|
238
260
|
emergencyStatusMessage: string;
|
|
261
|
+
callsign?: string | undefined;
|
|
239
262
|
groupId?: string | undefined;
|
|
240
263
|
}, {
|
|
241
264
|
icao: string;
|
|
@@ -260,6 +283,7 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
260
283
|
signalQuality: number;
|
|
261
284
|
emergencyState: boolean;
|
|
262
285
|
emergencyStatusMessage: string;
|
|
286
|
+
callsign?: string | undefined;
|
|
263
287
|
groupId?: string | undefined;
|
|
264
288
|
emitterCategorySet?: number | undefined;
|
|
265
289
|
emitterCategory?: number | undefined;
|
|
@@ -291,6 +315,7 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
291
315
|
emitterCategory: number;
|
|
292
316
|
emergencyState: boolean;
|
|
293
317
|
emergencyStatusMessage: string;
|
|
318
|
+
callsign?: string | undefined;
|
|
294
319
|
groupId?: string | undefined;
|
|
295
320
|
}[];
|
|
296
321
|
}, {
|
|
@@ -318,6 +343,7 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
318
343
|
signalQuality: number;
|
|
319
344
|
emergencyState: boolean;
|
|
320
345
|
emergencyStatusMessage: string;
|
|
346
|
+
callsign?: string | undefined;
|
|
321
347
|
groupId?: string | undefined;
|
|
322
348
|
emitterCategorySet?: number | undefined;
|
|
323
349
|
emitterCategory?: number | undefined;
|
|
@@ -1319,6 +1345,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1319
1345
|
type: z.ZodLiteral<"TRACKING_START">;
|
|
1320
1346
|
icao: z.ZodString;
|
|
1321
1347
|
targetId: z.ZodString;
|
|
1348
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
1322
1349
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
1323
1350
|
categoryId: z.ZodString;
|
|
1324
1351
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1327,12 +1354,14 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1327
1354
|
targetId: string;
|
|
1328
1355
|
domain: "adsb" | "remoteId";
|
|
1329
1356
|
categoryId: string;
|
|
1357
|
+
callsign?: string | undefined;
|
|
1330
1358
|
}, {
|
|
1331
1359
|
type: "TRACKING_START";
|
|
1332
1360
|
icao: string;
|
|
1333
1361
|
targetId: string;
|
|
1334
1362
|
domain: "adsb" | "remoteId";
|
|
1335
1363
|
categoryId: string;
|
|
1364
|
+
callsign?: string | undefined;
|
|
1336
1365
|
}>, z.ZodObject<{
|
|
1337
1366
|
type: z.ZodLiteral<"TRACKING_STOP">;
|
|
1338
1367
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1344,6 +1373,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1344
1373
|
list: z.ZodArray<z.ZodObject<{
|
|
1345
1374
|
targetId: z.ZodString;
|
|
1346
1375
|
icao: z.ZodString;
|
|
1376
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
1347
1377
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
1348
1378
|
categoryId: z.ZodString;
|
|
1349
1379
|
groupId: z.ZodOptional<z.ZodString>;
|
|
@@ -1392,6 +1422,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1392
1422
|
emitterCategory: number;
|
|
1393
1423
|
emergencyState: boolean;
|
|
1394
1424
|
emergencyStatusMessage: string;
|
|
1425
|
+
callsign?: string | undefined;
|
|
1395
1426
|
groupId?: string | undefined;
|
|
1396
1427
|
}, {
|
|
1397
1428
|
icao: string;
|
|
@@ -1416,6 +1447,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1416
1447
|
signalQuality: number;
|
|
1417
1448
|
emergencyState: boolean;
|
|
1418
1449
|
emergencyStatusMessage: string;
|
|
1450
|
+
callsign?: string | undefined;
|
|
1419
1451
|
groupId?: string | undefined;
|
|
1420
1452
|
emitterCategorySet?: number | undefined;
|
|
1421
1453
|
emitterCategory?: number | undefined;
|
|
@@ -1447,6 +1479,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1447
1479
|
emitterCategory: number;
|
|
1448
1480
|
emergencyState: boolean;
|
|
1449
1481
|
emergencyStatusMessage: string;
|
|
1482
|
+
callsign?: string | undefined;
|
|
1450
1483
|
groupId?: string | undefined;
|
|
1451
1484
|
}[];
|
|
1452
1485
|
}, {
|
|
@@ -1474,6 +1507,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1474
1507
|
signalQuality: number;
|
|
1475
1508
|
emergencyState: boolean;
|
|
1476
1509
|
emergencyStatusMessage: string;
|
|
1510
|
+
callsign?: string | undefined;
|
|
1477
1511
|
groupId?: string | undefined;
|
|
1478
1512
|
emitterCategorySet?: number | undefined;
|
|
1479
1513
|
emitterCategory?: number | undefined;
|
|
@@ -2460,6 +2494,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2460
2494
|
targetId: string;
|
|
2461
2495
|
domain: "adsb" | "remoteId";
|
|
2462
2496
|
categoryId: string;
|
|
2497
|
+
callsign?: string | undefined;
|
|
2463
2498
|
} | {
|
|
2464
2499
|
type: "TRACKING_STOP";
|
|
2465
2500
|
} | {
|
|
@@ -2489,6 +2524,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2489
2524
|
emitterCategory: number;
|
|
2490
2525
|
emergencyState: boolean;
|
|
2491
2526
|
emergencyStatusMessage: string;
|
|
2527
|
+
callsign?: string | undefined;
|
|
2492
2528
|
groupId?: string | undefined;
|
|
2493
2529
|
}[];
|
|
2494
2530
|
} | {
|
|
@@ -2723,6 +2759,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2723
2759
|
targetId: string;
|
|
2724
2760
|
domain: "adsb" | "remoteId";
|
|
2725
2761
|
categoryId: string;
|
|
2762
|
+
callsign?: string | undefined;
|
|
2726
2763
|
} | {
|
|
2727
2764
|
type: "TRACKING_STOP";
|
|
2728
2765
|
} | {
|
|
@@ -2750,6 +2787,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2750
2787
|
signalQuality: number;
|
|
2751
2788
|
emergencyState: boolean;
|
|
2752
2789
|
emergencyStatusMessage: string;
|
|
2790
|
+
callsign?: string | undefined;
|
|
2753
2791
|
groupId?: string | undefined;
|
|
2754
2792
|
emitterCategorySet?: number | undefined;
|
|
2755
2793
|
emitterCategory?: number | undefined;
|
|
@@ -2999,6 +3037,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2999
3037
|
type: z.ZodLiteral<"TRACKING_START">;
|
|
3000
3038
|
icao: z.ZodString;
|
|
3001
3039
|
targetId: z.ZodString;
|
|
3040
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
3002
3041
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
3003
3042
|
categoryId: z.ZodString;
|
|
3004
3043
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3007,12 +3046,14 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3007
3046
|
targetId: string;
|
|
3008
3047
|
domain: "adsb" | "remoteId";
|
|
3009
3048
|
categoryId: string;
|
|
3049
|
+
callsign?: string | undefined;
|
|
3010
3050
|
}, {
|
|
3011
3051
|
type: "TRACKING_START";
|
|
3012
3052
|
icao: string;
|
|
3013
3053
|
targetId: string;
|
|
3014
3054
|
domain: "adsb" | "remoteId";
|
|
3015
3055
|
categoryId: string;
|
|
3056
|
+
callsign?: string | undefined;
|
|
3016
3057
|
}>, z.ZodObject<{
|
|
3017
3058
|
type: z.ZodLiteral<"TRACKING_STOP">;
|
|
3018
3059
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3024,6 +3065,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3024
3065
|
list: z.ZodArray<z.ZodObject<{
|
|
3025
3066
|
targetId: z.ZodString;
|
|
3026
3067
|
icao: z.ZodString;
|
|
3068
|
+
callsign: z.ZodOptional<z.ZodString>;
|
|
3027
3069
|
domain: z.ZodEnum<["adsb", "remoteId"]>;
|
|
3028
3070
|
categoryId: z.ZodString;
|
|
3029
3071
|
groupId: z.ZodOptional<z.ZodString>;
|
|
@@ -3072,6 +3114,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3072
3114
|
emitterCategory: number;
|
|
3073
3115
|
emergencyState: boolean;
|
|
3074
3116
|
emergencyStatusMessage: string;
|
|
3117
|
+
callsign?: string | undefined;
|
|
3075
3118
|
groupId?: string | undefined;
|
|
3076
3119
|
}, {
|
|
3077
3120
|
icao: string;
|
|
@@ -3096,6 +3139,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3096
3139
|
signalQuality: number;
|
|
3097
3140
|
emergencyState: boolean;
|
|
3098
3141
|
emergencyStatusMessage: string;
|
|
3142
|
+
callsign?: string | undefined;
|
|
3099
3143
|
groupId?: string | undefined;
|
|
3100
3144
|
emitterCategorySet?: number | undefined;
|
|
3101
3145
|
emitterCategory?: number | undefined;
|
|
@@ -3127,6 +3171,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3127
3171
|
emitterCategory: number;
|
|
3128
3172
|
emergencyState: boolean;
|
|
3129
3173
|
emergencyStatusMessage: string;
|
|
3174
|
+
callsign?: string | undefined;
|
|
3130
3175
|
groupId?: string | undefined;
|
|
3131
3176
|
}[];
|
|
3132
3177
|
}, {
|
|
@@ -3154,6 +3199,7 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3154
3199
|
signalQuality: number;
|
|
3155
3200
|
emergencyState: boolean;
|
|
3156
3201
|
emergencyStatusMessage: string;
|
|
3202
|
+
callsign?: string | undefined;
|
|
3157
3203
|
groupId?: string | undefined;
|
|
3158
3204
|
emitterCategorySet?: number | undefined;
|
|
3159
3205
|
emitterCategory?: number | undefined;
|
|
@@ -4134,4 +4180,5 @@ export type TUserActionDataOfCgi<T extends EUserActions> = Extract<TWsUserAction
|
|
|
4134
4180
|
export type TWsApiFlightData = z.infer<typeof wsApiFlightDataSchema>;
|
|
4135
4181
|
export type TWsApiCameraData = z.infer<typeof wsCameraPositionDataSchema>;
|
|
4136
4182
|
export type TApiUser = z.infer<typeof apiUserSchema>;
|
|
4183
|
+
export type TApiUserInput = z.infer<typeof apiUserInputSchema>;
|
|
4137
4184
|
export {};
|
|
@@ -3,6 +3,6 @@ import { WsEvents } from '../internal/WsEvents';
|
|
|
3
3
|
import { TEventData, TApiUser } from '../types/ws/PlaneTrackerEvents';
|
|
4
4
|
export declare class PlaneTrackerEvents extends WsEvents<TEventData> {
|
|
5
5
|
private _apiUser;
|
|
6
|
-
constructor(ws: IWsClient,
|
|
6
|
+
constructor(ws: IWsClient, apiUser: Omit<TApiUser, 'ip'>);
|
|
7
7
|
private sendInitMsg;
|
|
8
8
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|