In my app i am using both the ionic Camera and also the media capture libraries, at different screens of the project.
in the Camera lib when i go open camera, the user is prompted to allow or deny
in the screen where we have media capture library being used for video, no such popup comes up even on first time app launch. causing to give me the permission denied error
how can i get the allow deny for media capture when doing a video
is there something i need to add in the options?
my code is as follow
let options = { limit: 1, duration: 10 };
this.mediaCapture.captureVideo(options)
.then(
(data: MediaFile[]) => {
console.log("getting the logs for video: " + JSON.stringify(data));
if (data.length == 1) {
console.log("got to data :" + JSON.stringify(data));
this.upload(data[0].fullPath, data[0].name, data[0].type);
}
},
(err: CaptureError) => console.error(err)
);
Thanks for helping me