In my Angular app, there is a requirement to record screen. I've used navigator.mediaDevices.getDisplayMedia to capture screen. It is working in local. But could see errors in the command line like Property 'getDisplayMedia' does not exist on type 'MediaDevices'.. Because of this error, I could not generate the build file.
Here is my code:
const videoOptions = {
video: {
cursor: 'always'
},
audio: true,
};
this.captureStream = await navigator.mediaDevices.getDisplayMedia(videoOptions);
I'm using
- Angular CLI: 11.0.2
- TS: 4.0.5
Thank you