@camera.ui/browser 0.0.99 → 0.0.101

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.
@@ -0,0 +1,23 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+ /**
17
+ * splaytree v3.1.2
18
+ * Fast Splay tree for Node and browser
19
+ *
20
+ * @author Alexander Milevski <info@w8r.name>
21
+ * @license MIT
22
+ * @preserve
23
+ */
@@ -9,7 +9,7 @@ export declare class CoreManager implements CoreManagerInterface {
9
9
  private subject;
10
10
  constructor(socketService: SocketService, logger: BaseLogger);
11
11
  getFFmpegPath(): Promise<string>;
12
- getHwaccelInfo(): Promise<FfmpegArgs>;
12
+ getHwaccelInfo(targetCodec: 'h264' | 'h265'): Promise<FfmpegArgs>;
13
13
  getServerAddresses(): Promise<string[]>;
14
14
  getIceServers(): Promise<IceServer[]>;
15
15
  private onRequest;
@@ -73,8 +73,8 @@ export declare abstract class BaseCameraDevice extends Subscribed {
73
73
  protected removeAllListeners(): void;
74
74
  protected updateCamera(updatedCamera: Camera): void;
75
75
  protected updateCameraState(state: boolean): void;
76
- protected updateStateInternal<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], skipCheck?: boolean): void;
77
- protected checkStateInternal<T extends keyof SetValues>(stateName: T, event: SetValues[T]): {
76
+ protected updateStateInternal<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], skipCheck?: boolean, skipDetectionsCheck?: boolean): void;
77
+ protected checkStateInternal<T extends keyof SetValues>(stateName: T, event: SetValues[T], skipDetectionsCheck?: boolean): {
78
78
  changed: boolean;
79
79
  event: StateValues[T];
80
80
  };
@@ -1,2 +1,2 @@
1
1
  import type { Detection } from '@camera.ui/types';
2
- export declare const mergeDetections: (detections: Detection[], iouThreshold?: number) => Detection[];
2
+ export declare function mergeDetections(detections: Detection[], iouThreshold?: number, closeThreshold?: number): Detection[];
@@ -1,5 +1,5 @@
1
1
  import type { CameraActivitySettings, Detection, DetectionZone } from '@camera.ui/types';
2
2
  export declare const convertZonePointsToPixels: (zone: DetectionZone, detection: Detection) => DetectionZone;
3
3
  export declare const convertBoundingBoxToPixels: (detection: Detection) => Detection;
4
- export declare const areObjectDetectionsValid: (detections: Detection[], zones: DetectionZone[], activitySettings: CameraActivitySettings) => Detection[];
5
4
  export declare const areMotionDetectionsValid: (detections: Detection[], zones: DetectionZone[], activitySettings: CameraActivitySettings) => Detection[];
5
+ export declare const areObjectDetectionsValid: (detections: Detection[], zones: DetectionZone[], activitySettings: CameraActivitySettings) => Detection[];
@@ -121,7 +121,7 @@ export interface CameraDeviceProxyMethods {
121
121
  addCameraSource(source: CameraConfigInputSettings): Promise<void>;
122
122
  updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>): Promise<void>;
123
123
  removeCameraSource(sourceId: string): Promise<void>;
124
- probeStream(sourceId: string): Promise<ProbeStream | undefined>;
124
+ probeStream(sourceId: string, refresh: boolean): Promise<ProbeStream | undefined>;
125
125
  }
