react-native-rectangle-doc-scanner 3.215.0 → 3.216.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,14 +157,11 @@ class CameraController(
|
|
|
157
157
|
|
|
158
158
|
val rotation = previewView.display?.rotation ?: Surface.ROTATION_0
|
|
159
159
|
|
|
160
|
-
// Build Preview
|
|
160
|
+
// Build Preview with PERFORMANCE mode
|
|
161
161
|
preview = Preview.Builder()
|
|
162
162
|
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
|
|
163
163
|
.setTargetRotation(rotation)
|
|
164
164
|
.build()
|
|
165
|
-
.also {
|
|
166
|
-
it.setSurfaceProvider(previewView.surfaceProvider)
|
|
167
|
-
}
|
|
168
165
|
|
|
169
166
|
// Build ImageAnalysis
|
|
170
167
|
imageAnalysis = ImageAnalysis.Builder()
|
|
@@ -191,10 +188,14 @@ class CameraController(
|
|
|
191
188
|
preview,
|
|
192
189
|
imageAnalysis
|
|
193
190
|
)
|
|
191
|
+
|
|
192
|
+
// Set surface provider AFTER binding to avoid timeout
|
|
193
|
+
preview?.setSurfaceProvider(previewView.surfaceProvider)
|
|
194
|
+
|
|
194
195
|
analysisBound = true
|
|
195
|
-
Log.d(TAG, "[CAMERAX] Camera and analysis bound successfully")
|
|
196
|
+
Log.d(TAG, "[CAMERAX-FIX] Camera and analysis bound successfully in ONE call")
|
|
196
197
|
} catch (e: Exception) {
|
|
197
|
-
Log.e(TAG, "[CAMERAX] Failed to bind camera use cases", e)
|
|
198
|
+
Log.e(TAG, "[CAMERAX-FIX] Failed to bind camera use cases", e)
|
|
198
199
|
analysisBound = false
|
|
199
200
|
}
|
|
200
201
|
}
|
package/package.json
CHANGED