May 18, 2021 WeChat Mini Program Development Document
Base library 2.1.0 starts to support, and low versions need to be compatible.
Get the currently supported audio input source
Property | Type | The default | Required | Description |
---|---|---|---|---|
success | function | Whether | The interface calls a successful callback function | |
fail | function | Whether | The interface calls the failed callback function | |
complete | function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
Property | Type | Description |
---|---|---|
audioSources | Array.<string> | A list of supported audio input sources that can be used in the RecorderManager.start() interface. The return value defines the https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioSource |
The legal value of res.audioSources
Value | Description | The lowest version |
---|---|---|
auto | Automatic settings, the default use of mobile phone microphone, plug in the headset and automatically switch the use of headphone microphone, all platforms apply | |
buildInMic | Mobile microphone, iOS only | |
headsetMic | Headset microphone, iOS only | |
Mic | Microphones (phone microphones when you don't have a headset, headphone microphones when you plug in your headset), Android only | |
camcorder | Same mic for recording audio and video content, Android only | |
voice_communication | With mic, for real-time communication, Android only | |
voice_recognition | Same mic, for speech recognition, Android only |