Created
August 24, 2017 16:12
-
-
Save pavei/14bf9ed59b4fbcf99154565af69d9d86 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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