{
  "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`.\nOn iOS, if a recording interrupted by the system cannot be merged, the promise will reject with `FAILED_TO_MERGE_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 or interrupted 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.\n`{ status: \"INTERRUPTED\" }` if the recording was paused due to a system interruption.",
        "complexTypes": [
          "CurrentRecordingStatus"
        ],
        "slug": "getcurrentstatus"
      },
      {
        "name": "addListener",
        "signature": "(eventName: 'voiceRecordingInterrupted', listenerFunc: (event: VoiceRecordingInterruptedEvent) => void) => Promise<PluginListenerHandle>",
        "parameters": [
          {
            "name": "eventName",
            "docs": "The name of the event to listen for.",
            "type": "'voiceRecordingInterrupted'"
          },
          {
            "name": "listenerFunc",
            "docs": "The callback function to invoke when the event occurs.",
            "type": "(event: VoiceRecordingInterruptedEvent) => void"
          }
        ],
        "returns": "Promise<PluginListenerHandle>",
        "tags": [
          {
            "name": "param",
            "text": "eventName The name of the event to listen for."
          },
          {
            "name": "param",
            "text": "listenerFunc The callback function to invoke when the event occurs."
          },
          {
            "name": "returns",
            "text": "A promise that resolves to a PluginListenerHandle."
          }
        ],
        "docs": "Listen for audio recording interruptions (e.g., phone calls, other apps using microphone).\nAvailable on iOS and Android only.",
        "complexTypes": [
          "PluginListenerHandle",
          "VoiceRecordingInterruptedEvent"
        ],
        "slug": "addlistenervoicerecordinginterrupted-"
      },
      {
        "name": "addListener",
        "signature": "(eventName: 'voiceRecordingInterruptionEnded', listenerFunc: (event: VoiceRecordingInterruptionEndedEvent) => void) => Promise<PluginListenerHandle>",
        "parameters": [
          {
            "name": "eventName",
            "docs": "The name of the event to listen for.",
            "type": "'voiceRecordingInterruptionEnded'"
          },
          {
            "name": "listenerFunc",
            "docs": "The callback function to invoke when the event occurs.",
            "type": "(event: VoiceRecordingInterruptionEndedEvent) => void"
          }
        ],
        "returns": "Promise<PluginListenerHandle>",
        "tags": [
          {
            "name": "param",
            "text": "eventName The name of the event to listen for."
          },
          {
            "name": "param",
            "text": "listenerFunc The callback function to invoke when the event occurs."
          },
          {
            "name": "returns",
            "text": "A promise that resolves to a PluginListenerHandle."
          }
        ],
        "docs": "Listen for audio recording interruption end events.\nAvailable on iOS and Android only.",
        "complexTypes": [
          "PluginListenerHandle",
          "VoiceRecordingInterruptionEndedEvent"
        ],
        "slug": "addlistenervoicerecordinginterruptionended-"
      },
      {
        "name": "removeAllListeners",
        "signature": "() => Promise<void>",
        "parameters": [],
        "returns": "Promise<void>",
        "tags": [],
        "docs": "Remove all listeners for this plugin.",
        "complexTypes": [],
        "slug": "removealllisteners"
      }
    ],
    "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": "requirePlaybackSupport",
          "tags": [],
          "docs": "Whether the web implementation should require the selected recording MIME type\nto also be playable by the browser's native HTML `<audio>` element.\n\nDefaults to `true` on web to reduce cases where `MediaRecorder` reports support\nfor a format but the recorded file cannot be played back in the same browser\n(observed on some Safari/iOS/WKWebView combinations).\n\nNative platforms ignore this option.",
          "complexTypes": [],
          "type": "boolean | 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; fileExtension: 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', 'INTERRUPTED', 'NONE'.",
          "complexTypes": [],
          "type": "'NONE' | 'RECORDING' | 'PAUSED' | 'INTERRUPTED'"
        }
      ]
    },
    {
      "name": "PluginListenerHandle",
      "slug": "pluginlistenerhandle",
      "docs": "",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "remove",
          "tags": [],
          "docs": "",
          "complexTypes": [],
          "type": "() => Promise<void>"
        }
      ]
    }
  ],
  "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 accessible 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 accessible 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 accessible on Android 11 or newer."
        },
        {
          "name": "ExternalCache",
          "value": "\"EXTERNAL_CACHE\"",
          "tags": [
            {
              "text": "7.1.0",
              "name": "since"
            }
          ],
          "docs": "The external cache directory.\nOn iOS it will use the Documents directory.\nOn Android it's the primary shared/external cache."
        },
        {
          "name": "LibraryNoCloud",
          "value": "\"LIBRARY_NO_CLOUD\"",
          "tags": [
            {
              "text": "7.1.0",
              "name": "since"
            }
          ],
          "docs": "The Library directory without cloud backup. Used in iOS.\nOn Android it's the directory holding application files."
        },
        {
          "name": "Temporary",
          "value": "\"TEMPORARY\"",
          "tags": [
            {
              "text": "7.1.0",
              "name": "since"
            }
          ],
          "docs": "A temporary directory for iOS.\nOn Android it's the directory holding the application cache."
        }
      ]
    }
  ],
  "typeAliases": [
    {
      "name": "Base64String",
      "slug": "base64string",
      "docs": "Represents a Base64 encoded string.",
      "types": [
        {
          "text": "string",
          "complexTypes": []
        }
      ]
    },
    {
      "name": "VoiceRecordingInterruptedEvent",
      "slug": "voicerecordinginterruptedevent",
      "docs": "Event payload for voiceRecordingInterrupted event (empty - no data).",
      "types": [
        {
          "text": "Record<string, never>",
          "complexTypes": [
            "Record"
          ]
        }
      ]
    },
    {
      "name": "Record",
      "slug": "record",
      "docs": "Construct a type with a set of properties K of type T",
      "types": [
        {
          "text": "{\r\n    [P in K]: T;\r\n}",
          "complexTypes": [
            "K",
            "T"
          ]
        }
      ]
    },
    {
      "name": "VoiceRecordingInterruptionEndedEvent",
      "slug": "voicerecordinginterruptionendedevent",
      "docs": "Event payload for voiceRecordingInterruptionEnded event (empty - no data).",
      "types": [
        {
          "text": "Record<string, never>",
          "complexTypes": [
            "Record"
          ]
        }
      ]
    }
  ],
  "pluginConfigs": []
}