Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
cordova-plugin-audio-recorder-api
Advanced tools
This plugin is a Cordova audio recorder plugin which works as API.
This plugin is a Cordova audio recorder plugin that works as API.
Different than http://plugins.cordova.io/#/package/org.apache.cordova.media-capture this plugin does not request the native recorder app (system default recorder) and active recording manually.
$ cordova plugin add cordova-plugin-audio-recorder-api
var recorder = new Object;
recorder.stop = function() {
window.plugins.audioRecorderAPI.stop(function(msg) {
// success
alert('ok: ' + msg);
}, function(msg) {
// failed
alert('ko: ' + msg);
});
}
recorder.record = function() {
window.plugins.audioRecorderAPI.record(function(msg) {
// complete
alert('ok: ' + msg);
}, function(msg) {
// failed
alert('ko: ' + msg);
}, 30); // record 30 seconds
}
recorder.playback = function() {
window.plugins.audioRecorderAPI.playback(function(msg) {
// complete
alert('ok: ' + msg);
}, function(msg) {
// failed
alert('ko: ' + msg);
});
}
iOS: /var/mobile/Applications/<UUID>/Library/NoCloud/<file-id>.m4a
Android: /data/data/<app-id>/files/<file-id>.m4a
Example with file plugin: http://ngcordova.com/docs/plugins/file/
iOS: /var/mobile/Applications/<UUID>/Documents/new_file.m4a
Android: <sdcard>/new_file.m4a
window.plugins.audioRecorderAPI.record(function(savedFilePath) {
var fileName = savedFilePath.split('/')[savedFilePath.split('/').length - 1];
var directory;
if (cordova.file.documentsDirectory) {
directory = cordova.file.documentsDirectory; // for iOS
} else {
directory = cordova.file.externalRootDirectory; // for Android
}
$cordovaFile.copyFile(
cordova.file.dataDirectory, fileName,
directory, "new_file.m4a"
)
.then(function (success) {
alert(JSON.stringify(success));
}, function (error) {
alert(JSON.stringify(error));
});
}, function(msg) {
alert('ko: ' + msg);
}, 3);
FAQs
This plugin is a Cordova audio recorder plugin which works as API.
The npm package cordova-plugin-audio-recorder-api receives a total of 15 weekly downloads. As such, cordova-plugin-audio-recorder-api popularity was classified as not popular.
We found that cordova-plugin-audio-recorder-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.