edimuj / cordova-plugin-audioinput

This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
https://github.com/edimuj/app-audioinput-demo
MIT License
161 stars 88 forks source link

Working with audioinput on ionic2 #26

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello, I've tried running the audioinput plugin on an ioinic2 app but there is no response or indication that he plugin is working, for example, I did console.log(window.audioinput); but the audioinput object does not print to console log. Does this plugin work in with another plugin? or will have to write a Web Audio API code to work with the window.audioinput? or is it completely stand alone? I would like to see a working demo code with ionic2 or angular2. Note: I couldnt figure out how to use the example demo code found on the plugin. Edit: window.audioinput prints undefined in console log.

ghost commented 8 years ago

`import {Component} from '@angular/core'; import {NavController, Platform} from 'ionic-angular';

@Component({ templateUrl: 'build/pages/contact/contact.html' }) export class ContactPage { //public platform: any;

constructor(private navCtrl: NavController, private platform: Platform) { platform.ready().then(() => {

    // (<any>window).audioinput is same as window.audioinput
    console.log((<any>window).audioinput); // prints undefined in console
});

}

} `

edimuj commented 8 years ago

Hmm, not quite sure if I understand, this is just a regular Apache Cordova plugin. From your code it doesn't look like the plugin has been installed into your project. How did you perform the actual import/install of the cordova-audioinput-plugin?

I don't use ionic myself, but I've understood that it can be a bit confusing regarding how to use Cordova plugins together with ionic, since you can do it in a number of different ways. This article seems to clarify a lot of things regarding this subject: http://www.joshmorony.com/using-cordova-plugins-in-ionic-2-with-ionic-native

edimuj commented 8 years ago

Closing this issue since there's been no response for a month now.

faustofjunqueira commented 7 years ago

Hello, I have the same problem, How you solved this problem?

faustofjunqueira commented 7 years ago

I found the bug. Don't run the ionic run with livereload.

cya

edimuj commented 7 years ago

@faustofjunqueira thanks for sharing!