camstreamerlib 4.0.0-beta.37 → 4.0.0-beta.39
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 +38 -27
- package/cjs/CamOverlayAPI.js +42 -75
- 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/CamOverlayAPI/scoreBoardSchema.js +6 -1
- 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 -76
- 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/CamOverlayAPI/scoreBoardSchema.js +6 -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 +24 -14
- 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 +38 -38
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +13 -13
- 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
|
@@ -1 +1,276 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const connectionSchema = z.object({
|
|
3
|
+
protocol: z.union([z.literal('http'), z.literal('https'), z.literal('https_insecure')]),
|
|
4
|
+
ip: z.union([z.string().ip(), z.literal('')]),
|
|
5
|
+
port: z.number().positive().lt(65535),
|
|
6
|
+
user: z.string(),
|
|
7
|
+
pass: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export const widgetSchema = z.object({
|
|
10
|
+
enabled: z.boolean().default(true),
|
|
11
|
+
coord: z.union([
|
|
12
|
+
z.literal('top_left'),
|
|
13
|
+
z.literal('top_right'),
|
|
14
|
+
z.literal('bottom_left'),
|
|
15
|
+
z.literal('bottom_right'),
|
|
16
|
+
]),
|
|
17
|
+
posX: z.number().nonnegative(),
|
|
18
|
+
posY: z.number().nonnegative(),
|
|
19
|
+
scale: z.number().positive(),
|
|
20
|
+
});
|
|
21
|
+
const labelOptionsSchema = z.union([
|
|
22
|
+
z.literal('blank'),
|
|
23
|
+
z.literal('registration'),
|
|
24
|
+
z.literal('call_sign'),
|
|
25
|
+
z.literal('flight_number'),
|
|
26
|
+
z.literal('icao'),
|
|
27
|
+
]);
|
|
28
|
+
const identificationLabelSchema = z.object({
|
|
29
|
+
firstRow: labelOptionsSchema,
|
|
30
|
+
secondRow: labelOptionsSchema,
|
|
31
|
+
thirdRow: labelOptionsSchema,
|
|
32
|
+
fourthRow: labelOptionsSchema,
|
|
33
|
+
opacity: z.number().positive(),
|
|
34
|
+
});
|
|
35
|
+
export const cameraSettingsSchema = z.object({
|
|
36
|
+
units: z.union([z.literal('metric'), z.literal('imperial')]).default('imperial'),
|
|
37
|
+
adsbSource: z
|
|
38
|
+
.object({
|
|
39
|
+
ip: z.union([z.string().ip(), z.literal('')]),
|
|
40
|
+
port: z.number().positive().lt(65535),
|
|
41
|
+
})
|
|
42
|
+
.default({ ip: '', port: 30334 }),
|
|
43
|
+
camera: connectionSchema.default({
|
|
44
|
+
protocol: 'http',
|
|
45
|
+
ip: '127.0.0.1',
|
|
46
|
+
port: 80,
|
|
47
|
+
user: 'root',
|
|
48
|
+
pass: '',
|
|
49
|
+
}),
|
|
50
|
+
cameraCalibrationProcessConfig: z
|
|
51
|
+
.object({
|
|
52
|
+
nightSkyCalibrationEnabled: z.boolean(),
|
|
53
|
+
scheduleNightSkyCalibrationTimestamp: z.number(),
|
|
54
|
+
})
|
|
55
|
+
.default({ nightSkyCalibrationEnabled: false, scheduleNightSkyCalibrationTimestamp: 0 }),
|
|
56
|
+
cameraConfig: z
|
|
57
|
+
.object({
|
|
58
|
+
maxZoomLevel: z.number().optional(),
|
|
59
|
+
defaultCaptureSizeMeters: z.number().positive().default(120),
|
|
60
|
+
captureSizeExtensionMeters: z.number().positive().default(80),
|
|
61
|
+
})
|
|
62
|
+
.default({
|
|
63
|
+
maxZoomLevel: 30,
|
|
64
|
+
defaultCaptureSizeMeters: 120,
|
|
65
|
+
captureSizeExtensionMeters: 80,
|
|
66
|
+
}),
|
|
67
|
+
stream: z
|
|
68
|
+
.object({
|
|
69
|
+
width: z.number().positive(),
|
|
70
|
+
height: z.number().positive(),
|
|
71
|
+
})
|
|
72
|
+
.default({ width: 1920, height: 1080 }),
|
|
73
|
+
imageConfig: z
|
|
74
|
+
.object({
|
|
75
|
+
dayAperture: z.number().nonnegative().min(0).max(100),
|
|
76
|
+
nightAperture: z.number().nonnegative().min(0).max(100),
|
|
77
|
+
})
|
|
78
|
+
.default({ dayAperture: 50, nightAperture: 0 }),
|
|
79
|
+
airportConfig: z
|
|
80
|
+
.object({
|
|
81
|
+
icao: z.string().default(''),
|
|
82
|
+
centerLat: z.number(),
|
|
83
|
+
centerLon: z.number(),
|
|
84
|
+
radius: z.number().nonnegative().default(10000),
|
|
85
|
+
})
|
|
86
|
+
.default({
|
|
87
|
+
icao: '',
|
|
88
|
+
centerLat: 0,
|
|
89
|
+
centerLon: 0,
|
|
90
|
+
radius: 10000,
|
|
91
|
+
}),
|
|
92
|
+
trackingConfig: z
|
|
93
|
+
.object({
|
|
94
|
+
prioritizeEmergency: z.boolean(),
|
|
95
|
+
})
|
|
96
|
+
.default({ prioritizeEmergency: true }),
|
|
97
|
+
overlayText: z
|
|
98
|
+
.object({
|
|
99
|
+
displayIcao: z.boolean().optional(),
|
|
100
|
+
displayRegistration: z.boolean().optional(),
|
|
101
|
+
displayFlightNumber: z.boolean().optional(),
|
|
102
|
+
displayAltitude: z.boolean().optional(),
|
|
103
|
+
displayVelocity: z.boolean().optional(),
|
|
104
|
+
displayDistance: z.boolean().optional(),
|
|
105
|
+
displayFOV: z.boolean().optional(),
|
|
106
|
+
displayPTError: z.boolean().optional(),
|
|
107
|
+
displayPTZSpeed: z.boolean().optional(),
|
|
108
|
+
displayVelocityData: z.boolean().optional(),
|
|
109
|
+
displaySignalQuality: z.boolean().optional(),
|
|
110
|
+
displayAutoTrackingInfo: z.boolean().optional(),
|
|
111
|
+
displayGPSCoords: z.boolean().optional(),
|
|
112
|
+
displayVapixQuery: z.boolean().optional(),
|
|
113
|
+
displayFocus: z.boolean().optional(),
|
|
114
|
+
displayAperture: z.boolean().optional(),
|
|
115
|
+
displaySunDistance: z.boolean().optional(),
|
|
116
|
+
displayTickTime: z.boolean().optional(),
|
|
117
|
+
displayAircraftInfo: z.boolean().optional(),
|
|
118
|
+
})
|
|
119
|
+
.optional(),
|
|
120
|
+
widget: widgetSchema.default({
|
|
121
|
+
enabled: true,
|
|
122
|
+
coord: 'top_right',
|
|
123
|
+
posX: 10,
|
|
124
|
+
posY: 10,
|
|
125
|
+
scale: 100,
|
|
126
|
+
}),
|
|
127
|
+
airportWidget: widgetSchema.default({
|
|
128
|
+
enabled: true,
|
|
129
|
+
coord: 'top_left',
|
|
130
|
+
posX: 10,
|
|
131
|
+
posY: 10,
|
|
132
|
+
scale: 100,
|
|
133
|
+
}),
|
|
134
|
+
fr24FlightInfoSource: z
|
|
135
|
+
.object({
|
|
136
|
+
enabled: z.boolean().default(false),
|
|
137
|
+
priority: z.number().int().positive().default(1),
|
|
138
|
+
apiToken: z.string().default(''),
|
|
139
|
+
validateFlights: z.boolean().default(true),
|
|
140
|
+
})
|
|
141
|
+
.default({
|
|
142
|
+
enabled: false,
|
|
143
|
+
priority: 1,
|
|
144
|
+
apiToken: '',
|
|
145
|
+
validateFlights: true,
|
|
146
|
+
}),
|
|
147
|
+
radarcapeFlightInfoSource: z
|
|
148
|
+
.object({
|
|
149
|
+
enabled: z.boolean().default(false),
|
|
150
|
+
priority: z.number().int().positive().default(2),
|
|
151
|
+
ip: z.union([z.string().ip(), z.literal('')]).default(''),
|
|
152
|
+
port: z.number().positive().lt(65535).default(80),
|
|
153
|
+
})
|
|
154
|
+
.default({
|
|
155
|
+
enabled: false,
|
|
156
|
+
priority: 2,
|
|
157
|
+
ip: '',
|
|
158
|
+
port: 80,
|
|
159
|
+
}),
|
|
160
|
+
identificationLabel: identificationLabelSchema.default({
|
|
161
|
+
firstRow: 'registration',
|
|
162
|
+
secondRow: 'blank',
|
|
163
|
+
thirdRow: 'blank',
|
|
164
|
+
fourthRow: 'blank',
|
|
165
|
+
opacity: 30,
|
|
166
|
+
}),
|
|
167
|
+
acs: connectionSchema
|
|
168
|
+
.extend({
|
|
169
|
+
enabled: z.boolean(),
|
|
170
|
+
sourceKey: z.string(),
|
|
171
|
+
})
|
|
172
|
+
.default({
|
|
173
|
+
enabled: false,
|
|
174
|
+
protocol: 'https_insecure',
|
|
175
|
+
ip: '',
|
|
176
|
+
port: 29204,
|
|
177
|
+
user: '',
|
|
178
|
+
pass: '',
|
|
179
|
+
sourceKey: '',
|
|
180
|
+
}),
|
|
181
|
+
genetec: connectionSchema
|
|
182
|
+
.extend({
|
|
183
|
+
enabled: z.boolean(),
|
|
184
|
+
baseUri: z.string().default(''),
|
|
185
|
+
appId: z.string().default(''),
|
|
186
|
+
cameraList: z.string().array().default([]),
|
|
187
|
+
})
|
|
188
|
+
.default({
|
|
189
|
+
enabled: false,
|
|
190
|
+
protocol: 'http',
|
|
191
|
+
ip: '',
|
|
192
|
+
port: 4590,
|
|
193
|
+
user: '',
|
|
194
|
+
pass: '',
|
|
195
|
+
baseUri: 'WebSdk',
|
|
196
|
+
appId: '',
|
|
197
|
+
cameraList: [],
|
|
198
|
+
}),
|
|
199
|
+
});
|
|
200
|
+
export const serverSettingsSchema = z.object({
|
|
201
|
+
cameraCalibration: z.object({
|
|
202
|
+
posLat: z.number(),
|
|
203
|
+
posLon: z.number(),
|
|
204
|
+
geoidHN: z.number(),
|
|
205
|
+
altitudeAmsl: z.number(),
|
|
206
|
+
rotationEast: z.number(),
|
|
207
|
+
rotationNorth: z.number(),
|
|
208
|
+
rotationUp: z.number(),
|
|
209
|
+
tiltTransformationCoefA: z.number(),
|
|
210
|
+
tiltCameraKnownPoint: z.number(),
|
|
211
|
+
tiltRealKnownPoint: z.number(),
|
|
212
|
+
}),
|
|
213
|
+
});
|
|
214
|
+
export const trackingModeSchema = z.object({
|
|
215
|
+
mode: z.union([z.literal('MANUAL'), z.literal('AUTOMATIC')]),
|
|
216
|
+
});
|
|
217
|
+
export const flightInfoSchema = z.object({
|
|
218
|
+
callsign: z.string().optional(),
|
|
219
|
+
flightNumber: z.string().optional(),
|
|
220
|
+
registration: z.string().optional(),
|
|
221
|
+
aircraftType: z.string().optional(),
|
|
222
|
+
airlines: z.string().optional(),
|
|
223
|
+
originAirport: z
|
|
224
|
+
.object({
|
|
225
|
+
icao: z.string().optional(),
|
|
226
|
+
iata: z.string().optional(),
|
|
227
|
+
city: z.string().optional(),
|
|
228
|
+
})
|
|
229
|
+
.optional(),
|
|
230
|
+
destinationAirport: z.object({
|
|
231
|
+
icao: z.string().optional(),
|
|
232
|
+
iata: z.string().optional(),
|
|
233
|
+
city: z.string().optional(),
|
|
234
|
+
}),
|
|
235
|
+
flightImages: z
|
|
236
|
+
.array(z.object({
|
|
237
|
+
src: z.string().optional(),
|
|
238
|
+
photographer: z.string().optional(),
|
|
239
|
+
}))
|
|
240
|
+
.optional(),
|
|
241
|
+
});
|
|
242
|
+
export const priorityListSchema = z.object({
|
|
243
|
+
priorityList: z.array(z.string()).default([]),
|
|
244
|
+
});
|
|
245
|
+
export const whiteListSchema = z.object({
|
|
246
|
+
whiteList: z.array(z.string()).default([]),
|
|
247
|
+
});
|
|
248
|
+
export const blackListSchema = z.object({
|
|
249
|
+
blackList: z.array(z.string()).default([]),
|
|
250
|
+
});
|
|
251
|
+
export const mapTypeSchema = z.enum(['roadmap', 'satellite']);
|
|
252
|
+
export const mapInfoSchema = z.object({
|
|
253
|
+
minZoom: z.number().nonnegative(),
|
|
254
|
+
maxZoom: z.number().nonnegative(),
|
|
255
|
+
mapTypes: z.array(mapTypeSchema),
|
|
256
|
+
tileSize: z.number().nonnegative(),
|
|
257
|
+
});
|
|
258
|
+
export const zonesSchema = z.object({
|
|
259
|
+
zones: z
|
|
260
|
+
.array(z.object({
|
|
261
|
+
enabled: z.boolean().default(true),
|
|
262
|
+
name: z.string().optional(),
|
|
263
|
+
area: z
|
|
264
|
+
.array(z.object({
|
|
265
|
+
lat: z.number(),
|
|
266
|
+
lon: z.number(),
|
|
267
|
+
}))
|
|
268
|
+
.nonempty(),
|
|
269
|
+
minAltitudeAmsl: z.number().optional(),
|
|
270
|
+
maxAltitudeAmsl: z.number().optional(),
|
|
271
|
+
minSpeedKmph: z.number().optional(),
|
|
272
|
+
maxSpeedKmph: z.number().optional(),
|
|
273
|
+
weight: z.number(),
|
|
274
|
+
}))
|
|
275
|
+
.default([]),
|
|
276
|
+
});
|
package/esm/types/VapixAPI.js
CHANGED
|
@@ -12,6 +12,19 @@ export const applicationSchema = z.object({
|
|
|
12
12
|
VendorHomePage: z.string().optional(),
|
|
13
13
|
LicenseName: z.string().optional(),
|
|
14
14
|
});
|
|
15
|
+
export const applicationListSchema = z.array(applicationSchema.extend({
|
|
16
|
+
appId: z
|
|
17
|
+
.union([
|
|
18
|
+
z.literal('CamStreamer'),
|
|
19
|
+
z.literal('CamSwitcher'),
|
|
20
|
+
z.literal('CamOverlay'),
|
|
21
|
+
z.literal('CamScripter'),
|
|
22
|
+
z.literal('PlaneTracker'),
|
|
23
|
+
z.literal('Ndihxplugin'),
|
|
24
|
+
z.literal('SportTracker'),
|
|
25
|
+
])
|
|
26
|
+
.nullable(),
|
|
27
|
+
}));
|
|
15
28
|
export const APP_IDS = [
|
|
16
29
|
'CamStreamer',
|
|
17
30
|
'CamSwitcher',
|
|
@@ -42,7 +55,12 @@ const audioSampleRatesSchema = z.object({
|
|
|
42
55
|
});
|
|
43
56
|
const audioSampleRatesOutSchema = audioSampleRatesSchema.transform(toCamelCaseDeep);
|
|
44
57
|
export const sdCardWatchedStatuses = ['OK', 'connected', 'disconnected'];
|
|
45
|
-
export const
|
|
58
|
+
export const sdCardInfoSchema = z.object({
|
|
59
|
+
status: z.enum(sdCardWatchedStatuses),
|
|
60
|
+
totalSize: z.number(),
|
|
61
|
+
freeSize: z.number(),
|
|
62
|
+
});
|
|
63
|
+
export const ptzOverviewSchema = z.record(z.number(), z.array(z.object({ id: z.number(), name: z.string() })));
|
|
46
64
|
export const cameraPTZItemDataSchema = z.object({
|
|
47
65
|
pan: z.number().optional(),
|
|
48
66
|
tilt: z.number().optional(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
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>;
|
|
@@ -324,7 +334,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
324
334
|
pos_y: number;
|
|
325
335
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
326
336
|
scale: number;
|
|
327
|
-
font:
|
|
337
|
+
font: string;
|
|
328
338
|
teamHomeShortname: string;
|
|
329
339
|
teamGuestShortname: string;
|
|
330
340
|
teamHomeBackgroundColor: string;
|
|
@@ -354,7 +364,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
354
364
|
pos_y: number;
|
|
355
365
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
356
366
|
scale: number;
|
|
357
|
-
font:
|
|
367
|
+
font: string;
|
|
358
368
|
teamHomeShortname: string;
|
|
359
369
|
teamGuestShortname: string;
|
|
360
370
|
teamHomeBackgroundColor: string;
|
|
@@ -387,7 +397,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
387
397
|
cameraList: number[];
|
|
388
398
|
zIndex: number;
|
|
389
399
|
scale: number;
|
|
390
|
-
font:
|
|
400
|
+
font: string;
|
|
391
401
|
teamHomeBackgroundColor: string;
|
|
392
402
|
teamGuestBackgroundColor: string;
|
|
393
403
|
teamHomeTextColor: string;
|
|
@@ -427,7 +437,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
427
437
|
teamGuestName: string;
|
|
428
438
|
scoreVisible: boolean;
|
|
429
439
|
description: string;
|
|
430
|
-
textFont:
|
|
440
|
+
textFont: string;
|
|
431
441
|
scoreFont: "classic";
|
|
432
442
|
}>;
|
|
433
443
|
getServices(options?: THttpRequestOptions): Promise<({
|
|
@@ -733,7 +743,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
733
743
|
pos_y: number;
|
|
734
744
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
735
745
|
scale: number;
|
|
736
|
-
font:
|
|
746
|
+
font: string;
|
|
737
747
|
teamHomeShortname: string;
|
|
738
748
|
teamGuestShortname: string;
|
|
739
749
|
teamHomeBackgroundColor: string;
|
|
@@ -763,7 +773,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
763
773
|
pos_y: number;
|
|
764
774
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
765
775
|
scale: number;
|
|
766
|
-
font:
|
|
776
|
+
font: string;
|
|
767
777
|
teamHomeShortname: string;
|
|
768
778
|
teamGuestShortname: string;
|
|
769
779
|
teamHomeBackgroundColor: string;
|
|
@@ -796,7 +806,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
796
806
|
cameraList: number[];
|
|
797
807
|
zIndex: number;
|
|
798
808
|
scale: number;
|
|
799
|
-
font:
|
|
809
|
+
font: string;
|
|
800
810
|
teamHomeBackgroundColor: string;
|
|
801
811
|
teamGuestBackgroundColor: string;
|
|
802
812
|
teamHomeTextColor: string;
|
|
@@ -836,7 +846,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
836
846
|
teamGuestName: string;
|
|
837
847
|
scoreVisible: boolean;
|
|
838
848
|
description: string;
|
|
839
|
-
textFont:
|
|
849
|
+
textFont: string;
|
|
840
850
|
scoreFont: "classic";
|
|
841
851
|
})[]>;
|
|
842
852
|
updateSingleService(service: TService, 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;
|