-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
done! :) |
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 :) |
Android also works! LGTM! :) 🚀 |
(tested with react-native-fs all the options that they have in the directories) |
isaaccolson
pushed a commit
to isaaccolson/deliveries-mobile
that referenced
this pull request
Oct 30, 2024
…g` (mrousavy#3103) * feat: Add custom `path` for `takePhoto`/`takeSnapshot`/`startRecording` * feat: Implement custom `path` for iOS * chore: Parse strongly typed * Update Flash.swift * feat: Add `path` for `takePhoto` on Android * feat: Throw error if flash is not available on iOS * feat: Support `path` for `takeSnapshot` on Android * feat: Support `path` for `startRecording` on Android * fix: Move logic into `OutputFile` to allow deletion if it is a temp file * fix: Make file URL parsing more solid * fix: Fix video file type * Update MediaPage.tsx * fix: Don't look for directories
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
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.takeSnapshot
ignored thequality
parameter on iOS. Now it works, and can properly compress the JPG.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