@capgo/camera-preview 8.0.14 → 8.1.0
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 +1 -0
- package/android/src/main/java/app/capgo/capacitor/camera/preview/CameraPreview.java +13 -1
- package/android/src/main/java/app/capgo/capacitor/camera/preview/CameraXView.java +42 -10
- package/android/src/main/java/app/capgo/capacitor/camera/preview/model/CameraSessionConfiguration.java +8 -1
- package/dist/docs.json +24 -0
- package/dist/esm/definitions.d.ts +9 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +2 -0
- package/dist/esm/web.js +54 -3
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +54 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +54 -3
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapgoCameraPreviewPlugin/CameraController.swift +75 -29
- package/ios/Sources/CapgoCameraPreviewPlugin/Plugin.swift +6 -2
- package/package.json +1 -1
|
@@ -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 = "8.0
|
|
37
|
+
private let pluginVersion: String = "8.1.0"
|
|
38
38
|
public let identifier = "CameraPreviewPlugin"
|
|
39
39
|
public let jsName = "CameraPreview"
|
|
40
40
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
@@ -655,6 +655,7 @@ public class CameraPreview: CAPPlugin, CAPBridgedPlugin, CLLocationManagerDelega
|
|
|
655
655
|
print(" - initialZoomLevel: \(call.getFloat("initialZoomLevel") ?? 1.0)")
|
|
656
656
|
print(" - disableFocusIndicator: \(call.getBool("disableFocusIndicator") ?? false)")
|
|
657
657
|
print(" - force: \(call.getBool("force") ?? false)")
|
|
658
|
+
print(" - videoQuality: \(call.getString("videoQuality") ?? "high")")
|
|
658
659
|
|
|
659
660
|
let force = call.getBool("force") ?? false
|
|
660
661
|
|
|
@@ -752,6 +753,9 @@ public class CameraPreview: CAPPlugin, CAPBridgedPlugin, CLLocationManagerDelega
|
|
|
752
753
|
self.positioning = call.getString("positioning") ?? "top"
|
|
753
754
|
self.disableFocusIndicator = call.getBool("disableFocusIndicator") ?? false
|
|
754
755
|
|
|
756
|
+
// Default to high if not provided
|
|
757
|
+
let videoQuality = call.getString("videoQuality") ?? "high"
|
|
758
|
+
|
|
755
759
|
let initialZoomLevel = call.getFloat("initialZoomLevel")
|
|
756
760
|
|
|
757
761
|
// Check for conflict between aspectRatio and size (width/height)
|
|
@@ -772,7 +776,7 @@ public class CameraPreview: CAPPlugin, CAPBridgedPlugin, CLLocationManagerDelega
|
|
|
772
776
|
return
|
|
773
777
|
}
|
|
774
778
|
|
|
775
|
-
self.cameraController.prepare(cameraPosition: self.cameraPosition, deviceId: deviceId, disableAudio: self.disableAudio, cameraMode: cameraMode, aspectRatio: self.aspectRatio, initialZoomLevel: initialZoomLevel, disableFocusIndicator: self.disableFocusIndicator) { error in
|
|
779
|
+
self.cameraController.prepare(cameraPosition: self.cameraPosition, deviceId: deviceId, disableAudio: self.disableAudio, cameraMode: cameraMode, aspectRatio: self.aspectRatio, initialZoomLevel: initialZoomLevel, disableFocusIndicator: self.disableFocusIndicator, videoQuality: videoQuality) { error in
|
|
776
780
|
if let error = error {
|
|
777
781
|
print(error)
|
|
778
782
|
DispatchQueue.main.async {
|