2019-11-19 00:03:00 -03:00
2017-06-20 18:40:19 -04:00
2019-11-13 22:27:34 -03:00
2019-11-13 22:27:34 -03:00
2019-11-18 13:52:55 -03:00
2018-11-22 11:35:44 -08:00
2019-11-13 22:35:48 -03:00
2019-11-16 23:49:14 -03:00
2019-11-14 00:30:16 -03:00
2016-04-03 13:18:58 -04:00
2019-11-18 23:29:31 -03:00
2019-11-14 00:27:22 -03:00
2017-06-18 09:41:06 -04:00
2019-11-19 00:02:00 -03:00
2019-11-19 00:03:00 -03:00

Peer Calls

Build Status NPM Package

WebRTC peer to peer calls for everyone. See it live in action at peercalls.com.

Work in progress.

Requirements

Stack

  • Express
  • Socket.IO
  • React
  • Redux
  • TypeScript (since peer-calls v2.1.0)

Installation & Running

Using npx (from NPM)

npx peer-calls

Installing locally

npm install peer-calls
./node_modules/.bin/peer-calls

Installing Globally

npm install --global peer-calls
peer-calls

Using docker

Use the jeremija/peer-calls image from Docker Hub:

docker pull jeremija/peer-calls
docker run --rm -it -p 3000:3000 peer-calls:latest

From git source

git clone https://github.com/jeremija/peer-calls.git
cd peer-calls
npm install

# for production
npm run build
npm start

# for development
npm run start:watch

Building Docker image

git clone https://github.com/jeremija/peer-calls
cd peer-calls
docker build -t peer-calls .
docker run --rm -it -p 3000:3000 peer-calls:latest

Configuration

There has been a breaking change in v3.0.0. The default binary provided via NPM is now called peer-calls, while it used to be peercalls. This has been made to make npx peer-calls work.

Version 3 also changed the way configuration works. Previously, config module was used to read config files. To make things simpler, a default STUN configuration will now be used by default. Config files can still be provided via the config/ folder in the working directory, but the extension read will be .yaml instead of .json.

The config files are read in the following order:

  • node_modules/peer-calls/config/default.yaml
  • node_modules/peer-calls/config/${NODE_ENV}.yaml, if NODE_ENV is set
  • node_modules/peer-calls/config/local.yaml
  • ./config/default.yaml
  • ./config/${NODE_ENV}.yaml, if NODE_ENV is set
  • ./config/local.yaml

No errors will be thrown if a file is not found, but an error will be thrown when the required properties are not found. To debug configuration issues, set the DEBUG environment variable to DEBUG=peercalls,peercalls:config.

Additionally, version 3 provides easier configuration via environment variables. For example:

 - Set STUN/TURN servers: `PEERCALLS__ICE_SERVERS='[{"url": "stun:stun.l.google.com:19302", "urls": "stun:stun.l.google.com:19302"}]'
 - Change base url: `PEERCALLS__BASE_URL=/test`
 - Enable SSL: `PEERCALLS__SSL='{"cert": "/path/to/cert.pem", "key": "/path/to/cert.key"}'`
 - Enable SSL: `PEERCALLS__SSL=undefined`

See config/default.yaml for sample configuration.

By default, the server will start on port 3000. This can be modified by setting the PORT environment variable to another number, or to a path for a unix domain socket.

To access the server, go to http://localhost:3000 (or another port).

Testing

npm install
npm test

Browser Support

Tested on Firefox and Chrome, including mobile versions.

Does not work on iOS 10, but should work on iOS 11 - would appreciate feedback!

For more details, see here:

Contributing

See Contributing section.

If you encoutner a bug, please open a new issue! Thank you ❤️

License

MIT

Description
No description provided
Readme 4 MiB
Languages
TypeScript 88.9%
SCSS 9.3%
HTML 1.1%
JavaScript 0.4%
Dockerfile 0.3%