react-native-rectangle-doc-scanner 10.10.0 → 10.11.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.
@@ -123,18 +123,16 @@ class CameraController(
123
123
  request.resolution.height
124
124
  )
125
125
  val surface = Surface(surfaceTexture)
126
- request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
127
- Log.d(TAG, "[CAMERAX] Surface provided - result: ${result.resultCode}")
128
126
 
129
- // Apply transform to correct orientation
130
- textureView.post {
131
- updateTextureViewTransform(
132
- request.resolution.width,
133
- request.resolution.height
134
- )
135
- }
127
+ // Apply transform BEFORE providing surface
128
+ updateTextureViewTransform(
129
+ request.resolution.width,
130
+ request.resolution.height
131
+ )
136
132
 
137
- surface.release()
133
+ request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
134
+ Log.d(TAG, "[CAMERAX] Surface provided - result: ${result.resultCode}")
135
+ // Don't release surface - let CameraX manage it
138
136
  }
139
137
  } else {
140
138
  Log.e(TAG, "[CAMERAX] SurfaceTexture is null! Waiting for TextureView to be ready...")
@@ -144,18 +142,16 @@ class CameraController(
144
142
  Log.d(TAG, "[CAMERAX] SurfaceTexture now available ($width x $height)")
145
143
  st.setDefaultBufferSize(request.resolution.width, request.resolution.height)
146
144
  val surface = Surface(st)
147
- request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
148
- Log.d(TAG, "[CAMERAX] Surface provided (delayed) - result: ${result.resultCode}")
149
145
 
150
- // Apply transform to correct orientation
151
- textureView.post {
152
- updateTextureViewTransform(
153
- request.resolution.width,
154
- request.resolution.height
155
- )
156
- }
146
+ // Apply transform BEFORE providing surface
147
+ updateTextureViewTransform(
148
+ request.resolution.width,
149
+ request.resolution.height
150
+ )
157
151
 
158
- surface.release()
152
+ request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
153
+ Log.d(TAG, "[CAMERAX] Surface provided (delayed) - result: ${result.resultCode}")
154
+ // Don't release surface - let CameraX manage it
159
155
  }
160
156
  }
161
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "10.10.0",
3
+ "version": "10.11.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",