camstreamerlib 4.0.0-beta.37 → 4.0.0-beta.38
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/CamOverlayAPI.js +42 -69
- package/cjs/CamScripterAPI.js +30 -24
- package/cjs/CamStreamerAPI.js +30 -33
- package/cjs/CamSwitcherAPI.js +57 -52
- package/cjs/PlaneTrackerAPI.js +55 -66
- package/cjs/VapixAPI.js +23 -22
- package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +4 -14
- package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
- package/cjs/{VapixEvents.js → node/VapixEvents.js} +1 -1
- package/cjs/node/events/GenetecAgent.js +5 -27
- package/cjs/node/index.js +17 -0
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
- package/cjs/types/CamOverlayPainter.js +12 -0
- package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
- package/cjs/types/CamSwitcherAPI.js +38 -1
- package/cjs/types/GenetecAgent.js +31 -0
- package/cjs/types/PlaneTrackerAPI.js +277 -0
- package/cjs/types/VapixAPI.js +20 -2
- package/cjs/types/VapixEvents.js +2 -0
- package/esm/CamOverlayAPI.js +43 -70
- package/esm/CamScripterAPI.js +30 -24
- package/esm/CamStreamerAPI.js +30 -30
- package/esm/CamSwitcherAPI.js +58 -53
- package/esm/PlaneTrackerAPI.js +56 -67
- package/esm/VapixAPI.js +24 -23
- package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +1 -11
- package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
- package/esm/{VapixEvents.js → node/VapixEvents.js} +1 -1
- package/esm/node/events/GenetecAgent.js +1 -23
- package/esm/node/index.js +10 -0
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +1 -1
- package/esm/types/CamOverlayPainter.js +11 -1
- package/esm/types/CamSwitcherAPI.js +38 -1
- package/esm/types/GenetecAgent.js +28 -0
- package/esm/types/PlaneTrackerAPI.js +276 -1
- package/esm/types/VapixAPI.js +19 -1
- package/esm/types/VapixEvents.js +1 -0
- package/package.json +1 -1
- package/types/CamOverlayAPI.d.ts +16 -6
- package/types/CamScripterAPI.d.ts +34 -9
- package/types/CamStreamerAPI.d.ts +27 -5
- package/types/CamSwitcherAPI.d.ts +136 -23
- package/types/PlaneTrackerAPI.d.ts +201 -20
- package/types/VapixAPI.d.ts +46 -12
- package/types/bin/CreatePackage.d.ts +1 -0
- package/types/{CamOverlayDrawingAPI.d.ts → node/CamOverlayDrawingAPI.d.ts} +1 -1
- package/types/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +2 -2
- package/types/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +2 -13
- package/types/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.d.ts +1 -1
- package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
- package/types/node/VapixEvents.d.ts +16 -0
- package/types/node/events/GenetecAgent.d.ts +1 -144
- package/types/node/index.d.ts +10 -0
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +2 -2
- package/types/types/CamOverlayDrawingAPI.d.ts +3 -13
- package/types/types/CamOverlayPainter.d.ts +12 -10
- package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
- package/types/types/CamStreamerAPI.d.ts +2 -2
- package/types/types/CamSwitcherAPI.d.ts +111 -30
- package/types/types/GenetecAgent.d.ts +174 -0
- package/types/types/PlaneTrackerAPI.d.ts +859 -0
- package/types/types/VapixAPI.d.ts +54 -8
- package/types/types/VapixEvents.d.ts +15 -0
- package/types/types/common.d.ts +1 -0
- package/types/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/types/VapixEvents.d.ts +0 -43
- /package/cjs/{CreatePackage.js → bin/CreatePackage.js} +0 -0
- /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
- /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
- /package/esm/{CreatePackage.js → bin/CreatePackage.js} +0 -0
- /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
- /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
- /package/{types/CreatePackage.d.ts → esm/types/CamScripterAPICameraEventsGenerator.js} +0 -0
package/types/CamOverlayAPI.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IClient, TBlobResponse, TResponse } from './internal/types';
|
|
2
|
-
import { THttpRequestOptions, TProxyParams
|
|
2
|
+
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
3
3
|
import { ProxyClient } from './internal/ProxyClient';
|
|
4
|
-
import { ImageType, TCoordinates, TField, TFile,
|
|
4
|
+
import { ImageType, TCoordinates, TField, TFile, TFileType, TStorage, TService } from './types/CamOverlayAPI';
|
|
5
5
|
export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
private client;
|
|
7
7
|
constructor(client: Client);
|
|
@@ -10,13 +10,23 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
10
10
|
static getFilePreviewPath: (path: string) => string;
|
|
11
11
|
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
12
12
|
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
13
|
-
getNetworkCameraList(options?: THttpRequestOptions): Promise<
|
|
13
|
+
getNetworkCameraList(options?: THttpRequestOptions): Promise<{
|
|
14
|
+
name: string;
|
|
15
|
+
ip: string;
|
|
16
|
+
}[]>;
|
|
14
17
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
15
18
|
getMjpegStreamImage(mjpegUrl: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
16
|
-
listFiles(fileType: TFileType, options?: THttpRequestOptions): Promise<
|
|
19
|
+
listFiles(fileType: TFileType, options?: THttpRequestOptions): Promise<{
|
|
20
|
+
path: string;
|
|
21
|
+
name: string;
|
|
22
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
23
|
+
}[]>;
|
|
17
24
|
uploadFile(fileType: TFileType, formData: Parameters<Client['post']>[0]['data'], storage: TStorage, options?: THttpRequestOptions): Promise<void>;
|
|
18
25
|
removeFile(fileType: TFileType, fileParams: TFile, options?: THttpRequestOptions): Promise<void>;
|
|
19
|
-
getFileStorage(fileType: TFileType, options?: THttpRequestOptions): Promise<
|
|
26
|
+
getFileStorage(fileType: TFileType, options?: THttpRequestOptions): Promise<{
|
|
27
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
28
|
+
state: string;
|
|
29
|
+
}[]>;
|
|
20
30
|
getFilePreviewFromCamera(path: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
21
31
|
updateInfoticker(serviceId: number, text: string, options?: THttpRequestOptions): Promise<void>;
|
|
22
32
|
setEnabled(serviceId: number, enabled: boolean, options?: THttpRequestOptions): Promise<void>;
|
|
@@ -846,7 +856,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
846
856
|
updateCGImage(serviceId: number, path: string, coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
847
857
|
updateCGImageFromData(serviceId: number, imageType: ImageType, imageData: Parameters<Client['post']>[0]['data'], coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
848
858
|
private promiseCGUpdate;
|
|
849
|
-
private
|
|
859
|
+
private _getJson;
|
|
850
860
|
private _post;
|
|
851
861
|
private _getBlob;
|
|
852
862
|
private parseBlobResponse;
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { ProxyClient } from './internal/ProxyClient';
|
|
2
2
|
import { IClient, TResponse } from './internal/types';
|
|
3
|
-
import {
|
|
4
|
-
import { THttpRequestOptions,
|
|
3
|
+
import { TStorageType } from './types/CamScripterAPI';
|
|
4
|
+
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
5
5
|
export declare class CamScripterAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
client: Client;
|
|
7
7
|
constructor(client: Client);
|
|
8
|
-
static
|
|
8
|
+
static getProxyPath: () => string;
|
|
9
9
|
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
10
10
|
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
11
|
-
getNetworkCameraList(options?: THttpRequestOptions): Promise<
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
getNetworkCameraList(options?: THttpRequestOptions): Promise<{
|
|
12
|
+
name: string;
|
|
13
|
+
ip: string;
|
|
14
|
+
}[]>;
|
|
15
|
+
getStorageInfo(options?: THttpRequestOptions): Promise<[{
|
|
16
|
+
type: "INTERNAL";
|
|
17
|
+
capacity_mb: number;
|
|
18
|
+
}, {
|
|
19
|
+
type: "SD_CARD";
|
|
20
|
+
capacity_mb: number;
|
|
21
|
+
}] | [{
|
|
22
|
+
type: "INTERNAL";
|
|
23
|
+
capacity_mb: number;
|
|
24
|
+
}]>;
|
|
25
|
+
getPackageList(options?: THttpRequestOptions): Promise<{
|
|
26
|
+
storage: "INTERNAL" | "SD_CARD";
|
|
27
|
+
manifest: {
|
|
28
|
+
package_name: string;
|
|
29
|
+
package_menu_name: string;
|
|
30
|
+
package_version: string;
|
|
31
|
+
vendor: string;
|
|
32
|
+
ui_link: string;
|
|
33
|
+
required_camscripter_version?: string | undefined;
|
|
34
|
+
required_camscripter_rbi_version?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
}[]>;
|
|
14
37
|
installPackages(formData: Parameters<Client['post']>[0]['data'], storage: TStorageType, options?: THttpRequestOptions): Promise<{
|
|
15
38
|
status: number;
|
|
16
39
|
message: string;
|
|
@@ -27,11 +50,13 @@ export declare class CamScripterAPI<Client extends IClient<TResponse, any>> {
|
|
|
27
50
|
status: number;
|
|
28
51
|
message: string;
|
|
29
52
|
}>;
|
|
30
|
-
getNodejsStatus(options?: THttpRequestOptions): Promise<
|
|
53
|
+
getNodejsStatus(options?: THttpRequestOptions): Promise<{
|
|
54
|
+
node_state: "OK" | "NOT_INSTALLED" | "NOT_FOUND";
|
|
55
|
+
}>;
|
|
31
56
|
installNodejs(storage: TStorageType, options?: THttpRequestOptions): Promise<{
|
|
32
57
|
status: number;
|
|
33
58
|
message: string;
|
|
34
59
|
}>;
|
|
35
|
-
private
|
|
36
|
-
private
|
|
60
|
+
private _getJson;
|
|
61
|
+
private _post;
|
|
37
62
|
}
|
|
@@ -6,6 +6,8 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
6
6
|
client: Client;
|
|
7
7
|
constructor(client: Client);
|
|
8
8
|
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
9
|
+
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
10
|
+
getUtcTime(options?: THttpRequestOptions): Promise<number>;
|
|
9
11
|
getStreamList(options?: THttpRequestOptions): Promise<Record<number, {
|
|
10
12
|
enabled: 0 | 1;
|
|
11
13
|
schedule: string;
|
|
@@ -15,7 +17,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
15
17
|
internalVapixParameters: string;
|
|
16
18
|
userVapixParameters: string;
|
|
17
19
|
outputParameters: string;
|
|
18
|
-
outputType: "video" | "
|
|
20
|
+
outputType: "video" | "none" | "images";
|
|
19
21
|
mediaServerUrl: string;
|
|
20
22
|
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
21
23
|
inputUrl: string;
|
|
@@ -29,7 +31,29 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
29
31
|
startTime: number | null;
|
|
30
32
|
stopTime: number | null;
|
|
31
33
|
}>>;
|
|
32
|
-
getStream(streamId: number, options?: THttpRequestOptions): Promise<
|
|
34
|
+
getStream(streamId: number, options?: THttpRequestOptions): Promise<{
|
|
35
|
+
enabled: 0 | 1;
|
|
36
|
+
schedule: string;
|
|
37
|
+
active: 0 | 1;
|
|
38
|
+
audioSource: string;
|
|
39
|
+
avSyncMsec: number;
|
|
40
|
+
internalVapixParameters: string;
|
|
41
|
+
userVapixParameters: string;
|
|
42
|
+
outputParameters: string;
|
|
43
|
+
outputType: "video" | "none" | "images";
|
|
44
|
+
mediaServerUrl: string;
|
|
45
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
46
|
+
inputUrl: string;
|
|
47
|
+
forceStereo: 0 | 1;
|
|
48
|
+
streamDelay: number | null;
|
|
49
|
+
statusLed: number;
|
|
50
|
+
statusPort: string;
|
|
51
|
+
callApi: number;
|
|
52
|
+
trigger: string;
|
|
53
|
+
prepareAhead: number;
|
|
54
|
+
startTime: number | null;
|
|
55
|
+
stopTime: number | null;
|
|
56
|
+
}>;
|
|
33
57
|
getStreamParameter(streamId: number, paramName: string, options?: THttpRequestOptions): Promise<string>;
|
|
34
58
|
setStream(streamId: number, params: Partial<TStream>, options?: THttpRequestOptions): Promise<{
|
|
35
59
|
message: string;
|
|
@@ -41,8 +65,6 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
41
65
|
}>;
|
|
42
66
|
isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
43
67
|
deleteStream(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
44
|
-
|
|
45
|
-
getUtcTime(options?: THttpRequestOptions): Promise<number>;
|
|
46
|
-
private get;
|
|
68
|
+
private _getJson;
|
|
47
69
|
}
|
|
48
70
|
export declare const parseCameraStreamResponse: (cameraStreamData: TCameraStream) => TStream;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IClient, TResponse } from './internal/types';
|
|
2
|
-
import {
|
|
3
|
-
import { TAudioChannel, THttpRequestOptions,
|
|
2
|
+
import { TStreamSaveList, TTrackerSaveList, TClipSaveList, TPlaylistSaveList, TCameraOptions, TGlobalAudioSettings, TSecondaryAudioSettings } from './types/CamSwitcherAPI';
|
|
3
|
+
import { TAudioChannel, THttpRequestOptions, TProxyParams, TStorageType } from './types/common';
|
|
4
4
|
import { ProxyClient } from './internal/ProxyClient';
|
|
5
5
|
export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
client: Client;
|
|
@@ -10,26 +10,110 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
|
10
10
|
new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
|
|
11
11
|
prototype: FormData;
|
|
12
12
|
});
|
|
13
|
-
static
|
|
14
|
-
static
|
|
15
|
-
static
|
|
13
|
+
static getProxyPath: () => string;
|
|
14
|
+
static getWsEventsPath: () => string;
|
|
15
|
+
static getClipPreviewPath: (id: string, storage: TStorageType) => string;
|
|
16
16
|
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
17
17
|
generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
|
|
18
18
|
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
19
|
-
getNetworkCameraList(options?: THttpRequestOptions): Promise<
|
|
19
|
+
getNetworkCameraList(options?: THttpRequestOptions): Promise<{
|
|
20
|
+
name: string;
|
|
21
|
+
ip: string;
|
|
22
|
+
}[]>;
|
|
20
23
|
getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
|
|
21
|
-
getStorageInfo(options?: THttpRequestOptions): Promise<
|
|
24
|
+
getStorageInfo(options?: THttpRequestOptions): Promise<{
|
|
25
|
+
storage: "SD_DISK" | "FLASH";
|
|
26
|
+
writable: boolean;
|
|
27
|
+
size: number;
|
|
28
|
+
available: number;
|
|
29
|
+
}[]>;
|
|
22
30
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
23
|
-
getOutputInfo(options?: THttpRequestOptions): Promise<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
getOutputInfo(options?: THttpRequestOptions): Promise<{
|
|
32
|
+
rtspUrl: string;
|
|
33
|
+
ws: string;
|
|
34
|
+
wsInitialMessage: string;
|
|
35
|
+
}>;
|
|
36
|
+
getAudioPushInfo(options?: THttpRequestOptions): Promise<{
|
|
37
|
+
ws: string;
|
|
38
|
+
wsInitialMessage: string;
|
|
39
|
+
}>;
|
|
40
|
+
getStreamSaveList(options?: THttpRequestOptions): Promise<Record<string, {
|
|
41
|
+
ip?: string | undefined;
|
|
42
|
+
niceName?: string | undefined;
|
|
43
|
+
mdnsName?: string | undefined;
|
|
44
|
+
port?: number | undefined;
|
|
45
|
+
enabled?: boolean | undefined;
|
|
46
|
+
auth?: string | undefined;
|
|
47
|
+
query?: string | undefined;
|
|
48
|
+
channel?: "audio" | "video" | "av" | undefined;
|
|
49
|
+
keyboard?: Record<string, string | null> | undefined;
|
|
50
|
+
sortIndexOverview?: number | undefined;
|
|
51
|
+
viewNumber?: number | undefined;
|
|
52
|
+
}>>;
|
|
53
|
+
getClipSaveList(options?: THttpRequestOptions): Promise<Record<string, {
|
|
54
|
+
niceName?: string | undefined;
|
|
55
|
+
channel?: "audio" | "video" | "av" | undefined;
|
|
56
|
+
keyboard?: Record<string, string | null> | undefined;
|
|
57
|
+
sortIndexOverview?: number | undefined;
|
|
58
|
+
}>>;
|
|
59
|
+
getPlaylistSaveList(options?: THttpRequestOptions): Promise<Record<string, {
|
|
60
|
+
niceName?: string | undefined;
|
|
61
|
+
channel?: "audio" | "video" | "av" | undefined;
|
|
62
|
+
keyboard?: Record<string, string | null> | undefined;
|
|
63
|
+
sortIndexOverview?: number | undefined;
|
|
64
|
+
isFavourite?: boolean | undefined;
|
|
65
|
+
sortIndexFavourite?: number | undefined;
|
|
66
|
+
play_type?: "PLAY_ALL" | "PLAY_ALL_LOOP" | "PLAY_ALL_SHUFFLED" | "PLAY_ALL_LOOP_SHUFFLED" | "PLAY_ONE_RANDOM" | undefined;
|
|
67
|
+
default?: boolean | undefined;
|
|
68
|
+
stream_list?: {
|
|
69
|
+
repeat: number;
|
|
70
|
+
video: {
|
|
71
|
+
storage?: "SD_DISK" | "FLASH" | undefined;
|
|
72
|
+
stream_name?: string | undefined;
|
|
73
|
+
clip_name?: string | undefined;
|
|
74
|
+
tracker_name?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
id: string;
|
|
77
|
+
isTimeoutCustom: boolean;
|
|
78
|
+
ptz_preset_pos_name: string;
|
|
79
|
+
timeout: number;
|
|
80
|
+
audio?: {
|
|
81
|
+
storage?: "SD_DISK" | "FLASH" | undefined;
|
|
82
|
+
stream_name?: string | undefined;
|
|
83
|
+
clip_name?: string | undefined;
|
|
84
|
+
tracker_name?: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
}[] | undefined;
|
|
87
|
+
}>>;
|
|
88
|
+
getTrackerSaveList(options?: THttpRequestOptions): Promise<Record<string, {
|
|
89
|
+
name?: string | undefined;
|
|
90
|
+
channel?: "audio" | "video" | "av" | undefined;
|
|
91
|
+
keyboard?: Record<string, string | null> | undefined;
|
|
92
|
+
sortIndexOverview?: number | undefined;
|
|
93
|
+
viewNumber?: number | undefined;
|
|
94
|
+
id?: string | undefined;
|
|
95
|
+
previewId?: string | undefined;
|
|
96
|
+
duration?: number | undefined;
|
|
97
|
+
width?: number | undefined;
|
|
98
|
+
height?: number | undefined;
|
|
99
|
+
fps?: number | undefined;
|
|
100
|
+
motion_history_frames?: number | undefined;
|
|
101
|
+
include_zone?: number[][] | undefined;
|
|
102
|
+
include_node_ids?: string[] | undefined;
|
|
103
|
+
camera_list?: {
|
|
104
|
+
name: string;
|
|
105
|
+
id: string;
|
|
106
|
+
overview: boolean;
|
|
107
|
+
zone: number[];
|
|
108
|
+
playlist_name: string;
|
|
109
|
+
ptz_preset_pos_no: number;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
camera_view_number?: number | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
setStreamSaveList(data: TStreamSaveList, options?: THttpRequestOptions): Promise<any>;
|
|
114
|
+
setClipSaveList(data: TClipSaveList, options?: THttpRequestOptions): Promise<any>;
|
|
115
|
+
setPlaylistSaveList(data: TPlaylistSaveList, options?: THttpRequestOptions): Promise<any>;
|
|
116
|
+
setTrackerSaveList(data: TTrackerSaveList, options?: THttpRequestOptions): Promise<any>;
|
|
33
117
|
playlistSwitch(playlistName: string, options?: THttpRequestOptions): Promise<void>;
|
|
34
118
|
playlistQueuePush(playlistName: string, options?: THttpRequestOptions): Promise<void>;
|
|
35
119
|
playlistQueueClear(options?: THttpRequestOptions): Promise<void>;
|
|
@@ -37,18 +121,47 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
|
37
121
|
playlistQueuePlayNext(options?: THttpRequestOptions): Promise<void>;
|
|
38
122
|
addNewClip(file: any, clipType: 'video' | 'audio', storage: TStorageType, clipId: string, fileName?: string, options?: THttpRequestOptions): Promise<void>;
|
|
39
123
|
removeClip(clipId: string, storage: TStorageType, options?: THttpRequestOptions): Promise<any>;
|
|
40
|
-
getClipList(options?: THttpRequestOptions): Promise<
|
|
124
|
+
getClipList(options?: THttpRequestOptions): Promise<Record<string, {
|
|
125
|
+
storage: "SD_DISK" | "FLASH";
|
|
126
|
+
stream_list: ({
|
|
127
|
+
type: "video";
|
|
128
|
+
width: number;
|
|
129
|
+
height: number;
|
|
130
|
+
fps: number;
|
|
131
|
+
sample_rate: number;
|
|
132
|
+
h264_profile: "high" | "main" | "baseline";
|
|
133
|
+
h264_level: "4.1";
|
|
134
|
+
gop: number;
|
|
135
|
+
bitrate: number;
|
|
136
|
+
} | {
|
|
137
|
+
type: "audio";
|
|
138
|
+
sample_rate: number;
|
|
139
|
+
channel_count: 1 | 2;
|
|
140
|
+
})[];
|
|
141
|
+
duration: number;
|
|
142
|
+
}>>;
|
|
41
143
|
setCamSwitchOptions(data: TCameraOptions, cameraFWVersion: string, options?: THttpRequestOptions): Promise<void>;
|
|
42
144
|
setGlobalAudioSettings(settings: TGlobalAudioSettings, options?: THttpRequestOptions): Promise<void>;
|
|
43
145
|
setSecondaryAudioSettings(settings: TSecondaryAudioSettings, options?: THttpRequestOptions): Promise<void>;
|
|
44
146
|
setDefaultPlaylist(playlistId: string, options?: THttpRequestOptions): Promise<void>;
|
|
45
147
|
setPermanentRtspUrlToken(token: string, options?: THttpRequestOptions): Promise<void>;
|
|
46
|
-
getCamSwitchOptions(options?: THttpRequestOptions): Promise<
|
|
47
|
-
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<
|
|
48
|
-
|
|
148
|
+
getCamSwitchOptions(options?: THttpRequestOptions): Promise<any>;
|
|
149
|
+
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<{
|
|
150
|
+
type: "fromSource" | "source";
|
|
151
|
+
source: string;
|
|
152
|
+
storage?: string | undefined;
|
|
153
|
+
}>;
|
|
154
|
+
getSecondaryAudioSettings(options?: THttpRequestOptions): Promise<{
|
|
155
|
+
type: "CLIP" | "STREAM" | "NONE";
|
|
156
|
+
storage: "SD_DISK" | "FLASH";
|
|
157
|
+
secondaryAudioLevel: number;
|
|
158
|
+
masterAudioLevel: number;
|
|
159
|
+
streamName?: string | undefined;
|
|
160
|
+
clipName?: string | undefined;
|
|
161
|
+
}>;
|
|
49
162
|
getPermanentRtspUrlToken(options?: THttpRequestOptions): Promise<string>;
|
|
50
|
-
private
|
|
51
|
-
private
|
|
163
|
+
private _getJson;
|
|
164
|
+
private _post;
|
|
52
165
|
private setParamFromCameraJSON;
|
|
53
166
|
private getParamFromCameraAndJSONParse;
|
|
54
167
|
}
|
|
@@ -1,43 +1,224 @@
|
|
|
1
1
|
import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
|
|
2
|
-
import { ICAO, TApiUser, TExportDataType, TImportDataType } from './types/PlaneTrackerAPI';
|
|
2
|
+
import { ICAO, TApiUser, TBlackList, TExportDataType, TImportDataType, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
|
|
3
3
|
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
4
4
|
import { ProxyClient } from './internal/ProxyClient';
|
|
5
5
|
export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
private client;
|
|
7
7
|
private apiUser;
|
|
8
8
|
constructor(client: Client, apiUser: TApiUser);
|
|
9
|
-
static
|
|
9
|
+
static getProxyPath: () => string;
|
|
10
10
|
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
11
11
|
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
12
12
|
resetPtzCalibration(options?: THttpRequestOptions): Promise<TResponse>;
|
|
13
13
|
resetFocusCalibration(options?: THttpRequestOptions): Promise<TResponse>;
|
|
14
14
|
serverRunCheck(options?: THttpRequestOptions): Promise<TResponse>;
|
|
15
15
|
getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
16
|
-
fetchCameraSettings(options?: THttpRequestOptions): Promise<
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
fetchCameraSettings(options?: THttpRequestOptions): Promise<{
|
|
17
|
+
camera: {
|
|
18
|
+
ip: string;
|
|
19
|
+
port: number;
|
|
20
|
+
protocol: "https" | "http" | "https_insecure";
|
|
21
|
+
user: string;
|
|
22
|
+
pass: string;
|
|
23
|
+
};
|
|
24
|
+
units: "metric" | "imperial";
|
|
25
|
+
adsbSource: {
|
|
26
|
+
ip: string;
|
|
27
|
+
port: number;
|
|
28
|
+
};
|
|
29
|
+
cameraCalibrationProcessConfig: {
|
|
30
|
+
nightSkyCalibrationEnabled: boolean;
|
|
31
|
+
scheduleNightSkyCalibrationTimestamp: number;
|
|
32
|
+
};
|
|
33
|
+
cameraConfig: {
|
|
34
|
+
defaultCaptureSizeMeters: number;
|
|
35
|
+
captureSizeExtensionMeters: number;
|
|
36
|
+
maxZoomLevel?: number | undefined;
|
|
37
|
+
};
|
|
38
|
+
stream: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
imageConfig: {
|
|
43
|
+
dayAperture: number;
|
|
44
|
+
nightAperture: number;
|
|
45
|
+
};
|
|
46
|
+
airportConfig: {
|
|
47
|
+
icao: string;
|
|
48
|
+
centerLat: number;
|
|
49
|
+
centerLon: number;
|
|
50
|
+
radius: number;
|
|
51
|
+
};
|
|
52
|
+
trackingConfig: {
|
|
53
|
+
prioritizeEmergency: boolean;
|
|
54
|
+
};
|
|
55
|
+
widget: {
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
scale: number;
|
|
58
|
+
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
59
|
+
posX: number;
|
|
60
|
+
posY: number;
|
|
61
|
+
};
|
|
62
|
+
airportWidget: {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
scale: number;
|
|
65
|
+
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
66
|
+
posX: number;
|
|
67
|
+
posY: number;
|
|
68
|
+
};
|
|
69
|
+
fr24FlightInfoSource: {
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
priority: number;
|
|
72
|
+
apiToken: string;
|
|
73
|
+
validateFlights: boolean;
|
|
74
|
+
};
|
|
75
|
+
radarcapeFlightInfoSource: {
|
|
76
|
+
ip: string;
|
|
77
|
+
port: number;
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
priority: number;
|
|
80
|
+
};
|
|
81
|
+
identificationLabel: {
|
|
82
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
83
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
84
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
85
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
86
|
+
opacity: number;
|
|
87
|
+
};
|
|
88
|
+
acs: {
|
|
89
|
+
ip: string;
|
|
90
|
+
port: number;
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
protocol: "https" | "http" | "https_insecure";
|
|
93
|
+
user: string;
|
|
94
|
+
pass: string;
|
|
95
|
+
sourceKey: string;
|
|
96
|
+
};
|
|
97
|
+
genetec: {
|
|
98
|
+
ip: string;
|
|
99
|
+
port: number;
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
cameraList: string[];
|
|
102
|
+
appId: string;
|
|
103
|
+
protocol: "https" | "http" | "https_insecure";
|
|
104
|
+
user: string;
|
|
105
|
+
pass: string;
|
|
106
|
+
baseUri: string;
|
|
107
|
+
};
|
|
108
|
+
overlayText?: {
|
|
109
|
+
displayIcao?: boolean | undefined;
|
|
110
|
+
displayRegistration?: boolean | undefined;
|
|
111
|
+
displayFlightNumber?: boolean | undefined;
|
|
112
|
+
displayAltitude?: boolean | undefined;
|
|
113
|
+
displayVelocity?: boolean | undefined;
|
|
114
|
+
displayDistance?: boolean | undefined;
|
|
115
|
+
displayFOV?: boolean | undefined;
|
|
116
|
+
displayPTError?: boolean | undefined;
|
|
117
|
+
displayPTZSpeed?: boolean | undefined;
|
|
118
|
+
displayVelocityData?: boolean | undefined;
|
|
119
|
+
displaySignalQuality?: boolean | undefined;
|
|
120
|
+
displayAutoTrackingInfo?: boolean | undefined;
|
|
121
|
+
displayGPSCoords?: boolean | undefined;
|
|
122
|
+
displayVapixQuery?: boolean | undefined;
|
|
123
|
+
displayFocus?: boolean | undefined;
|
|
124
|
+
displayAperture?: boolean | undefined;
|
|
125
|
+
displaySunDistance?: boolean | undefined;
|
|
126
|
+
displayTickTime?: boolean | undefined;
|
|
127
|
+
displayAircraftInfo?: boolean | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
setCameraSettings(settingsJsonString: string, options?: THttpRequestOptions): Promise<any>;
|
|
131
|
+
fetchServerSettings(options?: THttpRequestOptions): Promise<{
|
|
132
|
+
cameraCalibration: {
|
|
133
|
+
posLat: number;
|
|
134
|
+
posLon: number;
|
|
135
|
+
geoidHN: number;
|
|
136
|
+
altitudeAmsl: number;
|
|
137
|
+
rotationEast: number;
|
|
138
|
+
rotationNorth: number;
|
|
139
|
+
rotationUp: number;
|
|
140
|
+
tiltTransformationCoefA: number;
|
|
141
|
+
tiltCameraKnownPoint: number;
|
|
142
|
+
tiltRealKnownPoint: number;
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
19
145
|
exportAppSettings(dataType: TExportDataType, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
20
146
|
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
21
|
-
fetchFlightInfo(icao: ICAO, options?: THttpRequestOptions): Promise<
|
|
22
|
-
|
|
23
|
-
|
|
147
|
+
fetchFlightInfo(icao: ICAO, options?: THttpRequestOptions): Promise<{
|
|
148
|
+
destinationAirport: {
|
|
149
|
+
icao?: string | undefined;
|
|
150
|
+
iata?: string | undefined;
|
|
151
|
+
city?: string | undefined;
|
|
152
|
+
};
|
|
153
|
+
registration?: string | undefined;
|
|
154
|
+
callsign?: string | undefined;
|
|
155
|
+
flightNumber?: string | undefined;
|
|
156
|
+
aircraftType?: string | undefined;
|
|
157
|
+
airlines?: string | undefined;
|
|
158
|
+
originAirport?: {
|
|
159
|
+
icao?: string | undefined;
|
|
160
|
+
iata?: string | undefined;
|
|
161
|
+
city?: string | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
flightImages?: {
|
|
164
|
+
src?: string | undefined;
|
|
165
|
+
photographer?: string | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
}>;
|
|
168
|
+
getTrackingMode(options?: THttpRequestOptions): Promise<{
|
|
169
|
+
mode: "MANUAL" | "AUTOMATIC";
|
|
170
|
+
}>;
|
|
171
|
+
setTrackingMode(mode: TTrackingMode['mode'], options?: THttpRequestOptions): Promise<any>;
|
|
24
172
|
startTrackingPlane(icao: ICAO, options?: THttpRequestOptions): Promise<TResponse>;
|
|
25
173
|
stopTrackingPlane(options?: THttpRequestOptions): Promise<TResponse>;
|
|
26
|
-
getPriorityList(options?: THttpRequestOptions): Promise<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
174
|
+
getPriorityList(options?: THttpRequestOptions): Promise<{
|
|
175
|
+
priorityList: string[];
|
|
176
|
+
}>;
|
|
177
|
+
setPriorityList(priorityList: TPriorityList['priorityList'], options?: THttpRequestOptions): Promise<any>;
|
|
178
|
+
getWhiteList(options?: THttpRequestOptions): Promise<{
|
|
179
|
+
whiteList: string[];
|
|
180
|
+
}>;
|
|
181
|
+
setWhiteList(whiteList: TWhiteList['whiteList'], options?: THttpRequestOptions): Promise<any>;
|
|
182
|
+
getBlackList(options?: THttpRequestOptions): Promise<{
|
|
183
|
+
blackList: string[];
|
|
184
|
+
}>;
|
|
185
|
+
setBlackList(blackList: TBlackList['blackList'], options?: THttpRequestOptions): Promise<any>;
|
|
186
|
+
fetchMapInfo(options?: THttpRequestOptions): Promise<{
|
|
187
|
+
minZoom: number;
|
|
188
|
+
maxZoom: number;
|
|
189
|
+
mapTypes: ("roadmap" | "satellite")[];
|
|
190
|
+
tileSize: number;
|
|
191
|
+
}>;
|
|
192
|
+
getZones(options?: THttpRequestOptions): Promise<{
|
|
193
|
+
zones: {
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
area: [{
|
|
196
|
+
lat: number;
|
|
197
|
+
lon: number;
|
|
198
|
+
}, ...{
|
|
199
|
+
lat: number;
|
|
200
|
+
lon: number;
|
|
201
|
+
}[]];
|
|
202
|
+
weight: number;
|
|
203
|
+
name?: string | undefined;
|
|
204
|
+
minAltitudeAmsl?: number | undefined;
|
|
205
|
+
maxAltitudeAmsl?: number | undefined;
|
|
206
|
+
minSpeedKmph?: number | undefined;
|
|
207
|
+
maxSpeedKmph?: number | undefined;
|
|
208
|
+
}[];
|
|
209
|
+
}>;
|
|
210
|
+
setZones(zones: TZones['zones'], options?: THttpRequestOptions): Promise<any>;
|
|
35
211
|
goToCoordinates(lat: number, lon: number, alt?: number, options?: THttpRequestOptions): Promise<TResponse>;
|
|
36
|
-
checkGenetecConnection(params: TParameters, options?: THttpRequestOptions): Promise<
|
|
37
|
-
getGenetecCameraList(params: TParameters, options?: THttpRequestOptions): Promise<
|
|
212
|
+
checkGenetecConnection(params: TParameters, options?: THttpRequestOptions): Promise<any>;
|
|
213
|
+
getGenetecCameraList(params: TParameters, options?: THttpRequestOptions): Promise<{
|
|
214
|
+
value: string;
|
|
215
|
+
index: number;
|
|
216
|
+
label: string;
|
|
217
|
+
}[]>;
|
|
38
218
|
private _getJson;
|
|
219
|
+
private _post;
|
|
39
220
|
private _getBlob;
|
|
40
221
|
private parseBlobResponse;
|
|
41
|
-
private _postJsonEncoded;
|
|
42
222
|
private _postUrlEncoded;
|
|
223
|
+
private _postJsonEncoded;
|
|
43
224
|
}
|