react-native-rectangle-doc-scanner 3.174.0 → 3.175.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.
@@ -145,6 +145,7 @@ class CameraController(
145
145
  Log.d(TAG, "[BIND] PreviewView.surfaceProvider: ${previewView.surfaceProvider}")
146
146
  Log.d(TAG, "[BIND] PreviewView attached to window: ${previewView.isAttachedToWindow}")
147
147
  Log.d(TAG, "[BIND] PreviewView size: ${previewView.width}x${previewView.height}")
148
+ Log.d(TAG, "[BIND] PreviewView implementationMode: ${previewView.implementationMode}")
148
149
  // Unbind all use cases before rebinding
149
150
  Log.d(TAG, "[BIND] Unbinding all existing use cases...")
150
151
  cameraProvider.unbindAll()
@@ -167,10 +168,15 @@ class CameraController(
167
168
  Log.d(TAG, "[BIND] Setting surface provider to previewView...")
168
169
  Log.d(TAG, "[BIND] PreviewView: $previewView")
169
170
  Log.d(TAG, "[BIND] PreviewView.surfaceProvider: ${previewView.surfaceProvider}")
170
- // Devices with the SurfaceOrderQuirk expect the preview surface to be set last.
171
- // Apply the SurfaceProvider after binding so the preview stays on top.
172
- preview.setSurfaceProvider(previewView.surfaceProvider)
173
- Log.d(TAG, "[BIND] Surface provider set successfully")
171
+ // TextureView(Compatibility) 모드에서는 SurfaceProvider를 먼저 지정해도 순서 문제가 없다.
172
+ // PERFORMANCE 모드(SurfaceView)에서는 SurfaceOrderQuirk 대응을 위해 바인딩 이후에 지정한다.
173
+ if (previewView.implementationMode == PreviewView.ImplementationMode.COMPATIBLE) {
174
+ preview.setSurfaceProvider(previewView.surfaceProvider)
175
+ Log.d(TAG, "[BIND] Surface provider set immediately (COMPATIBLE mode)")
176
+ } else {
177
+ preview.setSurfaceProvider(previewView.surfaceProvider)
178
+ Log.d(TAG, "[BIND] Surface provider set after binding (PERFORMANCE mode)")
179
+ }
174
180
 
175
181
  // Restore torch state if it was enabled
176
182
  if (torchEnabled) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.174.0",
3
+ "version": "3.175.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",