Skip to content

Commit

Permalink
Bug fix in #103. Thanks arturomf. Also some code cleanup and added on…
Browse files Browse the repository at this point in the history
…Error callback.
  • Loading branch information
edimuj committed Jun 12, 2023
1 parent 2c3b1c6 commit be39d52
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 189 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ var captureCfg = {
// -VOICE_RECOGNITION - Tuned for voice recognition if available (Android only)
audioSourceType: audioinput.AUDIOSOURCE_TYPE.DEFAULT,

// If you have your own error handler, you can set a callback to your function
// using the onError parameter. The callback function will be called with a single string parameter
// that contains the error message.
onError: undefined,

// Optionally specifies a file://... URL to which the audio should be saved.
// If this is set, then no audioinput events will be raised during recording.
// When stop is called, a single audioinputfinished event will be raised, with
Expand Down
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export interface AudioInputConfiguration {
// is available.
fileUrl?: string;

// Optional onError callback. Is called with error message string as parameter.
onError?: Function;

// Guess it?
debug?: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-audioinput",
"version": "1.0.2",
"version": "1.0.3",
"description": "This cordova plugin enables audio capture from the device microphone, by in (near) real-time forwarding raw audio data to the web layer of your application.",
"cordova": {
"id": "cordova-plugin-audioinput",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-audioinput"
version="1.0.2"
version="1.0.3"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">

Expand Down
Loading

0 comments on commit be39d52

Please sign in to comment.