feat: support for the torch control and returns torch timestamps on `onRecordingFinished` callback.
What
This PR adds support for the torch and returns torch timestamps on onRecordingFinished callback.
Changes
This PR added new props metadata to capture torch timestamps data on onRecordingFinished callback and adds a new props torchControl
torchControl={{ torchDuration: 5, torchDelay: 2 }}
Tested on
- iPhone 11 Pro, iOS 15
- iPhone 12, iOS 15
- iPhone 13 Pro Max, iOS 15
Related issues
nope
Hi, thanks for your PR! This looks very interesting, although the API is a bit weird and looks very hardcoded. Is there a way to also get that behaviour on android? Can we alternatively maybe have an imperative API? Why can't the user just set state to toggle torch on or off and does all the timing logic in JS?
- We don't have that behavior on android yet.
- Yes, we can make an imperative API for that functionality.
- about using the state to toggle, actually, we did, we also measured the time start recording call and the time starts recording actually do their action. we think to pass a prop to control the torch and let start recording functions using it for a better approach for our case.
@mrousavy Could you please approve running workflows?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-native-vision-camera | ❌ Failed (Inspect) | Aug 28, 2023 6:05am |
Hey thanks for your PR and sorry for the long radio silence. sorry but I don't think the internal state makes sense here.