viromedia/viro

cant use startVideoRecording on Android 13

saadxprt opened this issue · 1 comments

Environment

Please provide the following information about your environment:

  1. Development OS: Mac, Windows, Linux
    Windows

  2. Device OS & Version: What Android OS version (7.0, 8.0, etc.) or iOS version (11.0, 11.2) is your device running on?
    Android 13 actual device

  3. Version: ViroReact version and React Native version
    @viro-community/react-viro": "^2.41.1", "react-native": "0.72.6"

  4. Device(s): What device(s) are you are seeing the issue on (i.e. iPhone X, Samsung Note 8, etc)
    Infinix Zero 30

const handlePressRecordVideo = async () => {
    if (recording) {
      try {
        const result = await ref.current?._stopVideoRecording();
        setRecording(false);
        console.log("[254]", result);
      } catch (e) {
        console.error("[254]", e);
      }
    } else {
      try {
        setRecording(true);
        const result = await ref.current?._startVideoRecording(
          "test",
          true,
          (e) => {
            // https://viro-community.readme.io/docs/viroconstants#section-video-recording-screenshot-errors
            console.error("[254]", e);
          }
        );
        console.log("[254]", result);
      } catch (e) {
        console.error("[254]", e);
      }
    }
  }

it returns
{"errorCode": 1, "success": false, "url": null}

This is working fine with android 12 with these permissions

await request('android.permission.WRITE_EXTERNAL_STORAGE');
what do I need to do in order to make this _startVideoRecording work with Android 13? or just store the recording anywhere on the phone which I can access