@camera.ui/browser 0.0.71 → 0.0.73

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.
Files changed (90) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +10 -2
  3. package/dist/types/packages/client/browser/src/proxy/deviceManager.d.ts +9 -6
  4. package/dist/types/packages/client/browser/src/proxy/pluginsManager.d.ts +4 -1
  5. package/dist/types/packages/client/browser/src/proxy/systemManager.d.ts +4 -1
  6. package/dist/types/packages/client/browser/src/socket.d.ts +6 -1
  7. package/dist/types/{server/src/camera/streaming/browser/browser-peer-connection.d.ts → packages/client/browser/src/streaming/peer-connection.d.ts} +4 -5
  8. package/dist/types/{server/src/camera/streaming/browser/browser-streaming-session.d.ts → packages/client/browser/src/streaming/streaming-session.d.ts} +8 -7
  9. package/dist/types/{server/src/camera/streaming/browser/webrtc-browser-connection.d.ts → packages/client/browser/src/streaming/webrtc-connection.d.ts} +6 -7
  10. package/dist/types/packages/client/browser/src/types.d.ts +26 -2
  11. package/dist/types/server/src/api/controllers/api.controller.d.ts +6 -0
  12. package/dist/types/server/src/api/controllers/auth.controller.d.ts +20 -0
  13. package/dist/types/server/src/api/controllers/backup.controller.d.ts +10 -0
  14. package/dist/types/server/src/api/controllers/cameras.controller.d.ts +33 -0
  15. package/dist/types/server/src/api/controllers/config.controller.d.ts +14 -0
  16. package/dist/types/server/src/api/controllers/files.controller.d.ts +8 -0
  17. package/dist/types/server/src/api/controllers/plugins.controller.d.ts +54 -0
  18. package/dist/types/server/src/api/controllers/streams.controller.d.ts +12 -0
  19. package/dist/types/server/src/api/controllers/system.controller.d.ts +14 -0
  20. package/dist/types/server/src/api/controllers/users.controller.d.ts +15 -0
  21. package/dist/types/server/src/api/database/index.d.ts +1 -1
  22. package/dist/types/server/src/api/go2rtc/api/application.d.ts +1 -1
  23. package/dist/types/server/src/api/go2rtc/api/config.d.ts +1 -1
  24. package/dist/types/server/src/api/go2rtc/api/snapshot.d.ts +1 -1
  25. package/dist/types/server/src/api/go2rtc/api/streams.d.ts +1 -1
  26. package/dist/types/server/src/api/index.d.ts +18 -0
  27. package/dist/types/server/src/api/middlewares/authPermission.middleware.d.ts +5 -0
  28. package/dist/types/server/src/api/middlewares/authValidation.middleware.d.ts +4 -0
  29. package/dist/types/server/src/api/middlewares/pagination.middleware.d.ts +3 -0
  30. package/dist/types/server/src/api/plugins/cameraui.plugin.d.ts +11 -0
  31. package/dist/types/server/src/api/plugins/database.plugin.d.ts +11 -0
  32. package/dist/types/server/src/api/plugins/go2rtc.plugin.d.ts +11 -0
  33. package/dist/types/server/src/api/plugins/logger.plugin.d.ts +7 -0
  34. package/dist/types/server/src/api/plugins/socket.plugin.d.ts +11 -0
  35. package/dist/types/server/src/api/plugins/system.plugin.d.ts +21 -0
  36. package/dist/types/server/src/api/plugins/useragent.plugin.d.ts +8 -0
  37. package/dist/types/server/src/api/routes/api.routes.d.ts +2 -0
  38. package/dist/types/server/src/api/routes/auth.routes.d.ts +2 -0
  39. package/dist/types/server/src/api/routes/backup.routes.d.ts +2 -0
  40. package/dist/types/server/src/api/routes/cameras.routes.d.ts +2 -0
  41. package/dist/types/server/src/api/routes/config.routes.d.ts +2 -0
  42. package/dist/types/server/src/api/routes/files.routes.d.ts +2 -0
  43. package/dist/types/server/src/api/routes/index.d.ts +7 -0
  44. package/dist/types/server/src/api/routes/plugins.routes.d.ts +2 -0
  45. package/dist/types/server/src/api/routes/streams.routes.d.ts +2 -0
  46. package/dist/types/server/src/api/routes/system.routes.d.ts +2 -0
  47. package/dist/types/server/src/api/routes/users.routes.d.ts +2 -0
  48. package/dist/types/server/src/api/schemas/plugins.schema.d.ts +25 -0
  49. package/dist/types/server/src/api/services/backup.service.d.ts +10 -0
  50. package/dist/types/server/src/api/utils/axios.d.ts +2 -0
  51. package/dist/types/server/src/api/utils/cert.d.ts +11 -0
  52. package/dist/types/server/src/api/utils/moveFiles.d.ts +1 -0
  53. package/dist/types/server/src/api/websocket/nsp/status.d.ts +1 -1
  54. package/dist/types/server/src/api/websocket/types.d.ts +1 -1
  55. package/dist/types/server/src/api.d.ts +5 -5
  56. package/dist/types/server/src/decoder/ffmpeg.d.ts +1 -0
  57. package/dist/types/server/src/decoder/index.d.ts +17 -6
  58. package/dist/types/server/src/decoder/types.d.ts +62 -15
  59. package/dist/types/server/src/decoder/worker/index.d.ts +42 -3
  60. package/dist/types/server/src/{camera/base → devices/camera}/cameraDevice.d.ts +5 -5
  61. package/dist/types/server/src/{camera/controller.d.ts → devices/camera/controller/index.d.ts} +6 -6
  62. package/dist/types/server/src/{camera → devices/camera/controller}/types.d.ts +11 -21
  63. package/dist/types/server/src/{camera/base → devices/camera}/index.d.ts +18 -16
  64. package/dist/types/server/src/{camera → devices/camera}/streaming/peer-connection.d.ts +10 -9
  65. package/dist/types/server/src/{camera → devices/camera}/streaming/streaming-session.d.ts +3 -3
  66. package/dist/types/server/src/{camera → devices/camera}/streaming/webrtc-connection.d.ts +4 -4
  67. package/dist/types/server/src/main.d.ts +21 -0
  68. package/dist/types/server/src/nats/constants.d.ts +1 -0
  69. package/dist/types/server/src/nats/index.d.ts +1 -1
  70. package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +2 -6
  71. package/dist/types/server/src/nats/proxy/deviceManager.d.ts +1 -1
  72. package/dist/types/server/src/nats/server.d.ts +3 -2
  73. package/dist/types/server/src/nats/types.d.ts +14 -28
  74. package/dist/types/server/src/nats/websocket.d.ts +3 -2
  75. package/dist/types/server/src/plugins/base.d.ts +2 -2
  76. package/dist/types/server/src/plugins/node/logger.d.ts +2 -0
  77. package/dist/types/server/src/plugins/node/proxy/cameraDevice.d.ts +10 -6
  78. package/dist/types/server/src/plugins/node/proxy/deviceManager.d.ts +2 -2
  79. package/dist/types/server/src/plugins/node/proxy/queue.d.ts +2 -2
  80. package/dist/types/server/src/plugins/worker-ipc.d.ts +5 -2
  81. package/dist/types/server/src/services/logger/index.d.ts +3 -3
  82. package/dist/types/server/src/utils/pythonInstaller.d.ts +2 -1
  83. package/dist/types/server/src/{camera/utils → utils}/subscribed.d.ts +1 -1
  84. package/dist/types/shared/types/index.d.ts +2 -4
  85. package/package.json +4 -4
  86. package/dist/types/server/src/api/websocket/nsp/frame.d.ts +0 -10
  87. package/dist/types/server/src/camera/base/cameraDeviceBrowser.d.ts +0 -6
  88. package/dist/types/server/src/decoder/worker/runtime/base/index.d.ts +0 -36
  89. package/dist/types/server/src/decoder/worker/runtime/child-process/index.d.ts +0 -17
  90. package/dist/types/server/src/decoder/worker/runtime/worker-thread/index.d.ts +0 -22
