Extending this example into a Chatroulette app
Now that you have a working application that connects two users in a peer-to-peer video call, you can easily extend this in a number of ways. One option is to change the setup and signaling flow so that callees are connected to random callers just like the video Chatroulette applications that have sprung up all across the Internet. Have a look at this Google search, https://www.google.com/search?q=video+chat+roulette.
To implement this type of functionality, you only need to make two simple changes.
First, each browser that connects to the web page can randomly be allocated as either a caller or a callee, removing the need for the caller to send a link with call_token
to the callee. In this new application, users just visit the web page and are automatically entered into either the caller or callee scenario.
Second, update the signaling server so that when a callee joins, the signaling server loops through the webrtc_discussions
object looking...