RTCMultiConnection Docs

RTCMultiConnection.openOrJoin | "method"

HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?

"connection.openOrJoin" method allows you auto-open or auto-join any room.
"openOrJoin" method will create room if it does NOT exists. Otherwise it will join it.

"openOrJoin" method requires RTCMultiConnection >= v3.

"connection.openOrJoin" method accepts "room-id" as first argument; and [optional] callback as second argument:

connection.openOrJoin( 'room-id' );

// or
connection.openOrJoin( 'room-id', function(isRoomExists, roomid) {
    alert(isRoomExists ? 'You joined room' : 'You created room');

Latest Issues

Want to ask a Question?

You can include your email for private conversation!

Latest Updates