[mirotalksfu] - update rules
هذا الالتزام موجود في:
@@ -97,6 +97,8 @@ let wbPop = [];
|
||||
|
||||
let isButtonsVisible = false;
|
||||
|
||||
let isRoomLocked = false;
|
||||
|
||||
// ####################################################
|
||||
// INIT ROOM
|
||||
// ####################################################
|
||||
@@ -1126,11 +1128,13 @@ function handleRoomClientEvents() {
|
||||
hide(lockRoomButton);
|
||||
show(unlockRoomButton);
|
||||
setColor(unlockRoomButton, 'red');
|
||||
isRoomLocked = true;
|
||||
});
|
||||
rc.on(RoomClient.EVENTS.roomUnlock, () => {
|
||||
console.log('Room Client unlock room');
|
||||
hide(unlockRoomButton);
|
||||
show(lockRoomButton);
|
||||
isRoomLocked = false;
|
||||
});
|
||||
rc.on(RoomClient.EVENTS.exitRoom, () => {
|
||||
console.log('Room Client leave room');
|
||||
|
||||
@@ -472,6 +472,11 @@ class RoomClient {
|
||||
participantsCount = data.peer_counts;
|
||||
adaptAspectRatio(participantsCount);
|
||||
if (isParticipantsListOpen) getRoomParticipants(true);
|
||||
if (participantsCount == 1) {
|
||||
isPresenter = true;
|
||||
handleRules(isPresenter);
|
||||
console.log('I am alone in the room, got Presenter Rules');
|
||||
}
|
||||
}.bind(this),
|
||||
);
|
||||
|
||||
|
||||
@@ -64,8 +64,16 @@ function handleRules(isPresenter) {
|
||||
BUTTONS.consumerVideo.ejectButton = false;
|
||||
BUTTONS.consumerVideo.muteAudioButton = false;
|
||||
BUTTONS.consumerVideo.muteVideoButton = false;
|
||||
handleNotPresenterButtons();
|
||||
} else {
|
||||
BUTTONS.settings.lockRoomButton = !isRoomLocked;
|
||||
BUTTONS.settings.unlockRoomButton = isRoomLocked;
|
||||
BUTTONS.videoOff.muteAudioButton = true;
|
||||
BUTTONS.videoOff.ejectButton = true;
|
||||
BUTTONS.consumerVideo.ejectButton = true;
|
||||
BUTTONS.consumerVideo.muteAudioButton = true;
|
||||
BUTTONS.consumerVideo.muteVideoButton = true;
|
||||
}
|
||||
handleNotPresenterButtons();
|
||||
}
|
||||
|
||||
function handleNotPresenterButtons() {
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم