react-native-rectangle-doc-scanner 3.193.0 → 3.194.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.
@@ -119,11 +119,9 @@ class CameraController(
119
119
 
120
120
  val targetRotation = previewView.display?.rotation ?: Surface.ROTATION_0
121
121
 
122
- // Preview use case
122
+ // Preview use case (avoid forcing a size to let CameraX pick a compatible stream)
123
123
  Log.d(TAG, "[BIND] Creating Preview use case...")
124
124
  val preview = Preview.Builder()
125
- // Use a modest fixed size to avoid stream configuration timeouts on some devices.
126
- .setTargetResolution(Size(960, 720))
127
125
  .setTargetRotation(targetRotation)
128
126
  .build()
129
127
  Log.d(TAG, "[BIND] Preview created: $preview")
@@ -77,8 +77,8 @@ class DocumentScannerView(context: ThemedReactContext) : FrameLayout(context), L
77
77
  previewView = PreviewView(context).apply {
78
78
  layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
79
79
  scaleType = PreviewView.ScaleType.FILL_CENTER
80
- // Use PERFORMANCE (SurfaceView) - more reliable for camera preview
81
- implementationMode = PreviewView.ImplementationMode.PERFORMANCE
80
+ // Use COMPATIBLE (TextureView) to avoid SurfaceView black frames on some devices.
81
+ implementationMode = PreviewView.ImplementationMode.COMPATIBLE
82
82
  visibility = View.VISIBLE
83
83
  keepScreenOn = true
84
84
  // Force view to be drawn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.193.0",
3
+ "version": "3.194.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",