> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.getAvailableAudioSources

> Get the available audio input sources.

Returns the audio input sources available for recording. Pass one of them as `audioSource` to `RecorderManager.start` (see [my.getRecorderManager](https://docs.rebellapp.com/jsapi/media/recorder/my.getRecorderManager.md)).

## Parameters

| Property | Type | Required | Description |
| - | - | - | - |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |

## Success Callback

| Property | Type | Description |
| - | - | - |
| audioSources | Array\<String> | Supported audio input sources (see below) |

### audioSources Values

| Value | Description |
| - | - |
| `auto` | Automatic: the phone microphone by default, the headphone microphone when headphones are connected. All platforms |
| `buildInMic` | Phone microphone. iOS only |
| `headsetMic` | Headphone microphone. iOS only |
| `mic` | Microphone: the phone microphone without headphones, the headphone microphone when connected. Android only |

## Code Example

```javascript theme={null}
my.getAvailableAudioSources({
  success: (res) => {
    console.log('Audio sources:', res.audioSources);
  }
});
```

## Related APIs

> [card] [my.getRecorderManager](https://docs.rebellapp.com/jsapi/media/recorder/my.getRecorderManager.md)
>
> Record audio


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.