# wx.getAvailableAudioSources(Object object)

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

with Promise style call: Supported

Mini Program plugin: Support, need to Mini Program base library version no less than 2.15.0

Get the currently supported audio input source

# parameter

# Object object

attribute type Default values Required Introductions
success function no Interface calls the successful callback function
fail function no Interface calls failed callback functions
complete function no Callback function at the end of an interface call (both successful and unsuccessful calls are executed)

# object.success callback

# parameter
# Object res
attribute type Introductions
audioSources Array.&ltstring&gt A list of supported audio input sources can be found in the RecorderManager.start() Interface. Return value definition reference https://developer.android.with/reference/valley/android/media/MediaRecorder.AudioSource

res.audioSources Legal value

value Introductions Minimum version
car Automatic settings, the default use of mobile phone microphone, plug in the headphone microphone automatically switch to use the microphone, all platforms
buildInMic Mobile microphone, limited iOS
headsetMic Headphone microphone, only iOS
small Microphone (mobile microphone when unplugged, headphone microphone when plugged in), limited Android
camcorder with Mic, for recording audio and video content, limited Android
voice_communication with Mic, for real-time communication, limited Android
voice_recognition with Mic for speech recognition only Android