MenuMenu

RTCMultiConnection.disconnectWith

Close peer connection with a specific user

This method allows you leave any single user.

This method accepts "remote-user-id" as the only argument:

connection.disconnectWith( 'remote-userid' );

// or
// to leave entire room
connection.getAllParticipants().forEach(function(participantId) {
    connection.disconnectWith( participantId );
});