react-native-rectangle-doc-scanner 3.215.0 → 3.217.0
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.
|
@@ -157,7 +157,7 @@ class CameraController(
|
|
|
157
157
|
|
|
158
158
|
val rotation = previewView.display?.rotation ?: Surface.ROTATION_0
|
|
159
159
|
|
|
160
|
-
// Build Preview
|
|
160
|
+
// Build Preview and set surface provider BEFORE binding
|
|
161
161
|
preview = Preview.Builder()
|
|
162
162
|
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
|
|
163
163
|
.setTargetRotation(rotation)
|
|
@@ -183,7 +183,7 @@ class CameraController(
|
|
|
183
183
|
CameraSelector.DEFAULT_BACK_CAMERA
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
// Bind both Preview and ImageAnalysis together in
|
|
186
|
+
// Bind both Preview and ImageAnalysis together in ONE call
|
|
187
187
|
try {
|
|
188
188
|
camera = provider.bindToLifecycle(
|
|
189
189
|
lifecycleOwner,
|
|
@@ -192,9 +192,9 @@ class CameraController(
|
|
|
192
192
|
imageAnalysis
|
|
193
193
|
)
|
|
194
194
|
analysisBound = true
|
|
195
|
-
Log.d(TAG, "[CAMERAX] Camera and analysis bound successfully")
|
|
195
|
+
Log.d(TAG, "[CAMERAX-FIX-V2] Camera and analysis bound successfully")
|
|
196
196
|
} catch (e: Exception) {
|
|
197
|
-
Log.e(TAG, "[CAMERAX] Failed to bind camera use cases", e)
|
|
197
|
+
Log.e(TAG, "[CAMERAX-FIX-V2] Failed to bind camera use cases", e)
|
|
198
198
|
analysisBound = false
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -78,7 +78,7 @@ class DocumentScannerView(context: ThemedReactContext) : FrameLayout(context), L
|
|
|
78
78
|
layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
79
79
|
visibility = View.VISIBLE
|
|
80
80
|
keepScreenOn = true
|
|
81
|
-
implementationMode = PreviewView.ImplementationMode.
|
|
81
|
+
implementationMode = PreviewView.ImplementationMode.PERFORMANCE
|
|
82
82
|
scaleType = PreviewView.ScaleType.FILL_CENTER
|
|
83
83
|
}
|
|
84
84
|
Log.d(TAG, "[INIT] PreviewView created: $previewView")
|
package/package.json
CHANGED