@camera.ui/browser 0.0.76 → 0.0.79

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 (54) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +7 -5
  3. package/dist/types/packages/client/browser/src/socket.d.ts +6 -5
  4. package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +54 -0
  5. package/dist/types/packages/client/browser/src/types.d.ts +13 -7
  6. package/dist/types/packages/client/browser/src/utils.d.ts +12 -0
  7. package/dist/types/server/src/api/database/index.d.ts +1 -1
  8. package/dist/types/server/src/api/database/types.d.ts +11 -6
  9. package/dist/types/server/src/api/go2rtc/api/config.d.ts +3 -4
  10. package/dist/types/server/src/api/go2rtc/api/index.d.ts +1 -2
  11. package/dist/types/server/src/api/go2rtc/api/streams.d.ts +4 -5
  12. package/dist/types/server/src/api/index.d.ts +0 -1
  13. package/dist/types/server/src/api/schemas/cameras.schema.d.ts +180 -121
  14. package/dist/types/server/src/api/schemas/config.schema.d.ts +2 -2
  15. package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +18 -18
  16. package/dist/types/server/src/api/schemas/users.schema.d.ts +8 -8
  17. package/dist/types/server/src/api/services/plugins.service.d.ts +1 -0
  18. package/dist/types/server/src/api/types/index.d.ts +0 -2
  19. package/dist/types/server/src/api/utils/fetch.d.ts +2 -0
  20. package/dist/types/server/src/api/websocket/types.d.ts +1 -15
  21. package/dist/types/server/src/api.d.ts +1 -2
  22. package/dist/types/server/src/camera/controller.d.ts +8 -3
  23. package/dist/types/server/src/camera/device.d.ts +2 -3
  24. package/dist/types/server/src/camera/index.d.ts +20 -18
  25. package/dist/types/server/src/camera/polygon.d.ts +5 -2
  26. package/dist/types/server/src/camera/streaming/peer-connection.d.ts +1 -1
  27. package/dist/types/server/src/camera/types.d.ts +7 -6
  28. package/dist/types/server/src/camera/videoFrame.d.ts +10 -11
  29. package/dist/types/server/src/decoder/types.d.ts +31 -22
  30. package/dist/types/server/src/decoder/worker.d.ts +3 -3
  31. package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +0 -2
  32. package/dist/types/server/src/nats/server.d.ts +10 -7
  33. package/dist/types/server/src/nats/types.d.ts +7 -8
  34. package/dist/types/server/src/nats/websocket.d.ts +8 -0
  35. package/dist/types/server/src/plugins/index.d.ts +1 -0
  36. package/dist/types/server/src/polyglot/node/plugins/api.d.ts +1 -2
  37. package/dist/types/server/src/polyglot/node/plugins/cameraStorage.d.ts +2 -2
  38. package/dist/types/server/src/polyglot/node/plugins/proxy/cameraDevice.d.ts +8 -9
  39. package/dist/types/server/src/polyglot/node/plugins/proxy/deviceManager.d.ts +3 -3
  40. package/dist/types/server/src/polyglot/node/plugins/proxy/pluginsManager.d.ts +3 -3
  41. package/dist/types/server/src/polyglot/node/plugins/proxy/systemManager.d.ts +3 -3
  42. package/dist/types/server/src/polyglot/node/plugins/schema.d.ts +8 -1
  43. package/dist/types/server/src/polyglot/node/plugins/storageController.d.ts +1 -1
  44. package/dist/types/server/src/services/config/constants.d.ts +0 -2
  45. package/dist/types/server/src/services/config/index.d.ts +1 -1
  46. package/dist/types/server/src/utils/packer.d.ts +2 -0
  47. package/dist/types/server/src/utils/pythonInstaller.d.ts +1 -1
  48. package/dist/types/server/src/utils/utils.d.ts +5 -0
  49. package/package.json +6 -8
  50. package/dist/types/packages/client/browser/src/streaming/peer-connection.d.ts +0 -24
  51. package/dist/types/packages/client/browser/src/streaming/streaming-session.d.ts +0 -25
  52. package/dist/types/packages/client/browser/src/streaming/webrtc-connection.d.ts +0 -26
  53. package/dist/types/server/src/api/utils/axios.d.ts +0 -2
  54. package/dist/types/server/src/api/websocket/nsp/streams.d.ts +0 -15
