Cordova's media api doc: http://docs.phonegap.com/en/edge/cordova_media_capture_capture.md.html#Capture
package: http://plugins.cordova.io/#/package/org.apache.cordova.media
声音录制这里有一个使用 Cordova 的 sample: https://software.intel.com/en-us/html5/articles/media-sample-with-phonegap
As the sample said:
The requirements for the Media sample program are:
- Use of the PhoneGap compatible Media object
- Recording the sound through device microphone
- Playback newly recorded sound as well as old recording
- Support Android* devices
- Support Apple iOS* devices
Design Considerations
First of all, this app is for demonstrating the PhoneGap media object functionality. The UI should be simple and clear. All the buttons need to be in a good state when app starts. The [Play] button should be enabled only when there is a recorded audio file.
Second, the app limits the recording time to 10ms because it is a demo app only.
Last, the goal is to have one code base that supports multiple platforms using PhoneGap. But because of differences of media support and file system between iOS* and Android*, you will find several places where specific code is implemented for a specific platform.