ammm,
well, I worked the camera with the camera plugin preview,
- $ ionic cordova plugin add cordova-plugin-camera-preview
$ npm install --save @ionic-native/camera-preview
2.import in your app.module and provider Camerapreview
3. i used this code in constructor in my case home.ts
this.cameraPreview.switchCamera();
let cameraPreviewOpts: CameraPreviewOptions = {
x: 0,
y: 0,
width: window.screen.width,
height: window.screen.height,
camera: 'rear',
tapPhoto: true,
previewDrag: true,
toBack: true,
alpha: 1
}
this.cameraPreview.startCamera(cameraPreviewOpts).then(
(res) => {
console.log(res)
},
(err) => {
console.log(err)
});
build, now should working , regards.