Dele Olajide

WebRTC Screen Share with Openfire

Blog Post created by Dele Olajide Champion on Apr 2, 2013

Chrome version 26 stable and Firefox (Nightly build) now support full desktop screen sharing. In Chrome, you have to enable "Enable screen capture support in getUserMedia()" with the chrome://flags URL.

 

Image1.jpg

 

As the desktop screen is treated as a video device, you only have to make a change to the getUserMedia method for video and your existing application will work with no further changes. As an example, I only made the following change to my webrtc video example and now it allows two users to share their desktop screens

 

navigator.webkitGetUserMedia(
    {video:{mandatory: {chromeMediaSource: 'screen'}}},
    this.onUserMediaSuccess.bind(this),
    this.onUserMediaError.bind(this)
);

 

To see it in action, just click on this URL https://webrtc.free-solutions.org:8443/webrtc/screen.html from two different PCs. Register with two different user names (no spaces or special characters).

 

It is hosted by the very good kind and generous folks at free-solutions.org

Outcomes