@capgo/camera-preview 8.0.13 → 8.0.14

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.
@@ -2759,7 +2759,8 @@ public class CameraXView implements LifecycleOwner, LifecycleObserver {
2759
2759
  // Determine current position based on session config and flip it
2760
2760
  String currentPosition = sessionConfig.getPosition();
2761
2761
  String newPosition = "front".equals(currentPosition) ? "rear" : "front";
2762
-
2762
+ // Maintain centered config
2763
+ boolean wasCentered = sessionConfig.isCentered();
2763
2764
  Log.d(TAG, "flipCamera: Switching from " + currentPosition + " to " + newPosition);
2764
2765
 
2765
2766
  sessionConfig = new CameraSessionConfiguration(
@@ -2782,6 +2783,8 @@ public class CameraXView implements LifecycleOwner, LifecycleObserver {
2782
2783
  sessionConfig.isVideoModeEnabled() // enableVideoMode
2783
2784
  );
2784
2785
 
2786
+ sessionConfig.setCentered(wasCentered);
2787
+
2785
2788
  // Clear current device ID to force position-based selection
2786
2789
  currentDeviceId = null;
2787
2790
 
@@ -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.13"
37
+ private let pluginVersion: String = "8.0.14"
38
38
  public let identifier = "CameraPreviewPlugin"
39
39
  public let jsName = "CameraPreview"
40
40
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/camera-preview",
3
- "version": "8.0.13",
3
+ "version": "8.0.14",
4
4
  "description": "Camera preview",
5
5
  "license": "MPL-2.0",
6
6
  "repository": {