Skip to content

Instantly share code, notes, and snippets.

@luckyyang
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luckyyang/00286f1a505933d95b84 to your computer and use it in GitHub Desktop.
Save luckyyang/00286f1a505933d95b84 to your computer and use it in GitHub Desktop.
Cordova's media api

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.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment