Comments (2)
I'm guessing your code is inside a render function, so your let scannerEnabled = true
is just being redeclared and assigned every time. Try using a ref instead
const scannerEnabled = useRef(true)
...
if(!scannerEnabled.current) return
...
scannerEnabled.current = false
from react-native-vision-camera.
Yes, you can just use a Ref and decide to stop scanning inside your app's business logic. That's the caller's job, not something a Camera library should do.
from react-native-vision-camera.
Related Issues (20)
- π [Android] isActive change doesn't happen fast enough causing device/camera-already-in-use error when switching to native camera app HOT 1
- π§ Execution failed for task ':react-native-vision-camera:compileReleaseKotlin'. HOT 3
- π§ This API is provided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignment with React Native frameworks and won't be considered a breaking change. HOT 10
- π Android: Frameprocessor HOT 7
- π Focus not work HOT 1
- π Memory leak Android HOT 6
- π [iOS] Did someone manage to get to reasonable FPS with ML Kit Pose Detection (native frame processor plugin)? HOT 2
- π Lifecycle methods for native frame processors HOT 5
- π How to access GPS location tags in photo metadata? HOT 4
- π takePhoto() function working very slowly on Android HOT 3
- π§ A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction HOT 13
- π How does RNVC interact with OS camera settings? HOT 1
- π Is there a migration guide from V3 to V4? HOT 3
- π§ :react-native-vision-camera:compileDebugKotlin FAILED HOT 2
- Torch does not work on CodeScannerπ HOT 3
- π Hello, Which version of react-native-vision-camera supports RN 0.67? HOT 1
- Build failed with face-detector pluginπ§ HOT 3
- π Torch does not work on CodeScanner HOT 2
- π How to translate preview point to screen point with resizeMode contain? HOT 2
- π Error when switching front camera on iPhone HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.