- disable/enable chat for viewer when settings are changed

This commit is contained in:
Richard Alam 2014-05-23 19:33:27 -07:00
parent 8549159aad
commit fb2fd12f3c
2 changed files with 18 additions and 14 deletions

View File

@ -305,15 +305,13 @@ package org.bigbluebutton.main.model.users
public function applyLockSettings():void {
var lockSettings:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings();
disableMyCam = userLocked && lockSettings.getDisableCam();
disableMyMic = userLocked && lockSettings.getDisableMic();
disableMyPrivateChat = userLocked && lockSettings.getDisablePrivateChat();
disableMyPublicChat = userLocked && lockSettings.getDisablePublicChat();
disableMyCam = lockSettings.getDisableCam();
disableMyMic = lockSettings.getDisableMic();
disableMyPrivateChat = lockSettings.getDisablePrivateChat();
disableMyPublicChat = lockSettings.getDisablePublicChat();
var dispatcher:Dispatcher = new Dispatcher();
var event:LockControlEvent = new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS)
dispatcher.dispatchEvent(event);
dispatcher.dispatchEvent(new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS));
//If it's sharing webcam, stop it
if(disableMyCam && hasStream){

View File

@ -68,11 +68,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<![CDATA[
import com.adobe.utils.StringUtil;
import com.asfusion.mate.events.Dispatcher;
import flash.accessibility.AccessibilityProperties;
import mx.binding.utils.BindingUtils;
import mx.collections.ArrayCollection;
import mx.controls.Button;
import mx.core.ScrollPolicy;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.LockControlEvent;
@ -89,8 +92,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.chat.events.SendPrivateChatMessageEvent;
import org.bigbluebutton.modules.chat.events.SendPublicChatMessageEvent;
import org.bigbluebutton.modules.chat.events.TranscriptEvent;
import org.bigbluebutton.modules.chat.model.ChatMessage;
import org.bigbluebutton.modules.chat.model.ChatConversation;
import org.bigbluebutton.modules.chat.model.ChatMessage;
import org.bigbluebutton.modules.chat.model.ChatOptions;
import org.bigbluebutton.modules.chat.views.ChatMessageRenderer;
import org.bigbluebutton.modules.chat.vo.ChatMessageVO;
@ -619,14 +622,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function lockSettingsChanged(e:Event):void {
if (UsersUtil.amIModerator()) return; // Settings only affect viewers.
var userManager:UserManager = UserManager.getInstance();
var conference:Conference = userManager.getConference();
var me:BBBUser = conference.getMyUser();
if(publicChat) {
sendBtn.enabled = !me.disableMyPublicChat;
if (publicChat) {
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat;
} else {
sendBtn.enabled = !me.disableMyPrivateChat;
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat;
}
}
]]>