# wx.getAvailableAudioSources(Object object)

Start from base library version 2.1.0. Please remaining backward compatible.

Gets supported audio input sources.

# Parameters

# Object object

Attribute Type Default Required Description
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

# object.success callback function

# Parameters
# Object res
Property Type Description
audioSources Array.<string> The list of supported audio input sources. It can be used in the API RecorderManager.start(). For the definitions of returned values, please see https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioSource

Valid values of res.audioSources

Value Description Minimum Version
auto Automatic setup. The mobile microphone is used by default. The headset microphone is automatically adopted when the headset is plugged in. This setup applies to all platforms.
buildInMic Mobile microphone for iOS only
headsetMic Headset microphone for iOS only
mic Microphone (if the headset is not plugged in, the mobile microphone is used; otherwise, the headset microphone is used) for Android only
camcorder Same as mic. Suitable for audio and video recording. For Android only.
voice_communication Same as mic. Suitable for real-time communication. For Android only.
voice_recognition Same as mic. Suitable for speech recognition. For Android only.