Comments (5)
In 3.9.2 as well??
Can you please put the full adb logcat
logs here? I need to know what gets called before the error is thrown
from react-native-vision-camera.
Wait - you're not using useCameraPermission()
? You need to do that. It's the first step in the docs.
from react-native-vision-camera.
I've removed it for the purpose of the test, I thought the error was from useCameraPermission(), but after removing it, I still get it.
Here's my code with useCameraPermission()
const Camera = () => {
const { hasPermission, requestPermission } = useCameraPermission();
const cameraRef = useRef<any>(null);
const [cameraState, setCameraState] = useState<"back" | "front">("back");
const device = useCameraDevice(cameraState);
useEffect(() => {
if(!hasPermission) {
requestPermission();
}
}, [])
if (!device) {
return (
<View>
<Text>No camera device</Text>
</View>
)
}
return (
<SafeAreaView style={{ flex: 1 }}>
<Camera
ref={cameraRef}
style={StyleSheet.absoluteFill}
device={device}
isActive={true}
photo={true}
video={true}
audio={false}
/>
</SafeAreaView>
)
}
export default Camera;
from react-native-vision-camera.
you shouldn't mount the camera at all if you don't have permission.
maybe I should add this to the docs explicitly as well
from react-native-vision-camera.
That make sense, it would be great if this is in docs
from react-native-vision-camera.
Related Issues (20)
- 💭 Get "Missing purpose string" Apple violation when VCEnableLocation is false HOT 3
- 💭 onIitialized only work when the isActive once. HOT 2
- 🐛 onOutputOrientationChanged outputs wrong value on tablets HOT 7
- ✨ Hello author, can you add a cropping function after taking the photo? HOT 3
- 🐛 system/camera-is-restricted Camera functionality is not available because it has been restricted by the operating system, possibly due to a device policy. HOT 5
- 💭 Question: Implementing Virtual Background and AR Try-On Glasses with Frame Processing HOT 2
- 💭 CodeScanner does not recognize Data Matrix code on a black background HOT 2
- 🐛 photo.orientation is wrong when outputOrientation = preview on Android HOT 2
- 🐛 OutputOrientation: "Duplicate label in when" HOT 1
- 💭 Add filter to photo when photo is taken HOT 2
- 💭 Obtaining camera calibration data HOT 5
- 🐛 Crash in Android release build HOT 5
- 🐛 Failed to convert NativeBuffer to SkImage HOT 2
- 🔧 RCT_NEW_ARCH_ENABLED=1 failed pod install HOT 2
- 🐛 Cannot debug via Google Chrome if using Android Native method marked as synchronous HOT 2
- 🐛 Crash in iOS release build when using SkiaFrameProcessor HOT 3
- 🐛 Cached apps freezer is freezing app on Google Pixel with Android 14 HOT 6
- 🐛 App Crashes when try to implement camera inside modal. HOT 1
- 💭 iOS photo quality vs native camera HOT 4
- 🐛 RN 0.74, RNVC 4.3.2. Take a photo or snapshot on iOS, the file does not exist at the path indicated by the response HOT 10
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.