-
-
Save Raynos/3368250 to your computer and use it in GitHub Desktop.
PeerConnection hack
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
// one end | |
// send offer | |
var stream = PeerConnectionStream(remoteId) | |
// wait for answer to open | |
stream.on("open", function () { | |
// do shit | |
}) | |
// other end | |
// receive offer | |
discoveryNetwork.on("stream", function (remoteId, stream) { | |
// send answer and wait for answer received on other end to open | |
stream.on("open", function () { | |
// do shit | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment