---
modificationDate: January 15, 2026
title: Audio (expo-audio)
description: A library that provides an API to implement audio playback and recording in apps.
sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-53/packages/expo-audio'
packageName: 'expo-audio'
iconUrl: '/static/images/packages/expo-av.png'
platforms: ['android', 'ios', 'web', 'tvos', 'expo-go']
---

<AgentInstructions>

## Submitting Feedback

If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved:

curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/versions/v53.0.0/sdk/audio/","feedback":"🤖 Agent feedback: <specific, actionable description>"}'

Only submit when you have something specific and actionable to report.

</AgentInstructions>

# Expo Audio (expo-audio)

A library that provides an API to implement audio playback and recording in apps.
Android, iOS, tvOS, Web, Included in Expo Go

> For the complete documentation index, see [llms.txt](/llms.txt). Use this file to discover all available pages.

`expo-audio` is a cross-platform audio library for accessing the native audio capabilities of the device.

Note that audio automatically stops if headphones/bluetooth audio devices are disconnected.

## Installation

```sh
npx expo install expo-audio
```

If you are installing this in an [existing React Native app](/bare/overview), make sure to [install `expo`](/bare/installing-expo-modules) in your project.

## Configuration in app config

You can configure `expo-audio` using its built-in [config plugin](/config-plugins/introduction) if you use config plugins in your project ([Continuous Native Generation (CNG)](/workflow/continuous-native-generation)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does **not** use CNG, then you'll need to manually configure the library.

### Example app.json with config plugin

```json
{
  "expo": {
    "plugins": [
      [
        "expo-audio",
        {
          "microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone."
        }
      ]
    ]
  }
}
```

### Configurable properties

| Name | Default | Description |
| --- | --- | --- |
| `microphonePermission` | `"Allow $(PRODUCT_NAME) to access your microphone"` | Only for: iOS. A string to set the `NSMicrophoneUsageDescription` permission message. |

## Usage

### Playing sounds

```jsx
import { View, StyleSheet, Button } from 'react-native';
import { useAudioPlayer } from 'expo-audio';

const audioSource = require('./assets/Hello.mp3');

export default function App() {
  const player = useAudioPlayer(audioSource);

  return (
    <View style={styles.container}>
      <Button title="Play Sound" onPress={() => player.play()} />
      <Button
        title="Replay Sound"
        onPress={() => {
          player.seekTo(0);
          player.play();
        }}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    backgroundColor: '#ecf0f1',
    padding: 10,
  },
});
```

> **Note:** If you're migrating from [`expo-av`](/versions/v53.0.0/sdk/av), you'll notice that `expo-audio` doesn't automatically reset the playback position when audio finishes. After [`play()`](/versions/v53.0.0/sdk/audio#play), the player stays paused at the end of the sound. To play it again, call [`seekTo(seconds)`](/versions/v53.0.0/sdk/audio#seektoseconds) to reset the position — as shown in the example above.

### Recording sounds

```jsx
import { useState, useEffect } from 'react';
import { View, StyleSheet, Button } from 'react-native';
import {
  useAudioRecorder,
  AudioModule,
  RecordingPresets,
  setAudioModeAsync,
  useAudioRecorderState,
} from 'expo-audio';

export default function App() {
  const audioRecorder = useAudioRecorder(RecordingPresets.HIGH_QUALITY);
  const recorderState = useAudioRecorderState(audioRecorder);

  const record = async () => {
    await audioRecorder.prepareToRecordAsync();
    audioRecorder.record();
  };

  const stopRecording = async () => {
    // The recording will be available on `audioRecorder.uri`.
    await audioRecorder.stop();
  };

  useEffect(() => {
    (async () => {
      const status = await AudioModule.requestRecordingPermissionsAsync();
      if (!status.granted) {
        Alert.alert('Permission to access microphone was denied');
      }

      setAudioModeAsync({
        playsInSilentMode: true,
        allowsRecording: true,
      });
    })();
  }, []);

  return (
    <View style={styles.container}>
      <Button
        title={recorderState.isRecording ? 'Stop Recording' : 'Start Recording'}
        onPress={recorderState.isRecording ? stopRecording : record}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    backgroundColor: '#ecf0f1',
    padding: 10,
  },
});
```

### Playing or recording audio in background 

On iOS, audio playback and recording in background is only available in standalone apps, and it requires some extra configuration. On iOS, each background feature requires a special key in `UIBackgroundModes` array in your **Info.plist** file. In standalone apps this array is empty by default, so to use background features you will need to add appropriate keys to your **app.json** configuration.

See an example of **app.json** that enables audio playback in background:

```json
{
  "expo": {
    ...
    "ios": {
      ...
      "infoPlist": {
        ...
        "UIBackgroundModes": [
          "audio"
        ]
      }
    }
  }
}
```

### Using the AudioPlayer directly

In most cases, the [`useAudioPlayer`](/versions/v53.0.0/sdk/audio#useaudioplayersource-updateinterval) hook should be used to create a `AudioPlayer` instance. It manages the player's lifecycle and ensures that it is properly disposed of when the component is unmounted. However, in some advanced use cases, it might be necessary to create a `AudioPlayer` that does not get automatically destroyed when the component is unmounted. In those cases, the `AudioPlayer` can be created using the [`createAudioPlayer`](/versions/v53.0.0/sdk/audio#audiocreateaudioplayersource-updateinterval) function. You need be aware of the risks that come with this approach, as it is your responsibility to call the [`release()`](/versions/v53.0.0/sdk/expo#release) method when the player is no longer needed. If not handled properly, this approach may lead to memory leaks.

```tsx
import { createAudioPlayer } from 'expo-audio';
const player = createAudioPlayer(audioSource);
```

### Notes on web usage

-   A MediaRecorder issue on Chrome produces WebM files missing the duration metadata. [See the open Chromium issue](https://bugs.chromium.org/p/chromium/issues/detail?id=642012).
-   MediaRecorder encoding options and other configurations are inconsistent across browsers, utilizing a Polyfill such as [kbumsik/opus-media-recorder](https://github.com/kbumsik/opus-media-recorder) or [ai/audio-recorder-polyfill](https://github.com/ai/audio-recorder-polyfill) in your application will improve your experience. Any options passed to `prepareToRecordAsync` will be passed directly to the MediaRecorder API and as such the polyfill.
-   Web browsers require sites to be served securely for them to listen to a mic. See [MediaDevices `getUserMedia()` security](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#security) for more details.

## API

```js
import { useAudioPlayer, useAudioRecorder } from 'expo-audio';
```

## Constants

### `Audio.AUDIO_SAMPLE_UPDATE`

Supported platforms: Android, iOS, tvOS, Web.

Type: `'audioSampleUpdate'`

### `Audio.PLAYBACK_STATUS_UPDATE`

Supported platforms: Android, iOS, tvOS, Web.

Type: `'playbackStatusUpdate'`

### `Audio.RECORDING_STATUS_UPDATE`

Supported platforms: Android, iOS, tvOS, Web.

Type: `'recordingStatusUpdate'`

### `Audio.RecordingPresets`

Supported platforms: Android, iOS, tvOS, Web.

Type: Record<string, [RecordingOptions](#recordingoptions)\>

Constant which contains definitions of the two preset examples of `RecordingOptions`, as implemented in the Audio SDK.

#### `HIGH_QUALITY`

```ts
RecordingPresets.HIGH_QUALITY = {
 extension: '.m4a',
  sampleRate: 44100,
  numberOfChannels: 2,
  bitRate: 128000,
  android: {
    outputFormat: 'mpeg4',
    audioEncoder: 'aac',
  },
  ios: {
    outputFormat: IOSOutputFormat.MPEG4AAC,
    audioQuality: AudioQuality.MAX,
    linearPCMBitDepth: 16,
    linearPCMIsBigEndian: false,
    linearPCMIsFloat: false,
  },
  web: {
    mimeType: 'audio/webm',
    bitsPerSecond: 128000,
  },
};
```

#### `LOW_QUALITY`

```ts
RecordingPresets.LOW_QUALITY = {
  extension: '.m4a',
  sampleRate: 44100,
  numberOfChannels: 2,
  bitRate: 64000,
  android: {
    extension: '.3gp',
    outputFormat: '3gp',
    audioEncoder: 'amr_nb',
  },
  ios: {
    audioQuality: AudioQuality.MIN,
    outputFormat: IOSOutputFormat.MPEG4AAC,
    linearPCMBitDepth: 16,
    linearPCMIsBigEndian: false,
    linearPCMIsFloat: false,
  },
  web: {
    mimeType: 'audio/webm',
    bitsPerSecond: 128000,
  },
};
```

## Hooks

### `useAudioPlayer(source, updateInterval)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `source`(optional) | [AudioSource](#audiosource) |
| `updateInterval`(optional) | `number` |

  

Returns: `AudioPlayer`

### `useAudioPlayerStatus(player)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `player` | [AudioPlayer](#audioplayer) |

  

Returns: `AudioStatus`

### `useAudioRecorder(options, statusListener)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `options` | [RecordingOptions](#recordingoptions) |
| `statusListener`(optional) | (status: [RecordingStatus](#recordingstatus)) => void |

  

Returns: `AudioRecorder`

### `useAudioRecorderState(recorder, interval)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `recorder` | [AudioRecorder](#audiorecorder) |
| `interval`(optional) | `number` |

  

Returns: `RecorderState`

### `useAudioSampleListener(player, listener)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `player` | [AudioPlayer](#audioplayer) |
| `listener` | (data: [AudioSample](#audiosample)) => void |

  

Returns: `void`

## Classes

### `AudioPlayer`

Supported platforms: Android, iOS, tvOS, Web.

Type: Class extends [SharedObject](/versions/v53.0.0/sdk/expo#sharedobject)<[AudioEvents](#audioevents)\>

AudioPlayer Properties

### `currentTime`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

The current position through the audio item in seconds.

### `duration`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

The total duration of the audio in seconds.

### `id`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

Unique identifier for the player object.

### `isAudioSamplingSupported`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether audio sampling is supported on the platform.

### `isBuffering`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the player is buffering.

### `isLoaded`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the player is finished loading.

### `loop`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the player is currently looping.

### `muted`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the player is currently muted.

### `paused`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the player is currently paused.

### `playbackRate`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

The current playback rate of the audio.

### `playing`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the player is currently playing.

### `shouldCorrectPitch`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

A boolean describing if we are correcting the pitch for a changed rate.

### `volume`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

The current volume of the audio.

AudioPlayer Methods

### `pause()`

Supported platforms: Android, iOS, tvOS, Web.

Pauses the player.

Returns: `void`

### `play()`

Supported platforms: Android, iOS, tvOS, Web.

Start playing audio.

Returns: `void`

### `remove()`

Supported platforms: Android, iOS, tvOS, Web.

Remove the player from memory to free up resources.

Returns: `void`

### `replace(source)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `source` | [AudioSource](#audiosource) |

  

Replaces the current audio source with a new one.

Returns: `void`

### `seekTo(seconds)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `seconds` | `number` | The number of seconds to seek by. |

  

Seeks the playback by the given number of seconds.

Returns: `Promise<void>`

### `setPlaybackRate(rate, pitchCorrectionQuality)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `rate` | `number` | The playback rate of the audio. |
| `pitchCorrectionQuality`(optional) | [PitchCorrectionQuality](#pitchcorrectionquality) | The quality of the pitch correction. |

  

Sets the current playback rate of the audio.

Returns: `void`

### `AudioRecorder`

Supported platforms: Android, iOS, tvOS, Web.

Type: Class extends [SharedObject](/versions/v53.0.0/sdk/expo#sharedobject)<[RecordingEvents](#recordingevents)\>

AudioRecorder Properties

### `currentTime`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

The current length of the recording, in seconds.

### `id`

Supported platforms: Android, iOS, tvOS, Web.

Type: `number`

Unique identifier for the recorder object.

### `isRecording`

Supported platforms: Android, iOS, tvOS, Web.

Type: `boolean`

Boolean value indicating whether the recording is in progress.

### `uri`

Supported platforms: Android, iOS, tvOS, Web.

Literal type: `union`

The uri of the recording.

Acceptable values are: `null` | `string`

AudioRecorder Methods

### `getAvailableInputs()`

Supported platforms: Android, iOS, tvOS, Web.

Returns a list of available recording inputs. This method can only be called if the `Recording` has been prepared.

Returns: `RecordingInput[]`

A `Promise` that is fulfilled with an array of `RecordingInput` objects.

### `getCurrentInput()`

Supported platforms: Android, iOS, tvOS, Web.

Returns the currently-selected recording input. This method can only be called if the `Recording` has been prepared.

Returns: `RecordingInput`

A `Promise` that is fulfilled with a `RecordingInput` object.

### `getStatus()`

Supported platforms: Android, iOS, tvOS, Web.

Status of the current recording.

Returns: `RecorderState`

### `pause()`

Supported platforms: Android, iOS, tvOS, Web.

Pause the recording.

Returns: `void`

### `prepareToRecordAsync(options)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `options`(optional) | [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)<[RecordingOptions](#recordingoptions)\> |

  

Prepares the recording for recording.

Returns: `Promise<void>`

### `record()`

Supported platforms: Android, iOS, tvOS, Web.

Starts the recording.

Returns: `void`

### `recordForDuration(seconds)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `seconds` | `number` | The time in seconds to stop recording at. |

  

Stops the recording once the specified time has elapsed.

Returns: `void`

### `setInput(inputUid)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `inputUid` | `string` | The uid of a `RecordingInput`. |

  

Sets the current recording input.

Returns: `void`

A `Promise` that is resolved if successful or rejected if not.

### `startRecordingAtTime(seconds)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `seconds` | `number` | The time in seconds to start recording at. |

  

Starts the recording at the given time.

Returns: `void`

### `stop()`

Supported platforms: Android, iOS, tvOS, Web.

Stop the recording.

Returns: `Promise<void>`

## Methods

### `Audio.createAudioPlayer(source, updateInterval)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `source`(optional) | [AudioSource](#audiosource) |
| `updateInterval`(optional) | `number` |

  

Creates an instance of an `AudioPlayer` that doesn't release automatically.

> For most use cases you should use the [`useAudioPlayer`](#useaudioplayersource-updateinterval) hook instead. See the [Using the `AudioPlayer` directly](#using-the-audioplayer-directly) section for more details.

Returns: `AudioPlayer`

### `Audio.getRecordingPermissionsAsync()`

Supported platforms: Android, iOS, tvOS, Web.

Returns: `Promise<permissionresponse>`

### `Audio.requestRecordingPermissionsAsync()`

Supported platforms: Android, iOS, tvOS, Web.

Returns: `Promise<permissionresponse>`

### `Audio.setAudioModeAsync(mode)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `mode` | [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)<[AudioMode](#audiomode)\> |

  

Returns: `Promise<void>`

### `Audio.setIsAudioActiveAsync(active)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `active` | `boolean` |

  

Returns: `Promise<void>`

## Event Subscriptions

### `Audio.useAudioSampleListener(player, listener)`

Supported platforms: Android, iOS, tvOS, Web.

| Parameter | Type |
| --- | --- |
| `player` | [AudioPlayer](#audioplayer) |
| `listener` | (data: [AudioSample](#audiosample)) => void |

  

Returns: `void`

## Types

### `AndroidAudioEncoder`

Supported platforms: Android.

Literal Type: `string`

Acceptable values are: `'default'` | `'amr_nb'` | `'amr_wb'` | `'aac'` | `'he_aac'` | `'aac_eld'`

### `AndroidOutputFormat`

Supported platforms: Android.

Literal Type: `string`

Acceptable values are: `'default'` | `'3gp'` | `'mpeg4'` | `'amrnb'` | `'amrwb'` | `'aac_adts'` | `'mpeg2ts'` | `'webm'`

### `AudioEvents`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| audioSampleUpdate | (data: [AudioSample](#audiosample)) => void | - |
| playbackStatusUpdate | (status: [AudioStatus](#audiostatus)) => void | - |

### `AudioMode`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| allowsRecording(optional) | `boolean` | Supported platforms: iOS. Whether the audio session allows recording. Default: `false` |
| interruptionMode | [InterruptionMode](#interruptionmode) | Supported platforms: iOS. Determines how the audio session interacts with other sessions. |
| interruptionModeAndroid | [InterruptionModeAndroid](#interruptionmodeandroid) | Supported platforms: Android. Determines how the audio session interacts with other sessions on Android. |
| playsInSilentMode | `boolean` | Supported platforms: iOS. Determines if audio playback is allowed when the device is in silent mode. |
| shouldPlayInBackground(optional) | `boolean` | Whether the audio session stays active when the app moves to the background. Default: `false` |
| shouldRouteThroughEarpiece | `boolean` | Supported platforms: Android. Whether the audio should route through the earpiece. |

### `AudioSample`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| channels | [AudioSampleChannel[]](#audiosamplechannel) | - |
| timestamp | `number` | - |

### `AudioSampleChannel`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| frames | `number[]` | - |

### `AudioSource`

Supported platforms: Android, iOS, tvOS, Web.

Type: `string` or `number` or `null` or `object` shaped as below:

| Property | Type | Description |
| --- | --- | --- |
| assetId(optional) | `number` | The asset ID of a local audio asset, acquired with the `require` function. This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored. |
| headers(optional) | `Record<string, string>` | An object representing the HTTP headers to send along with the request for a remote audio source. On web requires the `Access-Control-Allow-Origin` header returned by the server to include the current domain. |
| uri(optional) | `string` | A string representing the resource identifier for the audio, which could be an HTTPS address, a local file path, or the name of a static audio file resource. |

### `AudioStatus`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| currentTime | `number` | - |
| didJustFinish | `boolean` | - |
| duration | `number` | - |
| id | `number` | - |
| isBuffering | `boolean` | - |
| isLoaded | `boolean` | - |
| loop | `boolean` | - |
| mute | `boolean` | - |
| playbackRate | `number` | - |
| playbackState | `string` | - |
| playing | `boolean` | - |
| reasonForWaitingToPlay | `string` | - |
| shouldCorrectPitch | `boolean` | - |
| timeControlStatus | `string` | - |

### `BitRateStrategy`

Supported platforms: Android, iOS, tvOS, Web.

Literal Type: `string`

Acceptable values are: `'constant'` | `'longTermAverage'` | `'variableConstrained'` | `'variable'`

### `InterruptionMode`

Supported platforms: Android, iOS, tvOS, Web.

Literal Type: `string`

Acceptable values are: `'mixWithOthers'` | `'doNotMix'` | `'duckOthers'`

### `InterruptionModeAndroid`

Supported platforms: Android, iOS, tvOS, Web.

Literal Type: `string`

Acceptable values are: `'doNotMix'` | `'duckOthers'`

### `PermissionExpiration`

Supported platforms: Android, iOS, tvOS, Web.

Literal Type: `union`

Permission expiration time. Currently, all permissions are granted permanently.

Acceptable values are: `'never'` | `number`

### `PermissionResponse`

Supported platforms: Android, iOS, tvOS, Web.

An object obtained by permissions get and request functions.

| Property | Type | Description |
| --- | --- | --- |
| canAskAgain | `boolean` | Indicates if user can be asked again for specific permission. If not, one should be directed to the Settings app in order to enable/disable the permission. |
| expires | `PermissionExpiration` | Determines time when the permission expires. |
| granted | `boolean` | A convenience boolean that indicates if the permission is granted. |
| status | `PermissionStatus` | Determines the status of the permission. |

### `PitchCorrectionQuality`

Supported platforms: Android, iOS, tvOS, Web.

Literal Type: `string`

Acceptable values are: `'low'` | `'medium'` | `'high'`

### `RecorderState`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| canRecord | `boolean` | - |
| durationMillis | `number` | - |
| isRecording | `boolean` | - |
| mediaServicesDidReset | `boolean` | - |
| metering(optional) | `number` | - |
| url | `string | null` | - |

### `RecordingEvents`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| recordingStatusUpdate | (status: [RecordingStatus](#recordingstatus)) => void | - |

### `RecordingInput`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| name | `string` | - |
| type | `string` | - |
| uid | `string` | - |

### `RecordingOptions`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| android | [RecordingOptionsAndroid](#recordingoptionsandroid) | Supported platforms: Android. Recording options for the Android platform. |
| bitRate | `number` | The desired bit rate. . Example. `128000` |
| extension | `string` | The desired file extension. . Example. `.caf` |
| ios | [RecordingOptionsIos](#recordingoptionsios) | Supported platforms: iOS. Recording options for the iOS platform. |
| isMeteringEnabled(optional) | `boolean` | A boolean that determines whether audio level information will be part of the status object under the "metering" key. |
| numberOfChannels | `number` | The desired number of channels. . Example. `2` |
| sampleRate | `number` | The desired sample rate. . Example. `44100` |
| web(optional) | [RecordingOptionsWeb](#recordingoptionsweb) | Supported platforms: Web. Recording options for the Web platform. |

### `RecordingOptionsAndroid`

Supported platforms: Android.

| Property | Type | Description |
| --- | --- | --- |
| audioEncoder | [AndroidAudioEncoder](#androidaudioencoder) | The desired audio encoder. See the [`AndroidAudioEncoder`](#androidaudioencoder) enum for all valid values. |
| extension(optional) | `string` | The desired file extension. . Example. `.caf` |
| maxFileSize(optional) | `number` | The desired maximum file size in bytes, after which the recording will stop (but `stopAndUnloadAsync()` must still be called after this point). . Example. `65536` |
| outputFormat | [AndroidOutputFormat](#androidoutputformat) | The desired file format. See the [`AndroidOutputFormat`](#androidoutputformat) enum for all valid values. |
| sampleRate(optional) | `number` | The desired sample rate. . Example. `44100` |

### `RecordingOptionsIos`

Supported platforms: iOS.

| Property | Type | Description |
| --- | --- | --- |
| audioQuality | [AudioQuality](#audioquality) | number | The desired audio quality. See the [`AudioQuality`](#audioquality) enum for all valid values. |
| bitDepthHint(optional) | `number` | The desired bit depth hint. . Example. `16` |
| bitRateStrategy(optional) | `number` | The desired bit rate strategy. See the next section for an enumeration of all valid values of `bitRateStrategy`. |
| extension(optional) | `string` | The desired file extension. . Example. `.caf` |
| linearPCMBitDepth(optional) | `number` | The desired PCM bit depth. . Example. `16` |
| linearPCMIsBigEndian(optional) | `boolean` | A boolean describing if the PCM data should be formatted in big endian. |
| linearPCMIsFloat(optional) | `boolean` | A boolean describing if the PCM data should be encoded in floating point or integral values. |
| outputFormat(optional) | string | [IOSOutputFormat](#iosoutputformat) | number | The desired file format. See the [`IOSOutputFormat`](#iosoutputformat) enum for all valid values. |
| sampleRate(optional) | `number` | The desired sample rate. . Example. `44100` |

### `RecordingOptionsWeb`

Supported platforms: Web.

| Property | Type | Description |
| --- | --- | --- |
| bitsPerSecond(optional) | `number` | - |
| mimeType(optional) | `string` | - |

### `RecordingStatus`

Supported platforms: Android, iOS, tvOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| error | `string | null` | - |
| hasError | `boolean` | - |
| id | `number` | - |
| isFinished | `boolean` | - |
| url | `string | null` | - |

## Enums

### `AudioQuality`

Supported platforms: Android, iOS, tvOS, Web.

#### `MIN`

`AudioQuality.MIN = 0`

#### `LOW`

`AudioQuality.LOW = 32`

#### `MEDIUM`

`AudioQuality.MEDIUM = 64`

#### `HIGH`

`AudioQuality.HIGH = 96`

#### `MAX`

`AudioQuality.MAX = 127`

### `IOSOutputFormat`

Supported platforms: iOS.

#### `MPEGLAYER1`

`IOSOutputFormat.MPEGLAYER1 = ".mp1"`

#### `MPEGLAYER2`

`IOSOutputFormat.MPEGLAYER2 = ".mp2"`

#### `MPEGLAYER3`

`IOSOutputFormat.MPEGLAYER3 = ".mp3"`

#### `MPEG4AAC`

`IOSOutputFormat.MPEG4AAC = "aac "`

#### `MPEG4AAC_ELD`

`IOSOutputFormat.MPEG4AAC_ELD = "aace"`

#### `MPEG4AAC_ELD_SBR`

`IOSOutputFormat.MPEG4AAC_ELD_SBR = "aacf"`

#### `MPEG4AAC_ELD_V2`

`IOSOutputFormat.MPEG4AAC_ELD_V2 = "aacg"`

#### `MPEG4AAC_HE`

`IOSOutputFormat.MPEG4AAC_HE = "aach"`

#### `MPEG4AAC_LD`

`IOSOutputFormat.MPEG4AAC_LD = "aacl"`

#### `MPEG4AAC_HE_V2`

`IOSOutputFormat.MPEG4AAC_HE_V2 = "aacp"`

#### `MPEG4AAC_SPATIAL`

`IOSOutputFormat.MPEG4AAC_SPATIAL = "aacs"`

#### `AC3`

`IOSOutputFormat.AC3 = "ac-3"`

#### `AES3`

`IOSOutputFormat.AES3 = "aes3"`

#### `APPLELOSSLESS`

`IOSOutputFormat.APPLELOSSLESS = "alac"`

#### `ALAW`

`IOSOutputFormat.ALAW = "alaw"`

#### `AUDIBLE`

`IOSOutputFormat.AUDIBLE = "AUDB"`

#### `60958AC3`

`IOSOutputFormat.60958AC3 = "cac3"`

#### `MPEG4CELP`

`IOSOutputFormat.MPEG4CELP = "celp"`

#### `ENHANCEDAC3`

`IOSOutputFormat.ENHANCEDAC3 = "ec-3"`

#### `MPEG4HVXC`

`IOSOutputFormat.MPEG4HVXC = "hvxc"`

#### `ILBC`

`IOSOutputFormat.ILBC = "ilbc"`

#### `APPLEIMA4`

`IOSOutputFormat.APPLEIMA4 = "ima4"`

#### `LINEARPCM`

`IOSOutputFormat.LINEARPCM = "lpcm"`

#### `MACE3`

`IOSOutputFormat.MACE3 = "MAC3"`

#### `MACE6`

`IOSOutputFormat.MACE6 = "MAC6"`

#### `AMR`

`IOSOutputFormat.AMR = "samr"`

#### `AMR_WB`

`IOSOutputFormat.AMR_WB = "sawb"`

#### `DVIINTELIMA`

`IOSOutputFormat.DVIINTELIMA = 1836253201`

#### `MICROSOFTGSM`

`IOSOutputFormat.MICROSOFTGSM = 1836253233`

#### `QUALCOMM`

`IOSOutputFormat.QUALCOMM = "Qclp"`

#### `QDESIGN2`

`IOSOutputFormat.QDESIGN2 = "QDM2"`

#### `QDESIGN`

`IOSOutputFormat.QDESIGN = "QDMC"`

#### `MPEG4TWINVQ`

`IOSOutputFormat.MPEG4TWINVQ = "twvq"`

#### `ULAW`

`IOSOutputFormat.ULAW = "ulaw"`

### `PermissionStatus`

Supported platforms: Android, iOS, tvOS, Web.

#### `DENIED`

`PermissionStatus.DENIED = "denied"`

User has denied the permission.

#### `GRANTED`

`PermissionStatus.GRANTED = "granted"`

User has granted the permission.

#### `UNDETERMINED`

`PermissionStatus.UNDETERMINED = "undetermined"`

User hasn't granted or denied the permission yet.