@@ -3,28 +3,31 @@ import type { ProxyAuth } from './types.js';
3
3
  export declare class NatsServer {
4
4
  private readonly clusterAmount;
5
5
  private readonly auth;
6
- private _serverPort;
7
- private _clusterPort;
6
+ private serverPort;
7
+ private clusterPort;
8
+ private _endpoints;
8
9
  private serverProcess?;
9
10
  private clusterProcesses;
10
11
  private logger;
11
12
  private configService;
12
13
  private process;
13
14
  private tmpDir;
15
+ private config;
14
16
  private manuallyKilled;
15
17
  private shuttingDown;
16
18
  private _status;
17
19
  get status(): RUNTIME_STATUS;
18
- get serverPort(): number;
19
- get clusterPort(): number;
20
+ get endpoints(): string[];
20
21
  constructor(auth: ProxyAuth);
21
22
  start(): Promise<void>;
22
- private startServer;
23
- private startClusterServer;
24
- private setupProcess;
23
+ private configServer;
24
+ private configClusters;
25
25
  stop(): Promise<void>;
26
26
  restart(): Promise<void>;
27
27
  getPID(): number;
28
+ private startServer;
29
+ private startClusterServer;
30
+ private setupProcess;
28
31
  private writeConfigFile;
29
32
  private stringifyConfig;
30
33
  private kill;
@@ -1,4 +1,4 @@
1
- import type { Camera } from '../api/database/types.js';
1
+ import type { Camera, VideoStreamingMode } from '../api/database/types.js';
2
2
  import type { CameraDevice } from '../camera/device.js';
3
3
  import type { CameraConfig, Container, FfmpegOptions, PrebufferState, SetValues, StateValues, StreamInfo } from '../camera/types.js';
4
4
  import type { BasePlugin } from '../plugins/base.js';
@@ -25,7 +25,7 @@ export interface ProxyMessageStructure {
25
25
  fn: string;
26
26
  args: any;
27
27
  timeout: number;
28
- timestamp: string;
28
+ timestamp: number;
29
29
  response?: any;
30
30
  error?: any;
31
31
  }
@@ -52,6 +52,10 @@ export interface WebsocketClientRequest<T extends keyof MethodNamesByManager> {
52
52
  args: any[];
53
53
  }
54
54
  export type WebsocketClientProxyEvent = 'updateDevice' | 'updateState';
55
+ export interface StreamPayload {
56
+ type: Exclude<VideoStreamingMode, 'webrtc' | 'webrtc/tcp'> | 'webrtc/offer' | 'webrtc/candidate';
57
+ value: string;
58
+ }
55
59
  export interface DeviceManagerServerProxyMethods {
56
60
  createCamera(data: {
57
61
  camera: CameraConfig;
@@ -147,7 +151,7 @@ export interface CameraDeviceProxyMethods {
147
151
  export type CameraDeviceProxyMethodNames = MethodKeys<CameraDeviceProxyMethods>;
148
152
  export interface DeviceManagerListenerMessagePayload {
149
153
  type: keyof DeviceManagerProxyEventCallbacks;
150
- data: DeviceManagerProxyEvents['cameraSelected'] | DeviceManagerProxyEvents['cameraDeselected'] | DeviceManagerProxyEvents['cameraUpdated'];
154
+ data: DeviceManagerProxyEvents['cameraSelected'] | DeviceManagerProxyEvents['cameraDeselected'];
151
155
  }
152
156
  export interface DeviceManagerProxyMethods {
153
157
  getCameraByName(name: string): Promise<CameraDevice | undefined>;
@@ -166,15 +170,10 @@ export interface DeviceManagerProxyEvents {
166
170
  camera: Camera;
167
171
  extension: CameraExtension;
168
172
  };
169
- cameraUpdated: {
170
- camera: Camera;
171
- extension: CameraExtension;
172
- };
173
173
  }
174
174
  export interface DeviceManagerProxyEventCallbacks {
175
175
  cameraSelected: (camera: CameraDevice, extension: CameraExtension) => void;
176
176
  cameraDeselected: (cameraId: string, extension: CameraExtension) => void;
177
- cameraUpdated: (cameraId: string, extension: CameraExtension) => void;
178
177
  }
179
178
  export interface DeviceManagerProxyGenericEvent<K extends keyof DeviceManagerProxyEvents> {
180
179
  type: K;
@@ -5,8 +5,11 @@ import type { CameraDeviceListenerMessagePayload } from './types.js';
5
5
  export declare class WebsocketProxy {
6
6
  nsp: Namespace;
7
7
  nspName: SocketNsp;
8
+ private logger;
8
9
  private proxy;
10
+ private configService;
9
11
  private camerasService;
12
+ private bridges;
10
13
  constructor(io: Server);
11
14
  init(): void;
12
15
  publishCameraEvent<K extends keyof StateValues>(cameraId: string, stateName: K, data: {
@@ -15,6 +18,11 @@ export declare class WebsocketProxy {
15
18
  }): void;
16
19
  publishCameraEvent(cameraId: string, type: CameraDeviceListenerMessagePayload['type'], data?: any): void;
17
20
  private setupEventListeners;
21
+ private connectBridge;
22
+ private closeBridge;
23
+ private sendMessage;
24
+ private onEnd;
25
+ private onDestroy;
18
26
  private isSystemManagerMethod;
19
27
  private isDeviceManagerMethod;
20
28
  private isPluginsManagerMethod;
@@ -26,6 +26,7 @@ export declare class PluginManager {
26
26
  installRequiredPythonEnvs(): Promise<void>;
27
27
  private loadInstalledPlugins;
28
28
  private removeOrphanedPlugins;
29
+ private handleDisabledPlugins;
29
30
  private loadDefaultPaths;
30
31
  private addNpmPrefixToSearchPaths;
31
32
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { EventEmitter } from 'node:events';
3
2
  import { DeviceManager, PluginsManager, SystemManager } from './proxy/index.js';
4
3
  import { StorageController } from './storageController.js';
@@ -34,7 +33,7 @@ export declare class PluginAPI extends EventEmitter implements API {
34
33
  readonly storagePath: string;
35
34
  readonly configFile: string;
36
35
  readonly plugin: BasePlugin;
37
- constructor(plugin: Plugin, logger: PluginLogger, proxyPort: number, auth: {
36
+ constructor(plugin: Plugin, logger: PluginLogger, proxyEndpoints: string[], auth: {
38
37
  user: string;
39
38
  pass: string;
40
39
  });
@@ -13,7 +13,7 @@ export declare class CameraStorage {
13
13
  * Initialize the storage.
14
14
  * This will load the configuration from the database.
15
15
  */
16
- initializeStorage(): Promise<void>;
16
+ initializeStorage(): void;
17
17
  /**
18
18
  * Get a value from the configuration by its key/path.
19
19
  * If the schema has an onGet function, the onGet function will be called.
@@ -72,7 +72,7 @@ export declare class CameraStorage {
72
72
  *
73
73
  * @param path - The path to the schema to remove.
74
74
  */
75
- removeSchema(path: string): Promise<void>;
75
+ removeSchema(path: string): void;
76
76
  /**
77
77
  * Change a schema by its config path/key from the existing schema.
78
78
  * It will also change the value from the configuration.
@@ -1,8 +1,8 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { CameraDevice } from '../../../../camera/device.js';
3
2
  import { MotionFrame, VideoFrame } from '../../../../camera/videoFrame.js';
4
3
  import type { Camera } from '../../../../api/database/types.js';
5
4
  import type { CameraSource, SetValues } from '../../../../camera/types.js';
5
+ import type { VideoFrame as VideoFrameImp } from '../../../../decoder/types.js';
6
6
  import type { IceServer } from '../../../../services/config/types.js';
7
7
  import type { PluginAPI } from '../api.js';
8
8
  import type { PluginLogger } from '../logger.js';
@@ -10,32 +10,32 @@ export declare class CameraDeviceProxy extends CameraDevice {
10
10
  private api;
11
11
  private initialized;
12
12
  private subject;
13
- private subjectMotionFrame;
14
13
  private cameraSubscriberSubject;
15
14
  private cameraPluginSubscriberSubject;
16
15
  private frameSubject;
17
- private framePrebufferSubject;
18
16
  private motionFrameSubject;
19
17
  private signalingSubject;
20
18
  private signalingTargetSubject;
21
19
  private publisher?;
20
+ private cameraPublisher?;
22
21
  private framePublisher?;
22
+ private motionFramePublisher?;
23
+ private signalingPublisher?;
23
24
  private subscriber?;
24
25
  private cameraSubscriber?;
25
26
  private cameraPluginSubscriber?;
26
27
  private signalingSubscriber?;
27
28
  private frameSubscriber?;
28
- private prebufferFrameSubsciber?;
29
29
  private motionFrameSubscriber?;
30
30
  private messageQueue?;
31
31
  private activeRequests;
32
32
  private activeMotionRequests;
33
33
  private auth;
34
- private proxyPort;
34
+ private proxyEndpoints;
35
35
  private pluginID;
36
36
  private pluginName;
37
37
  get sources(): CameraSource[];
38
- constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, pluginId: string, pluginName: string, proxyPort: number, auth: {
38
+ constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, pluginId: string, pluginName: string, proxyEndpoints: string[], auth: {
39
39
  user: string;
40
40
  pass: string;
41
41
  });
@@ -43,12 +43,11 @@ export declare class CameraDeviceProxy extends CameraDevice {
43
43
  connect(): Promise<void>;
44
44
  disconnect(): Promise<void>;
45
45
  reboot(): Promise<void>;
46
- getFrames(): AsyncIterableIterator<VideoFrame>;
46
+ getFrames(prebufferDuration?: number): AsyncIterableIterator<VideoFrame>;
47
47
  getMotionFrames(): AsyncIterableIterator<MotionFrame>;
48
- getPrebufferedFrames(): AsyncIterableIterator<VideoFrame>;
49
48
  getFfmpegPath(): Promise<string>;
50
49
  getIceServers(): Promise<IceServer[]>;
51
- updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], frame?: Buffer): Promise<void>;
50
+ updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], frame?: VideoFrameImp): Promise<void>;
52
51
  refreshStates(): Promise<void>;
53
52
  cleanup(): Promise<void>;
54
53
  private onMotionFrame;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { EventEmitter } from 'node:events';
3
2
  import { CameraDeviceProxy } from './cameraDevice.js';
4
3
  import type { CameraDevice } from '../../../../camera/device.js';
@@ -20,15 +19,16 @@ export declare class DeviceManager extends EventEmitter implements DeviceManager
20
19
  private subject;
21
20
  private dmSubject;
22
21
  private publisher?;
22
+ private dmPublisher?;
23
23
  private subscriber?;
24
24
  private dmSubscriber?;
25
25
  private messageQueue?;
26
26
  private auth;
27
- private proxyPort;
27
+ private proxyEndpoints;
28
28
  private pluginId;
29
29
  private pluginName;
30
30
  private devices;
31
- constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyPort: number, auth: {
31
+ constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyEndpoints: string[], auth: {
32
32
  user: string;
33
33
  pass: string;
34
34
  });
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { EventEmitter } from 'node:events';
3
2
  import type { PluginsManagerProxyEventCallbacks, PluginsManagerProxyMethods } from '../../../../nats/types.js';
4
3
  import type { PluginAPI } from '../api.js';
@@ -17,14 +16,15 @@ export declare class PluginsManager extends EventEmitter implements PluginsManag
17
16
  private subject;
18
17
  private pmSubject;
19
18
  private publisher?;
19
+ private pmPublisher?;
20
20
  private subscriber?;
21
21
  private pmSubscriber?;
22
22
  private messageQueue?;
23
23
  private auth;
24
- private proxyPort;
24
+ private proxyEndpoints;
25
25
  private pluginId;
26
26
  private pluginName;
27
- constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyPort: number, auth: {
27
+ constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyEndpoints: string[], auth: {
28
28
  user: string;
29
29
  pass: string;
30
30
  });
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { EventEmitter } from 'node:events';
3
2
  import type { SystemManagerProxyEventCallbacks, SystemManagerProxyMethods } from '../../../../nats/types.js';
4
3
  import type { PluginAPI } from '../api.js';
@@ -17,14 +16,15 @@ export declare class SystemManager extends EventEmitter implements SystemManager
17
16
  private subject;
18
17
  private smSubject;
19
18
  private publisher?;
19
+ private smPublisher?;
20
20
  private subscriber?;
21
21
  private smSubscriber?;
22
22
  private messageQueue?;
23
23
  private auth;
24
- private proxyPort;
24
+ private proxyEndpoints;
25
25
  private pluginId;
26
26
  private pluginName;
27
- constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyPort: number, auth: {
27
+ constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyEndpoints: string[], auth: {
28
28
  user: string;
29
29
  pass: string;
30
30
  });
@@ -71,6 +71,13 @@ export declare const removeFunctionsFromSchemaForm: (schemaForm: PluginJsonSchem
71
71
  * @returns - The JSON schema without functions.
72
72
  */
73
73
  export declare const removeFunctionsFromSchema: (jsonSchema: PluginJsonSchema) => PluginJsonSchema;
74
+ /**
75
+ * Checks if a given JSON schema is readonly.
76
+ *
77
+ * @param jsonSchema - The JSON schema to check.
78
+ * @returns - True if the JSON schema is readonly, false otherwise.
79
+ */
80
+ export declare const schameIsReadonly: (jsonSchema: JsonSchema | PluginJsonSchema) => boolean;
74
81
  /**
75
82
  * Converts a config path to a schema path.
76
83
  *
@@ -137,7 +144,7 @@ export declare const generateStringSchema: (value: string) => JsonSchemaString;
137
144
  * @param type - The type of the enum.
138
145
  * @returns - The generated JSON schema for the enum.
139
146
  */
140
- export declare const generateEnumSchema: (value: string[]) => JsonSchemaEnum;
147
+ export declare const generateEnumSchema: (value: (string | number | boolean)[]) => JsonSchemaEnum;
141
148
  /**
142
149
  * Generates a JSON schema for an object.
143
150
  *
@@ -12,7 +12,7 @@ export declare class StorageController {
12
12
  * @param cameraId - The camera id
13
13
  * @param schema - The plugin schema
14
14
  */
15
- createCameraStorage(instance: any, cameraId: string, schema?: PluginJsonSchemaForm): Promise<CameraStorage>;
15
+ createCameraStorage(instance: any, cameraId: string, schema?: PluginJsonSchemaForm): CameraStorage;
16
16
  /**
17
17
  * Get a camera storage instance
18
18
  *
@@ -1,6 +1,4 @@
1
- import type { RTCIceServer } from 'werift';
2
1
  import type { Go2RtcConfig, IConfig, IceServer } from './types.js';
3
2
  export declare const DEFAULT_ICE_SERVERS: IceServer[];
4
- export declare const DEFAULT_WERIFT_ICE_SERVERS: RTCIceServer[];
5
3
  export declare const DEFAULT_CONFIG: IConfig;
6
4
  export declare const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig;
@@ -9,7 +9,6 @@ export declare class ConfigService {
9
9
  PLUGINS_ID: string;
10
10
  USER_PLUGINS_ID: string;
11
11
  SETTINGS_ID: string;
12
- TOKENS_ID: string;
13
12
  USERS_ID: string;
14
13
  SECRETS: Secrets;
15
14
  static IS_DEV: boolean;
@@ -27,6 +26,7 @@ export declare class ConfigService {
27
26
  STORAGE_PATH: string;
28
27
  DATABASE_PATH: string;
29
28
  USERS_STORAGE_PATH: string;
29
+ TMP_DIR: string;
30
30
  PLUGINS_STORAGE_PATH: string;
31
31
  PLUGINS_INSTALL_PATH: string;
32
32
  PLUGINS_PJSON_FILE: string;
@@ -0,0 +1,2 @@
1
+ export declare const pack: (message: any) => Buffer;
2
+ export declare const unpack: <T = any>(message: Buffer | Uint8Array) => T;
@@ -18,7 +18,7 @@ export declare class PythonInstaller {
18
18
  get version(): string;
19
19
  private get logPrefix();
20
20
  constructor(identifier: string, venvDir?: string, version?: string);
21
- install(): Promise<void>;
21
+ install(type: 'plugin' | 'server'): Promise<void>;
22
22
  installPluginPython(): Promise<void>;
23
23
  uninstall(): Promise<void>;
24
24
  updatePluginDependencies(requirementsPath: string): Promise<void>;
@@ -1,6 +1,11 @@
1
1
  import type { JwtTokenDecoded } from '../api/types/index.js';
2
+ export type Customizer<TObject, TSource> = (objValue: any, srcValue: any, key: string, object: TObject, source: TSource, stack: any[]) => any;
2
3
  export declare const toQuery: (data: any) => string;
3
4
  export declare const toData: (query: string) => Record<string, any>;
4
5
  export declare const isJson: (str: any) => boolean;
5
6
  export declare const parseJwt: (access_token: string) => JwtTokenDecoded;
6
7
  export declare const sleep: (ms: number) => Promise<void>;
8
+ export declare const isEqual: (first: any, second: any, ignoreOrder?: boolean) => boolean;
9
+ export declare const mergeWith: <TObject, TSource>(object: TObject, source: TSource, customizer: Customizer<TObject, TSource>, stack?: any[]) => TObject & TSource;
10
+ export declare const orderBy: (array: any[], keys: string[], orders: ("asc" | "desc")[]) => any[];
11
+ export declare const structuredClone: <T>(obj: T) => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/browser",
3
- "version": "0.0.76",
3
+ "version": "0.0.79",
4
4
  "description": "camera.ui browser client",
5
5
  "author": "seydx (https://github.com/seydx/camera.ui)",
6
6
  "module": "./dist/bundle.js",
@@ -24,8 +24,6 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "axios": "^1.7.2",
27
- "lodash.clonedeep": "^4.5.0",
28
- "lodash.isequal": "^4.5.0",
29
27
  "lru-cache": "^10.2.2",
30
28
  "rxjs": "^7.8.1",
31
29
  "socket.io-client": "^4.7.5"
@@ -34,19 +32,19 @@
34
32
  "@rushstack/eslint-patch": "^1.10.3",
35
33
  "@swc/register": "^0.1.10",
36
34
  "@types/webrtc": "^0.0.43",
37
- "@typescript-eslint/eslint-plugin": "^7.11.0",
38
- "@typescript-eslint/parser": "^7.11.0",
35
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
36
+ "@typescript-eslint/parser": "^7.14.1",
39
37
  "bufferutil": "^4.0.8",
40
38
  "eslint": "^8.57.0",
41
39
  "eslint-config-prettier": "^9.1.0",
42
40
  "eslint-plugin-prettier": "^5.1.3",
43
- "prettier": "^3.3.0",
41
+ "prettier": "^3.3.2",
44
42
  "rimraf": "^5.0.7",
45
43
  "ts-loader": "^9.5.1",
46
- "typescript": "^5.4.5",
44
+ "typescript": "^5.5.2",
47
45
  "updates": "^16.2.0",
48
46
  "utf-8-validate": "^6.0.4",
49
- "webpack": "^5.91.0",
47
+ "webpack": "^5.92.1",
50
48
  "webpack-cli": "^5.1.4"
51
49
  },
52
50
  "bugs": {
@@ -1,24 +0,0 @@
1
- import { ReplaySubject, Subject } from 'rxjs';
2
- import { Subscribed } from '../../../../../shared/types/index.js';
3
- import type { BaseLogger, IceServer } from '../../../../../shared/types/index.js';
4
- import type { BasicBrowserPeerConnection, CameraDevice } from '../types.js';
5
- export declare class BasicPeerConnection extends Subscribed implements BasicBrowserPeerConnection {
6
- onIceCandidate: Subject<RTCIceCandidate>;
7
- onConnectionState: ReplaySubject<RTCPeerConnectionState>;
8
- videoTransceiver: RTCRtpTransceiver;
9
- audioTransceiver: RTCRtpTransceiver;
10
- private cameraDevice;
11
- private logger;
12
- private pc;
13
- private videoElement;
14
- constructor(cameraDevice: CameraDevice, videoElement: HTMLVideoElement, iceServers: IceServer[], logger: BaseLogger);
15
- enableMicrophone(track: MediaStreamTrack): void;
16
- disableMicrophone(): void;
17
- createOffer(): Promise<RTCSessionDescriptionInit>;
18
- acceptAnswer(answer: {
19
- type: 'answer';
20
- sdp: string;
21
- }): Promise<void>;
22
- addIceCandidate(candidate: RTCIceCandidateInit): Promise<void>;
23
- close(): void;
24
- }
@@ -1,25 +0,0 @@
1
- import { ReplaySubject } from 'rxjs';
2
- import { Subscribed } from '../../../../../shared/types/index.js';
3
- import type { Observable } from 'rxjs';
4
- import type { BaseLogger } from '../../../../../shared/types/index.js';
5
- import type { CameraDevice } from '../types.js';
6
- import type { WebrtcConnection } from './webrtc-connection.js';
7
- export declare class StreamingSession extends Subscribed {
8
- readonly onCallAnswered: ReplaySubject<void>;
9
- readonly onCallEnded: ReplaySubject<void>;
10
- private onUsingOpus;
11
- private micState;
12
- private hasEnded;
13
- private cameraDevice;
14
- private connection;
15
- private logger;
16
- onMicrophoneEnabled: Observable<boolean>;
17
- get isUsingOpus(): Promise<boolean>;
18
- constructor(cameraDevice: CameraDevice, logger: BaseLogger, connection: WebrtcConnection);
19
- enableMicrophone(track: MediaStreamTrack): void;
20
- disableMicrophone(): void;
21
- stop(): void;
22
- private createStateObservable;
23
- private bindToConnection;
24
- private callEnded;
25
- }
@@ -1,26 +0,0 @@
1
- import { ReplaySubject, type Observable } from 'rxjs';
2
- import { Subscribed } from '../../../../../shared/types/index.js';
3
- import { BasicPeerConnection } from './peer-connection.js';
4
- import type { BaseLogger, IceServer } from '../../../../../shared/types/index.js';
5
- import type { CameraDevice } from '../types.js';
6
- export declare class WebrtcConnection extends Subscribed {
7
- readonly onCallAnswered: ReplaySubject<string>;
8
- readonly onCallEnded: ReplaySubject<void>;
9
- readonly onError: ReplaySubject<void>;
10
- readonly onMessage: ReplaySubject<{
11
- method: string;
12
- }>;
13
- readonly onWsOpen: Observable<unknown>;
14
- readonly pc: BasicPeerConnection;
15
- private readonly ws;
16
- private readonly onOfferSent;
17
- private hasEnded;
18
- private cameraDevice;
19
- private logger;
20
- constructor(cameraDevice: CameraDevice, sourceName: string, videoElement: HTMLVideoElement, iceServers: IceServer[], logger: BaseLogger);
21
- stop(): void;
22
- private initiateCall;
23
- private handleMessage;
24
- private sendMessage;
25
- private callEnded;
26
- }
@@ -1,2 +0,0 @@
1
- declare const axiosInstance: import("axios").AxiosInstance;
2
- export default axiosInstance;
@@ -1,15 +0,0 @@
1
- import type { Namespace, Server } from 'socket.io';
2
- import type { SocketNsp } from '../types.js';
3
- export declare class StreamsNamespace {
4
- nsp: Namespace;
5
- nspName: SocketNsp;
6
- private bridges;
7
- private logger;
8
- private configService;
9
- constructor(io: Server);
10
- private connectBridge;
11
- private sendMessage;
12
- private closeBridge;
13
- private onEnd;
14
- private onDestroy;
15
- }