0

I can create and join a room using:

document.getElementById('open-room').onclick = function() {
  var roomid = roomName.value;
  if (!roomid.length) return alert('Please enter roomid.');
  this.disabled = true;
  connection.openOrJoin(roomid, function(isRoomAlreadyCreatedBySomeoneElse) {
      if (isRoomAlreadyCreatedBySomeoneElse == false) nOpenRoom();
      showRoomURL(connection.sessionid);
    } else {
      showRoomURL(roomid);
      document.getElementById('open-room').parentNode.innerHTML = '';
    }
  });
};

How can I create a room without Joining?

Tolulope
  • 488
  • 1
  • 5
  • 19
  • 1
    This feature will be added in next version (3.4.8) to keep a room alive or pre-create a room even if there are no participants. We can add API like this: `connection.setup('room-id', callback)` to pre-create a room or `connection.kill('room-id')` to stop the room however only room owner/moderator can stop it. Remember, API methods names are not decided use. Maybe I'll use something different e.g. `connection.precreateRoom` or similar. – Muaz Khan Oct 03 '18 at 16:02
  • @MuazKhan Ok, thanks, Thanks for your work with the library – Tolulope Oct 03 '18 at 16:12
  • @MuazKhanさん was this implemented? I wonder if there's a way to join a room on load for both participants, just passing the room key. Thak you – Igor O Apr 09 '19 at 02:54

0 Answers0