-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
What's happening?
When pausing a video recording, switching the camera (e.g., from back to front via the device prop), and then resuming the recording, there is noticeable audio lag/desync in the final video output. The video resumes smoothly, but the audio appears delayed by 1-3 seconds (depending on device), causing misalignment between sound and visuals. This occurs consistently on physical devices and disrupts user experience for apps requiring seamless multi-camera recordings (e.g., video calls or tutorials).
This seems related to the camera session reinitialization during the switch, which may interrupt or flush audio buffers/timestamps even in a paused state. No errors are thrown in logs, but the output video plays with offset audio.
Reproduceable Code
<Camera
ref={camRef}
device={frontMode ? front : back}
isActive={isFocused}
torch={isTorchOn === true ? 'on' : 'off'}
video={true}
audio={true}
focusable={true}
format={format}
enableZoomGesture={true}
style={StyleSheet.absoluteFill}
/>Relevant log output
We have Visual bug, just lags in soundCamera Device
{
"videoStabilizationModes": [
"off",
"cinematic",
"cinematic-extended"
],
"autoFocusSystem": "contrast-detection",
"photoWidth": 3264,
"supportsPhotoHdr": false,
"supportsDepthCapture": false,
"maxISO": 3918,
"minISO": 41,
"minFps": 15,
"videoWidth": 1280,
"supportsVideoHdr": true,
"videoHeight": 720,
"fieldOfView": 86.45470190505881,
"maxFps": 30,
"phDevice
Android Pixel 7 Pro, but can be on any device
VisionCamera Version
4.7.2
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this project's Code of Conduct
- I searched for similar issues in this repository and found none.