startSession method

Future<void> startSession(
  1. String setupFailedError
)

Implementation

Future<void> startSession(String setupFailedError) async {
  if (state.cameraState != CameraState.ready && !_setupAttempted) {
    await _initializeCamera(setupFailedError);
  }

  try {
    final controller = _ref.read(cameraControllerProvider);
    if (controller != null && !controller.value.isRecordingVideo) {
      await startVideoRecording();
    }
  } catch (e) {
    // Handle error silently
  }
}