Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the plugin to work with the latest cordova file system. #6

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions AudioEncode.js

This file was deleted.

22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
## PhoneGap AudioEncode Plugin ##
## Cordova AudioEncode Plugin ##
* by Lyle Pratt
* Updated Oct 2012 by Keenan Wyrobek for Cordova 2.1.0
* Updated November 2013 by John Croucher for Cordova 3.0
* Updated January 2014-2015 by Tomas Krones for Cordova 4.3

## Works with Cordova/Phonegap 3.1 - 4.3+ ##

## About this Plugin ##

This plugin lets you easily convert WAV audio into M4A audio. It is useful when using Phonegap's audio capture or media recording functionality. Uploading WAV files on via cellular connections is not advised. M4A encoded files are 1/4 to 1/10 the size.
This plugin lets you easily convert WAV audio into M4A audio. It is useful when using Cordova's audio capture or media recording functionality. Uploading WAV files on via cellular connections is not advised. M4A encoded files are 1/4 to 1/10 the size.

Note: .wav file is deleted after conversion.

## Using the Plugin ##

Expand All @@ -15,7 +21,9 @@ The plugin creates a function at window.encodeAudio(originalSrc, success, fail)

Example:

window.encodeAudio(pathToWavFile, success, fail);
// Note: cordova.file.documentsDirectory is from the cordova file plugin https://github.com/apache/cordova-plugin-file/
var fullPathToWavFile = cordova.file.documentsDirectory + "wavefile.wav";
window.plugins.AudioEncode.encodeAudio(fullPathToWavFile, success, fail);

var success = function(newM4APath) {
//Do something with your new encoded audio (upload it? - see notes in Xcode example)
Expand All @@ -31,10 +39,10 @@ See demo code for more details

## Adding the Plugin to your project ##

1. This plug in has been tested with Cordova/PhoneGap 2.1.0 and currently only supports iOS - has been tested on 5.1, 6.0, 6.1 & 7.0
2. Add the .h and .m files to your Plugins folder in your project.
3. Add the .js files to your "www" folder on disk, and add reference(s) to the .js files in your html file(s).
4. Go to Cordova.plist under Resources in Xcode - Under Plugins dictionalty add AudioEncode:AudioEncode
This plug in has been tested with Cordova/PhoneGap 4.3 and currently only supports iOS - has been tested on 5.1 - 8.0

1. Using Cordova CLI, in terminal navigate to your projects root directory.
2. run `cordova plugin add https://github.com/wootwoot1234/cordova-audio-encode.git`


## LICENSE ##
Expand Down
Loading