@microblink/camera-manager 7.2.3 → 7.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microblink/camera-manager",
3
- "version": "7.2.3",
3
+ "version": "7.2.5",
4
4
  "author": "Microblink",
5
5
  "type": "module",
6
6
  "main": "./dist/camera-manager.js",
@@ -52,10 +52,19 @@ export type StartCameraStreamOptions = {
52
52
  * Options for the CameraManager.
53
53
  *
54
54
  * @param mirrorFrontCameras - If true, front-facing cameras will be mirrored horizontally when started.
55
+ * @param preferredResolution - The desired video resolution for camera streams. This is used as the ideal resolution when starting camera streams. If a camera doesn't support the specified resolution, the camera will automatically fall back to the next lower supported resolution in this order: 4k → 1080p → 720p.
55
56
  */
56
57
  export type CameraManagerOptions = {
57
58
  /** If true, the camera stream will be mirrored horizontally when started. */
58
59
  mirrorFrontCameras: boolean;
60
+ /**
61
+ * The desired video resolution for camera streams. This is used as the ideal resolution
62
+ * when starting camera streams. If a camera doesn't support the specified resolution,
63
+ * the camera will automatically fall back to the next lower supported resolution in this order:
64
+ * 4k → 1080p → 720p. The actual resolution used may differ from this setting based on
65
+ * camera capabilities and system constraints.
66
+ */
67
+ preferredResolution: VideoResolutionName;
59
68
  };
60
69
  /**
61
70
  * Default options for the CameraManager.
@@ -88,13 +97,20 @@ export declare class CameraManager {
88
97
  */
89
98
  constructor(options?: Partial<CameraManagerOptions>, videoFrameProcessorOptions?: VideoFrameProcessorInitOptions);
90
99
  /**
91
- * Sets the resolution of the camera stream.
100
+ * Sets the desired video resolution for camera streams. This is used as the ideal resolution
101
+ * when starting camera streams. If a camera doesn't support the specified resolution,
102
+ * the camera will automatically fall back to the next lower supported resolution in this order:
103
+ * 4k → 1080p → 720p. If there's an active stream, it will be restarted with the new resolution.
92
104
  *
93
- * @param resolution - The resolution to set.
105
+ * @param resolution - The ideal resolution to set for camera streams.
94
106
  */
95
107
  setResolution: (resolution: VideoResolutionName) => Promise<void>;
96
108
  /**
97
- * The resolution of the camera stream.
109
+ * The desired video resolution for camera streams. This is used as the ideal resolution
110
+ * when starting camera streams. If a camera doesn't support the specified resolution,
111
+ * the camera will automatically fall back to the next lower supported resolution in this order:
112
+ * 4k → 1080p → 720p. The actual resolution used may differ from this setting based on
113
+ * camera capabilities and system constraints.
98
114
  */
99
115
  get resolution(): "720p" | "1080p" | "4k";
100
116
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CameraManager.d.ts","sourceRoot":"","sources":["../../src/core/CameraManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAQnE,OAAO,EAGL,kBAAkB,IAAI,KAAK,EAC5B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EACL,cAAc,EAGd,8BAA8B,EAC/B,MAAM,uBAAuB,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,SAAS,KACb,UAAU,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;AAExC;;;;;GAKG;AACH,KAAK,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,GAAG,SAAS,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAEE,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,GACD;IAEE,eAAe,EAAE,YAAY,GAAG,SAAS,CAAC;IAC1C,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,GACD;IAEE,eAAe,EAAE,UAAU,CAAC;IAC5B,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,GACD;IAEE,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,eAAe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B;;OAEG;IACH,UAAU;IAYV;;OAEG;IACH,aAAa;IAmIb;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,OAAO;IAyBjC;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,KAAK,CAAC,SAAS,CAAmB;IAEpD;;;;OAIG;IACH,QAAQ,EAAE,OAAO,KAAK,CAAC,QAAQ,CAAkB;IAEjD;;OAEG;IACH,KAAK;CAMN"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright (c) 2025 Microblink Ltd. All rights reserved.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=CameraManager.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CameraManager.test.d.ts","sourceRoot":"","sources":["../../src/core/CameraManager.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -139,13 +139,20 @@ export declare class CameraManager {
139
139
  */
140
140
  constructor(options?: Partial<CameraManagerOptions>, videoFrameProcessorOptions?: VideoFrameProcessorInitOptions);
141
141
  /**
142
- * Sets the resolution of the camera stream.
142
+ * Sets the desired video resolution for camera streams. This is used as the ideal resolution
143
+ * when starting camera streams. If a camera doesn't support the specified resolution,
144
+ * the camera will automatically fall back to the next lower supported resolution in this order:
145
+ * 4k → 1080p → 720p. If there's an active stream, it will be restarted with the new resolution.
143
146
  *
144
- * @param resolution - The resolution to set.
147
+ * @param resolution - The ideal resolution to set for camera streams.
145
148
  */
146
149
  setResolution: (resolution: VideoResolutionName) => Promise<void>;
147
150
  /**
148
- * The resolution of the camera stream.
151
+ * The desired video resolution for camera streams. This is used as the ideal resolution
152
+ * when starting camera streams. If a camera doesn't support the specified resolution,
153
+ * the camera will automatically fall back to the next lower supported resolution in this order:
154
+ * 4k → 1080p → 720p. The actual resolution used may differ from this setting based on
155
+ * camera capabilities and system constraints.
149
156
  */
150
157
  get resolution(): "720p" | "1080p" | "4k";
151
158
  /**
@@ -290,10 +297,19 @@ export declare type CameraManagerComponent = {
290
297
  * Options for the CameraManager.
291
298
  *
292
299
  * @param mirrorFrontCameras - If true, front-facing cameras will be mirrored horizontally when started.
300
+ * @param preferredResolution - The desired video resolution for camera streams. This is used as the ideal resolution when starting camera streams. If a camera doesn't support the specified resolution, the camera will automatically fall back to the next lower supported resolution in this order: 4k → 1080p → 720p.
293
301
  */
294
302
  export declare type CameraManagerOptions = {
295
303
  /** If true, the camera stream will be mirrored horizontally when started. */
296
304
  mirrorFrontCameras: boolean;
305
+ /**
306
+ * The desired video resolution for camera streams. This is used as the ideal resolution
307
+ * when starting camera streams. If a camera doesn't support the specified resolution,
308
+ * the camera will automatically fall back to the next lower supported resolution in this order:
309
+ * 4k → 1080p → 720p. The actual resolution used may differ from this setting based on
310
+ * camera capabilities and system constraints.
311
+ */
312
+ preferredResolution: VideoResolutionName;
297
313
  };
298
314
 
299
315
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CaptureScreen.d.ts","sourceRoot":"","sources":["../../src/ui/CaptureScreen.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,SAAS,EAOV,MAAM,UAAU,CAAC;AAwBlB;;GAEG;AACH,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAsK3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,SA4DpC,CAAC"}
1
+ {"version":3,"file":"CaptureScreen.d.ts","sourceRoot":"","sources":["../../src/ui/CaptureScreen.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,SAAS,EAOV,MAAM,UAAU,CAAC;AAwBlB;;GAEG;AACH,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAkL3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,SA4DpC,CAAC"}