https://github.com/maikthomas/webrtc-demo
A simple WebRTC Example App with signalling server
https://github.com/maikthomas/webrtc-demo
signalling-server videocall webrtc
Last synced: about 1 month ago
JSON representation
A simple WebRTC Example App with signalling server
- Host: GitHub
- URL: https://github.com/maikthomas/webrtc-demo
- Owner: maikthomas
- Created: 2020-10-30T10:40:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-10T14:57:09.000Z (over 5 years ago)
- Last Synced: 2023-03-09T04:36:20.044Z (over 3 years ago)
- Topics: signalling-server, videocall, webrtc
- Language: JavaScript
- Homepage:
- Size: 4.32 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webrtc-demo

A simple project to demo a 1:1 video call with WebRTC.
Consisting of:
- Frontend with React
loosely following the steps described here: https://webrtc.org/getting-started/overview
- A barebones signalling server in node using socket.io
Implementing the flow described in this MDN doc: https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling#Signaling_transaction_flow
Considerations:
- The app only allows 1:1 communication between two peers, and will ignore any further client connections.
- When the first two clients connect, they are assigned a role, client1 or client2.
- In the frontend, the connection logic is different for client1 and client2 (client1 makes the offer, client2 responds etc)
- The signalling server has no persistence or retry logic for the offers, it just passes the message to the other client
- This demo does not handle any reconnection, disconnection or other real world call logic
## Building and running on localhost
Install dependencies
```sh
yarn
```
run locally:
In one terminal start the web app dev server on :8080
```sh
yarn dev
```
In another start the signalling server on :8000 (this also serves the statics but without hot reload)
```sh
yarn start
```
## Credits
Made with [createapp.dev](https://createapp.dev/)