NOTE: This is more of an experiment than an actual application.
Trivial real time one-on-one video call implementation using WebRTC API.
- Audio
- Auth system
- Consistent storage for the websocket server for parallel calls handling
- Currently there's no dynamic peer connection updates when a remote client joins a call via a link. You will need to refresh the page on the local peer side to make it work
- Not tested in production
- WebRTC API
- Websocket server (Signaling channel) (port: 8080)
- HTTP server powered by Express.js (port: 8000)
- Node.js
- MongoDB
- mkcert
Certificates to generate for HTTPS connection:
- certs/cert-key.pem (Certificate's private key)
- certs/cert.pem (Certificate)
To have HTTPS connection in the local development environment I used mkcert to generate SSL certificates and local CA authority.
If you're having an Insecure Connection warning before you can proceed to the website, there could be many reasons for it. But here are some of the more common ones I've faced myself:
-
If you try to access express.js server from your mobile device on your local network, make sure you add your machine's local ip address (e.g. 192.168.1.2) to the DNS resolver of your SSL certificate. This stackoverflow question should help.
-
On desktop, make sure you've added your CA authority to the browser's trust store.
To check peer connection status in browser (Firefox) use the following url:
about:webrtc
NOTE: Make sure you've generated SSL certificates in certs/ folder prior to launching servers
Install npm packages
$ cd Webcall/
$ npm install
Express.js server
$ cd express/
$ node server.js
Websocket server
$ cd websocket/
$ node server.js
Go to
https://localhost:8000