{
  "api": {
    "name": "VoiceRecorderPlugin",
    "slug": "voicerecorderplugin",
    "docs": "Interface for the VoiceRecorderPlugin which provides methods to record audio.",
    "tags": [],
    "methods": [
      {
        "name": "canDeviceVoiceRecord",
        "signature": "() => Promise<GenericResponse>",
        "parameters": [],
        "returns": "Promise<GenericResponse>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to a GenericResponse."
          },
          {
            "name": "throws",
            "text": "Error with code \"COULD_NOT_QUERY_PERMISSION_STATUS\" if the device cannot query the permission status."
          }
        ],
        "docs": "Checks if the current device can record audio.\nOn mobile, this function will always resolve to `{ value: true }`.\nIn a browser, it will resolve to `{ value: true }` or `{ value: false }` based on the browser's ability to record.\nThis method does not take into account the permission status, only if the browser itself is capable of recording at all.",
        "complexTypes": [
          "GenericResponse"
        ],
        "slug": "candevicevoicerecord"
      },
      {
        "name": "requestAudioRecordingPermission",
        "signature": "() => Promise<GenericResponse>",
        "parameters": [],
        "returns": "Promise<GenericResponse>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to a GenericResponse."
          },
          {
            "name": "throws",
            "text": "Error if the permission request fails."
          }
        ],
        "docs": "Requests audio recording permission from the user.\nIf the permission has already been provided, the promise will resolve with `{ value: true }`.\nOtherwise, the promise will resolve to `{ value: true }` or `{ value: false }` based on the user's response.",
        "complexTypes": [
          "GenericResponse"
        ],
        "slug": "requestaudiorecordingpermission"
      },
      {
        "name": "hasAudioRecordingPermission",
        "signature": "() => Promise<GenericResponse>",
        "parameters": [],
        "returns": "Promise<GenericResponse>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to a GenericResponse."
          },
          {
            "name": "throws",
            "text": "Error with code \"COULD_NOT_QUERY_PERMISSION_STATUS\" if the device cannot query the permission status."
          }
        ],
        "docs": "Checks if audio recording permission has been granted.\nWill resolve to `{ value: true }` or `{ value: false }` based on the status of the permission.\nThe web implementation of this plugin uses the Permissions API, which is not widespread.\nIf the status of the permission cannot be checked, the promise will reject with `COULD_NOT_QUERY_PERMISSION_STATUS`.\nIn that case, use `requestAudioRecordingPermission` or `startRecording` and capture any exception that is thrown.",
        "complexTypes": [
          "GenericResponse"
        ],
        "slug": "hasaudiorecordingpermission"
      },
      {
        "name": "startRecording",
        "signature": "(options?: RecordingOptions | undefined) => Promise<GenericResponse>",
        "parameters": [
          {
            "name": "options",
            "docs": "The options for the recording.",
            "type": "RecordingOptions | undefined"
          }
        ],
        "returns": "Promise<GenericResponse>",
        "tags": [
          {
            "name": "param",
            "text": "options The options for the recording."
          },
          {
            "name": "returns",
            "text": "A promise that resolves to a GenericResponse."
          },
          {
            "name": "throws",
            "text": "Error with one of the specified error codes if the recording cannot be started."
          }
        ],
        "docs": "Starts audio recording.\nOn success, the promise will resolve to { value: true }.\nOn error, the promise will reject with one of the following error codes:\n\"MISSING_PERMISSION\", \"ALREADY_RECORDING\", \"MICROPHONE_BEING_USED\", \"DEVICE_CANNOT_VOICE_RECORD\", or \"FAILED_TO_RECORD\".",
        "complexTypes": [
          "GenericResponse",
          "RecordingOptions"
        ],
        "slug": "startrecording"
      },
      {
        "name": "stopRecording",
        "signature": "() => Promise<RecordingData>",
        "parameters": [],
        "returns": "Promise<RecordingData>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to RecordingData."
          },
          {
            "name": "throws",
            "text": "Error with one of the specified error codes if the recording cannot be stopped."
          }
        ],
        "docs": "Stops audio recording.\nWill stop the recording that has been previously started.\nIf the function `startRecording` has not been called beforehand, the promise will reject with `RECORDING_HAS_NOT_STARTED`.\nIf the recording has been stopped immediately after it has been started, the promise will reject with `EMPTY_RECORDING`.\nIn a case of unknown error, the promise will reject with `FAILED_TO_FETCH_RECORDING`.\nIn case of success, the promise resolves to RecordingData containing the recording in base-64, the duration of the recording in milliseconds, and the MIME type.",
        "complexTypes": [
          "RecordingData"
        ],
        "slug": "stoprecording"
      },
      {
        "name": "pauseRecording",
        "signature": "() => Promise<GenericResponse>",
        "parameters": [],
        "returns": "Promise<GenericResponse>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to a GenericResponse."
          },
          {
            "name": "throws",
            "text": "Error with one of the specified error codes if the recording cannot be paused."
          }
        ],
        "docs": "Pauses the ongoing audio recording.\nIf the recording has not started yet, the promise will reject with an error code `RECORDING_HAS_NOT_STARTED`.\nOn success, the promise will resolve to { value: true } if the pause was successful or { value: false } if the recording is already paused.\nOn certain mobile OS versions, this function is not supported and will reject with `NOT_SUPPORTED_OS_VERSION`.",
        "complexTypes": [
          "GenericResponse"
        ],
        "slug": "pauserecording"
      },
      {
        "name": "resumeRecording",
        "signature": "() => Promise<GenericResponse>",
        "parameters": [],
        "returns": "Promise<GenericResponse>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to a GenericResponse."
          },
          {
            "name": "throws",
            "text": "Error with one of the specified error codes if the recording cannot be resumed."
          }
        ],
        "docs": "Resumes a paused audio recording.\nIf the recording has not started yet, the promise will reject with an error code `RECORDING_HAS_NOT_STARTED`.\nOn success, the promise will resolve to { value: true } if the resume was successful or { value: false } if the recording is already running.\nOn certain mobile OS versions, this function is not supported and will reject with `NOT_SUPPORTED_OS_VERSION`.",
        "complexTypes": [
          "GenericResponse"
        ],
        "slug": "resumerecording"
      },
      {
        "name": "getCurrentStatus",
        "signature": "() => Promise<CurrentRecordingStatus>",
        "parameters": [],
        "returns": "Promise<CurrentRecordingStatus>",
        "tags": [
          {
            "name": "returns",
            "text": "A promise that resolves to a CurrentRecordingStatus."
          },
          {
            "name": "throws",
            "text": "Error if the status cannot be fetched."
          }
        ],
        "docs": "Gets the current status of the voice recorder.\nWill resolve with one of the following values:\n`{ status: \"NONE\" }` if the plugin is idle and waiting to start a new recording.\n`{ status: \"RECORDING\" }` if the plugin is in the middle of recording.\n`{ status: \"PAUSED\" }` if the recording is paused.",
        "complexTypes": [
          "CurrentRecordingStatus"
        ],
        "slug": "getcurrentstatus"
      }
    ],
    "properties": []
  },
  "interfaces": [
    {
      "name": "GenericResponse",
      "slug": "genericresponse",
      "docs": "Interface representing a generic response with a boolean value.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "value",
          "tags": [],
          "docs": "The result of the operation as a boolean value.",
          "complexTypes": [],
          "type": "boolean"
        }
      ]
    },
    {
      "name": "RecordingOptions",
      "slug": "recordingoptions",
      "docs": "Can be used to specify options for the recording.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "directory",
          "tags": [
            {
              "text": "RecordingData",
              "name": "see"
            }
          ],
          "docs": "The capacitor filesystem directory where the recording should be saved.\n\nIf not specified, the recording will be stored in a base64 string and returned in the `RecordingData` object.",
          "complexTypes": [
            "Directory"
          ],
          "type": "Directory"
        },
        {
          "name": "subDirectory",
          "tags": [],
          "docs": "An optional subdirectory in the specified directory where the recording should be saved.",
          "complexTypes": [],
          "type": "string | undefined"
        }
      ]
    },
    {
      "name": "RecordingData",
      "slug": "recordingdata",
      "docs": "Interface representing the data of a recording.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "value",
          "tags": [],
          "docs": "The value containing the recording details.",
          "complexTypes": [
            "Base64String"
          ],
          "type": "{ recordDataBase64: string; msDuration: number; mimeType: string; uri?: string | undefined; }"
        }
      ]
    },
    {
      "name": "CurrentRecordingStatus",
      "slug": "currentrecordingstatus",
      "docs": "Interface representing the current status of the voice recorder.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "status",
          "tags": [],
          "docs": "The current status of the recorder, which can be one of the following values: 'RECORDING', 'PAUSED', 'NONE'.",
          "complexTypes": [],
          "type": "'RECORDING' | 'PAUSED' | 'NONE'"
        }
      ]
    }
  ],
  "enums": [
    {
      "name": "Directory",
      "slug": "directory",
      "members": [
        {
          "name": "Documents",
          "value": "\"DOCUMENTS\"",
          "tags": [
            {
              "text": "1.0.0",
              "name": "since"
            }
          ],
          "docs": "The Documents directory.\nOn iOS it's the app's documents directory.\nUse this directory to store user-generated content.\nOn Android it's the Public Documents folder, so it's accessible from other apps.\nIt's not accesible on Android 10 unless the app enables legacy External Storage\nby adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\nin the `AndroidManifest.xml`.\nOn Android 11 or newer the app can only access the files/folders the app created."
        },
        {
          "name": "Data",
          "value": "\"DATA\"",
          "tags": [
            {
              "text": "1.0.0",
              "name": "since"
            }
          ],
          "docs": "The Data directory.\nOn iOS it will use the Documents directory.\nOn Android it's the directory holding application files.\nFiles will be deleted when the application is uninstalled."
        },
        {
          "name": "Library",
          "value": "\"LIBRARY\"",
          "tags": [
            {
              "text": "1.1.0",
              "name": "since"
            }
          ],
          "docs": "The Library directory.\nOn iOS it will use the Library directory.\nOn Android it's the directory holding application files.\nFiles will be deleted when the application is uninstalled."
        },
        {
          "name": "Cache",
          "value": "\"CACHE\"",
          "tags": [
            {
              "text": "1.0.0",
              "name": "since"
            }
          ],
          "docs": "The Cache directory.\nCan be deleted in cases of low memory, so use this directory to write app-specific files.\nthat your app can re-create easily."
        },
        {
          "name": "External",
          "value": "\"EXTERNAL\"",
          "tags": [
            {
              "text": "1.0.0",
              "name": "since"
            }
          ],
          "docs": "The external directory.\nOn iOS it will use the Documents directory.\nOn Android it's the directory on the primary shared/external\nstorage device where the application can place persistent files it owns.\nThese files are internal to the applications, and not typically visible\nto the user as media.\nFiles will be deleted when the application is uninstalled."
        },
        {
          "name": "ExternalStorage",
          "value": "\"EXTERNAL_STORAGE\"",
          "tags": [
            {
              "text": "1.0.0",
              "name": "since"
            }
          ],
          "docs": "The external storage directory.\nOn iOS it will use the Documents directory.\nOn Android it's the primary shared/external storage directory.\nIt's not accesible on Android 10 unless the app enables legacy External Storage\nby adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\nin the `AndroidManifest.xml`.\nIt's not accesible on Android 11 or newer."
        }
      ]
    }
  ],
  "typeAliases": [
    {
      "name": "Base64String",
      "slug": "base64string",
      "docs": "Represents a Base64 encoded string.",
      "types": [
        {
          "text": "string",
          "complexTypes": []
        }
      ]
    }
  ],
  "pluginConfigs": []
}