I was integrated the video calling with room creations using Twilio npm package after that I got another requirement to implement screen sharing functionality the below code working fine for the web browsers but during the video call in mobile app is not working, if any help provided how to do that implementation with Twilio or without Twilio will be appreciated.
mediaDevices.getDisplayMedia({ constraints }).then(stream =\> {
this.screenTrack = new LocalVideoTrack(stream.getTracks()\[0\],);
room.localParticipant.publishTrack(this.screenTrack);
this.screenshared(this.screenTrack);
this.shareText = 'Stop sharing';
this.screenTrack.mediaStreamTrack.onended = () =\> { this.shareScreen() };
}).catch((err) =\> {
console.log(err);
alert('Could not share the screen.');
});