hi i install , beacuse native-cordova is deprecated , so please guide me which plugin best gor me video record with audio . and also guide me how to fix this error
awesome-cordova-plugin @media-capture , but video not record showing this error
Error :
src/app/home/home.page.ts:59:9 - error TS2345: Argument of type ‘(data: MediaFile) => void’ is not assignable to parameter of type ‘(value: MediaFile | CaptureError) => void | PromiseLike’.
Types of parameters ‘data’ and ‘value’ are incompatible.
Type ‘MediaFile | CaptureError’ is not assignable to type ‘MediaFile’.
Type ‘CaptureError’ is missing the following properties from type ‘MediaFile’: length, pop, push, concat, and 26 more.
59 (data: MediaFile) => { }
}
Code : async takeVideo() {
const options: CaptureVideoOptions = {
limit: 1,
duration: 30, // Set the maximum duration for the recording (in seconds)
};
this.mediaCapture.captureVideo(options)
.then(
(data: MediaFile) => {
console.log(data);
},
(err: CaptureError) => console.error(err)
);
}