@capgo/camera-preview 7.3.2 → 7.3.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -69,18 +69,24 @@ public class CameraPreview: CAPPlugin, CAPBridgedPlugin {
|
|
|
69
69
|
var disableAudio: Bool = false
|
|
70
70
|
|
|
71
71
|
@objc func rotated() {
|
|
72
|
-
let
|
|
72
|
+
guard let previewView = self.previewView,
|
|
73
|
+
let posX = self.posX,
|
|
74
|
+
let posY = self.posY,
|
|
75
|
+
let width = self.width,
|
|
76
|
+
let heightValue = self.height else {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
let paddingBottom = self.paddingBottom ?? 0
|
|
80
|
+
let height = heightValue - paddingBottom
|
|
73
81
|
|
|
74
82
|
if UIWindow.isLandscape {
|
|
75
|
-
|
|
76
|
-
self.cameraController.previewLayer?.frame =
|
|
83
|
+
previewView.frame = CGRect(x: posY, y: posX, width: max(height, width), height: min(height, width))
|
|
84
|
+
self.cameraController.previewLayer?.frame = previewView.frame
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
if UIWindow.isPortrait {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
self.cameraController.previewLayer?.frame = self.previewView.frame
|
|
88
|
+
previewView.frame = CGRect(x: posX, y: posY, width: min(height, width), height: max(height, width))
|
|
89
|
+
self.cameraController.previewLayer?.frame = previewView.frame
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
if let connection = self.cameraController.fileVideoOutput?.connection(with: .video) {
|