fix meeting mute and disable unmute of others
This commit is contained in:
parent
5a155e5c09
commit
860fd2a5df
@ -14,12 +14,13 @@ trait MuteUserCmdMsgHdlr extends RightsManagementTrait {
|
||||
val outGW: OutMsgRouter
|
||||
|
||||
def handleMuteUserCmdMsg(msg: MuteUserCmdMsg) {
|
||||
if (msg.body.userId != msg.header.userId && permissionFailed(
|
||||
if (msg.body.userId != msg.header.userId && (msg.body.mute == false || permissionFailed(
|
||||
PermissionCheck.MOD_LEVEL,
|
||||
PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId
|
||||
)) {
|
||||
))) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
val reason = "No permission to mute user."
|
||||
val muteUnmuteStr: String = if (msg.body.mute) "mute" else "unmute"
|
||||
val reason = "No permission to " + muteUnmuteStr + " user."
|
||||
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, outGW, liveMeeting)
|
||||
} else {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
|
@ -5,6 +5,8 @@ import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.apps.breakout.BreakoutHdlrHelpers
|
||||
import org.bigbluebutton.core.models.{ VoiceUserState, VoiceUsers }
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, OutMsgRouter }
|
||||
import org.bigbluebutton.core2.MeetingStatus2x
|
||||
import org.bigbluebutton.core2.message.senders.MsgBuilder
|
||||
|
||||
trait UserJoinedVoiceConfEvtMsgHdlr extends BreakoutHdlrHelpers with SystemConfiguration {
|
||||
this: BaseMeetingActor =>
|
||||
@ -51,5 +53,11 @@ trait UserJoinedVoiceConfEvtMsgHdlr extends BreakoutHdlrHelpers with SystemConfi
|
||||
if (liveMeeting.props.meetingProp.isBreakout) {
|
||||
updateParentMeetingWithUsers()
|
||||
}
|
||||
|
||||
// if the meeting is muted tell freeswitch to mute the new person
|
||||
if (!isListenOnly && MeetingStatus2x.isMeetingMuted(liveMeeting.status)) {
|
||||
val event = MsgBuilder.buildMuteUserInVoiceConfSysMsg(liveMeeting.props.meetingProp.intId, voiceConf, voiceUserId, true)
|
||||
outGW.send(event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,6 +138,8 @@ class ReceivedJsonMsgHandlerActor(
|
||||
routeVoiceMsg[UserDisconnectedFromGlobalAudioMsg](envelope, jsonNode)
|
||||
case MuteMeetingCmdMsg.NAME =>
|
||||
routeGenericMsg[MuteMeetingCmdMsg](envelope, jsonNode)
|
||||
case IsMeetingMutedReqMsg.NAME =>
|
||||
routeGenericMsg[IsMeetingMutedReqMsg](envelope, jsonNode)
|
||||
|
||||
// Breakout rooms
|
||||
case BreakoutRoomsListMsg.NAME =>
|
||||
|
@ -22,7 +22,7 @@ trait IsMeetingMutedReqMsgHdlr {
|
||||
BbbCommonEnvCoreMsg(envelope, event)
|
||||
}
|
||||
|
||||
val event = build(liveMeeting.props.meetingProp.intId, msg.body.requesterId, MeetingStatus2x.isMeetingMuted(liveMeeting.status))
|
||||
val event = build(liveMeeting.props.meetingProp.intId, msg.header.userId, MeetingStatus2x.isMeetingMuted(liveMeeting.status))
|
||||
outGW.send(event)
|
||||
}
|
||||
}
|
||||
|
@ -29,13 +29,16 @@ trait MuteAllExceptPresentersCmdMsgHdlr extends RightsManagementTrait {
|
||||
|
||||
outGW.send(event)
|
||||
|
||||
// I think the correct flow would be to find those who are presenters and exclude them
|
||||
// from the list of voice users. The remaining, mute.
|
||||
VoiceUsers.findAll(liveMeeting.voiceUsers) foreach { vu =>
|
||||
if (!vu.listenOnly) {
|
||||
Users2x.findWithIntId(liveMeeting.users2x, vu.intId) match {
|
||||
case Some(u) => if (!u.presenter) muteUserInVoiceConf(vu, muted)
|
||||
case None => muteUserInVoiceConf(vu, muted)
|
||||
// We no longer want to unmute users when meeting mute is turned off
|
||||
if (muted) {
|
||||
// I think the correct flow would be to find those who are presenters and exclude them
|
||||
// from the list of voice users. The remaining, mute.
|
||||
VoiceUsers.findAll(liveMeeting.voiceUsers) foreach { vu =>
|
||||
if (!vu.listenOnly) {
|
||||
Users2x.findWithIntId(liveMeeting.users2x, vu.intId) match {
|
||||
case Some(u) => if (!u.presenter) muteUserInVoiceConf(vu, muted)
|
||||
case None => muteUserInVoiceConf(vu, muted)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,9 +54,12 @@ trait MuteMeetingCmdMsgHdlr extends RightsManagementTrait {
|
||||
|
||||
outGW.send(meetingMutedEvent)
|
||||
|
||||
VoiceUsers.findAll(liveMeeting.voiceUsers) foreach { vu =>
|
||||
if (!vu.listenOnly) {
|
||||
muteUserInVoiceConf(vu, muted)
|
||||
// We no longer want to unmute users when meeting mute is turned off
|
||||
if (muted) {
|
||||
VoiceUsers.findAll(liveMeeting.voiceUsers) foreach { vu =>
|
||||
if (!vu.listenOnly) {
|
||||
muteUserInVoiceConf(vu, muted)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -115,12 +115,12 @@ case class MuteAllExceptPresentersCmdMsg(header: BbbClientMsgHeader,
|
||||
case class MuteAllExceptPresentersCmdMsgBody(mutedBy: String, mute: Boolean)
|
||||
|
||||
/**
|
||||
* Sent by client to mute all users except presenters in the voice conference.
|
||||
* Sent by client to determine current meeting mute state.
|
||||
*/
|
||||
object IsMeetingMutedReqMsg { val NAME = "IsMeetingMutedReqMsg"}
|
||||
case class IsMeetingMutedReqMsg(header: BbbClientMsgHeader,
|
||||
body: IsMeetingMutedReqMsgBody) extends StandardMsg
|
||||
case class IsMeetingMutedReqMsgBody(requesterId: String)
|
||||
case class IsMeetingMutedReqMsgBody()
|
||||
|
||||
object IsMeetingMutedRespMsg { val NAME = "IsMeetingMutedRespMsg"}
|
||||
case class IsMeetingMutedRespMsg(header: BbbClientMsgHeader,
|
||||
|
@ -174,10 +174,10 @@ bbb.users.settings.audioSettings = Audio Test
|
||||
bbb.users.settings.webcamSettings = Webcam Settings
|
||||
bbb.users.settings.muteAll = Mute All Users
|
||||
bbb.users.settings.muteAllExcept = Mute All Users Except Presenter
|
||||
bbb.users.settings.unmuteAll = Unmute All Users
|
||||
bbb.users.settings.unmuteAll = Turn Off Meeting Mute
|
||||
bbb.users.settings.clearAllStatus = Clear all status icons
|
||||
bbb.users.emojiStatusBtn.toolTip = Update my status icon
|
||||
bbb.users.roomMuted.text = Viewers Muted
|
||||
bbb.users.roomMuted.text = Users Muted
|
||||
bbb.users.roomLocked.text = Viewers Locked
|
||||
bbb.users.pushToTalk.toolTip = Talk
|
||||
bbb.users.pushToMute.toolTip = Mute yourself
|
||||
|
@ -45,7 +45,6 @@
|
||||
enableSettingsButton="true"
|
||||
enableGuestUI="false"
|
||||
guestSoftMode="false"
|
||||
moderatorUnmute="true"
|
||||
baseTabIndex="301"
|
||||
/>
|
||||
|
||||
|
@ -83,6 +83,7 @@ package org.bigbluebutton.main.model.users
|
||||
sender.queryForGuestPolicy();
|
||||
sender.queryForGuestsWaiting();
|
||||
sender.getLockSettings();
|
||||
sender.getRoomMuteState();
|
||||
|
||||
if (!LiveMeeting.inst().meeting.isBreakout) {
|
||||
sender.queryForBreakoutRooms(LiveMeeting.inst().meeting.internalId);
|
||||
|
@ -34,9 +34,6 @@ package org.bigbluebutton.modules.users.model {
|
||||
[Bindable]
|
||||
public var enableSettingsButton:Boolean = true;
|
||||
|
||||
[Bindable]
|
||||
public var moderatorUnmute:Boolean = true;
|
||||
|
||||
[Bindable]
|
||||
public var enableGuestUI:Boolean = false;
|
||||
|
||||
|
@ -123,7 +123,9 @@ package org.bigbluebutton.modules.users.services
|
||||
break;
|
||||
case "MeetingMutedEvtMsg":
|
||||
handleMeetingMuted(message);
|
||||
break;
|
||||
break;
|
||||
case "IsMeetingMutedRespMsg":
|
||||
handleIsMeetingMutedResp(message);
|
||||
case "meetingState":
|
||||
handleMeetingState(message);
|
||||
break;
|
||||
@ -624,6 +626,14 @@ package org.bigbluebutton.modules.users.services
|
||||
}
|
||||
}
|
||||
|
||||
private function handleIsMeetingMutedResp(msg:Object):void {
|
||||
var body:Object = msg.body as Object;
|
||||
if (body.hasOwnProperty("muted")) {
|
||||
LiveMeeting.inst().meetingStatus.isMeetingMuted = body.muted as Boolean;
|
||||
dispatcher.dispatchEvent(new MeetingMutedEvent());
|
||||
}
|
||||
}
|
||||
|
||||
private function handleMeetingState(msg:Object):void {
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
var perm:Object = map.permissions;
|
||||
|
@ -493,7 +493,7 @@ package org.bigbluebutton.modules.users.services
|
||||
var message:Object = {
|
||||
header: {name: "IsMeetingMutedReqMsg", meetingId: UsersUtil.getInternalMeetingID(),
|
||||
userId: UsersUtil.getMyUserID()},
|
||||
body: {requesterId: UsersUtil.getMyUserID()}
|
||||
body: {}
|
||||
};
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
|
@ -192,7 +192,7 @@
|
||||
var allowModeratorToSeeOwnSettings: Boolean = !data.me || (data.me && UsersUtil.amIModerator());
|
||||
settingsBtn.visible = rolledOver && allowModeratorToSeeOwnSettings && !UsersUtil.isBreakout();
|
||||
|
||||
if ( !data.inVoiceConf || ( options.moderatorUnmute == false && UsersUtil.amIModerator() && !UsersUtil.isMe(data.userId) ) ) {
|
||||
if (!data.inVoiceConf) {
|
||||
muteImg.visible = false;
|
||||
muteImg.includeInLayout = false;
|
||||
muteBtn.visible = false;
|
||||
@ -210,13 +210,15 @@
|
||||
muteBtn.visible = false;
|
||||
muteBtn.includeInLayout = false;
|
||||
} else {
|
||||
muteImg.visible = !rolledOver;
|
||||
muteImg.includeInLayout = !rolledOver;
|
||||
muteBtn.visible = rolledOver;
|
||||
muteBtn.includeInLayout = rolledOver;
|
||||
// can no longer unmute others
|
||||
var showMuteBtn:Boolean = rolledOver && (!data.muted || data.me);
|
||||
muteImg.visible = !showMuteBtn;
|
||||
muteImg.includeInLayout = !showMuteBtn;
|
||||
muteBtn.visible = showMuteBtn;
|
||||
muteBtn.includeInLayout = showMuteBtn;
|
||||
muteBtn.enabled = true;
|
||||
|
||||
if (data.talking && !rolledOver) {
|
||||
if (data.talking && !showMuteBtn) {
|
||||
muteImg.filters = [new GlowFilter(getStyle("glowFilterColor"), 1, 6, 6, 2, BitmapFilterQuality.HIGH, false, false)];
|
||||
} else {
|
||||
muteImg.filters = [];
|
||||
@ -262,7 +264,7 @@
|
||||
webcamBtn.includeInLayout = false;
|
||||
}
|
||||
|
||||
if (!rolledOver) {
|
||||
if (muteImg.visible) {
|
||||
if (data.inVoiceConf) {
|
||||
if (data.listenOnly) {
|
||||
muteImg.source = getStyle("iconSound");
|
||||
@ -272,19 +274,20 @@
|
||||
muteImg.source = getStyle("iconAudio");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (data.muted == rolledOverMute)
|
||||
muteBtn.setStyle("icon", getStyle("iconAudio"));
|
||||
else
|
||||
muteBtn.setStyle("icon", getStyle("iconAudioMuted"));
|
||||
}
|
||||
|
||||
if (lockImg.visible) {
|
||||
if (data.locked && !data.presenter && ls.isAnythingLocked()) {
|
||||
lockImg.source = getStyle("iconLock");
|
||||
} else {
|
||||
lockImg.source = null;
|
||||
}
|
||||
} else {
|
||||
if (data.muted == rolledOverMute)
|
||||
muteBtn.setStyle("icon", getStyle("iconAudio"));
|
||||
else
|
||||
muteBtn.setStyle("icon", getStyle("iconAudioMuted"));
|
||||
|
||||
if (data.locked == rolledOverLock)
|
||||
lockBtn.setStyle("icon", getStyle("iconUnlock"));
|
||||
else
|
||||
|
@ -419,15 +419,13 @@ $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();
|
||||
if (presenter != null)
|
||||
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});
|
||||
}
|
||||
if (!roomMuted) {
|
||||
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAll'), icon: getStyle('iconAudioMuted'), handler: muteAll});
|
||||
var presenter:User2x = UsersUtil.getPresenter();
|
||||
if (presenter != null)
|
||||
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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user