Reputation: 91
I've asked this question before a few years back on the now defunct Twilio Community forums and I can no longer get to the insights provided there. Basically, I'm looking for a suggested approach to allow an unknown amount of users to visit a site and optimally pair these visitors in random Twilio Video rooms with 1 other participant. I guess you could say it is a bit like Chat Roulette, without the roulette bit. Once two users are paired, they would undergo another experience together, like watching a piece of content.
I suppose I would put all current users into a queue and put two of them at a time into WebRTC Go or P2P rooms. Another technique I used in the past, which may work here is allowing more than 2 users into a room, let's say, 20, and then writing logic which can optimally pair up the 20 participants?
Upvotes: 0
Views: 71
Reputation: 3300
Twilio developer evangelist here. Both of those ways would work! I might recommend you look at this app my former teammate Dominik Kundel made: it's a Twilio Video Demo that randomly connects people with each other.
Upvotes: 3