Cade Scanner doesn't scan codes on the left side of screen❓
Question
I update my react-native app: react-native 0.69.1 -> 0.72 react-native-vision-camera 2.14.1 -> 3.6.12
Before updates I use vision-camera-code-scanner for scanning barcodes and scanner scan barcodes on full screen (and the issue was to create custom reaction zone) But after update the I set the regionOfInterest and it's not work. Also I found that on the left side of the screen zone where scanner not work (not matter use regionOfInterest or not)
The device.sensorOrientation landscape-right The screen orientation portrait
Use Android Emulator - Pixel_4_API_34
P.S. regionOfInterest - not work
in red not scanned zone
What I tried
I tried to set the orientation in props of Camera not help. The start position of screen in top left side but start position of camera frame is top right side.
Frame: {"height": 720, "width": 1280}
Code usage:
const codeScanner = useCodeScanner({
codeTypes: [
'code-128',
'code-39',
'code-93',
'codabar',
'ean-13',
'ean-8',
'itf',
'upc-e',
'qr',
'pdf-417',
'aztec',
'data-matrix',
],
onCodeScanned: (codes, frame) => {
console.log('🚀 ~ ScanBarcode ~ frame:', frame);
console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
console.log('codes', codes.length);
console.log('code', codes?.[0]);
console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
},
regionOfInterest: {
x: layoutPosition.x,
y: layoutPosition.y,
width: layoutPosition.width,
height: layoutPosition.height,
},
});
<Camera
style={StyleSheet.absoluteFill}
device={device}
isActive={isFocused}
audio={false}
orientation="portrait"
codeScanner={codeScanner}
/>
VisionCamera Version
3.6.12
Additional information
- [ ] I am using Expo
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar questions in the issues page as well as in the discussions page and found none.
Still facing this issue
Hey! I think this has already been fixed. If not, feel free to re-open :)