Reputation: 53
I am using this CameraOptions
private optionsCamera: CameraOptions = {
quality: 50,
saveToPhotoAlbum: false,
correctOrientation:true,
allowEdit: true,
targetWidth:1024,
targetHeight:1024,
sourceType: this.camera.PictureSourceType.CAMERA,
cameraDirection: this.camera.Direction.FRONT, // also i use Numbers also "1"
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.PNG,
mediaType: this.camera.MediaType.PICTURE,
}
but after build still android open a back camera only
Kindly help me for alternative camera plugin (default front camera) or fix this bug for ionic 4
Upvotes: 0
Views: 1258
Reputation: 2043
from document:
CameraOptions Errata
Android Quirks
Any cameraDirection value results in a back-facing photo. (= You can only use the back camera)
https://github.com/apache/cordova-plugin-camera#android-quirks-1
Upvotes: 1