Created
June 5, 2019 19:05
-
-
Save RangerMauve/62501c98b42c63f2de6ee0644a6852ff to your computer and use it in GitHub Desktop.
WebRTC Signaling with Dat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebRTC, unlike Dat, requires doing a handshake through a third party. | |
With beaker, that third party can be the existing P2P connections that you have. | |
To connect between two peers you need to do the following: | |
- Create a Dat Archive for the call website | |
- Listen on messages in the [dat-peers API](https://beakerbrowser.com/docs/apis/experimental-datpeers) | |
- Have the user enter a "room" | |
- Set up the WebRTC connection, send the SDP handshake and the `room` through datPeers | |
- When you get messages for your room, pass them to the local PeerConnection as being remote SDP or ICE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment