Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1894,8 +1894,8 @@ private void startRecordingInternal() {
try {
cameraCaptureSession.setRepeatingRequest(previewBuilder.build(), null, backgroundHandler);

// Add small delay to ensure camera surface is connected and first frames are captured
// This helps prevent audio-only recordings
// Add delay to ensure camera surface is connected, first frames are captured,
// and auto-exposure has time to stabilize (prevents dark initial frames)
backgroundHandler.postDelayed(() -> {
try {
if (cameraCaptureSession == null || recorderSurface == null || !recorderSurface.isValid()) {
Expand Down Expand Up @@ -1932,7 +1932,7 @@ public void run() {
notifyVideoError(currentVideoId, "Failed to start recording: " + e.getMessage());
isRecording = false;
}
}, 100); // 100ms delay to ensure surface is ready
}, 300); // 300ms delay to ensure surface is ready and auto-exposure stabilizes
} catch (CameraAccessException | IllegalStateException e) {
Log.e(TAG, "Failed to start video recording", e);
notifyVideoError(currentVideoId, "Failed to start recording: " + e.getMessage());
Expand Down
Loading