126
126
  export interface CameraDeviceListenerStatePayload<K extends keyof StateValues> {
127
127
  stateName: K;
@@ -19,7 +19,7 @@ export type ImageInputFormat = 'yuv' | 'rgb' | 'rgba' | 'gray';
19
19
  export type ImageOutputFormat = 'rgb' | 'rgba' | 'gray';
20
20
  export type CameraExtension = 'hub' | 'prebuffer' | 'motionDetection' | 'objectDetection' | 'audioDetection' | 'ptz';
21
21
  export type CameraFrameWorkerDecoder = 'pillow' | 'wasm';
22
- export type CameraFrameWorkerResolution = 640 | 480 | 320;
22
+ export type CameraFrameWorkerResolution = '3840x2160' | '3072x1728' | '2560x1440' | '1920x1080' | '1440x1080' | '1280x720' | '960x540' | '640x480' | '640x360' | '320x240' | '320x180';
23
23
  export type AudioCodec = 'PCMU' | 'PCMA' | 'MPEG4-GENERIC' | 'opus' | 'G722' | 'MPA' | 'PCM' | 'FLAC';
24
24
  export type AudioFFmpegCodec = 'pcm_mulaw' | 'pcm_alaw' | 'aac' | 'libopus' | 'g722' | 'mp3' | 'pcm_s16be' | 'pcm_s16le' | 'flac';
25
25
  export type VideoCodec = 'H264' | 'H265' | 'VP8' | 'VP9' | 'AV1' | 'JPEG' | 'RAW';
@@ -232,8 +232,8 @@ export interface ImageCrop {
232
232
  height: number;
233
233
  }
234
234
  export interface ImageResize {
235
- width?: number;
236
- height?: number;
235
+ width: number;
236
+ height: number;
237
237
  }
238
238
  export interface ImageFormat {
239
239
  to: ImageOutputFormat;
@@ -306,7 +306,7 @@ export interface CameraDelegates {
306
306
  }
307
307
  export interface CameraSource extends CameraInput {
308
308
  getPrebufferingState(container: Container): Promise<PrebufferState | undefined>;
309
- probeStream(): Promise<ProbeStream | undefined>;
309
+ probeStream(refresh?: boolean): Promise<ProbeStream | undefined>;
310
310
  }
311
311
  export interface CameraInternalSource extends CameraSource {
312
312
  type: 'aac' | 'opus' | 'pcma';
@@ -470,14 +470,16 @@ export interface DeviceManager {
470
470
  }
471
471
  export interface CoreManager {
472
472
  getFFmpegPath(): Promise<string>;
473
- getHwaccelInfo(): Promise<FfmpegArgs>;
473
+ getHwaccelInfo(targetCodec: 'h264' | 'h265'): Promise<FfmpegArgs>;
474
474
  getServerAddresses(): Promise<string[]>;
475
475
  getIceServers(): Promise<IceServer[]>;
476
476
  }
477
477
  export interface FfmpegArgs {
478
+ codec: string;
478
479
  hwaccel: string;
479
480
  hwaccelArgs: string[];
480
- hwaccelFilter: string;
481
+ hwaccelFilters: string[];
482
+ hwDeviceArgs: string[];
481
483
  threads: string;
482
484
  }
483
485
  export interface IceServer {
@@ -2,7 +2,7 @@ import type { FastifyInstance } from 'fastify';
2
2
  import type { Database as DB, RootDatabase as RootDB } from 'lmdb';
3
3
  import type { DBAuth, DBCamera, DBPlugin, DBSettings, DBSystem, DBUser } from './types.js';
4
4
  export declare class Database {
5
- static readonly VERSION = "1.0.2";
5
+ static readonly VERSION = "1.0.3";
6
6
  authDB: RootDB<DBAuth, 'auth'>;
7
7
  camerasDB: DB<DBCamera[], 'cameras'>;
8
8
  pluginsDB: DB<DBPlugin[], 'plugins'>;
@@ -220,15 +220,15 @@ export declare const streamingModeSchema: zod.ZodUnion<[zod.ZodLiteral<"mse">, z
220
220
  export declare const frameWorkerSettingsSchema: zod.ZodObject<{
221
221
  decoder: zod.ZodUnion<[zod.ZodLiteral<"pillow">, zod.ZodLiteral<"wasm">]>;
222
222
  fps: zod.ZodNumber;
223
- resolution: zod.ZodUnion<[zod.ZodLiteral<640>, zod.ZodLiteral<480>, zod.ZodLiteral<320>]>;
223
+ resolution: zod.ZodUnion<[zod.ZodLiteral<"3840x2160">, zod.ZodLiteral<"3072x1728">, zod.ZodLiteral<"2560x1440">, zod.ZodLiteral<"1920x1080">, zod.ZodLiteral<"1440x1080">, zod.ZodLiteral<"1280x720">, zod.ZodLiteral<"960x540">, zod.ZodLiteral<"640x480">, zod.ZodLiteral<"640x360">, zod.ZodLiteral<"320x240">, zod.ZodLiteral<"320x180">]>;
224
224
  }, "strip", zod.ZodTypeAny, {
225
225
  decoder: "pillow" | "wasm";
226
226
  fps: number;
227
- resolution: 640 | 480 | 320;
227
+ resolution: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180";
228
228
  }, {
229
229
  decoder: "pillow" | "wasm";
230
230
  fps: number;
231
- resolution: 640 | 480 | 320;
231
+ resolution: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180";
232
232
  }>;
233
233
  export declare const cameraTypeSchema: zod.ZodUnion<[zod.ZodLiteral<"camera">, zod.ZodLiteral<"doorbell">]>;
234
234
  export declare const interfaceSettingsSchema: zod.ZodObject<{
@@ -470,15 +470,15 @@ export declare const createCameraSchema: zod.ZodObject<{
470
470
  frameWorkerSettings: zod.ZodDefault<zod.ZodObject<{
471
471
  decoder: zod.ZodUnion<[zod.ZodLiteral<"pillow">, zod.ZodLiteral<"wasm">]>;
472
472
  fps: zod.ZodNumber;
473
- resolution: zod.ZodUnion<[zod.ZodLiteral<640>, zod.ZodLiteral<480>, zod.ZodLiteral<320>]>;
473
+ resolution: zod.ZodUnion<[zod.ZodLiteral<"3840x2160">, zod.ZodLiteral<"3072x1728">, zod.ZodLiteral<"2560x1440">, zod.ZodLiteral<"1920x1080">, zod.ZodLiteral<"1440x1080">, zod.ZodLiteral<"1280x720">, zod.ZodLiteral<"960x540">, zod.ZodLiteral<"640x480">, zod.ZodLiteral<"640x360">, zod.ZodLiteral<"320x240">, zod.ZodLiteral<"320x180">]>;
474
474
  }, "strip", zod.ZodTypeAny, {
475
475
  decoder: "pillow" | "wasm";
476
476
  fps: number;
477
- resolution: 640 | 480 | 320;
477
+ resolution: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180";
478
478
  }, {
479
479
  decoder: "pillow" | "wasm";
480
480
  fps: number;
481
- resolution: 640 | 480 | 320;
481
+ resolution: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180";
482
482
  }>>;
483
483
  }, "strict", zod.ZodTypeAny, {
484
484
  pluginId: string;
@@ -525,7 +525,7 @@ export declare const createCameraSchema: zod.ZodObject<{
525
525
  frameWorkerSettings: {
526
526
  decoder: "pillow" | "wasm";
527
527
  fps: number;
528
- resolution: 640 | 480 | 320;
528
+ resolution: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180";
529
529
  };
530
530
  sources: {
531
531
  _id: string;
@@ -604,7 +604,7 @@ export declare const createCameraSchema: zod.ZodObject<{
604
604
  frameWorkerSettings?: {
605
605
  decoder: "pillow" | "wasm";
606
606
  fps: number;
607
- resolution: 640 | 480 | 320;
607
+ resolution: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180";
608
608
  } | undefined;
609
609
  extensions?: {
610
610
  plugins: string[];
@@ -627,7 +627,7 @@ export declare const patchCameraSchema: zod.ZodObject<{
627
627
  disabled: zod.ZodOptional<zod.ZodBoolean>;
628
628
  type: zod.ZodOptional<zod.ZodUnion<[zod.ZodLiteral<"camera">, zod.ZodLiteral<"doorbell">]>>;
629
629
  name: zod.ZodOptional<zod.ZodString>;
630
- snapshotTTL: zod.ZodDefault<zod.ZodNumber>;
630
+ snapshotTTL: zod.ZodOptional<zod.ZodNumber>;
631
631
  info: zod.ZodOptional<zod.ZodObject<{
632
632
  model: zod.ZodOptional<zod.ZodOptional<zod.ZodString>>;
633
633
  manufacturer: zod.ZodOptional<zod.ZodOptional<zod.ZodString>>;
@@ -822,18 +822,17 @@ export declare const patchCameraSchema: zod.ZodObject<{
822
822
  frameWorkerSettings: zod.ZodOptional<zod.ZodObject<{
823
823
  decoder: zod.ZodOptional<zod.ZodUnion<[zod.ZodLiteral<"pillow">, zod.ZodLiteral<"wasm">]>>;
824
824
  fps: zod.ZodOptional<zod.ZodNumber>;
825
- resolution: zod.ZodOptional<zod.ZodUnion<[zod.ZodLiteral<640>, zod.ZodLiteral<480>, zod.ZodLiteral<320>]>>;
825
+ resolution: zod.ZodOptional<zod.ZodUnion<[zod.ZodLiteral<"3840x2160">, zod.ZodLiteral<"3072x1728">, zod.ZodLiteral<"2560x1440">, zod.ZodLiteral<"1920x1080">, zod.ZodLiteral<"1440x1080">, zod.ZodLiteral<"1280x720">, zod.ZodLiteral<"960x540">, zod.ZodLiteral<"640x480">, zod.ZodLiteral<"640x360">, zod.ZodLiteral<"320x240">, zod.ZodLiteral<"320x180">]>>;
826
826
  }, "strip", zod.ZodTypeAny, {
827
827
  decoder?: "pillow" | "wasm" | undefined;
828
828
  fps?: number | undefined;
829
- resolution?: 640 | 480 | 320 | undefined;
829
+ resolution?: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180" | undefined;
830
830
  }, {
831
831
  decoder?: "pillow" | "wasm" | undefined;
832
832
  fps?: number | undefined;
833
- resolution?: 640 | 480 | 320 | undefined;
833
+ resolution?: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180" | undefined;
834
834
  }>>;
835
835
  }, "strict", zod.ZodTypeAny, {
836
- snapshotTTL: number;
837
836
  type?: "camera" | "doorbell" | undefined;
838
837
  disabled?: boolean | undefined;
839
838
  name?: string | undefined;
@@ -859,6 +858,7 @@ export declare const patchCameraSchema: zod.ZodObject<{
859
858
  firmwareVersion?: string | undefined;
860
859
  supportUrl?: string | undefined;
861
860
  } | undefined;
861
+ snapshotTTL?: number | undefined;
862
862
  activitySettings?: {
863
863
  object?: {
864
864
  confidence: number;
@@ -870,7 +870,7 @@ export declare const patchCameraSchema: zod.ZodObject<{
870
870
  frameWorkerSettings?: {
871
871
  decoder?: "pillow" | "wasm" | undefined;
872
872
  fps?: number | undefined;
873
- resolution?: 640 | 480 | 320 | undefined;
873
+ resolution?: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180" | undefined;
874
874
  } | undefined;
875
875
  sources?: {
876
876
  _id: string;
@@ -933,7 +933,7 @@ export declare const patchCameraSchema: zod.ZodObject<{
933
933
  frameWorkerSettings?: {
934
934
  decoder?: "pillow" | "wasm" | undefined;
935
935
  fps?: number | undefined;
936
- resolution?: 640 | 480 | 320 | undefined;
936
+ resolution?: "3840x2160" | "3072x1728" | "2560x1440" | "1920x1080" | "1440x1080" | "1280x720" | "960x540" | "640x480" | "640x360" | "320x240" | "320x180" | undefined;
937
937
  } | undefined;
938
938
  sources?: {
939
939
  name: string;
@@ -33,7 +33,7 @@ export declare const userPreferencesCamviewViewsLayout: zod.ZodObject<{
33
33
  type: "dnd" | "view";
34
34
  _id: string;
35
35
  name: string;
36
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
36
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
37
37
  cameras: {
38
38
  cameraId: string;
39
39
  index: number;
@@ -41,7 +41,7 @@ export declare const userPreferencesCamviewViewsLayout: zod.ZodObject<{
41
41
  }, {
42
42
  type: "dnd" | "view";
43
43
  name: string;
44
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
44
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
45
45
  cameras: {
46
46
  cameraId: string;
47
47
  index: number;
@@ -63,14 +63,14 @@ export declare const patchPreferencesCamviewViewsLayout: zod.ZodOptional<zod.Zod
63
63
  }>, "many">>;
64
64
  }, "strip", zod.ZodTypeAny, {
65
65
  name?: string | undefined;
66
- viewSize?: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26 | undefined;
66
+ viewSize?: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26 | undefined;
67
67
  cameras?: {
68
68
  cameraId: string;
69
69
  index: number;
70
70
  }[] | undefined;
71
71
  }, {
72
72
  name?: string | undefined;
73
- viewSize?: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26 | undefined;
73
+ viewSize?: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26 | undefined;
74
74
  cameras?: {
75
75
  cameraId: string;
76
76
  index: number;
@@ -96,7 +96,7 @@ export declare const userPreferencesCamview: zod.ZodObject<{
96
96
  type: "dnd" | "view";
97
97
  _id: string;
98
98
  name: string;
99
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
99
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
100
100
  cameras: {
101
101
  cameraId: string;
102
102
  index: number;
@@ -104,7 +104,7 @@ export declare const userPreferencesCamview: zod.ZodObject<{
104
104
  }, {
105
105
  type: "dnd" | "view";
106
106
  name: string;
107
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
107
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
108
108
  cameras: {
109
109
  cameraId: string;
110
110
  index: number;
@@ -116,7 +116,7 @@ export declare const userPreferencesCamview: zod.ZodObject<{
116
116
  type: "dnd" | "view";
117
117
  _id: string;
118
118
  name: string;
119
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
119
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
120
120
  cameras: {
121
121
  cameraId: string;
122
122
  index: number;
@@ -126,7 +126,7 @@ export declare const userPreferencesCamview: zod.ZodObject<{
126
126
  views: {
127
127
  type: "dnd" | "view";
128
128
  name: string;
129
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
129
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
130
130
  cameras: {
131
131
  cameraId: string;
132
132
  index: number;
@@ -256,7 +256,7 @@ export declare const userPreferences: zod.ZodObject<{
256
256
  type: "dnd" | "view";
257
257
  _id: string;
258
258
  name: string;
259
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
259
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
260
260
  cameras: {
261
261
  cameraId: string;
262
262
  index: number;
@@ -264,7 +264,7 @@ export declare const userPreferences: zod.ZodObject<{
264
264
  }, {
265
265
  type: "dnd" | "view";
266
266
  name: string;
267
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
267
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
268
268
  cameras: {
269
269
  cameraId: string;
270
270
  index: number;
@@ -276,7 +276,7 @@ export declare const userPreferences: zod.ZodObject<{
276
276
  type: "dnd" | "view";
277
277
  _id: string;
278
278
  name: string;
279
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
279
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
280
280
  cameras: {
281
281
  cameraId: string;
282
282
  index: number;
@@ -286,7 +286,7 @@ export declare const userPreferences: zod.ZodObject<{
286
286
  views: {
287
287
  type: "dnd" | "view";
288
288
  name: string;
289
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
289
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
290
290
  cameras: {
291
291
  cameraId: string;
292
292
  index: number;
@@ -358,7 +358,7 @@ export declare const userPreferences: zod.ZodObject<{
358
358
  type: "dnd" | "view";
359
359
  _id: string;
360
360
  name: string;
361
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
361
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
362
362
  cameras: {
363
363
  cameraId: string;
364
364
  index: number;
@@ -380,7 +380,7 @@ export declare const userPreferences: zod.ZodObject<{
380
380
  views: {
381
381
  type: "dnd" | "view";
382
382
  name: string;
383
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
383
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
384
384
  cameras: {
385
385
  cameraId: string;
386
386
  index: number;
@@ -420,7 +420,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
420
420
  type: "dnd" | "view";
421
421
  _id: string;
422
422
  name: string;
423
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
423
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
424
424
  cameras: {
425
425
  cameraId: string;
426
426
  index: number;
@@ -428,7 +428,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
428
428
  }, {
429
429
  type: "dnd" | "view";
430
430
  name: string;
431
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
431
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
432
432
  cameras: {
433
433
  cameraId: string;
434
434
  index: number;
@@ -440,7 +440,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
440
440
  type: "dnd" | "view";
441
441
  _id: string;
442
442
  name: string;
443
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
443
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
444
444
  cameras: {
445
445
  cameraId: string;
446
446
  index: number;
@@ -450,7 +450,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
450
450
  views: {
451
451
  type: "dnd" | "view";
452
452
  name: string;
453
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
453
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
454
454
  cameras: {
455
455
  cameraId: string;
456
456
  index: number;
@@ -522,7 +522,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
522
522
  type: "dnd" | "view";
523
523
  _id: string;
524
524
  name: string;
525
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
525
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
526
526
  cameras: {
527
527
  cameraId: string;
528
528
  index: number;
@@ -544,7 +544,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
544
544
  views: {
545
545
  type: "dnd" | "view";
546
546
  name: string;
547
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
547
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
548
548
  cameras: {
549
549
  cameraId: string;
550
550
  index: number;
@@ -579,7 +579,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
579
579
  type: "dnd" | "view";
580
580
  _id: string;
581
581
  name: string;
582
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
582
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
583
583
  cameras: {
584
584
  cameraId: string;
585
585
  index: number;
@@ -612,7 +612,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
612
612
  views: {
613
613
  type: "dnd" | "view";
614
614
  name: string;
615
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
615
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
616
616
  cameras: {
617
617
  cameraId: string;
618
618
  index: number;
@@ -647,7 +647,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
647
647
  type: "dnd" | "view";
648
648
  _id: string;
649
649
  name: string;
650
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
650
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
651
651
  cameras: {
652
652
  cameraId: string;
653
653
  index: number;
@@ -680,7 +680,7 @@ export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
680
680
  views: {
681
681
  type: "dnd" | "view";
682
682
  name: string;
683
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
683
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
684
684
  cameras: {
685
685
  cameraId: string;
686
686
  index: number;
@@ -734,7 +734,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
734
734
  type: "dnd" | "view";
735
735
  _id: string;
736
736
  name: string;
737
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
737
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
738
738
  cameras: {
739
739
  cameraId: string;
740
740
  index: number;
@@ -742,7 +742,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
742
742
  }, {
743
743
  type: "dnd" | "view";
744
744
  name: string;
745
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
745
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
746
746
  cameras: {
747
747
  cameraId: string;
748
748
  index: number;
@@ -754,7 +754,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
754
754
  type: "dnd" | "view";
755
755
  _id: string;
756
756
  name: string;
757
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
757
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
758
758
  cameras: {
759
759
  cameraId: string;
760
760
  index: number;
@@ -764,7 +764,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
764
764
  views: {
765
765
  type: "dnd" | "view";
766
766
  name: string;
767
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
767
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
768
768
  cameras: {
769
769
  cameraId: string;
770
770
  index: number;
@@ -836,7 +836,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
836
836
  type: "dnd" | "view";
837
837
  _id: string;
838
838
  name: string;
839
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
839
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
840
840
  cameras: {
841
841
  cameraId: string;
842
842
  index: number;
@@ -858,7 +858,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
858
858
  views: {
859
859
  type: "dnd" | "view";
860
860
  name: string;
861
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
861
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
862
862
  cameras: {
863
863
  cameraId: string;
864
864
  index: number;
@@ -893,7 +893,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
893
893
  type: "dnd" | "view";
894
894
  _id: string;
895
895
  name: string;
896
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
896
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
897
897
  cameras: {
898
898
  cameraId: string;
899
899
  index: number;
@@ -926,7 +926,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
926
926
  views: {
927
927
  type: "dnd" | "view";
928
928
  name: string;
929
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
929
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
930
930
  cameras: {
931
931
  cameraId: string;
932
932
  index: number;
@@ -961,7 +961,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
961
961
  type: "dnd" | "view";
962
962
  _id: string;
963
963
  name: string;
964
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
964
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
965
965
  cameras: {
966
966
  cameraId: string;
967
967
  index: number;
@@ -994,7 +994,7 @@ export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
994
994
  views: {
995
995
  type: "dnd" | "view";
996
996
  name: string;
997
- viewSize: 1 | 4 | 16 | 6 | 20 | 12 | 10 | 7 | 9 | 13 | 15 | 26;
997
+ viewSize: 1 | 4 | 6 | 9 | 10 | 16 | 20 | 12 | 7 | 13 | 15 | 26;
998
998
  cameras: {
999
999
  cameraId: string;
1000
1000
  index: number;
@@ -26,7 +26,7 @@ export declare class CameraController extends CameraDevice {
26
26
  connect(): Promise<void>;
27
27
  disconnect(): Promise<void>;
28
28
  updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T]): Promise<void>;
29
- probeStream(sourceId: string): Promise<ProbeStream | undefined>;
29
+ probeStream(sourceId: string, refresh?: boolean): Promise<ProbeStream | undefined>;
30
30
  addCameraSource(source: CameraConfigInputSettings): Promise<void>;
31
31
  updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>): Promise<void>;
32
32
  removeCameraSource(sourceId: string): Promise<void>;
@@ -11,7 +11,7 @@ export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
11
11
  connect(cameraId: string, pluginId: string): void;
12
12
  disconnect(cameraId: string, pluginId: string): void;
13
13
  updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T], cameraId: string, pluginId: string): Promise<void>;
14
- probeStream(sourceId: string, cameraId: string): Promise<ProbeStream | undefined>;
14
+ probeStream(sourceId: string, refresh: boolean, cameraId: string): Promise<ProbeStream | undefined>;
15
15
  addCameraSource(source: CameraConfigInputSettings, cameraId: string, pluginId: string): Promise<void>;
16
16
  updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>, cameraId: string, pluginId: string): Promise<void>;
17
17
  removeCameraSource(sourceId: string, cameraId: string, pluginId: string): Promise<void>;
@@ -7,7 +7,7 @@ export declare class CoreManagerProxy implements CoreManager {
7
7
  private messageQueue;
8
8
  constructor(messageQueue: MessageQueue);
9
9
  getFFmpegPath(): Promise<string>;
10
- getHwaccelInfo(): Promise<FfmpegArgs>;
10
+ getHwaccelInfo(targetCodec: 'h264' | 'h265'): Promise<FfmpegArgs>;
11
11
  getServerAddresses(): Promise<string[]>;
12
12
  getIceServers(): Promise<IceServer[]>;
13
13
  requestHandler(message: ProxyMessageStructure): Promise<void | ProxyMessageStructure>;
@@ -7,6 +7,7 @@ export declare class PluginManager {
7
7
  private api;
8
8
  private configService;
9
9
  private pythonVersionsToInstall;
10
+ installedPythonVersions: Set<string>;
10
11
  plugins: Map<string, Plugin>;
11
12
  pluginWorkers: Map<string, PluginWorker>;
12
13
  searchPaths: Set<string>;
@@ -8,6 +8,7 @@ export declare class PluginWorker {
8
8
  private logger;
9
9
  private configService;
10
10
  private socketService;
11
+ private pluginManager;
11
12
  private publisher?;
12
13
  private subscriber?;
13
14
  private subject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/browser",
3
- "version": "0.0.99",
3
+ "version": "0.0.101",
4
4
  "description": "camera.ui browser client",
5
5
  "author": "seydx (https://github.com/seydx/camera.ui)",
6
6
  "module": "./dist/bundle.js",
@@ -32,9 +32,9 @@
32
32
  "devDependencies": {
33
33
  "@rushstack/eslint-patch": "^1.10.4",
34
34
  "@swc/register": "^0.1.10",
35
- "@types/webrtc": "^0.0.43",
36
- "@typescript-eslint/eslint-plugin": "^8.7.0",
37
- "@typescript-eslint/parser": "^8.7.0",
35
+ "@types/webrtc": "^0.0.44",
36
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
37
+ "@typescript-eslint/parser": "^8.8.1",
38
38
  "bufferutil": "^4.0.8",
39
39
  "eslint": "^8.57.0",
40
40
  "eslint-config-prettier": "^9.1.0",
@@ -42,10 +42,10 @@
42
42
  "prettier": "^3.3.3",
43
43
  "rimraf": "^6.0.1",
44
44
  "ts-loader": "^9.5.1",
45
- "typescript": "^5.6.2",
45
+ "typescript": "^5.6.3",
46
46
  "updates": "^16.4.0",
47
47
  "utf-8-validate": "^6.0.4",
48
- "webpack": "^5.94.0",
48
+ "webpack": "^5.95.0",
49
49
  "webpack-cli": "^5.1.4"
50
50
  },
51
51
  "bugs": {