@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/dist/camera-manager.js +1398 -2149
- package/package.json +1 -1
- package/types/core/CameraManager.d.ts +19 -3
- package/types/core/CameraManager.d.ts.map +1 -1
- package/types/core/CameraManager.test.d.ts +5 -0
- package/types/core/CameraManager.test.d.ts.map +1 -0
- package/types/index.rollup.d.ts +19 -3
- package/types/ui/CaptureScreen.d.ts.map +1 -1
- package/dist/camera-manager.js.map +0 -1
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
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,M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,uBAAuB,CAAC,oBAAoB,EAAE,oBAAoB;IAKlE;;OAEG;IACH,mBAAmB;IASnB;;;;OAIG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM;IA0DjC;;;;OAIG;IACG,oBAAoB;IAuE1B;;;;OAIG;IACG,aAAa;IAuFnB;;;;OAIG;IACH,iBAAiB,sBAUf;IAkHF;;;;;;OAMG;IACG,iBAAiB,CAAC,MAAM,GAAE,wBAA6B;IA0B7D;;OAEG;IACH,gBAAgB;IAMhB;;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 @@
|
|
|
1
|
+
{"version":3,"file":"CameraManager.test.d.ts","sourceRoot":"","sources":["../../src/core/CameraManager.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/types/index.rollup.d.ts
CHANGED
|
@@ -139,13 +139,20 @@ export declare class CameraManager {
|
|
|
139
139
|
*/
|
|
140
140
|
constructor(options?: Partial<CameraManagerOptions>, videoFrameProcessorOptions?: VideoFrameProcessorInitOptions);
|
|
141
141
|
/**
|
|
142
|
-
* Sets the resolution
|
|
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
|
|
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,
|
|
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"}
|