tfjs
tfjs copied to clipboard
[React-Native] recordAsync() causes video to freeze and does not record or apply pose
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 22
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: iPhone SE
- TensorFlow.js installed from (npm or script link): npm
- TensorFlow.js version (use command below): ^3.18.0
Describe the current behavior
cameraRef.current.camera.recordAsync() causes video to freeze and app to crash
Describe the expected behavior I am needing to record the video as the pose is being detected
Standalone code to reproduce the issue
My camera file pretty much resembles this example. I have added in a couple functions that are unrelated to the camera recording and overall pose estimation. I have tried adding in recordAsync() to multiple areas such as in its own function, inside handleCameraStream() and within a button for onPress. All produced the same result of freezing and crashing.