Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function takePicture(){
- var options = {
- quality: 80,
- destinationType: Camera.DestinationType.FILE_URI,
- encodingType: Camera.EncodingType.PNG,
- mediaType: Camera.MediaType.PICTURE,
- pictureSourceType: Camera.PictureSourceType.CAMERA,
- allowEdit: true,
- targetWidth: 300,
- targetHeight: 300,
- //saveToPhotoAlbum: true
- }
- navigator.camera.getPicture( onSuccess, onFail, options );
- }
- function onSuccess(imageURI) {
- img.src = imageURI;
- document.getElementById("theFirstStars").classList.remove("hidden");
- document.querySelector(".btn-positive").style.display="none";
- img.classList.remove("hidden");
- }
- function onFail(message) {
- alert('Failed because: ' + message);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement