Permalink
30068fd Nov 25, 2016
executable file 151 lines (96 sloc) 3.97 KB

Installation Guide

This page explains how to install RTCMultiConnection v3.

Fetch from Github

Github is strongly recommended. NPM or TAR are secondary options.

git clone https://github.com/muaz-khan/RTCMultiConnection.git ./
npm install --production

Or download ZIP:

Then call npm install --production.

Use --production to skip grunt dependencies. You don't need grunt until you modify library itself.

Download TAR

wget http://webrtcweb.com/rtcmulticonnection-v3.tar.gz
tar -xf rtcmulticonnection-v3.tar.gz

Install using NPM or Bower

npm install rtcmulticonnection-v3 --production

# or
bower install rtcmulticonnection-v3

Run server.js

node server.js

Now open http://localhost:9001/.

Use HTTPs

Open server.js and enable isUseHTTPs:

var isUseHTTPs = true;

Change Port

Open server.js and set port:

var port = 443;

See how to enable SSL certificates:

Remember: HTTPs is requires for screen-capturing on both Chrome & Firefox.

Chrome requires HTTPs for normal camera/mic as well.

How to check if server is running correctly?

Open this URL: https://localhost:9001/socket.io/socket.io.js

If you can load /socket.io/socket.io.js on your server then it is working fine.

Stop Old Processes

Check all processes running on port 9001 and stop process by id:

lsof -n -i4TCP:9001 | grep LISTEN
kill process-ID

Or stop all processes on a specific port. (It may require sudo privileges):

fuser -vk 9001/tcp

Now open: http://localhost:9001/

Keep running server in background

nohup nodejs server.js > /dev/null 2>&1 &

Or:

nohup nodejs server.js &

Or use forever:

npm install forever -g
forever start server.js

To auto-start server.js on system-reboot (i.e. when Mac/Linux system shuts down or reboots):

npm install forever-service

cd __path to your npm install__
forever-service install ncustomAppName --script server.js

Commands to interact with service ncustomAppName Start:

- "sudo service ncustomAppName start" Stop
- "sudo service ncustomAppName stop" Status
- "sudo service ncustomAppName status" Restart - "sudo service ncustomAppName restart"

More info about forever-service here.

Other Documents

  1. Getting Started guide for RTCMultiConnection
  2. Installation Guide
  3. How to Use?
  4. API Reference
  5. Upgrade from v2 to v3
  6. How to write iOS/Android applications?
  7. Tips & Tricks

Twitter

License

RTCMultiConnection is released under MIT licence . Copyright (c) Muaz Khan.