December 15th, 2021
I created a simple framework for automatically and agnostically connecting to peer connections via sockets, establishing a webRTC peer connection, and displaying a video for each role, then assigning roles based on the endpoints at which those connections are achieved. The order of connection does not matter. A new connection to a role will bump the previous role. More complex user sets will require a STUN server.
Read more about it on the socket-identities git repo