Im trying to use this plugin in my Ionic3 app:
I have managed to install the plugin with:
cordova plugin add https://github.com/VirtuoWorks/CanvasCameraPlugin.git && cordova prepare
My problem is what to do next, i need to include the plugin into the app, with ionic native plugins this can be done like this:
import { SplashScreen } from '@ionic-native/splash-screen';
But what should i use for the CanvasCamera plugin?
import { CanvasCamera } from '??????';
My current code:
declare let CanvasCamera: any;
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Platform } from 'ionic-angular';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController, public platform: Platform) {
this.canvasCameraStart();
}
canvasCameraStart() {
this.platform.ready().then(() => {
var options = {
quality: 75,
destinationType: CanvasCamera.DestinationType.DATA_URL,
encodingType: CanvasCamera.EncodingType.JPEG,
width: 640,
height: 480
};
CanvasCamera.start(options);// here call the plugin's method
});
}
}