@momo-kits/camerakit 0.158.1-beta.2 → 0.158.1-sp.1
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.
|
@@ -110,13 +110,17 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega
|
|
|
110
110
|
|
|
111
111
|
// Setup the capture session with priority on basic video preview first
|
|
112
112
|
sessionQueue.async {
|
|
113
|
+
// Set session preset before configuring inputs/outputs to avoid
|
|
114
|
+
// race conditions that can reset metadata output types (iPhone 11 issue)
|
|
115
|
+
self.session.sessionPreset = .photo
|
|
116
|
+
|
|
113
117
|
self.setupResult = self.setupBasicVideoInput(cameraType: cameraType)
|
|
114
118
|
|
|
115
119
|
if self.setupResult == .success {
|
|
116
|
-
self.session.startRunning()
|
|
117
|
-
|
|
118
120
|
self.setupAdditionalOutputs(supportedBarcodeType: supportedBarcodeType)
|
|
119
121
|
|
|
122
|
+
self.session.startRunning()
|
|
123
|
+
|
|
120
124
|
self.addObservers()
|
|
121
125
|
|
|
122
126
|
self.update(torchMode: self.torchMode)
|
|
@@ -125,7 +129,6 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega
|
|
|
125
129
|
DispatchQueue.main.async {
|
|
126
130
|
self.cameraPreview.session = self.session
|
|
127
131
|
self.cameraPreview.previewLayer.videoGravity = .resizeAspectFill
|
|
128
|
-
self.session.sessionPreset = .photo
|
|
129
132
|
self.setVideoOrientationToInterfaceOrientation()
|
|
130
133
|
}
|
|
131
134
|
}
|