Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add custom path for takePhoto/takeSnapshot/startRecording #3103

Merged
merged 13 commits into from
Jul 29, 2024

Conversation

mrousavy
Copy link
Owner

@mrousavy mrousavy commented Jul 25, 2024

What

  1. Adds a path property to allow customizing the location where photos, snapshots and videos will be saved to. By default, this remains the temporary directory. If this is inside the temp directory, files will be deleted once the app closes. Otherwise, files will not be deleted by VisionCamera.
  2. This fixes an issue where takeSnapshot ignored the quality parameter on iOS. Now it works, and can properly compress the JPG.
  3. If you tried to pass flash when a device didn't support flash, takePhoto will now also throw an error on iOS (just like on Android)

Changes

Tested on

Related issues

Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 9:19am

@mrousavy
Copy link
Owner Author

done! :)

@mrousavy
Copy link
Owner Author

I can confirm iOS works - both for photos and videos. Just saved a video to the document directory and a photo to the caches directory. Works perfectly fine :)

@mrousavy
Copy link
Owner Author

Android also works! LGTM! :) 🚀

@mrousavy
Copy link
Owner Author

(tested with react-native-fs all the options that they have in the directories)

@mrousavy mrousavy merged commit 2ab7458 into main Jul 29, 2024
13 checks passed
@mrousavy mrousavy deleted the feat/save-path branch July 29, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Add record / save path
1 participant