MenuMenu

RTCMultiConnection.acceptParticipationRequest

Validate person who is joining your room

How to use

connection.onNewParticipant = function(participantId, userPreferences) {
    // if OfferToReceiveAudio/OfferToReceiveVideo should be enabled for specific users
    userPreferences.localPeerSdpConstraints.OfferToReceiveAudio = true;
    userPreferences.localPeerSdpConstraints.OfferToReceiveVideo = true;

    userPreferences.dontAttachStream = false; // according to situation
    userPreferences.dontGetRemoteStream = false;  // according to situation

    // below line must be included. Above all lines are optional.
    // if below line is NOT included; "join-request" will be considered rejected.
    connection.acceptParticipationRequest(participantId, userPreferences);
};

Please check this API as well: onNewParticipant