Files
phonegap-plugins/iOS/AudioRecord/AudioRecord.js
Francis Chong 84186b1990 Cordova 1.5.0 support of AudioRecord plugin.
Copied from iPhone/AudioRecord with following changes:
- rename classes for Cordova
- fix bug in stopRecordWithSettings()
2012-03-31 12:49:04 +08:00

25 lines
689 B
JavaScript

//
// AudioRecord.js
//
// Created by Lyle Pratt, September 2011.
// MIT licensed
//
/**
* PhoneGap's provided media library does not let you provide settings to the recording process
* resulting in large, stereo files of a specific, unchangable bitrate and sampling rate. These
* functions are intended to remedy that.
* @constructor
*/
/**
* Start recording audio file.
*/
Media.prototype.startRecordWithSettings = function(options) {
Cordova.exec(null, null, "AudioRecord","startAudioRecord", [this.id, this.src, options]);
};
Media.prototype.stopRecordWithSettings = function() {
Cordova.exec(null, null, "AudioRecord","stopAudioRecord", [this.id, this.src]);
};