@microblink/camera-manager 7.2.3 → 7.2.4
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/ui/CaptureScreen.d.ts.map +1 -1
- package/dist/camera-manager.js.map +0 -1
- package/types/index.rollup.d.ts +0 -695
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"}
|
|
@@ -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"}
|