创建会议室而不加入rtcmulticonnection

时间:2018-10-03 15:14:14

标签: javascript html5 webrtc rtcmulticonnection

我可以使用以下方法创建并加入房间:

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 = '';
    }
  });
};

如何不加入就创建房间?

0 个答案:

没有答案