Added new option "moderatorUnmute"

This commit is contained in:
Ghazi Triki 2017-10-06 10:57:19 +01:00
parent 23bb6bd34e
commit cb1ae776ea
4 changed files with 64 additions and 59 deletions

View File

@ -40,6 +40,7 @@
enableEmojiStatus="true"
enableSettingsButton="true"
enableGuestUI="false"
moderatorUnmute="true"
baseTabIndex="301"
/>

View File

@ -34,6 +34,9 @@ package org.bigbluebutton.modules.users.model {
[Bindable]
public var enableSettingsButton:Boolean = true;
[Bindable]
public var moderatorUnmute:Boolean = true;
[Bindable]
public var enableGuestUI:Boolean = false;

View File

@ -69,7 +69,9 @@
private var options:UsersOptions;
private var myMenu:Menu = null;
private function onCreationComplete():void{
private function onCreationComplete():void {
options = Options.getOptions(UsersOptions) as UsersOptions;
refreshRole(UsersUtil.amIModerator());
this.addEventListener(FlexEvent.DATA_CHANGE, dataChangeHandler);
@ -80,8 +82,6 @@
BindingUtils.bindSetter(updateButtons, userLockedInd, "visible");
BindingUtils.bindSetter(updateButtons, hasStreamInd, "visible");
BindingUtils.bindSetter(updateButtons, viewingStreamInd, "visible");
options = Options.getOptions(UsersOptions) as UsersOptions;
}
private function dataChangeHandler(e:Event):void {
@ -181,7 +181,7 @@
if (data != null) {
settingsBtn.visible = rolledOver && !data.me && !UsersUtil.isBreakout();
if (!data.inVoiceConf) {
if ( !data.inVoiceConf || ( options.moderatorUnmute == false && UsersUtil.amIModerator() && !UsersUtil.isMe(data.userId) ) ) {
muteImg.visible = false;
muteImg.includeInLayout = false;
muteBtn.visible = false;
@ -205,20 +205,20 @@
muteBtn.includeInLayout = rolledOver;
muteBtn.enabled = true;
if(data.talking && !rolledOver){
if (data.talking && !rolledOver) {
muteImg.filters = [new GlowFilter(getStyle("glowFilterColor"), 1, 6, 6, 2, BitmapFilterQuality.HIGH, false, false)];
}else{
} else {
muteImg.filters = [];
}
}
}
if (data.role == Role.MODERATOR){
if (data.role == Role.MODERATOR) {
lockImg.visible = false;
lockImg.includeInLayout = true;
lockBtn.visible = false;
lockBtn.includeInLayout = false;
} else if(moderator && ls.isAnythingLocked()) {
} else if (moderator && ls.isAnythingLocked()) {
lockImg.visible = !rolledOver;
lockImg.includeInLayout = !rolledOver;
lockBtn.visible = rolledOver;
@ -263,10 +263,9 @@
}
if ( data.locked && !data.presenter && ls.isAnythingLocked() ) {
if (data.locked && !data.presenter && ls.isAnythingLocked()) {
lockImg.source = getStyle("iconLock");
}
else {
} else {
lockImg.source = null;
}
} else {

View File

@ -384,6 +384,7 @@ $Id: $
paramsMenuData = [];
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.clearAllStatus'), icon: getStyle('iconClearStatus'), handler: resetEmojiStatuses});
if (partOptions.moderatorUnmute == true) {
if (!roomMuted) {
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAll'), icon: getStyle('iconAudioMuted'), handler: muteAll});
var presenter:User2x = UsersUtil.getPresenter();
@ -391,6 +392,7 @@ $Id: $
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAllExcept') + ": " + presenter.name, icon: getStyle('iconAudioMuted'), handler: muteAlmostAll});
} else
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.unmuteAll'), icon: getStyle('iconAudio'), handler: muteAll});
}
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.lockSettings'), icon: getStyle('iconLock'), handler: lockSettings});
if (breakoutOptions.enabled && amIModerator && !UsersUtil.isBreakout()) {