0

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.');

});
1
  • You say it's not working but you haven't showed anything that indicates that. You need to provide more info such as the console logs. Commented Mar 7, 2023 at 14:52

1 Answer 1

0

Unfortunately, the method mediaDevices.getDisplayMedia() does not work on WebView Android and some other mobile browsers. You can check the browser compatibility for getDisplayMedia() here.

Please note that getDisplayMedia() may not be available on all mobile browsers or WebView implementations. You may need to find an alternative solution or consider using a different approach for capturing the display on mobile devices.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.