3

I'm using expo-camera in my app and I've implemented it completely; The process of recording and stopping it works correctly, but when I click on stopRecording() no files are being returned; I was wondering what's the problem?

Here's my Code below:

  const recordVideo = async () => {
    let video;


      const options = {
        maxDuration: delay,
        quality: Camera.Constants.VideoQuality['1080p'],
        maxFileSize: 20000,
        mute: false,
        mirror: false,
      };
      if (cameraRef && cameraReady) {
        video = await cameraRef.recordAsync(options);
      }
      return video;
    }

    setRecording(false);
    if (cameraRef && cameraReady) {
      return await cameraRef.stopRecording();
    }
  };

return (
          <Camera
            ref={(ref) => setCameraRef(ref)}
            type={cameraType}
            style={styles.camera}
            onCameraReady={() => setCameraReady(true)}
            useCamera2Api
          />)
Aexomir
  • 158
  • 8

0 Answers0