Last active
January 17, 2018 19:54
-
-
Save cozzbie/b306206023c20dca4891411a7a88a400 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Create Bobs WebRTC Peer. (same as Alice) | |
// ... | |
//Set Alice's description as the remote | |
bob.setRemoteDescription(new RTCSessionDescription(data)) // 'data' is the session description from Alice | |
.then(function(){ | |
//Create answer | |
bob.createAnswer({ offerToRecieveAudio: 1, offerToReceiveVideo: 1 }) | |
.then(function(description){ | |
// Bob saves his description locally | |
bob.setLocalDescription(new RTCSessionDescription(description)); | |
// Send this description to Alice. This action is seen as acceptance of the call from Alice. | |
// ... | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment