@momo-kits/camerakit 0.150.2-beta.2 → 0.150.2-beta.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.
@@ -329,7 +329,7 @@ open class CKCamera(context: ThemedReactContext) : FrameLayout(context), Lifecyc
329
329
  val rotation = viewFinder.display.rotation
330
330
 
331
331
  viewFinder.setScaleType(resizeMode)
332
- viewFinder.setBackgroundColor(Color.WHITE)
332
+ viewFinder.setBackgroundColor(Color.BLACK)
333
333
 
334
334
  // CameraProvider
335
335
  val cameraProvider = cameraProvider
@@ -119,6 +119,7 @@ public class CameraView: UIView {
119
119
  focusInterfaceView.update(resetFocusWhenMotionDetected: resetFocusWhenMotionDetected)
120
120
  update(zoomMode: zoomMode)
121
121
 
122
+ camera.previewView.backgroundColor = .black
122
123
  addSubview(camera.previewView)
123
124
 
124
125
  addSubview(scannerInterfaceView)
@@ -88,11 +88,6 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega
88
88
  // MARK: - Public
89
89
 
90
90
  func setup(cameraType: CameraType, supportedBarcodeType: [CodeFormat]) {
91
- DispatchQueue.main.async {
92
- self.cameraPreview.session = self.session
93
- self.cameraPreview.previewLayer.videoGravity = .resizeAspectFill
94
- self.session.sessionPreset = .photo
95
- }
96
91
 
97
92
  // Setup the capture session with priority on basic video preview first
98
93
  sessionQueue.async {
@@ -109,11 +104,14 @@ class RealCamera: NSObject, CameraProtocol, AVCaptureMetadataOutputObjectsDelega
109
104
  }
110
105
 
111
106
  DispatchQueue.main.async {
107
+ self.cameraPreview.session = self.session
108
+ self.cameraPreview.previewLayer.videoGravity = .resizeAspectFill
109
+ self.session.sessionPreset = .photo
112
110
  self.setVideoOrientationToInterfaceOrientation()
113
111
  }
114
112
  }
115
113
 
116
- DispatchQueue.global(qos: .background).async {
114
+ DispatchQueue.global(qos: .utility).async {
117
115
  self.initializeMotionManager()
118
116
  }
119
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/camerakit",
3
- "version": "0.150.2-beta.2",
3
+ "version": "0.150.2-beta.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/teslamotors/react-native-camera-kit.git"