react-native-rectangle-doc-scanner 3.227.0 → 3.228.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.
@@ -10,7 +10,6 @@ import android.graphics.Rect
10
10
  import android.graphics.YuvImage
11
11
  import android.util.Log
12
12
  import android.view.Surface
13
- import androidx.camera.core.AspectRatio
14
13
  import androidx.camera.core.Camera
15
14
  import androidx.camera.core.CameraSelector
16
15
  import androidx.camera.core.ImageAnalysis
@@ -189,7 +188,6 @@ class CameraController(
189
188
 
190
189
  // Build Preview without a fixed size to avoid unsupported stream configs.
191
190
  preview = Preview.Builder()
192
- .setTargetAspectRatio(AspectRatio.RATIO_4_3)
193
191
  .setTargetRotation(rotation)
194
192
  .build()
195
193
  .also {
@@ -211,8 +209,7 @@ class CameraController(
211
209
  preview
212
210
  )
213
211
 
214
- Log.d(TAG, "[CAMERAX-V9] Preview bound with 640x480 resolution")
215
- Log.d(TAG, "[CAMERAX-V9] Waiting for capture session to configure...")
212
+ Log.d(TAG, "[CAMERAX-V9] Preview bound, waiting for capture session to configure...")
216
213
 
217
214
  // Log session state after some time
218
215
  android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
@@ -78,8 +78,8 @@ 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
- // SurfaceView path is more stable on some devices during session config.
82
- implementationMode = PreviewView.ImplementationMode.PERFORMANCE
81
+ // TextureView mode avoids some device-specific Camera2 session timeouts.
82
+ implementationMode = PreviewView.ImplementationMode.COMPATIBLE
83
83
  scaleType = PreviewView.ScaleType.FILL_CENTER
84
84
  }
85
85
  Log.d(TAG, "[INIT] PreviewView created: $previewView")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.227.0",
3
+ "version": "3.228.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",