Screen Sharing on your Local Server

Muaz Khan edited this page Mar 27, 2016 · 1 revision

This wiki explain:

How to implement client-side (local) screen-sharing without involving any 3rd-party service or extension or addon.

First step

Chrome users: Make a ZIP of this:

Add localhost or www.yourdomain.com here:

"matches": ["https://localhost:8080/*"]

Firefox users: Make XPI of this:

Add localhost or www.yourdomain.com here:

var arrayOfMyOwnDomains = ['yourdomain.com', 'www.yourdomain.com', 'localhost'];

Second step

  1. Chrome users: install above ZIP
  2. Firefox users: install above XPI

Third step

Download RTCMultiConnection codes:

Or via wget:

mkdir RTCMultiConnection-v3
cd RTCMultiConnection-v3
wget http://dl.webrtc-experiment.com/rtcmulticonnection-v3.tar.gz
tar -zxvf rtcmulticonnection-v3.tar.gz
ls -a

Please check other options (e.g. NPM/Git/bower/etc.) here:

Fourth step

Run the server.js file and open https://localhost:9001 or https://yourdomain.com:9001:

node server.js

# if you installed via NPM
cd node_moduels/rtcmulticonnection
node server.js

Last step

Try this demo:

First user should open the room, and rest should join.

Remember

  1. RTCMultiConnection is running top over socket.io which means that everything is in your own hands
  2. RTCMultiConnection is using 2-3 STUN/TURN servers however you can always remove/skip 3rd party URLs
  3. Screen sharing requires HTTPs in Firefox; however Chrome requires HTTPs for everything.
  4. RTCMultiConnection, by default, tries to use fake-certificate however you can use valid certificates as well
  5. Firefox addon or chrome extension is required to enable screen for your domain or localhost

Addon or chrome-extension is required only for the person who shares his screen. Other users don't need to install anything.