@@ -1,8 +1,7 @@
1
1
  import type { Camera } from '../api/database/types.js';
2
- import type { CameraDevice } from '../camera/base/cameraDevice.js';
3
- import type { BrowserCameraDevice } from '../camera/base/cameraDeviceBrowser.js';
4
- import type { CameraConfig, FfmpegOptions, PrebufferType, SetValues, StateValues, StreamInfo } from '../camera/types.js';
5
- import type { FrameMetadata, FrameSession } from '../decoder/types.js';
2
+ import type { FrameMetadata } from '../decoder/types.js';
3
+ import type { CameraDevice } from '../devices/camera/cameraDevice.js';
4
+ import type { CameraConfig, FfmpegOptions, PrebufferType, SetValues, StateValues, StreamInfo } from '../devices/camera/controller/types.js';
6
5
  import type { BasePlugin } from '../plugins/base.js';
7
6
  import type { CameraStorage } from '../plugins/node/cameraStorage.js';
8
7
  import type { CameraExtension } from '../plugins/types.js';
@@ -27,7 +26,7 @@ export interface ProxyMessageStructure {
27
26
  fn: string;
28
27
  args: any;
29
28
  timeout: number;
30
- timestamp: number;
29
+ timestamp: string;
31
30
  response?: any;
32
31
  error?: any;
33
32
  }
