@capgo/camera-preview 7.24.9 → 7.24.11
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/README.md
CHANGED
|
@@ -18,6 +18,21 @@
|
|
|
18
18
|
<p>
|
|
19
19
|
Capacitor plugin that allows camera interaction from Javascript and HTML<br>(based on cordova-plugin-camera-preview).
|
|
20
20
|
</p>
|
|
21
|
+
|
|
22
|
+
## Why Camera Preview?
|
|
23
|
+
|
|
24
|
+
A **free**, **fully-featured** alternative to paid camera plugins, built for maximum flexibility and performance:
|
|
25
|
+
|
|
26
|
+
- **Complete UI control** - Build your own camera interface with HTML/JS overlays instead of native constraints
|
|
27
|
+
- **Full hardware access** - Manual focus, zoom, exposure controls, flash modes, multiple cameras
|
|
28
|
+
- **Video recording** - Record with custom settings, no arbitrary limitations
|
|
29
|
+
- **Universal device support** - Tested across hundreds of Android and iOS devices
|
|
30
|
+
- **Performance optimized** - Direct camera stream access, efficient memory usage
|
|
31
|
+
- **Modern package management** - Supports both Swift Package Manager (SPM) and CocoaPods (SPM-ready for Capacitor 8)
|
|
32
|
+
- **Same JavaScript API** - Compatible interface with paid alternatives
|
|
33
|
+
|
|
34
|
+
Unlike restrictive paid plugins, you get full camera control to build exactly the experience you want - from QR scanners to professional video apps.
|
|
35
|
+
|
|
21
36
|
<br>
|
|
22
37
|
|
|
23
38
|
This plugin is compatible Capacitor 7 and above.
|
|
@@ -427,6 +427,11 @@ public class CameraPreview extends Plugin implements CameraXView.CameraXViewList
|
|
|
427
427
|
call.reject("flashMode required parameter is missing");
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
|
+
|
|
431
|
+
if (cameraXView == null || !cameraXView.isRunning()) {
|
|
432
|
+
call.reject("Camera is not running");
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
430
435
|
cameraXView.setFlashMode(flashMode);
|
|
431
436
|
call.resolve();
|
|
432
437
|
}
|
|
@@ -34,7 +34,7 @@ extension UIWindow {
|
|
|
34
34
|
*/
|
|
35
35
|
@objc(CameraPreview)
|
|
36
36
|
public class CameraPreview: CAPPlugin, CAPBridgedPlugin, CLLocationManagerDelegate {
|
|
37
|
-
private let pluginVersion: String = "7.24.
|
|
37
|
+
private let pluginVersion: String = "7.24.11"
|
|
38
38
|
public let identifier = "CameraPreviewPlugin"
|
|
39
39
|
public let jsName = "CameraPreview"
|
|
40
40
|
public let pluginMethods: [CAPPluginMethod] = [
|