MenuMenu

RTCMultiConnection.onUserIdAlreadyTaken

Userid must be unique

How to use

connection.onUserIdAlreadyTaken = function(useridAlreadyTaken, yourNewUserId) {
    console.warn('Userid already taken.', useridAlreadyTaken, 'Your new userid:', yourNewUserId);
    connection.userid = connection.token();
    connection.join(connection.sessionid);
};