@@ -42,9 +41,9 @@ export interface ProxyAuth {
42
41
  };
43
42
  }
44
43
  export interface MethodNamesByManager {
45
- systemManager: SystemManagerBrowserProxyMethodNames;
46
- deviceManager: DeviceManagerBrowserProxyMethodNames;
47
- pluginsManager: PluginsManagerBrowserProxyMethodNames;
44
+ systemManager: SystemManagerProxyMethodNames;
45
+ deviceManager: DeviceManagerProxyMethodNames;
46
+ pluginsManager: PluginsManagerProxyMethodNames;
48
47
  cameraDevice: CameraDeviceProxyMethodNames;
49
48
  }
50
49
  export type ManagerNames = keyof MethodNamesByManager;
@@ -114,10 +113,6 @@ export interface CameraDeviceProxyMethods {
114
113
  cameraId: string;
115
114
  pluginId: string;
116
115
  }): Promise<FrameMetadata>;
117
- getFrameSession(data: {
118
- cameraId: string;
119
- pluginId: string;
120
- }): Promise<FrameSession>;
121
116
  getFfmpegPath(data: {
122
117
  cameraId: string;
123
118
  pluginId: string;
@@ -164,17 +159,14 @@ export interface DeviceManagerListenerMessagePayload {
164
159
  type: keyof DeviceManagerProxyEventCallbacks;
165
160
  data: any;
166
161
  }
167
- export interface DeviceManagerBrowserProxyMethods {
168
- getCameraByName(name: string): Promise<CameraDevice | BrowserCameraDevice | undefined>;
169
- getCameraById(id: string): Promise<CameraDevice | BrowserCameraDevice | undefined>;
170
- }
171
- export interface DeviceManagerProxyMethods extends DeviceManagerBrowserProxyMethods {
162
+ export interface DeviceManagerProxyMethods {
163
+ getCameraByName(name: string): Promise<CameraDevice | undefined>;
164
+ getCameraById(id: string): Promise<CameraDevice | undefined>;
172
165
  createCamera(camera: CameraConfig): Promise<CameraDevice>;
173
166
  removeCameraByName(name: string): Promise<void>;
174
167
  removeCameraById(id: string): Promise<void>;
175
168
  }
176
169
  export type DeviceManagerProxyMethodNames = MethodKeys<DeviceManagerProxyMethods>;
177
- export type DeviceManagerBrowserProxyMethodNames = MethodKeys<DeviceManagerBrowserProxyMethods>;
178
170
  export interface DeviceManagerProxyEvents {
179
171
  cameraSelected: {
180
172
  camera: Camera;
@@ -189,9 +181,9 @@ export interface DeviceManagerProxyEvents {
189
181
  };
190
182
  }
191
183
  export interface DeviceManagerProxyEventCallbacks {
192
- cameraSelected: ((camera: CameraDevice, extension: CameraExtension) => void) | ((camera: BrowserCameraDevice, extension: CameraExtension) => void);
184
+ cameraSelected: (camera: CameraDevice, extension: CameraExtension) => void;
193
185
  cameraDeselected: (cameraId: string, extension: CameraExtension) => void;
194
- cameraUpdated: ((cameraId: string, camera: CameraDevice) => void) | ((cameraId: string, camera: BrowserCameraDevice) => void);
186
+ cameraUpdated: (cameraId: string, camera: CameraDevice) => void;
195
187
  }
196
188
  export interface DeviceManagerProxyGenericEvent<K extends keyof DeviceManagerProxyEvents> {
197
189
  type: K;
@@ -201,12 +193,9 @@ export interface SystemManagerListenerMessagePayload {
201
193
  type: keyof SystemManagerProxyEventCallbacks;
202
194
  data: any;
203
195
  }
204
- export interface SystemManagerBrowserProxyMethods {
205
- }
206
- export interface SystemManagerProxyMethods extends SystemManagerBrowserProxyMethods {
196
+ export interface SystemManagerProxyMethods {
207
197
  }
208
198
  export type SystemManagerProxyMethodNames = MethodKeys<SystemManagerProxyMethods>;
209
- export type SystemManagerBrowserProxyMethodNames = MethodKeys<SystemManagerBrowserProxyMethods>;
210
199
  export interface SystemManagerProxyMethodsListener {
211
200
  listen<E extends keyof SystemManagerProxyEventCallbacks>(eventType: E, callback: SystemManagerProxyEventCallbacks[E]): void;
212
201
  removeListener<E extends keyof SystemManagerProxyEventCallbacks>(eventType: E, callbackToRemove: SystemManagerProxyEventCallbacks[E]): void;
@@ -223,12 +212,9 @@ export interface PluginsManagerListenerMessagePayload {
223
212
  type: keyof PluginsManagerProxyEventCallbacks;
224
213
  data: any;
225
214
  }
226
- export interface PluginsManagerBrowserProxyMethods {
227
- }
228
- export interface PluginsManagerProxyMethods extends PluginsManagerBrowserProxyMethods {
215
+ export interface PluginsManagerProxyMethods {
229
216
  }
230
217
  export type PluginsManagerProxyMethodNames = MethodKeys<PluginsManagerProxyMethods>;
231
- export type PluginsManagerBrowserProxyMethodNames = MethodKeys<PluginsManagerBrowserProxyMethods>;
232
218
  export interface PluginsManagerProxyMethodsListener {
233
219
  listen<E extends keyof PluginsManagerProxyEventCallbacks>(eventType: E, callback: PluginsManagerProxyEventCallbacks[E]): void;
234
220
  removeListener<E extends keyof PluginsManagerProxyEventCallbacks>(eventType: E, callbackToRemove: PluginsManagerProxyEventCallbacks[E]): void;
@@ -1,11 +1,12 @@
1
1
  import type { Namespace, Server } from 'socket.io';
2
2
  import type { SocketNsp } from '../api/websocket/types.js';
3
- import type { StateValues } from '../camera/types.js';
3
+ import type { StateValues } from '../devices/camera/controller/types.js';
4
4
  import type { CameraDeviceListenerMessagePayload } from './types.js';
5
5
  export declare class WebsocketProxy {
6
6
  nsp: Namespace;
7
7
  nspName: SocketNsp;
8
8
  private proxy;
9
+ private camerasService;
9
10
  constructor(io: Server);
10
11
  init(): void;
11
12
  publishCameraEvent<K extends keyof StateValues>(cameraId: string, stateName: K, data: {
@@ -17,6 +18,6 @@ export declare class WebsocketProxy {
17
18
  private isSystemManagerMethod;
18
19
  private isDeviceManagerMethod;
19
20
  private isPluginsManagerMethod;
20
- private isCameraManagerMethod;
21
+ private isCameraProxyMethod;
21
22
  private isCameraState;
22
23
  }
@@ -1,7 +1,7 @@
1
- import type { CameraDevice } from '../camera/base/cameraDevice.js';
1
+ import type { CameraDevice } from '../devices/camera/cameraDevice.js';
2
2
  export declare abstract class BasePlugin {
3
3
  abstract onFormSubmit(actionId: string, payload: any): Promise<{
4
4
  toast?: string;
5
5
  }>;
6
- abstract configureCameras(cameras: CameraDevice[]): Promise<void>;
6
+ abstract configureCameras(cameras: CameraDevice[]): void;
7
7
  }
@@ -2,6 +2,8 @@ export declare class PluginLogger {
2
2
  private _prefix;
3
3
  private _loggerPrefix;
4
4
  private _disableTimestamps;
5
+ debugEnabled: boolean;
6
+ traceEnabled: boolean;
5
7
  private get prefix();
6
8
  constructor(prefix: string, disableTimestamps: boolean);
7
9
  log(...args: any[]): void;
@@ -1,7 +1,7 @@
1
- import { CameraDevice } from '../../../camera/base/cameraDevice.js';
1
+ import { CameraDevice } from '../../../devices/camera/cameraDevice.js';
2
2
  import type { Camera } from '../../../api/database/types.js';
3
- import type { CameraSource, SetValues } from '../../../camera/types.js';
4
- import type { Frame } from '../../../decoder/types.js';
3
+ import type { VideoFrame } from '../../../decoder/types.js';
4
+ import type { CameraSource, SetValues } from '../../../devices/camera/controller/types.js';
5
5
  import type { IceServer } from '../../../services/config/types.js';
6
6
  import type { PluginAPI } from '../api.js';
7
7
  import type { PluginLogger } from '../logger.js';
@@ -12,8 +12,9 @@ export declare class CameraDeviceProxy extends CameraDevice {
12
12
  private client;
13
13
  private cameraSubscriber;
14
14
  private cameraPluginSubscriber;
15
+ private signalingSubscriber;
15
16
  private frameSubscriber?;
16
- private activeSockets;
17
+ private activeRequests;
17
18
  private messageQueue;
18
19
  private auth;
19
20
  private pluginID;
@@ -22,6 +23,8 @@ export declare class CameraDeviceProxy extends CameraDevice {
22
23
  private cameraSubscriberSubject;
23
24
  private cameraPluginSubscriberSubject;
24
25
  private frameSubject;
26
+ private signalingSubject;
27
+ private signalingTargetSubject;
25
28
  get sources(): CameraSource[];
26
29
  constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, pluginId: string, pluginName: string, auth: {
27
30
  user: string;
@@ -31,15 +34,16 @@ export declare class CameraDeviceProxy extends CameraDevice {
31
34
  connect(): Promise<void>;
32
35
  disconnect(): Promise<void>;
33
36
  reboot(): Promise<void>;
34
- generateFrames(): AsyncIterableIterator<Frame>;
37
+ generateFrames(): AsyncIterableIterator<VideoFrame>;
35
38
  getFfmpegPath(): Promise<string>;
36
39
  getIceServers(): Promise<IceServer[]>;
37
40
  updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T]): Promise<void>;
38
41
  refreshStates(): Promise<void>;
39
42
  cleanup(): Promise<void>;
40
- private connectToServer;
43
+ private signalDecoder;
41
44
  private closeFrameSubscriber;
42
45
  private requestHandler;
43
46
  private listenToMessages;
47
+ private listenToSignalingMessages;
44
48
  private onRequest;
45
49
  }
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  import { EventEmitter } from 'node:events';
3
3
  import { CameraDeviceProxy } from './cameraDevice.js';
4
- import type { CameraDevice } from '../../../camera/base/cameraDevice.js';
5
- import type { CameraConfig } from '../../../camera/types.js';
4
+ import type { CameraDevice } from '../../../devices/camera/cameraDevice.js';
5
+ import type { CameraConfig } from '../../../devices/camera/controller/types.js';
6
6
  import type { DeviceManagerProxyEventCallbacks, DeviceManagerProxyMethods } from '../../../nats/types.js';
7
7
  import type { PluginAPI } from '../api.js';
8
8
  import type { PluginLogger } from '../logger.js';
@@ -1,5 +1,5 @@
1
- import { type NatsConnection, type Subscription } from 'nats';
2
- import type { BaseLogger } from '../../../camera/types.js';
1
+ import type { NatsConnection, Subscription } from 'nats';
2
+ import type { BaseLogger } from '../../../devices/camera/controller/types.js';
3
3
  import type { ProxyMessageStructure } from '../../../nats/types.js';
4
4
  export declare class ClientMessageQueue {
5
5
  private logger;
@@ -1,20 +1,23 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  import { EventEmitter } from 'node:events';
3
+ import type { Logger } from '../services/logger/index.js';
3
4
  import type { ProcessMessage, ProcessResponse } from './types.js';
4
5
  export declare interface WorkerIPC {
5
6
  on(event: 'message', listener: (message: ProcessResponse) => void): this;
6
7
  }
7
8
  export declare class WorkerIPC extends EventEmitter {
9
+ private logger;
8
10
  private publisher?;
9
11
  private subscriber?;
12
+ private name;
10
13
  private id;
11
14
  private subject;
12
15
  private targetSubject;
13
16
  private auth;
14
- constructor(id: string, auth: {
17
+ constructor(name: string, id: string, auth: {
15
18
  user: string;
16
19
  pass: string;
17
- });
20
+ }, logger: Logger);
18
21
  listen(): Promise<void>;
19
22
  close(): Promise<void>;
20
23
  sendMessage(message: ProcessMessage): void;
@@ -5,13 +5,13 @@ import type { LoggingLevel } from '../config/types.js';
5
5
  export declare class Logger {
6
6
  private _loggerPrefix;
7
7
  private _debugEnabled;
8
- private _traceLogging;
8
+ private _traceEnabled;
9
9
  private _disableTimestamps;
10
10
  notifications: UiNotification[];
11
11
  get debugEnabled(): boolean;
12
12
  set debugEnabled(state: boolean);
13
- get traceLogging(): boolean;
14
- set traceLogging(state: boolean);
13
+ get traceEnabled(): boolean;
14
+ set traceEnabled(state: boolean);
15
15
  get disableTimestamps(): boolean;
16
16
  set disableTimestamps(state: boolean);
17
17
  get prefix(): string;
@@ -1,12 +1,13 @@
1
1
  import { PortablePython } from '@bjia56/portable-python';
2
+ import { PluginLogger } from '../plugins/node/logger.js';
2
3
  export declare const SERVER_PY_VERSION = "3.11";
3
4
  export declare class PythonInstaller {
4
5
  static readonly versions: string[];
6
+ logger: PluginLogger;
5
7
  readonly python: PortablePython;
6
8
  readonly venvPath?: string;
7
9
  readonly installPath: string;
8
10
  private identifier;
9
- private logger;
10
11
  private configService;
11
12
  private needsUpdate;
12
13
  get isInstalled(): boolean;
@@ -1,4 +1,4 @@
1
- import { Subscription } from 'rxjs';
1
+ import type { Subscription } from 'rxjs';
2
2
  export declare class Subscribed {
3
3
  private readonly subscriptions;
4
4
  private readonly additionalSubscriptions;
@@ -1,12 +1,10 @@
1
1
  export type * from '../../server/src/api/database/types.js';
2
2
  export type * from '../../server/src/api/types/index.js';
3
3
  export type * from '../../server/src/api/websocket/types.js';
4
- export * from '../../server/src/camera/base/cameraDeviceBrowser.js';
5
- export * from '../../server/src/camera/streaming/browser/browser-streaming-session.js';
6
- export * from '../../server/src/camera/streaming/browser/webrtc-browser-connection.js';
7
- export type * from '../../server/src/camera/types.js';
8
4
  export type * from '../../server/src/decoder/types.js';
5
+ export type * from '../../server/src/devices/camera/controller/types.js';
9
6
  export * from '../../server/src/go2rtc/types.js';
10
7
  export type * from '../../server/src/nats/types.js';
11
8
  export * from '../../server/src/plugins/types.js';
12
9
  export * from '../../server/src/services/config/types.js';
10
+ export * from '../../server/src/utils/subscribed.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/browser",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "camera.ui browser client",
5
5
  "author": "seydx (https://github.com/seydx/camera.ui)",
6
6
  "module": "./dist/bundle.js",
@@ -23,7 +23,7 @@
23
23
  "prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "axios": "^1.6.8",
26
+ "axios": "^1.7.2",
27
27
  "lodash.clonedeep": "^4.5.0",
28
28
  "lodash.isequal": "^4.5.0",
29
29
  "lru-cache": "^10.2.2",
@@ -34,8 +34,8 @@
34
34
  "@rushstack/eslint-patch": "^1.10.3",
35
35
  "@swc/register": "^0.1.10",
36
36
  "@types/webrtc": "^0.0.43",
37
- "@typescript-eslint/eslint-plugin": "^7.9.0",
38
- "@typescript-eslint/parser": "^7.9.0",
37
+ "@typescript-eslint/eslint-plugin": "^7.10.0",
38
+ "@typescript-eslint/parser": "^7.10.0",
39
39
  "bufferutil": "^4.0.8",
40
40
  "eslint": "^8.57.0",
41
41
  "eslint-config-prettier": "^9.1.0",
@@ -1,10 +0,0 @@
1
- import type { Namespace, Server, Socket } from 'socket.io';
2
- import type { SocketNsp } from '../types.js';
3
- export declare class FrameNamespace {
4
- nsp: Namespace;
5
- nspName: SocketNsp;
6
- readonly connectedClients: Map<string, Set<Socket>>;
7
- private decoder;
8
- constructor(io: Server);
9
- private handleConnection;
10
- }
@@ -1,6 +0,0 @@
1
- import { BrowserStreamingSession } from '../streaming/browser/browser-streaming-session.js';
2
- import { BaseCameraDevice } from './index.js';
3
- export declare abstract class BrowserCameraDevice extends BaseCameraDevice {
4
- snapshot(forceNew?: boolean): Promise<ArrayBuffer>;
5
- createSession(sourceName: string, videoElement: HTMLVideoElement): Promise<BrowserStreamingSession>;
6
- }
@@ -1,36 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Subscribed } from '../../../../camera/utils/subscribed.js';
4
- import type { ChildProcess } from 'node:child_process';
5
- import type { Worker } from 'node:worker_threads';
6
- import type { CameraController } from '../../../../camera/controller.js';
7
- import type { ConfigService } from '../../../../services/config/index.js';
8
- import type { Logger } from '../../../../services/logger/index.js';
9
- import type { FrameMetadata, MainMessage, MainToWorkerMessage, MainToWorkerResponse, WorkerToMainMessage } from '../../../types.js';
10
- export declare abstract class StreamManager<T extends Worker | ChildProcess = any> extends Subscribed {
11
- token: string;
12
- protected readonly logger: Logger;
13
- protected readonly configService: ConfigService;
14
- protected readonly camera: CameraController;
15
- protected frameWorker?: T;
16
- protected stopped: boolean;
17
- protected auth: {
18
- user: string;
19
- pass: string;
20
- };
21
- constructor(camera: CameraController, auth: {
22
- user: string;
23
- pass: string;
24
- });
25
- abstract listen(): Promise<void>;
26
- abstract close(): Promise<void>;
27
- abstract workerPID(): number;
28
- getMetadata(): Promise<FrameMetadata>;
29
- startVideoSession(): Promise<void>;
30
- stopVideoSession(): Promise<void>;
31
- protected onMessage(workerMessage: WorkerToMainMessage): Promise<void>;
32
- protected abstract sendMessage(message: MainMessage, skipResponse?: boolean, data?: Record<string, any>): Promise<any>;
33
- protected abstract sendReponse(response: MainToWorkerResponse): void;
34
- protected abstract send(message: MainToWorkerMessage | MainToWorkerResponse): void;
35
- protected getLogPrefix(): string;
36
- }
@@ -1,17 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { ChildProcess } from 'node:child_process';
3
- import { StreamManager } from '../base/index.js';
4
- import type { CameraController } from '../../../../camera/controller.js';
5
- import type { MainMessage, MainToWorkerMessage, MainToWorkerResponse } from '../../../types.js';
6
- export declare class StreamProcess extends StreamManager<ChildProcess> {
7
- constructor(camera: CameraController, auth: {
8
- user: string;
9
- pass: string;
10
- });
11
- listen(): Promise<void>;
12
- close(): Promise<void>;
13
- workerPID(): number;
14
- protected sendMessage(message: MainMessage, skipResponse?: boolean, data?: Record<string, any>): Promise<any>;
15
- protected sendReponse(response: MainToWorkerResponse): void;
16
- protected send(message: MainToWorkerMessage | MainToWorkerResponse): void;
17
- }
@@ -1,22 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { Worker } from 'node:worker_threads';
3
- import { StreamManager } from '../base/index.js';
4
- import type { CameraController } from '../../../../camera/controller.js';
5
- import type { MainMessage, MainToWorkerMessage, MainToWorkerResponse } from '../../../types.js';
6
- export declare class StreamWorker extends StreamManager<Worker> {
7
- private channel1;
8
- private channel2;
9
- private messageFromMain;
10
- private messageToMain;
11
- private responseToMain;
12
- constructor(camera: CameraController, auth: {
13
- user: string;
14
- pass: string;
15
- });
16
- listen(): Promise<void>;
17
- close(): Promise<void>;
18
- workerPID(): number;
19
- protected sendMessage(message: MainMessage, skipResponse?: boolean, data?: Record<string, any>): Promise<any>;
20
- protected sendReponse(response: MainToWorkerResponse): void;
21
- protected send(message: MainToWorkerMessage | MainToWorkerResponse): void;
22
- }