Reputation: 161
Hi I am developing a virtual classroom for a E-Learning platform in sweden and Currently I am using programmable video from Twilio to handle the audio and video feed.
It is working perfectly how I want it to but right now what I want to add is screen sharing.
I can't find anything on how to add it to the "room", is there anywhere I can go to do so?
I have looked into webrtc experiments a bit but is it easy to implement with twilio?
Thanks
Upvotes: 1
Views: 2618
Reputation: 2479
A web app/chrome extension is required for this. The extension is very lightweight and just prompts the user to escalate permissions to enable Chrome's screen sharing functionality. Since Chrome extensions are associated with specific domains, you'll need to publish and manage your own extension but you can basically just copy/paste it from the given template.
Here is Twilio's guide: https://www.twilio.com/docs/api/video/screen-capture-chrome
Upvotes: 0
Reputation: 73027
Twilio developer evangelist here.
As far as I'm aware, screen sharing over WebRTC still requires the user to install an extension as it is not part of the browser's implementation.
If you are ok with installing extensions, then check out the documentation at the WebRTC experiments which shows the media constraints you need to pass to getUserMedia
in order to share the screen. You can then pass those constraints to Twilio Video when setting up your local media.
// for chrome
mandatory: {chromeMediaSource: 'screen'}
// or desktop-Capturing
mandatory: {chromeMediaSource: 'desktop'}
// for Firefox
video: {
mediaSource: 'window' || 'screen'
}
Upvotes: 1