video/comms/webrtc-ws-example
bel 7ab1723a5e archive 2021-09-14 06:30:17 -06:00
..
.gitignore archive 2021-09-14 06:30:17 -06:00
README.md archive 2021-09-14 06:30:17 -06:00
client.js archive 2021-09-14 06:30:17 -06:00
index.html archive 2021-09-14 06:30:17 -06:00
package-lock.json archive 2021-09-14 06:30:17 -06:00
package.json archive 2021-09-14 06:30:17 -06:00
server.js archive 2021-09-14 06:30:17 -06:00
startup.sh archive 2021-09-14 06:30:17 -06:00
style.css archive 2021-09-14 06:30:17 -06:00

README.md

WebRTC Video and Signaling sample

This sample demonstrates how to use WebSockets to create a signaling server for WebRTC calling. The signaling server is based on the WebSocket, opening a video call to another user by clicking on their name in the user list sidebar.

See the article Signaling and video calling on MDN for detailed information on how this code works.

Original example at https://github.com/mdn/samples-server/tree/master/s/webrtc-from-chat doesn't work properly. This project fixing it and use only video call, without a chatbox.

This is a demo purpose project, should not be used in production

  • Create a Linux VM
  • Install NodeJs and npm
apt install nodejs npm openssl
  • create a folder /app
mkdir -p /app
  • upload content into the folder
  • run the server
cd /app; sh startup.sh
  • open web browser at https://<YOUR_SERVER_IP>

NOTE on SSL The certificate is self signed, so allow your browser to open your untrusted website.