@camera.ui/browser 0.0.65 → 0.0.67
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/dist/bundle.js +1 -1
- package/dist/types/packages/client/browser/src/client.d.ts +3 -2
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +6 -23
- package/dist/types/packages/client/browser/src/proxy/deviceManager.d.ts +9 -38
- package/dist/types/packages/client/browser/src/proxy/pluginsManager.d.ts +5 -32
- package/dist/types/packages/client/browser/src/proxy/systemManager.d.ts +5 -32
- package/dist/types/packages/client/browser/src/socket.d.ts +10 -0
- package/dist/types/packages/client/browser/src/types.d.ts +1 -1
- package/dist/types/server/src/api/ws/types.d.ts +1 -1
- package/dist/types/server/src/camera/base/{base.server.d.ts → cameraDevice.d.ts} +2 -2
- package/dist/types/server/src/camera/base/{base.browser.d.ts → cameraDeviceBrowser.d.ts} +2 -2
- package/dist/types/server/src/camera/base/index.d.ts +80 -6
- package/dist/types/server/src/camera/streaming/browser/browser-peer-connection.d.ts +1 -1
- package/dist/types/server/src/camera/streaming/browser/browser-streaming-session.d.ts +1 -1
- package/dist/types/server/src/camera/streaming/browser/webrtc-browser-connection.d.ts +1 -1
- package/dist/types/server/src/camera/streaming/peer-connection.d.ts +1 -1
- package/dist/types/server/src/camera/streaming/streaming-session.d.ts +1 -1
- package/dist/types/server/src/camera/streaming/webrtc-connection.d.ts +1 -1
- package/dist/types/server/src/camera/utils/subscribed.d.ts +4 -4
- package/dist/types/server/src/{proxy → nats}/types.d.ts +114 -113
- package/dist/types/shared/types/index.d.ts +2 -2
- package/package.json +2 -3
- package/dist/types/server/src/camera/base/base.d.ts +0 -72
- package/dist/types/server/src/plugins/node/proxy/queue.d.ts +0 -29
- package/dist/types/server/src/proxy/constants.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Camera } from '../api/database/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CameraDevice } from '../camera/base/cameraDevice';
|
|
3
|
+
import type { BrowserCameraDevice } from '../camera/base/cameraDeviceBrowser';
|
|
3
4
|
import type { CameraConfig, FfmpegOptions, OnSetEvent, PrebufferType, StateValues, StreamInfo } from '../camera/types';
|
|
4
5
|
import type { FrameMetadata } from '../decoder/types';
|
|
5
6
|
import type { CameraExtension } from '../plugins/types';
|
|
@@ -28,12 +29,30 @@ export interface ProxyMessageStructure {
|
|
|
28
29
|
response?: any;
|
|
29
30
|
error?: any;
|
|
30
31
|
}
|
|
31
|
-
export interface
|
|
32
|
-
|
|
32
|
+
export interface ProxyAuth {
|
|
33
|
+
cluster: {
|
|
34
|
+
user: string;
|
|
35
|
+
pass: string;
|
|
36
|
+
};
|
|
37
|
+
server: {
|
|
38
|
+
user: string;
|
|
39
|
+
pass: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface MethodNamesByManager {
|
|
43
|
+
systemManager: SystemManagerBrowserProxyMethodNames;
|
|
44
|
+
deviceManager: DeviceManagerBrowserProxyMethodNames;
|
|
45
|
+
pluginsManager: PluginsManagerBrowserProxyMethodNames;
|
|
46
|
+
cameraDevice: CameraDeviceProxyMethodNames;
|
|
47
|
+
}
|
|
48
|
+
export type ManagerNames = keyof MethodNamesByManager;
|
|
49
|
+
export interface WebsocketClientRequest<T extends keyof MethodNamesByManager> {
|
|
50
|
+
name: T;
|
|
51
|
+
method: MethodNamesByManager[T];
|
|
33
52
|
args: any[];
|
|
34
53
|
}
|
|
35
|
-
export type
|
|
36
|
-
export interface
|
|
54
|
+
export type WebsocketClientProxyEvent = 'updateDevice' | 'updateState';
|
|
55
|
+
export interface DeviceManagerServerProxyMethods {
|
|
37
56
|
createCamera(data: {
|
|
38
57
|
camera: CameraConfig;
|
|
39
58
|
pluginId: string;
|
|
@@ -55,34 +74,101 @@ export interface ApiProxyMethods {
|
|
|
55
74
|
pluginId: string;
|
|
56
75
|
}): Promise<void>;
|
|
57
76
|
}
|
|
58
|
-
export interface
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
77
|
+
export interface SystemManagerServerProxyMethods {
|
|
78
|
+
}
|
|
79
|
+
export interface PluginsManagerServerProxyMethods {
|
|
80
|
+
}
|
|
81
|
+
export interface CameraDeviceProxyMethods {
|
|
82
|
+
connect(data: {
|
|
83
|
+
cameraId: string;
|
|
84
|
+
pluginId: string;
|
|
85
|
+
}): Promise<void>;
|
|
86
|
+
disconnect(data: {
|
|
87
|
+
cameraId: string;
|
|
88
|
+
pluginId: string;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
reboot(data: {
|
|
91
|
+
cameraId: string;
|
|
92
|
+
pluginId: string;
|
|
93
|
+
}): Promise<void>;
|
|
94
|
+
isPrebuffering(data: {
|
|
95
|
+
sourceName: string;
|
|
96
|
+
type: PrebufferType;
|
|
97
|
+
cameraId: string;
|
|
98
|
+
pluginId: string;
|
|
99
|
+
}): Promise<boolean>;
|
|
100
|
+
getPrebufferRawUrl(data: {
|
|
101
|
+
sourceName: string;
|
|
102
|
+
type: PrebufferType;
|
|
103
|
+
cameraId: string;
|
|
104
|
+
pluginId: string;
|
|
105
|
+
}): Promise<string | undefined>;
|
|
106
|
+
getStreamInfo(data: {
|
|
107
|
+
sourceName: string;
|
|
108
|
+
cameraId: string;
|
|
109
|
+
pluginId: string;
|
|
110
|
+
}): Promise<StreamInfo | undefined>;
|
|
111
|
+
getFrameMetadata(data: {
|
|
112
|
+
cameraId: string;
|
|
113
|
+
pluginId: string;
|
|
114
|
+
}): Promise<FrameMetadata>;
|
|
115
|
+
getFfmpegPath(data: {
|
|
116
|
+
cameraId: string;
|
|
117
|
+
pluginId: string;
|
|
118
|
+
}): string;
|
|
119
|
+
getIceServers(data: {
|
|
120
|
+
cameraId: string;
|
|
121
|
+
pluginId: string;
|
|
122
|
+
}): IceServer[];
|
|
123
|
+
snapshot(data: {
|
|
124
|
+
forceNew?: boolean;
|
|
125
|
+
cameraId: string;
|
|
126
|
+
pluginId: string;
|
|
127
|
+
}): Promise<ArrayBuffer>;
|
|
128
|
+
streamVideo(data: {
|
|
129
|
+
sourceName: string;
|
|
130
|
+
options: FfmpegOptions;
|
|
131
|
+
cameraId: string;
|
|
132
|
+
pluginId: string;
|
|
133
|
+
}): Promise<void>;
|
|
134
|
+
recordToFile(data: {
|
|
135
|
+
sourceName: string;
|
|
136
|
+
outputPath: string;
|
|
137
|
+
duration?: number;
|
|
138
|
+
cameraId: string;
|
|
139
|
+
pluginId: string;
|
|
140
|
+
}): Promise<void>;
|
|
141
|
+
updateState<T extends keyof StateValues>(data: {
|
|
142
|
+
stateName: T;
|
|
143
|
+
eventData: OnSetEvent<T>;
|
|
144
|
+
cameraId: string;
|
|
145
|
+
pluginId: string;
|
|
146
|
+
}): void;
|
|
147
|
+
refreshStates(data: {
|
|
148
|
+
cameraId: string;
|
|
149
|
+
pluginId: string;
|
|
150
|
+
}): Promise<{
|
|
151
|
+
camera: Camera;
|
|
152
|
+
states: StateValues;
|
|
153
|
+
cameraState: boolean;
|
|
154
|
+
}>;
|
|
71
155
|
}
|
|
156
|
+
export type CameraDeviceProxyMethodNames = MethodKeys<CameraDeviceProxyMethods>;
|
|
72
157
|
export interface DeviceManagerListenerMessagePayload {
|
|
73
158
|
type: keyof DeviceManagerProxyEventCallbacks;
|
|
74
159
|
data: any;
|
|
75
160
|
}
|
|
76
161
|
export interface DeviceManagerBrowserProxyMethods {
|
|
77
|
-
getCameraByName(name: string): Promise<CameraDevice | undefined>;
|
|
78
|
-
getCameraById(id: string): Promise<CameraDevice | undefined>;
|
|
79
|
-
removeCameraByName(name: string): Promise<void>;
|
|
80
|
-
removeCameraById(id: string): Promise<void>;
|
|
162
|
+
getCameraByName(name: string): Promise<CameraDevice | BrowserCameraDevice | undefined>;
|
|
163
|
+
getCameraById(id: string): Promise<CameraDevice | BrowserCameraDevice | undefined>;
|
|
81
164
|
}
|
|
82
165
|
export interface DeviceManagerProxyMethods extends DeviceManagerBrowserProxyMethods {
|
|
83
166
|
createCamera(camera: CameraConfig): Promise<CameraDevice>;
|
|
167
|
+
removeCameraByName(name: string): Promise<void>;
|
|
168
|
+
removeCameraById(id: string): Promise<void>;
|
|
84
169
|
}
|
|
85
170
|
export type DeviceManagerProxyMethodNames = MethodKeys<DeviceManagerProxyMethods>;
|
|
171
|
+
export type DeviceManagerBrowserProxyMethodNames = MethodKeys<DeviceManagerBrowserProxyMethods>;
|
|
86
172
|
export interface DeviceManagerProxyEvents {
|
|
87
173
|
cameraSelected: {
|
|
88
174
|
camera: Camera;
|
|
@@ -97,9 +183,9 @@ export interface DeviceManagerProxyEvents {
|
|
|
97
183
|
};
|
|
98
184
|
}
|
|
99
185
|
export interface DeviceManagerProxyEventCallbacks {
|
|
100
|
-
cameraSelected: ((camera:
|
|
186
|
+
cameraSelected: ((camera: CameraDevice, extension: CameraExtension) => void) | ((camera: BrowserCameraDevice, extension: CameraExtension) => void);
|
|
101
187
|
cameraDeselected: (cameraId: string, extension: CameraExtension) => void;
|
|
102
|
-
cameraUpdated: ((cameraId: string, camera:
|
|
188
|
+
cameraUpdated: ((cameraId: string, camera: CameraDevice) => void) | ((cameraId: string, camera: BrowserCameraDevice) => void);
|
|
103
189
|
}
|
|
104
190
|
export interface DeviceManagerProxyGenericEvent<K extends keyof DeviceManagerProxyEvents> {
|
|
105
191
|
type: K;
|
|
@@ -113,12 +199,13 @@ export interface SystemManagerBrowserProxyMethods {
|
|
|
113
199
|
}
|
|
114
200
|
export interface SystemManagerProxyMethods extends SystemManagerBrowserProxyMethods {
|
|
115
201
|
}
|
|
202
|
+
export type SystemManagerProxyMethodNames = MethodKeys<SystemManagerProxyMethods>;
|
|
203
|
+
export type SystemManagerBrowserProxyMethodNames = MethodKeys<SystemManagerBrowserProxyMethods>;
|
|
116
204
|
export interface SystemManagerProxyMethodsListener {
|
|
117
205
|
listen<E extends keyof SystemManagerProxyEventCallbacks>(eventType: E, callback: SystemManagerProxyEventCallbacks[E]): void;
|
|
118
206
|
removeListener<E extends keyof SystemManagerProxyEventCallbacks>(eventType: E, callbackToRemove: SystemManagerProxyEventCallbacks[E]): void;
|
|
119
207
|
removeAllListeners<E extends keyof SystemManagerProxyEventCallbacks>(eventType?: E): void;
|
|
120
208
|
}
|
|
121
|
-
export type SystemManagerProxyMethodNames = MethodKeys<SystemManagerProxyMethods>;
|
|
122
209
|
export interface SystemManagerProxyEvents {
|
|
123
210
|
}
|
|
124
211
|
export type SystemManagerProxyEventCallbacks = {};
|
|
@@ -134,12 +221,13 @@ export interface PluginsManagerBrowserProxyMethods {
|
|
|
134
221
|
}
|
|
135
222
|
export interface PluginsManagerProxyMethods extends PluginsManagerBrowserProxyMethods {
|
|
136
223
|
}
|
|
224
|
+
export type PluginsManagerProxyMethodNames = MethodKeys<PluginsManagerProxyMethods>;
|
|
225
|
+
export type PluginsManagerBrowserProxyMethodNames = MethodKeys<PluginsManagerBrowserProxyMethods>;
|
|
137
226
|
export interface PluginsManagerProxyMethodsListener {
|
|
138
227
|
listen<E extends keyof PluginsManagerProxyEventCallbacks>(eventType: E, callback: PluginsManagerProxyEventCallbacks[E]): void;
|
|
139
228
|
removeListener<E extends keyof PluginsManagerProxyEventCallbacks>(eventType: E, callbackToRemove: PluginsManagerProxyEventCallbacks[E]): void;
|
|
140
229
|
removeAllListeners<E extends keyof PluginsManagerProxyEventCallbacks>(eventType?: E): void;
|
|
141
230
|
}
|
|
142
|
-
export type PluginsManagerProxyMethodNames = MethodKeys<PluginsManagerProxyMethods>;
|
|
143
231
|
export interface PluginsManagerProxyEvents {
|
|
144
232
|
}
|
|
145
233
|
export type PluginsManagerProxyEventCallbacks = {};
|
|
@@ -158,90 +246,3 @@ export interface CameraDeviceListenerMessagePayload {
|
|
|
158
246
|
type: 'removed' | 'updated' | 'cameraState';
|
|
159
247
|
data?: any;
|
|
160
248
|
}
|
|
161
|
-
export interface CameraDeviceProxyMethods {
|
|
162
|
-
connect(data: {
|
|
163
|
-
cameraId: string;
|
|
164
|
-
pluginId: string;
|
|
165
|
-
}): Promise<void>;
|
|
166
|
-
disconnect(data: {
|
|
167
|
-
cameraId: string;
|
|
168
|
-
pluginId: string;
|
|
169
|
-
}): Promise<void>;
|
|
170
|
-
reboot(data: {
|
|
171
|
-
cameraId: string;
|
|
172
|
-
pluginId: string;
|
|
173
|
-
}): Promise<void>;
|
|
174
|
-
isPrebuffering(data: {
|
|
175
|
-
sourceName: string;
|
|
176
|
-
type: PrebufferType;
|
|
177
|
-
cameraId: string;
|
|
178
|
-
pluginId: string;
|
|
179
|
-
}): Promise<boolean>;
|
|
180
|
-
getPrebufferRawUrl(data: {
|
|
181
|
-
sourceName: string;
|
|
182
|
-
type: PrebufferType;
|
|
183
|
-
cameraId: string;
|
|
184
|
-
pluginId: string;
|
|
185
|
-
}): Promise<string | undefined>;
|
|
186
|
-
getStreamInfo(data: {
|
|
187
|
-
sourceName: string;
|
|
188
|
-
cameraId: string;
|
|
189
|
-
pluginId: string;
|
|
190
|
-
}): Promise<StreamInfo | undefined>;
|
|
191
|
-
getFrameMetadata(data: {
|
|
192
|
-
cameraId: string;
|
|
193
|
-
pluginId: string;
|
|
194
|
-
}): Promise<FrameMetadata>;
|
|
195
|
-
getFffmpegPath(data: {
|
|
196
|
-
cameraId: string;
|
|
197
|
-
pluginId: string;
|
|
198
|
-
}): string;
|
|
199
|
-
getIceServers(data: {
|
|
200
|
-
cameraId: string;
|
|
201
|
-
pluginId: string;
|
|
202
|
-
}): IceServer[];
|
|
203
|
-
snapshot(data: {
|
|
204
|
-
forceNew?: boolean;
|
|
205
|
-
cameraId: string;
|
|
206
|
-
pluginId: string;
|
|
207
|
-
}): Promise<ArrayBuffer>;
|
|
208
|
-
streamVideo(data: {
|
|
209
|
-
sourceName: string;
|
|
210
|
-
options: FfmpegOptions;
|
|
211
|
-
cameraId: string;
|
|
212
|
-
pluginId: string;
|
|
213
|
-
}): Promise<void>;
|
|
214
|
-
recordToFile(data: {
|
|
215
|
-
sourceName: string;
|
|
216
|
-
outputPath: string;
|
|
217
|
-
duration?: number;
|
|
218
|
-
cameraId: string;
|
|
219
|
-
pluginId: string;
|
|
220
|
-
}): Promise<void>;
|
|
221
|
-
updateState<T extends keyof StateValues>(data: {
|
|
222
|
-
stateName: T;
|
|
223
|
-
eventData: OnSetEvent<T>;
|
|
224
|
-
cameraId: string;
|
|
225
|
-
pluginId: string;
|
|
226
|
-
}): void;
|
|
227
|
-
refreshStates(data: {
|
|
228
|
-
cameraId: string;
|
|
229
|
-
pluginId: string;
|
|
230
|
-
}): Promise<{
|
|
231
|
-
camera: Camera;
|
|
232
|
-
states: StateValues;
|
|
233
|
-
cameraState: boolean;
|
|
234
|
-
}>;
|
|
235
|
-
}
|
|
236
|
-
export type CameraDeviceProxyMethodNames = MethodKeys<CameraDeviceProxyMethods>;
|
|
237
|
-
export type CameraDeviceProxyEventCallbacks = {
|
|
238
|
-
[K in keyof StateValues]: (newData: StateValues[K], oldData: StateValues[K]) => void;
|
|
239
|
-
};
|
|
240
|
-
export interface CameraDeviceProxyGenericEvent<K extends keyof StateValues> {
|
|
241
|
-
type: K;
|
|
242
|
-
data: StateValues[K];
|
|
243
|
-
}
|
|
244
|
-
export interface WsCameraDeviceClientMessage {
|
|
245
|
-
method: CameraDeviceProxyMethodNames;
|
|
246
|
-
args: any[];
|
|
247
|
-
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export type * from '../../server/src/api/database/types';
|
|
2
2
|
export type * from '../../server/src/api/types';
|
|
3
3
|
export type * from '../../server/src/api/ws/types';
|
|
4
|
-
export * from '../../server/src/camera/base/
|
|
4
|
+
export * from '../../server/src/camera/base/cameraDeviceBrowser';
|
|
5
5
|
export * from '../../server/src/camera/streaming/browser/browser-streaming-session';
|
|
6
6
|
export * from '../../server/src/camera/streaming/browser/webrtc-browser-connection';
|
|
7
7
|
export type * from '../../server/src/camera/types';
|
|
8
8
|
export type * from '../../server/src/decoder/types';
|
|
9
9
|
export * from '../../server/src/go2rtc/types';
|
|
10
|
+
export type * from '../../server/src/nats/types';
|
|
10
11
|
export * from '../../server/src/plugins/types';
|
|
11
|
-
export type * from '../../server/src/proxy/types';
|
|
12
12
|
export * from '../../server/src/services/config/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"description": "camera.ui browser client",
|
|
5
5
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
6
6
|
"module": "./dist/bundle.js",
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
"axios": "^1.6.8",
|
|
27
27
|
"lodash.clonedeep": "^4.5.0",
|
|
28
28
|
"lodash.isequal": "^4.5.0",
|
|
29
|
-
"nats.ws": "^1.26.0",
|
|
30
29
|
"rxjs": "^7.8.1",
|
|
31
|
-
"
|
|
30
|
+
"socket.io-client": "^4.7.5"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@rushstack/eslint-patch": "^1.10.2",
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
-
import { Subscribed } from '../utils/subscribed';
|
|
3
|
-
import type { Camera, CameraInformation, CameraPublicProperties, CameraType, CameraZone } from '../../api/database/types';
|
|
4
|
-
import type { IceServer } from '../../services/config/types';
|
|
5
|
-
import type { AudioState, BaseLogger, BatteryState, CameraSource, DoorbellState, LightState, MotionState, ObjectState, OnSetEvent, SirenState, StateValues } from '../types';
|
|
6
|
-
export declare abstract class CameraDeviceBase extends Subscribed {
|
|
7
|
-
protected logger: BaseLogger;
|
|
8
|
-
protected cameraSubject: BehaviorSubject<Camera>;
|
|
9
|
-
protected cameraState: BehaviorSubject<boolean>;
|
|
10
|
-
protected lightState: BehaviorSubject<LightState>;
|
|
11
|
-
protected motionState: BehaviorSubject<MotionState>;
|
|
12
|
-
protected audioState: BehaviorSubject<AudioState>;
|
|
13
|
-
protected objectState: BehaviorSubject<ObjectState>;
|
|
14
|
-
protected doorbellState: BehaviorSubject<DoorbellState>;
|
|
15
|
-
protected sirenState: BehaviorSubject<SirenState>;
|
|
16
|
-
protected batteryState: BehaviorSubject<BatteryState>;
|
|
17
|
-
onConnected: Observable<boolean>;
|
|
18
|
-
onLightSwitched: Observable<LightState>;
|
|
19
|
-
onMotionDetected: Observable<MotionState>;
|
|
20
|
-
onAudioDetected: Observable<AudioState>;
|
|
21
|
-
onObjectDetected: Observable<ObjectState>;
|
|
22
|
-
onDoorbellPressed: Observable<DoorbellState>;
|
|
23
|
-
onSirenDetected: Observable<SirenState>;
|
|
24
|
-
onBatteryChanged: Observable<BatteryState>;
|
|
25
|
-
get id(): string;
|
|
26
|
-
get nativeId(): string | undefined;
|
|
27
|
-
get pluginId(): string;
|
|
28
|
-
get state(): boolean;
|
|
29
|
-
get disabled(): boolean;
|
|
30
|
-
get name(): string;
|
|
31
|
-
get type(): CameraType;
|
|
32
|
-
get info(): CameraInformation;
|
|
33
|
-
get isCloud(): boolean;
|
|
34
|
-
get hasLight(): boolean;
|
|
35
|
-
get hasSiren(): boolean;
|
|
36
|
-
get hasBinarySensor(): boolean;
|
|
37
|
-
get hasBattery(): boolean;
|
|
38
|
-
get hasMotionDetector(): boolean;
|
|
39
|
-
get hasAudioDetector(): boolean;
|
|
40
|
-
get hasObjectDetector(): boolean;
|
|
41
|
-
get hasPtz(): boolean;
|
|
42
|
-
get hasPrebuffer(): boolean;
|
|
43
|
-
get hasIntercom(): boolean;
|
|
44
|
-
get motionZones(): CameraZone[];
|
|
45
|
-
get objectZones(): CameraZone[];
|
|
46
|
-
get sources(): CameraSource[];
|
|
47
|
-
get streamSource(): CameraSource;
|
|
48
|
-
get snapshotSource(): CameraSource;
|
|
49
|
-
get recordingSource(): CameraSource;
|
|
50
|
-
get detectionSource(): CameraSource;
|
|
51
|
-
constructor(camera: Camera, logger: BaseLogger);
|
|
52
|
-
abstract connect(): Promise<void>;
|
|
53
|
-
abstract disconnect(): Promise<void>;
|
|
54
|
-
abstract reboot(): Promise<void>;
|
|
55
|
-
abstract snapshot(forceNew?: boolean): Promise<ArrayBuffer>;
|
|
56
|
-
abstract getIceServers(): Promise<IceServer[]>;
|
|
57
|
-
protected abstract cleanup(): void;
|
|
58
|
-
getValue<T extends keyof StateValues>(stateName: T): StateValues[T];
|
|
59
|
-
updateState<T extends keyof StateValues>(stateName: T, eventData: OnSetEvent<T>): Promise<void>;
|
|
60
|
-
onStateChange<T extends keyof StateValues>(stateName: T): Observable<{
|
|
61
|
-
newState: StateValues[T];
|
|
62
|
-
oldState: StateValues[T];
|
|
63
|
-
}>;
|
|
64
|
-
onPropertyChange<T extends keyof CameraPublicProperties>(property: T): Observable<{
|
|
65
|
-
oldData: Camera[T];
|
|
66
|
-
newData: Camera[T];
|
|
67
|
-
}>;
|
|
68
|
-
removeAllListeners(): void;
|
|
69
|
-
private createStateObservable;
|
|
70
|
-
protected updateCamera(updatedCamera: Camera): void;
|
|
71
|
-
protected updateCameraState(state: boolean): void;
|
|
72
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Msg } from 'nats';
|
|
2
|
-
import type { BaseLogger } from '../../../camera/types';
|
|
3
|
-
import type { ProxyMessageStructure } from '../../../proxy/types';
|
|
4
|
-
interface NatsConnection {
|
|
5
|
-
publish(subject: string, data: Uint8Array): void;
|
|
6
|
-
}
|
|
7
|
-
interface Subscription extends AsyncIterable<Msg> {
|
|
8
|
-
}
|
|
9
|
-
interface JSONCodec<T> {
|
|
10
|
-
encode(d: T): Uint8Array;
|
|
11
|
-
decode(a: Uint8Array): T;
|
|
12
|
-
}
|
|
13
|
-
export declare class ClientMessageQueue {
|
|
14
|
-
private logger;
|
|
15
|
-
private publisher;
|
|
16
|
-
private subscriber;
|
|
17
|
-
private requestHandler;
|
|
18
|
-
private jc;
|
|
19
|
-
private aborted;
|
|
20
|
-
private isProcessing;
|
|
21
|
-
private queue;
|
|
22
|
-
private pendingResponses;
|
|
23
|
-
constructor(logger: BaseLogger, publisher: NatsConnection, subscriber: Subscription, codec: JSONCodec<any>, requestHandler: (message: ProxyMessageStructure) => void);
|
|
24
|
-
abortQueue(): void;
|
|
25
|
-
enqueue(message: ProxyMessageStructure): Promise<any>;
|
|
26
|
-
private processQueue;
|
|
27
|
-
private listenToMessages;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const NATS_SERVER_SUBJECT = "camera.ui-server";
|