Skip to content

Instantly share code, notes, and snippets.

@pavei
Created August 24, 2017 16:12
Show Gist options
  • Save pavei/14bf9ed59b4fbcf99154565af69d9d86 to your computer and use it in GitHub Desktop.
Save pavei/14bf9ed59b4fbcf99154565af69d9d86 to your computer and use it in GitHub Desktop.
/**
* Switch from back to front cämera
*/
refresh(){
this.cameraPreview.switchCamera();
}
/**
* Back button
*/
back(){
this.navCtrl.pop()
}
takePicture(){
var self = this;
const pictureOpts = {
quality: 80
}
this.cameraPreview.takePicture(pictureOpts).then(base64PictureData =>{
self.srcPhoto = base64PictureData;
self.cameraPreview.hide().then(() => {
})
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment