MenuMenu

RTCMultiConnection.maxParticipantsAllowed

Set max-limit for room members/participants

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>