Open rayj00 opened 4 years ago
It doesn't work in the Scaleable Broadcast example, but I haven't found a solution yet. I use it in voice conference. I hope it helps.
create room
// get roomname and password input value using jquery
var room_name = $("#input-roomName").val();
connection.password = $("#input-password).val();
connection.open(room_name, function(isRoomOpened, roomName, error){
if(isRoomOpened && !error){
console.log('successful create room');
}else{
console.log('error create room :' + error);
}
});
join room // get roomname and password input value using jquery var room_name= $("#input-roomName").val(); connection.password = $("#input-password).val(); connection.join(room_name, function(isJoinedRoom, roomName, error){ if(error){ switch(error){ case 'Invalid password': alert('Invalid password.'); break; case 'Room not available': alert('Room not available'); break; case 'Room full': alert('Room full'); break; default: } }else{ console.log('successful join room'); } });
Please advise how I can password protect Scaleable Broadcast or just RTCMulticonnection. I don't quite understand how to use the API for this. I want to stop anybody access while I am testing.
Thanks,
Ray