Open elirichey opened 2 years ago
I think such an API makes more sense:
const recorder = await camera.current.prepareRecorder()
await recorder.start()
await recorder.pause()
console.log(recorder.duration)
await recorder.resume()
await recorder.stop()
..exposed as a HostObject using JSI. That way you can also prepare the recorder beforehand to warm it up.
Started working on something here: https://github.com/mrousavy/react-native-vision-camera/pull/2194
as of now this doesn't really work, but we'll see what we can do
What feature or enhancement are you suggesting?
Hey Marc, this package is amazing and I appreciate all the time and effort you've put into it!
I noticed this in your ToDo file:
startRecording()
async. Due to NativeModules limitations, we can only have either one callback or one promise in a native function. ForstartRecording()
we need both, since you probably also want to catch any errors that occurred during astartRecording()
call (or wait until the recording has actually started, since this can also take some time)Any thoughts on when this might be completed? I'm trying to get an accurate timestamp from when video recording actually starts. Without it being async, the timestamps are off by about 1.3-1.6 seconds in iOS. Android seems to be off by 0.3-0.4 seconds.
I tested iOS on an iPhone 6 and Android on a Galaxy S10 5G
Thanks again,
Eli
What Platforms whould this feature/enhancement affect?
iOS, Android
Alternatives/Workarounds
I'm currently testing on a couple of devices to see if I can find a standard offset. Considering I'm still fact-finding I don't have any exact answers. Though, I imagine this approach will be fruitless. Hard-coding offsets doesn't seam like a viable solution, but I'm going to try it anyway.
Additional information