capacitor-camera-view 3.0.0 → 3.0.2
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.
|
@@ -97,13 +97,18 @@ extension CameraViewManager {
|
|
|
97
97
|
// MARK: - Capture Orientation
|
|
98
98
|
|
|
99
99
|
/// Applies the correct rotation to a capture output connection (photo,
|
|
100
|
-
/// sample, or movie) so captured media matches the
|
|
100
|
+
/// sample, or movie) so captured media matches what the preview shows.
|
|
101
101
|
internal func applyCaptureOrientation(to connection: AVCaptureConnection) {
|
|
102
102
|
if #available(iOS 17.0, *) {
|
|
103
103
|
// A nil coordinator only happens for a capture racing session
|
|
104
104
|
// teardown; leaving the connection at its default angle is harmless.
|
|
105
105
|
guard let coordinator = rotationCoordinator else { return }
|
|
106
|
-
|
|
106
|
+
|
|
107
|
+
// A detached preview layer makes the coordinator report a preview angle of 0.
|
|
108
|
+
let angle = videoPreviewLayer.superlayer == nil
|
|
109
|
+
? coordinator.videoRotationAngleForHorizonLevelCapture
|
|
110
|
+
: coordinator.videoRotationAngleForHorizonLevelPreview
|
|
111
|
+
|
|
107
112
|
if connection.isVideoRotationAngleSupported(angle) {
|
|
108
113
|
connection.videoRotationAngle = angle
|
|
109
114
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-camera-view",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "A Capacitor plugin for embedding a live camera feed directly into your app.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"prepublishOnly": "pnpm run build"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@capacitor/android": "^8.
|
|
67
|
-
"@capacitor/core": "^8.
|
|
66
|
+
"@capacitor/android": "^8.5.1",
|
|
67
|
+
"@capacitor/core": "^8.5.1",
|
|
68
68
|
"@capacitor/docgen": "^0.3.1",
|
|
69
|
-
"@capacitor/ios": "^8.
|
|
69
|
+
"@capacitor/ios": "^8.5.1",
|
|
70
70
|
"@commitlint/config-conventional": "^20.5.0",
|
|
71
71
|
"@ionic/prettier-config": "^4.0.0",
|
|
72
72
|
"@ionic/swiftlint-config": "^2.0.0",
|