@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.
@@ -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.14"
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/camera-preview",
3
- "version": "8.0.14",
3
+ "version": "8.1.0",
4
4
  "description": "Camera preview",
5
5
  "license": "MPL-2.0",
6
6
  "repository": {