you are completely free to define the room access in any way you want. In the case of the demo (note that this is just an example to serve as a basis to start out and/or give you ideas how to implement it) the index.jsx creates a random string, if not provided in the GET as roomId, and uses that as a GET parameter within the WebSocket url that is automatically created (see lib/urlFactory.js). This websocket url is then used for a dedicated protoo handler that holds all participants who registered with this roomId. In the mediasoup sphere, “rooms” are called “router”. You are free to define rooms that are made of multiple routers for horizontal scaling etc., but that is probably getting ahead a bit too much.
In general, the demo server parses the information when the websocket connection is established and creates the corresponding room (see server.js).
Also can i use server and client separately
Absolutely, I’m personally using a modified version of the demo server and can connect to it through Android or any other means. Never had any issues.
I want to have complete REST architecture.
WebRTC requires intensive back-and-forth communication, so you’d have a miserable time implementing something with pure REST. The client would essentially need to poll for new information all the time, which would be a nightmare to implement.