mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-01-14 16:58:03 -05:00
27 lines
557 B
JavaScript
27 lines
557 B
JavaScript
//
|
|
// AudioEncode.js
|
|
//
|
|
// Created by Lyle Pratt, September 2011.
|
|
// MIT licensed
|
|
//
|
|
|
|
/**
|
|
* This class converts audio at a file path to M4A format
|
|
* @constructor
|
|
*/
|
|
function AudioEncode() {
|
|
}
|
|
|
|
AudioEncode.prototype.encodeAudio = function(audioPath, successCallback, failCallback) {
|
|
PhoneGap.exec("AudioEncode.encodeAudio", audioPath, GetFunctionName(successCallback), GetFunctionName(failCallback));
|
|
};
|
|
|
|
PhoneGap.addConstructor(function()
|
|
{
|
|
if(!window.plugins)
|
|
{
|
|
window.plugins = {};
|
|
}
|
|
window.plugins.AudioEncode = new AudioEncode();
|
|
});
|