This is a cordova plugin for audio recording. And the record will be compressed into MP3 format by LAME.
- iOS >= 6.0
- Android >= 4.0
AudioRecorder.MAX
= 1AudioRecorder.NORMAL
= 2AudioRecorder.LOW
= 3
NOTE: The transformation of mp3 files by LAME may fail when using other samplingrates.
AudioRecorder.startRecord(options, success, error);
-
options: recorder settings
outSamplingRate
: Set sampling rate for output mp3. default: 22050(number)outBitRate
: Set bit rate for output mp3. default: 16(number)isChatMode
: If true then set AVAudioSessionModeVoiceChat in iOS and use NoiseSuppressor in Android. default: false(boolean)isSave
: If true then save mp3 file into device storage. default: false(boolean)
-
success: startRecord success callback.
-
error: startRecord error callback.
errorMessage
: a string about error(string)
AudioRecorder.stopRecord(success, error)
-
success: stopRecord success callback.
file
: output mp3 file object(This is a temporary file on device)name
: mp3 file's name.(string)type
:'audio/mpeg'
(string)uri
: file local uri(string)
-
error: stopRecord error callback
- 'errorMessage': a string about error(string)
- Set duration for audio recording.
Save record in device storage.- Play audio on device or Internet