Can I pair participants with other random participants? (More inside)

I'm looking to build an application which requires a user to grant access to their webcam in order to listen to a song. The catch? Users will be able to randomly view other individuals listening in real time. Unlike a chat roulette experience, it is not important that two individuals see each other but rather that each user see a random individual (and are seen by a random individual.)

My first thought was to place users in 50 participant video chats and build a UI which randomly showed one of those participants to the user. And just spin up as many of these 50 participant chats necessary to meet demand.

Is there another way I can meet the core goal of my concept? Allowing users to randomly see other individual users and be seen by other users?

Best Answer

  • dtoomey
    dtoomey admin
    Accepted Answer

    If you are ok with just matching each participant with someone else in the same Room, then you can have 50 participants in the same Room and each participant can just turn on a video track corresponding to another participant in that Room. By default each participant subscribes to the published tracks of all other participants, however by using the track switch off control feature of the 2.14+ version of the JavaScript SDK you can switch off the video tracks you are not interested in. You simply attach the video track you are interested in to a video element and that is the one that will be sent by the media server. More details are available here.

Answers

Sign In or Register to comment.