Streams : Creating a screensharing stream

Here is a description of the different steps to create a screenSharing stream. Our sample also demonstrate the usage of this stream in a conference.

Compatibility :

Screensharing is available on browsers :

  • Chrome :
  • Supported using an extension, please note that inline extension installation is disabled since September 12, 2018. Check the Note from Chromium. Our extension is available on Chrome Store.
  • Firefox :
  • Natively supported since Firefox version 52
  • Edge :
  • Natively supported, Screen Capture APIs require Windows 10 Pro or Enterprise. See the Note from Microsoft

Create your screenSharing stream

Use captureSourceType parameters to define set of desktop media sources you want to propose your user to share. Check our documentation on createScreensharingStream

        var captureSourceType = ["screen", "window", "tab", "audio"];
        apiRTC.Stream.createScreensharingStream(captureSourceType)
            .then(function(stream) {
                //Use your screenSharing stream
            })
            .catch(function(err) {
                console.error('Could not create screensharing stream :', err);
            });
    

Information to establish conference

Check our tutorial on registration if you need more details about conference establishment.

Live Demo