i think all is in the title: how can i get my socket id once a room is joined ? or can i specify the id i want on join ?
and in the same flavor, how can i identify the origin of a message when a message is received through a room ?
thanks !
function joinRoom() {
connection.join({name: getRoomName()}).on(ROOM_EVENT.STATE, function(room){
var participants = room.getParticipants();
console.log("Current number of participants in the room: " + participants.length);
...
}
As you can see you can set arbitrary unique room name and join to the room. Second user can join the same room by room name.
how can i identify the origin of a message when a message is received through a room ?