[enter image description here][1]I was using facing issue while open camera using action sheet and getting following error.
CameraProxy.js:105 Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. at successCallback (CameraProxy.js:105)
My ionic camera version is "@ionic-native/camera": "^4.3.0"
.
Is there an issue with actionsheet or native plugin?
My camera is getting started but not working.
The below was typescript code for camera
const actionSheet = this.actionSheetController.create({
title: 'Actions',
buttons: [{
text: 'upload',
role: 'destructive',
icon: 'upload',
handler: () => {
console.log('camera clicked');
const options: CameraOptions = {
quality: 100,
destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
};
this.camera.getPicture(options).then((imageData) => {
this.ProfileInfo.profileImagePath = 'data:image/png;base64,' + imageData;
this.ProfileInfo.profileimage = imageData;
this.updateImage(this.ProfileInfo);
}, (err) => {
});
}
}, {
text: 'camera',
icon: 'camera',
handler: () => {
console.log('camera clicked');
const options: CameraOptions = {
quality: 100,
destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
sourceType: this.camera.PictureSourceType.CAMERA
};
this.camera.getPicture(options).then((imageData) => {
this.ProfileInfo.profileImagePath = 'data:image/png;base64,' + imageData;
this.ProfileInfo.profileimage = imageData;
this.updateImage(this.ProfileInfo);
}, (err) => {
});
}
}, {
text: 'Cancel',
icon: 'close',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
}]
});
actionSheet.present();