@camera.ui/browser 0.0.65 → 0.0.66
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 +118 -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,34 @@ 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
|
+
websocket: {
|
|
42
|
+
user: string;
|
|
43
|
+
pass: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface MethodNamesByManager {
|
|
47
|
+
system: SystemManagerBrowserProxyMethodNames;
|
|
48
|
+
device: DeviceManagerBrowserProxyMethodNames;
|
|
49
|
+
plugins: PluginsManagerBrowserProxyMethodNames;
|
|
50
|
+
camera: CameraDeviceProxyMethodNames;
|
|
51
|
+
}
|
|
52
|
+
export type ManagerNames = keyof MethodNamesByManager;
|
|
53
|
+
export interface WebsocketClientRequest {
|
|
54
|
+
name: ManagerNames;
|
|
55
|
+
method: MethodNamesByManager[ManagerNames];
|
|
33
56
|
args: any[];
|
|
34
57
|
}
|
|
35
|
-
export type
|
|
36
|
-
export interface
|
|
58
|
+
export type WebsocketClientProxyEvent = 'updateDevice' | 'updateState';
|
|
59
|
+
export interface DeviceManagerServerProxyMethods {
|
|
37
60
|
createCamera(data: {
|
|
38
61
|
camera: CameraConfig;
|
|
39
62
|
pluginId: string;
|
|
@@ -55,34 +78,101 @@ export interface ApiProxyMethods {
|
|
|
55
78
|
pluginId: string;
|
|
56
79
|
}): Promise<void>;
|
|
57
80
|
}
|
|
58
|
-
export interface
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
pass: string;
|
|
62
|
-
};
|
|
63
|
-
server: {
|
|
64
|
-
user: string;
|
|
65
|
-
pass: string;
|
|
66
|
-
};
|
|
67
|
-
websocket: {
|
|
68
|
-
user: string;
|
|
69
|
-
pass: string;
|
|
70
|
-
};
|
|
81
|
+
export interface SystemManagerServerProxyMethods {
|
|
82
|
+
}
|
|
83
|
+
export interface PluginsManagerServerProxyMethods {
|
|
71
84
|
}
|
|
85
|
+
export interface CameraDeviceProxyMethods {
|
|
86
|
+
connect(data: {
|
|
87
|
+
cameraId: string;
|
|
88
|
+
pluginId: string;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
disconnect(data: {
|
|
91
|
+
cameraId: string;
|
|
92
|
+
pluginId: string;
|
|
93
|
+
}): Promise<void>;
|
|
94
|
+
reboot(data: {
|
|
95
|
+
cameraId: string;
|
|
96
|
+
pluginId: string;
|
|
97
|
+
}): Promise<void>;
|
|
98
|
+
isPrebuffering(data: {
|
|
99
|
+
sourceName: string;
|
|
100
|
+
type: PrebufferType;
|
|
101
|
+
cameraId: string;
|
|
102
|
+
pluginId: string;
|
|
103
|
+
}): Promise<boolean>;
|
|
104
|
+
getPrebufferRawUrl(data: {
|
|
105
|
+
sourceName: string;
|
|
106
|
+
type: PrebufferType;
|
|
107
|
+
cameraId: string;
|
|
108
|
+
pluginId: string;
|
|
109
|
+
}): Promise<string | undefined>;
|
|
110
|
+
getStreamInfo(data: {
|
|
111
|
+
sourceName: string;
|
|
112
|
+
cameraId: string;
|
|
113
|
+
pluginId: string;
|
|
114
|
+
}): Promise<StreamInfo | undefined>;
|
|
115
|
+
getFrameMetadata(data: {
|
|
116
|
+
cameraId: string;
|
|
117
|
+
pluginId: string;
|
|
118
|
+
}): Promise<FrameMetadata>;
|
|
119
|
+
getFfmpegPath(data: {
|
|
120
|
+
cameraId: string;
|
|
121
|
+
pluginId: string;
|
|
122
|
+
}): string;
|
|
123
|
+
getIceServers(data: {
|
|
124
|
+
cameraId: string;
|
|
125
|
+
pluginId: string;
|
|
126
|
+
}): IceServer[];
|
|
127
|
+
snapshot(data: {
|
|
128
|
+
forceNew?: boolean;
|
|
129
|
+
cameraId: string;
|
|
130
|
+
pluginId: string;
|
|
131
|
+
}): Promise<ArrayBuffer>;
|
|
132
|
+
streamVideo(data: {
|
|
133
|
+
sourceName: string;
|
|
134
|
+
options: FfmpegOptions;
|
|
135
|
+
cameraId: string;
|
|
136
|
+
pluginId: string;
|
|
137
|
+
}): Promise<void>;
|
|
138
|
+
recordToFile(data: {
|
|
139
|
+
sourceName: string;
|
|
140
|
+
outputPath: string;
|
|
141
|
+
duration?: number;
|
|
142
|
+
cameraId: string;
|
|
143
|
+
pluginId: string;
|
|
144
|
+
}): Promise<void>;
|
|
145
|
+
updateState<T extends keyof StateValues>(data: {
|
|
146
|
+
stateName: T;
|
|
147
|
+
eventData: OnSetEvent<T>;
|
|
148
|
+
cameraId: string;
|
|
149
|
+
pluginId: string;
|
|
150
|
+
}): void;
|
|
151
|
+
refreshStates(data: {
|
|
152
|
+
cameraId: string;
|
|
153
|
+
pluginId: string;
|
|
154
|
+
}): Promise<{
|
|
155
|
+
camera: Camera;
|
|
156
|
+
states: StateValues;
|
|
157
|
+
cameraState: boolean;
|
|
158
|
+
}>;
|
|
159
|
+
}
|
|
160
|
+
export type CameraDeviceProxyMethodNames = MethodKeys<CameraDeviceProxyMethods>;
|
|
72
161
|
export interface DeviceManagerListenerMessagePayload {
|
|
73
162
|
type: keyof DeviceManagerProxyEventCallbacks;
|
|
74
163
|
data: any;
|
|
75
164
|
}
|
|
76
165
|
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>;
|
|
166
|
+
getCameraByName(name: string): Promise<CameraDevice | BrowserCameraDevice | undefined>;
|
|
167
|
+
getCameraById(id: string): Promise<CameraDevice | BrowserCameraDevice | undefined>;
|
|
81
168
|
}
|
|
82
169
|
export interface DeviceManagerProxyMethods extends DeviceManagerBrowserProxyMethods {
|
|
83
170
|
createCamera(camera: CameraConfig): Promise<CameraDevice>;
|
|
171
|
+
removeCameraByName(name: string): Promise<void>;
|
|
172
|
+
removeCameraById(id: string): Promise<void>;
|
|
84
173
|
}
|
|
85
174
|
export type DeviceManagerProxyMethodNames = MethodKeys<DeviceManagerProxyMethods>;
|
|
175
|
+
export type DeviceManagerBrowserProxyMethodNames = MethodKeys<DeviceManagerBrowserProxyMethods>;
|
|
86
176
|
export interface DeviceManagerProxyEvents {
|
|
87
177
|
cameraSelected: {
|
|
88
178
|
camera: Camera;
|
|
@@ -97,9 +187,9 @@ export interface DeviceManagerProxyEvents {
|
|
|
97
187
|
};
|
|
98
188
|
}
|
|
99
189
|
export interface DeviceManagerProxyEventCallbacks {
|
|
100
|
-
cameraSelected: ((camera:
|
|
190
|
+
cameraSelected: ((camera: CameraDevice, extension: CameraExtension) => void) | ((camera: BrowserCameraDevice, extension: CameraExtension) => void);
|
|
101
191
|
cameraDeselected: (cameraId: string, extension: CameraExtension) => void;
|
|
102
|
-
cameraUpdated: ((cameraId: string, camera:
|
|
192
|
+
cameraUpdated: ((cameraId: string, camera: CameraDevice) => void) | ((cameraId: string, camera: BrowserCameraDevice) => void);
|
|
103
193
|
}
|
|
104
194
|
export interface DeviceManagerProxyGenericEvent<K extends keyof DeviceManagerProxyEvents> {
|
|
105
195
|
type: K;
|
|
@@ -113,12 +203,13 @@ export interface SystemManagerBrowserProxyMethods {
|
|
|
113
203
|
}
|
|
114
204
|
export interface SystemManagerProxyMethods extends SystemManagerBrowserProxyMethods {
|
|
115
205
|
}
|
|
206
|
+
export type SystemManagerProxyMethodNames = MethodKeys<SystemManagerProxyMethods>;
|
|
207
|
+
export type SystemManagerBrowserProxyMethodNames = MethodKeys<SystemManagerBrowserProxyMethods>;
|
|
116
208
|
export interface SystemManagerProxyMethodsListener {
|
|
117
209
|
listen<E extends keyof SystemManagerProxyEventCallbacks>(eventType: E, callback: SystemManagerProxyEventCallbacks[E]): void;
|
|
118
210
|
removeListener<E extends keyof SystemManagerProxyEventCallbacks>(eventType: E, callbackToRemove: SystemManagerProxyEventCallbacks[E]): void;
|
|
119
211
|
removeAllListeners<E extends keyof SystemManagerProxyEventCallbacks>(eventType?: E): void;
|
|
120
212
|
}
|
|
121
|
-
export type SystemManagerProxyMethodNames = MethodKeys<SystemManagerProxyMethods>;
|
|
122
213
|
export interface SystemManagerProxyEvents {
|
|
123
214
|
}
|
|
124
215
|
export type SystemManagerProxyEventCallbacks = {};
|
|
@@ -134,12 +225,13 @@ export interface PluginsManagerBrowserProxyMethods {
|
|
|
134
225
|
}
|
|
135
226
|
export interface PluginsManagerProxyMethods extends PluginsManagerBrowserProxyMethods {
|
|
136
227
|
}
|
|
228
|
+
export type PluginsManagerProxyMethodNames = MethodKeys<PluginsManagerProxyMethods>;
|
|
229
|
+
export type PluginsManagerBrowserProxyMethodNames = MethodKeys<PluginsManagerBrowserProxyMethods>;
|
|
137
230
|
export interface PluginsManagerProxyMethodsListener {
|
|
138
231
|
listen<E extends keyof PluginsManagerProxyEventCallbacks>(eventType: E, callback: PluginsManagerProxyEventCallbacks[E]): void;
|
|
139
232
|
removeListener<E extends keyof PluginsManagerProxyEventCallbacks>(eventType: E, callbackToRemove: PluginsManagerProxyEventCallbacks[E]): void;
|
|
140
233
|
removeAllListeners<E extends keyof PluginsManagerProxyEventCallbacks>(eventType?: E): void;
|
|
141
234
|
}
|
|
142
|
-
export type PluginsManagerProxyMethodNames = MethodKeys<PluginsManagerProxyMethods>;
|
|
143
235
|
export interface PluginsManagerProxyEvents {
|
|
144
236
|
}
|
|
145
237
|
export type PluginsManagerProxyEventCallbacks = {};
|
|
@@ -158,90 +250,3 @@ export interface CameraDeviceListenerMessagePayload {
|
|
|
158
250
|
type: 'removed' | 'updated' | 'cameraState';
|
|
159
251
|
data?: any;
|
|
160
252
|
}
|
|
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.66",
|
|
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";
|