Working with audioinput on ionic2
opened this issue · comments
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.
`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
});
}
}
`
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
Closing this issue since there's been no response for a month now.
Hello,
I have the same problem,
How you solved this problem?
I found the bug.
Don't run the ionic run with livereload.
cya
@faustofjunqueira thanks for sharing!