maxParticipantsAllowed | RTCMultiConnection

This property allows you set how many users can join your room.

Usage

// allow only one user
connection.maxParticipantsAllowed = 1;

// allow 4 users
connection.maxParticipantsAllowed = 4;

Description

parameterdescription
maxParticipantsAllowed it is number
a room owner can control how many participants he wants

Demo

<script src="https://rtcmulticonnection.herokuapp.com/dist/RTCMultiConnection.min.js"></script>
<script src="https://rtcmulticonnection.herokuapp.com/socket.io/socket.io.js"></script>

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'https://rtcmulticonnection.herokuapp.com:443/';

// if you want audio+video conferencing
connection.session = {
    audio: true,
    video: true
};

// allow only one user
// it will become one-to-one video chat
connection.maxParticipantsAllowed = 1;

connection.openOrJoin('your-room-id');
</script>