Merge pull request #536 from tdj-br/bbb-lock-settings-fix
Bbb lock settings fix
This commit is contained in:
commit
6e7b1491ef
@ -22,6 +22,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
|
||||
import org.bigbluebutton.conference.service.recorder.RecorderApplication;
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
@ -112,25 +113,20 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
|
||||
String externalUserID = ((String) params[5]).toString();
|
||||
String internalUserID = ((String) params[6]).toString();
|
||||
|
||||
Boolean locked = false;
|
||||
if (params.length >= 7 && ((Boolean) params[7])) {
|
||||
locked = true;
|
||||
}
|
||||
|
||||
Boolean muted = false;
|
||||
if (params.length >= 8 && ((Boolean) params[8])) {
|
||||
if (params.length >= 7 && ((Boolean) params[7])) {
|
||||
muted = true;
|
||||
}
|
||||
|
||||
Map<String, Boolean> lsMap = null;
|
||||
if (params.length >= 9) {
|
||||
if (params.length >= 8) {
|
||||
try {
|
||||
lsMap = (Map<String, Boolean> ) params[9];
|
||||
lsMap = (Map<String, Boolean> ) params[8];
|
||||
} catch(Exception e){
|
||||
lsMap = new HashMap<String, Boolean>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (record == true) {
|
||||
recorderApplication.createRecordSession(room);
|
||||
}
|
||||
@ -144,10 +140,12 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
|
||||
connection.setAttribute("USER_SESSION_ID", sessionId);
|
||||
|
||||
String debugInfo = "internalUserID=" + internalUserID + ",username=" + username + ",role=" + role + "," +
|
||||
",voiceConf=" + voiceBridge + ",room=" + room + ",externalUserid=" + externalUserID;
|
||||
",voiceConf=" + voiceBridge + ",room=" + room + ",externalUserid=" + externalUserID + ", muted =" + muted;
|
||||
log.debug("User [{}] connected to room [{}]", debugInfo, room);
|
||||
|
||||
bbbGW.initLockSettings(room, locked, lsMap);
|
||||
bbbGW.initLockSettings(room, lsMap);
|
||||
|
||||
bbbGW.initAudioSettings(room, internalUserID, muted);
|
||||
|
||||
String meetingId = bbbSession.getRoom();
|
||||
|
||||
|
@ -20,9 +20,10 @@
|
||||
package org.bigbluebutton.conference.service.chat;
|
||||
|
||||
import java.util.Map;
|
||||
import org.slf4j.Logger;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
|
||||
public class ChatApplication {
|
||||
|
@ -20,6 +20,7 @@ package org.bigbluebutton.conference.service.lock;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.conference.BigBlueButtonSession;
|
||||
import org.bigbluebutton.conference.Constants;
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
@ -66,15 +67,6 @@ public class LockService {
|
||||
bbbInGW.sendLockSettings(meetingId, userId, newSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called from client on connect to know if the room is locked or not
|
||||
* */
|
||||
public void isRoomLocked(){
|
||||
String meetingId = getBbbSession().getRoom();
|
||||
String userId = getMyUserId();
|
||||
bbbInGW.isMeetingLocked(meetingId, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method locks (or unlocks), based on lock parameter
|
||||
* all users but the users listed in array dontLockTheseUsers
|
||||
@ -87,10 +79,15 @@ public class LockService {
|
||||
/**
|
||||
* This method locks or unlocks a specific user
|
||||
* */
|
||||
public void setUserLock(Boolean lock, String internalUserID){
|
||||
log.debug("setUserLock ({}, {}, {})", new Object[] { lock, internalUserID });
|
||||
String meetingId = getBbbSession().getRoom();
|
||||
bbbInGW.lockUser(meetingId, lock, internalUserID);
|
||||
public void setUserLock(Map<String, Object> msg) {
|
||||
String meetingID = Red5.getConnectionLocal().getScope().getName();
|
||||
String requesterID = getBbbSession().getInternalUserID();
|
||||
|
||||
Boolean lock = (Boolean) msg.get("lock");
|
||||
String userId = (String) msg.get("userId");
|
||||
|
||||
log.info("setUserLock ({}, {})", new Object[] { lock, userId });
|
||||
bbbInGW.lockUser(meetingID, requesterID, lock, userId);
|
||||
}
|
||||
|
||||
public String getMyUserId() {
|
||||
|
@ -18,16 +18,15 @@
|
||||
*/
|
||||
package org.bigbluebutton.conference.service.recorder;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.bigbluebutton.service.recording.RedisListRecorder;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import org.bigbluebutton.service.recording.RedisListRecorder;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* The RecorderApplication class is used for setting the record module
|
||||
|
@ -2,14 +2,11 @@ package org.bigbluebutton.conference.service.voice;
|
||||
|
||||
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
|
||||
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
public class VoiceMessageListener implements MessageHandler{
|
||||
|
||||
private IBigBlueButtonInGW bbbGW;
|
||||
|
@ -17,14 +17,14 @@
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.conference.service.voice;
|
||||
import org.slf4j.Logger;
|
||||
import org.red5.server.api.Red5;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.conference.BigBlueButtonSession;
|
||||
import org.bigbluebutton.conference.Constants;
|
||||
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.red5.server.api.Red5;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class VoiceService {
|
||||
|
||||
@ -91,7 +91,7 @@ public class VoiceService {
|
||||
|
||||
String meetingID = Red5.getConnectionLocal().getScope().getName();
|
||||
String requesterID = getBbbSession().getInternalUserID();
|
||||
bbbInGW.lockUser(meetingID, requesterID, userid, lock);
|
||||
bbbInGW.lockMuteUser(meetingID, requesterID, userid, lock);
|
||||
}
|
||||
|
||||
public void ejectUserFromVoice(Map<String, Object> msg) {
|
||||
|
@ -18,8 +18,8 @@
|
||||
*/
|
||||
package org.bigbluebutton.conference.service.whiteboard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.conference.BigBlueButtonSession;
|
||||
import org.bigbluebutton.conference.Constants;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
@ -68,7 +68,7 @@ public class WhiteboardService {
|
||||
}
|
||||
}
|
||||
|
||||
private String pointsToString(ArrayList<Double> points){
|
||||
/*private String pointsToString(ArrayList<Double> points){
|
||||
String datapoints = "";
|
||||
for (Double i : points) {
|
||||
datapoints += i + ",";
|
||||
@ -79,7 +79,7 @@ public class WhiteboardService {
|
||||
|
||||
// application.sendShape(shape, type, color, thickness, fill, fillColor, transparency, id, status);
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
public void requestAnnotationHistory(Map<String, Object> message) {
|
||||
log.info("WhiteboardApplication - requestAnnotationHistory");
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.bigbluebutton.core.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@ -19,12 +18,10 @@ public interface IBigBlueButtonInGW {
|
||||
|
||||
|
||||
// Lock
|
||||
void initLockSettings(String meetingID, boolean locked, Map<String, Boolean> settings);
|
||||
void initLockSettings(String meetingID, Map<String, Boolean> settings);
|
||||
void sendLockSettings(String meetingID, String userId, Map<String, Boolean> settings);
|
||||
void getLockSettings(String meetingId, String userId);
|
||||
void isMeetingLocked(String meetingId, String userId);
|
||||
void lockAllUsers(String meetingId, boolean lock, ArrayList<String> dontLockTheseUsers);
|
||||
void lockUser(String meetingId, boolean lock, String internalUserID);
|
||||
void lockUser(String meetingId, String requesterID, boolean lock, String internalUserID);
|
||||
|
||||
|
||||
// Users
|
||||
@ -46,11 +43,12 @@ public interface IBigBlueButtonInGW {
|
||||
void userDisconnectedFromGlobalAudio(String voiceConf, String userid, String name);
|
||||
|
||||
// Voice
|
||||
void initAudioSettings(String meetingID, String requesterID, Boolean muted);
|
||||
void muteAllExceptPresenter(String meetingID, String requesterID, Boolean mute);
|
||||
void muteAllUsers(String meetingID, String requesterID, Boolean mute);
|
||||
void isMeetingMuted(String meetingID, String requesterID);
|
||||
void muteUser(String meetingID, String requesterID, String userID, Boolean mute);
|
||||
void lockUser(String meetingID, String requesterID, String userID, Boolean lock);
|
||||
void lockMuteUser(String meetingID, String requesterID, String userID, Boolean lock);
|
||||
void ejectUserFromVoice(String meetingID, String userId, String ejectedBy);
|
||||
void ejectUserFromMeeting(String meetingId, String userId, String ejectedBy);
|
||||
void voiceUserJoined(String meetingId, String userId, String webUserId, String conference,
|
||||
|
@ -5,12 +5,13 @@ import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.bigbluebutton.webconference.voice.events.ConferenceEventListener;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceStartRecordingEvent;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceUserJoinedEvent;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceUserLeftEvent;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceUserMutedEvent;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceUserTalkingEvent;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceStartRecordingEvent;
|
||||
import org.freeswitch.esl.client.IEslEventListener;
|
||||
import org.freeswitch.esl.client.transport.event.EslEvent;
|
||||
import org.jboss.netty.channel.ExceptionEvent;
|
||||
@ -197,9 +198,9 @@ public class ESLEventListener implements IEslEventListener {
|
||||
return e.getEventHeaders().get("Path");
|
||||
}
|
||||
|
||||
private String getRecordTimestampFromEvent(EslEvent e) {
|
||||
/*private String getRecordTimestampFromEvent(EslEvent e) {
|
||||
return e.getEventHeaders().get("Event-Date-Timestamp");
|
||||
}
|
||||
}*/
|
||||
|
||||
public void setConferenceEventListener(ConferenceEventListener listener) {
|
||||
this.conferenceEventListener = listener;
|
||||
|
@ -18,21 +18,10 @@
|
||||
*/
|
||||
package org.bigbluebutton.webconference.voice.freeswitch.actions;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
import org.bigbluebutton.webconference.voice.events.ConferenceEventListener;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceUserJoinedEvent;
|
||||
import org.bigbluebutton.webconference.voice.freeswitch.response.ConferenceMember;
|
||||
import org.bigbluebutton.webconference.voice.freeswitch.response.XMLResponseConferenceListParser;
|
||||
import org.freeswitch.esl.client.transport.message.EslMessage;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class BroadcastConferenceCommand extends FreeswitchCommand {
|
||||
|
||||
|
@ -18,21 +18,10 @@
|
||||
*/
|
||||
package org.bigbluebutton.webconference.voice.freeswitch.actions;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
import org.bigbluebutton.webconference.voice.events.ConferenceEventListener;
|
||||
import org.bigbluebutton.webconference.voice.events.VoiceUserJoinedEvent;
|
||||
import org.bigbluebutton.webconference.voice.freeswitch.response.ConferenceMember;
|
||||
import org.bigbluebutton.webconference.voice.freeswitch.response.XMLResponseConferenceListParser;
|
||||
import org.freeswitch.esl.client.transport.message.EslMessage;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class RecordConferenceCommand extends FreeswitchCommand {
|
||||
|
||||
|
@ -18,20 +18,14 @@
|
||||
*/
|
||||
package org.bigbluebutton.webconference.voice.freeswitch.response;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ import org.bigbluebutton.core.apps.presentation.Page
|
||||
import org.bigbluebutton.core.apps.presentation.Presentation
|
||||
|
||||
class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresentationsUtil) extends IBigBlueButtonInGW {
|
||||
|
||||
|
||||
// Meeting
|
||||
def createMeeting2(meetingID: String, externalMeetingID:String, meetingName: String, record: Boolean,
|
||||
voiceBridge: String, duration: Long, autoStartRecording: Boolean,
|
||||
@ -82,18 +82,21 @@ class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresen
|
||||
val disablePrivChat = s.getOrElse("disablePrivateChat", false)
|
||||
val disablePubChat = s.getOrElse("disablePublicChat", false)
|
||||
val lockedLayout = s.getOrElse("lockedLayout", false)
|
||||
var lockOnJoin = s.getOrElse("lockOnJoin", false)
|
||||
|
||||
val permissions = new Permissions(disableCam = disableCam,
|
||||
disableMic = disableMic,
|
||||
disablePrivChat = disablePrivChat,
|
||||
disablePubChat = disablePubChat,
|
||||
lockedLayout = lockedLayout)
|
||||
lockedLayout = lockedLayout,
|
||||
lockOnJoin = lockOnJoin)
|
||||
|
||||
bbbGW.accept(new SetLockSettings(meetingID, userId, permissions))
|
||||
}
|
||||
|
||||
def initLockSettings(meetingID: String, locked: Boolean, settings: java.util.Map[String, java.lang.Boolean]) {
|
||||
def initLockSettings(meetingID: String, settings: java.util.Map[String, java.lang.Boolean]) {
|
||||
// Convert java.util.Map to scala.collection.immutable.Map
|
||||
// settings.mapValues -> convaert java Map to scala mutable Map
|
||||
// settings.mapValues -> convert java Map to scala mutable Map
|
||||
// v => v.booleanValue() -> convert java Boolean to Scala Boolean
|
||||
// toMap -> converts from scala mutable map to scala immutable map
|
||||
val s = settings.mapValues (v => v.booleanValue() /* convert java Boolean to Scala Boolean */).toMap
|
||||
@ -102,29 +105,29 @@ class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresen
|
||||
val disablePrivChat = s.getOrElse("disablePrivateChat", false)
|
||||
val disablePubChat = s.getOrElse("disablePublicChat", false)
|
||||
val lockedLayout = s.getOrElse("lockedLayout", false)
|
||||
val lockOnJoin = s.getOrElse("lockOnJoin", false)
|
||||
val permissions = new Permissions(disableCam = disableCam,
|
||||
disableMic = disableMic,
|
||||
disablePrivChat = disablePrivChat,
|
||||
disablePubChat = disablePubChat,
|
||||
lockedLayout = lockedLayout)
|
||||
lockedLayout = lockedLayout,
|
||||
lockOnJoin = lockOnJoin)
|
||||
|
||||
bbbGW.accept(new InitLockSettings(meetingID, locked, permissions))
|
||||
bbbGW.accept(new InitLockSettings(meetingID, permissions))
|
||||
}
|
||||
|
||||
|
||||
|
||||
def initAudioSettings(meetingID: String, requesterID: String, muted: java.lang.Boolean) {
|
||||
bbbGW.accept(new InitAudioSettings(meetingID, requesterID, muted.booleanValue()))
|
||||
}
|
||||
|
||||
def getLockSettings(meetingId: String, userId: String) {
|
||||
bbbGW.accept(new GetLockSettings(meetingId, userId))
|
||||
}
|
||||
|
||||
def isMeetingLocked(meetingId: String, userId: String) {
|
||||
bbbGW.accept(new IsMeetingLocked(meetingId, userId))
|
||||
}
|
||||
|
||||
def lockAllUsers(meetingId: String, lock: Boolean, dontLockTheseUsers: ArrayList[String]) {
|
||||
bbbGW.accept(new LockAllUsers(meetingId, lock, dontLockTheseUsers.toSeq))
|
||||
}
|
||||
|
||||
def lockUser(meetingId: String, lock: Boolean, userId: String) {
|
||||
bbbGW.accept(new LockUser(meetingId, userId, lock))
|
||||
def lockUser(meetingId: String, requesterID: String, lock: Boolean, userId: String) {
|
||||
bbbGW.accept(new LockUserRequest(meetingId, requesterID, userId, lock))
|
||||
}
|
||||
|
||||
def setRecordingStatus(meetingId: String, userId: String, recording: java.lang.Boolean) {
|
||||
@ -413,7 +416,7 @@ class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresen
|
||||
voiceGW.muteUser(meetingID, requesterID, userID, mute)
|
||||
}
|
||||
|
||||
def lockUser(meetingID: String, requesterID: String, userID: String, lock: java.lang.Boolean) {
|
||||
def lockMuteUser(meetingID: String, requesterID: String, userID: String, lock: java.lang.Boolean) {
|
||||
voiceGW.lockUser(meetingID, requesterID, userID, lock)
|
||||
}
|
||||
|
||||
|
@ -30,11 +30,10 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
case msg: EndMeeting => handleEndMeeting(msg)
|
||||
case msg: LockSetting => handleLockSetting(msg)
|
||||
case msg: LockUser => handleLockUser(msg)
|
||||
case msg: LockAllUsers => handleLockAllUsers(msg)
|
||||
case msg: InitLockSettings => handleInitLockSettings(msg)
|
||||
case msg: InitAudioSettings => handleInitAudioSettings(msg)
|
||||
case msg: SetLockSettings => handleSetLockSettings(msg)
|
||||
case msg: GetLockSettings => handleGetLockSettings(msg)
|
||||
case msg: IsMeetingLocked => handleIsMeetingLocked(msg)
|
||||
case msg: ValidateAuthToken => handleValidateAuthToken(msg)
|
||||
case msg: RegisterUser => handleRegisterUser(msg)
|
||||
case msg: UserJoining => handleUserJoining(msg)
|
||||
@ -114,9 +113,7 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
case msg: PermissionsSettingInitialized => handlePermissionsSettingInitialized(msg)
|
||||
case msg: NewPermissionsSetting => handleNewPermissionsSetting(msg)
|
||||
case msg: UserLocked => handleUserLocked(msg)
|
||||
case msg: UsersLocked => handleUsersLocked(msg)
|
||||
case msg: GetPermissionsSettingReply => handleGetPermissionsSettingReply(msg)
|
||||
case msg: IsMeetingLockedReply => handleIsMeetingLockedReply(msg)
|
||||
case msg: UserRegistered => handleUserRegistered(msg)
|
||||
case msg: UserLeft => handleUserLeft(msg)
|
||||
case msg: PresenterAssigned => handlePresenterAssigned(msg)
|
||||
@ -333,32 +330,30 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleLockAllUsers(msg: LockAllUsers) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.EXCEPT_USERS, msg.exceptUsers.toString())
|
||||
payload.put(Constants.LOCK, msg.lock)
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
header.put(Constants.NAME, MessageNames.END_MEETING)
|
||||
header.put(Constants.TIMESTAMP, TimestampGenerator.generateTimestamp)
|
||||
header.put(Constants.CURRENT_TIME, TimestampGenerator.getCurrentTime)
|
||||
|
||||
// println("***** DISPATCHING LOCK ALL USERS *****************")
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleInitLockSettings(msg: InitLockSettings) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.SETTINGS, msg.settings.toString())
|
||||
payload.put(Constants.LOCKED, msg.locked)
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
header.put(Constants.NAME, MessageNames.INIT_LOCK_SETTINGS)
|
||||
header.put(Constants.TIMESTAMP, TimestampGenerator.generateTimestamp)
|
||||
header.put(Constants.CURRENT_TIME, TimestampGenerator.getCurrentTime)
|
||||
|
||||
// println("***** DISPATCHING INIT LOCK SETTINGS *****************")
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleInitAudioSettings(msg: InitAudioSettings) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.MUTED, msg.muted.toString())
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
header.put(Constants.NAME, MessageNames.INIT_AUDIO_SETTINGS)
|
||||
header.put(Constants.TIMESTAMP, TimestampGenerator.generateTimestamp)
|
||||
header.put(Constants.CURRENT_TIME, TimestampGenerator.getCurrentTime)
|
||||
|
||||
// println("***** DISPATCHING INIT LOCK SETTINGS *****************")
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
@ -391,20 +386,6 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleIsMeetingLocked(msg: IsMeetingLocked) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.USER_ID, msg.userId)
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
header.put(Constants.NAME, MessageNames.IS_MEETING_LOCKED)
|
||||
header.put(Constants.TIMESTAMP, TimestampGenerator.generateTimestamp)
|
||||
header.put(Constants.CURRENT_TIME, TimestampGenerator.getCurrentTime)
|
||||
|
||||
// println("***** DISPATCHING IS MEETING LOCKED *****************")
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleValidateAuthToken(msg: ValidateAuthToken) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
@ -1455,7 +1436,6 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
private def handlePermissionsSettingInitialized(msg: PermissionsSettingInitialized) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.LOCKED, msg.locked)
|
||||
payload.put(Constants.SETTINGS, msg.permissions.toString()) //#todo not tested
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
@ -1496,21 +1476,6 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleUsersLocked(msg: UsersLocked) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.EXCEPT_USERS, msg.exceptUsers.toString())
|
||||
payload.put(Constants.LOCKED, msg.lock)
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
header.put(Constants.NAME, MessageNames.USERS_LOCKED)
|
||||
header.put(Constants.TIMESTAMP, TimestampGenerator.generateTimestamp)
|
||||
header.put(Constants.CURRENT_TIME, TimestampGenerator.getCurrentTime)
|
||||
|
||||
// println("***** DISPATCHING USERS LOCKED *****************")
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleGetPermissionsSettingReply(msg: GetPermissionsSettingReply) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
@ -1524,20 +1489,6 @@ class CollectorActor(dispatcher: IDispatcher) extends Actor {
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleIsMeetingLockedReply(msg: IsMeetingLockedReply) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.USER_ID, msg.userId)
|
||||
|
||||
val header = new java.util.HashMap[String, Any]()
|
||||
header.put(Constants.NAME, MessageNames.IS_MEETING_LOCKED_REPLY)
|
||||
header.put(Constants.TIMESTAMP, TimestampGenerator.generateTimestamp)
|
||||
header.put(Constants.CURRENT_TIME, TimestampGenerator.getCurrentTime)
|
||||
|
||||
// println("***** DISPATCHING IS MEETING LOCKED REPLY *****************")
|
||||
dispatcher.dispatch(buildJson(header, payload))
|
||||
}
|
||||
|
||||
private def handleUserRegistered(msg: UserRegistered) {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
|
@ -25,6 +25,7 @@ class MeetingActor(val meetingID: String, val externalMeetingID: String, val mee
|
||||
with PollApp with LayoutApp with ChatApp
|
||||
with WhiteboardApp with LogHelper {
|
||||
|
||||
var audioSettingsInited = false
|
||||
var permissionsInited = false
|
||||
var permissions = new Permissions()
|
||||
var recording = false;
|
||||
@ -87,7 +88,9 @@ class MeetingActor(val meetingID: String, val externalMeetingID: String, val mee
|
||||
case msg: MuteUserRequest => handleMuteUserRequest(msg)
|
||||
case msg: EjectUserFromVoiceRequest => handleEjectUserRequest(msg)
|
||||
case msg: SetLockSettings => handleSetLockSettings(msg)
|
||||
case msg: LockUserRequest => handleLockUserRequest(msg)
|
||||
case msg: InitLockSettings => handleInitLockSettings(msg)
|
||||
case msg: InitAudioSettings => handleInitAudioSettings(msg)
|
||||
case msg: GetChatHistoryRequest => handleGetChatHistoryRequest(msg)
|
||||
case msg: SendPublicMessageRequest => handleSendPublicMessageRequest(msg)
|
||||
case msg: SendPrivateMessageRequest => handleSendPrivateMessageRequest(msg)
|
||||
|
@ -51,15 +51,9 @@ case class LockUser(
|
||||
meetingID: String,
|
||||
userId: String,
|
||||
lock: Boolean) extends InMessage
|
||||
|
||||
case class LockAllUsers(
|
||||
meetingID: String,
|
||||
lock: Boolean,
|
||||
exceptUsers: Seq[String]) extends InMessage
|
||||
|
||||
case class InitLockSettings(
|
||||
meetingID: String,
|
||||
locked: Boolean,
|
||||
settings: Permissions) extends InMessage
|
||||
|
||||
case class SetLockSettings(
|
||||
@ -73,12 +67,6 @@ case class GetLockSettings(
|
||||
userId: String
|
||||
) extends InMessage
|
||||
|
||||
case class IsMeetingLocked(
|
||||
meetingID: String,
|
||||
userId: String
|
||||
) extends InMessage
|
||||
|
||||
|
||||
// Users
|
||||
case class ValidateAuthToken(
|
||||
meetingID: String,
|
||||
@ -393,6 +381,11 @@ case class PresentationConversionCompleted(
|
||||
) extends InMessage
|
||||
|
||||
// Voice
|
||||
case class InitAudioSettings(
|
||||
meetingID: String,
|
||||
requesterID: String,
|
||||
muted: Boolean) extends InMessage
|
||||
|
||||
case class SendVoiceUsersRequest(
|
||||
meetingID: String,
|
||||
requesterID: String) extends InMessage
|
||||
|
@ -9,6 +9,7 @@ object MessageNames {
|
||||
val LOCK_SETTING = "lock_setting_request"
|
||||
val LOCK_USER = "lock_user_request"
|
||||
val INIT_LOCK_SETTINGS = "init_lock_settings"
|
||||
val INIT_AUDIO_SETTINGS = "init_audio_settings"
|
||||
val SET_LOCK_SETTINGS = "set_lock_settings"
|
||||
val GET_LOCK_SETTINGS = "get_lock_settings"
|
||||
val IS_MEETING_LOCKED = "is_meeting_locked"
|
||||
|
@ -107,7 +107,6 @@ case object IsAliveMessage extends IOutMessage
|
||||
// Permissions
|
||||
case class PermissionsSettingInitialized(
|
||||
meetingID: String,
|
||||
locked: Boolean,
|
||||
permissions: Permissions,
|
||||
applyTo: Array[UserVO],
|
||||
version:String = Versions.V_0_0_1
|
||||
@ -128,24 +127,12 @@ case class UserLocked(
|
||||
version:String = Versions.V_0_0_1
|
||||
) extends IOutMessage
|
||||
|
||||
case class UsersLocked(
|
||||
meetingID: String,
|
||||
lock: Boolean,
|
||||
exceptUsers: Seq[String],
|
||||
version:String = Versions.V_0_0_1
|
||||
) extends IOutMessage
|
||||
|
||||
case class GetPermissionsSettingReply(
|
||||
meetingID: String,
|
||||
userId: String,
|
||||
version:String = Versions.V_0_0_1
|
||||
) extends IOutMessage
|
||||
|
||||
case class IsMeetingLockedReply(
|
||||
meetingID: String,
|
||||
userId: String,
|
||||
version:String = Versions.V_0_0_1
|
||||
) extends IOutMessage
|
||||
|
||||
// Users
|
||||
case class UserRegistered(
|
||||
|
@ -1,5 +1,7 @@
|
||||
package org.bigbluebutton.core.api
|
||||
|
||||
import java.lang.Boolean
|
||||
|
||||
object Role extends Enumeration {
|
||||
type Role = Value
|
||||
val MODERATOR = Value("MODERATOR")
|
||||
@ -36,7 +38,8 @@ case class Permissions(
|
||||
disableMic: Boolean = false,
|
||||
disablePrivChat: Boolean = false,
|
||||
disablePubChat: Boolean = false,
|
||||
lockedLayout:Boolean = false
|
||||
lockedLayout:Boolean = false,
|
||||
lockOnJoin:Boolean = false
|
||||
)
|
||||
|
||||
case class RegisteredUser (
|
||||
@ -70,8 +73,7 @@ case class UserVO(
|
||||
webcamStream: String,
|
||||
phoneUser: Boolean,
|
||||
voiceUser: VoiceUser,
|
||||
listenOnly: Boolean,
|
||||
permissions: Permissions = new Permissions())
|
||||
listenOnly: Boolean)
|
||||
|
||||
case class VoiceUser(userId: String,
|
||||
webUserId: String,
|
||||
|
@ -153,43 +153,50 @@ trait UsersApp {
|
||||
case None => // do nothing
|
||||
}
|
||||
}
|
||||
|
||||
def handleLockUser(msg: LockUser) {
|
||||
|
||||
}
|
||||
|
||||
def handleLockAllUsers(msg: LockAllUsers) {
|
||||
|
||||
}
|
||||
|
||||
def handleGetLockSettings(msg: GetLockSettings) {
|
||||
|
||||
logger.info("Not implemented: handleGetLockSettings")
|
||||
}
|
||||
|
||||
def handleIsMeetingLocked(msg: IsMeetingLocked) {
|
||||
|
||||
}
|
||||
|
||||
def handleSetLockSettings(msg: SetLockSettings) {
|
||||
// println("*************** Received new lock settings ********************")
|
||||
if (!permissionsEqual(msg.settings)) {
|
||||
newPermissions(msg.settings)
|
||||
val au = affectedUsers(msg.settings)
|
||||
outGW.send(new NewPermissionsSetting(meetingID, msg.setByUser, permissions, au))
|
||||
outGW.send(new NewPermissionsSetting(meetingID, msg.setByUser, permissions, users.getUsers))
|
||||
|
||||
handleLockLayout(msg.settings.lockedLayout, msg.setByUser)
|
||||
}
|
||||
}
|
||||
|
||||
def handleLockUserRequest(msg: LockUserRequest) {
|
||||
users.getUser(msg.userID) match {
|
||||
case Some(u) => {
|
||||
val uvo = u.copy(locked=msg.lock)
|
||||
users.addUser(uvo)
|
||||
|
||||
logger.info("Lock user: mid=[" + meetingID + "] uid=[" + u.userID + "] lock=[" + msg.lock + "]")
|
||||
outGW.send(new UserLocked(meetingID, u.userID, msg.lock))
|
||||
}
|
||||
case None => {
|
||||
logger.info("Could not find user to lock: mid=[" + meetingID + "] uid=[" + msg.userID + "] lock=[" + msg.lock + "]")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def handleInitLockSettings(msg: InitLockSettings) {
|
||||
if (! permissionsInited) {
|
||||
permissionsInited = true
|
||||
if (permissions != msg.settings || locked != msg.locked) {
|
||||
permissions = msg.settings
|
||||
locked = msg.locked
|
||||
val au = affectedUsers(msg.settings)
|
||||
outGW.send(new PermissionsSettingInitialized(msg.meetingID, msg.locked, msg.settings, au))
|
||||
}
|
||||
newPermissions(msg.settings)
|
||||
outGW.send(new PermissionsSettingInitialized(msg.meetingID, msg.settings, users.getUsers))
|
||||
}
|
||||
}
|
||||
|
||||
def handleInitAudioSettings(msg: InitAudioSettings) {
|
||||
if (! audioSettingsInited) {
|
||||
audioSettingsInited = true
|
||||
if(meetingMuted != msg.muted) {
|
||||
handleMuteAllExceptPresenterRequest(new MuteAllExceptPresenterRequest(meetingID, msg.requesterID, msg.muted));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,19 +211,6 @@ trait UsersApp {
|
||||
au.toArray
|
||||
}
|
||||
|
||||
def affectedUsers(settings: Permissions):Array[UserVO] = {
|
||||
val au = ArrayBuffer[UserVO]()
|
||||
|
||||
users.getUsers foreach {u =>
|
||||
val nu = u.copy(permissions=permissions)
|
||||
users.addUser(nu)
|
||||
if (! u.presenter && u.role != Role.MODERATOR) {
|
||||
au += nu
|
||||
}
|
||||
}
|
||||
au.toArray
|
||||
}
|
||||
|
||||
def handleUserRaiseHand(msg: UserRaiseHand) {
|
||||
users.getUser(msg.userId) foreach {user =>
|
||||
val uvo = user.copy(raiseHand=true)
|
||||
@ -285,12 +279,12 @@ trait UsersApp {
|
||||
false, false, false, false)
|
||||
val uvo = new UserVO(msg.userID, ru.externId, ru.name,
|
||||
ru.role, raiseHand=false, presenter=false,
|
||||
hasStream=false, locked=false, webcamStream="",
|
||||
phoneUser=false, vu, listenOnly=false, permissions)
|
||||
hasStream=false, locked=getInitialLockStatus(ru.role),
|
||||
webcamStream="", phoneUser=false, vu, listenOnly=false)
|
||||
|
||||
users.addUser(uvo)
|
||||
|
||||
logger.info("User joined meeting: mid=[" + meetingID + "] uid=[" + uvo.userID + "]")
|
||||
logger.info("User joined meeting: mid=[" + meetingID + "] uid=[" + uvo.userID + "] role=[" + uvo.role + "] locked=[" + uvo.locked + "] permissions.lockOnJoin=[" + permissions.lockOnJoin + "] ")
|
||||
outGW.send(new UserJoined(meetingID, recorded, uvo))
|
||||
|
||||
outGW.send(new MeetingState(meetingID, recorded, uvo.userID, permissions, meetingMuted))
|
||||
@ -319,6 +313,10 @@ trait UsersApp {
|
||||
}
|
||||
}
|
||||
|
||||
def getInitialLockStatus(role: Role.Role):Boolean = {
|
||||
permissions.lockOnJoin && !role.equals(Role.MODERATOR)
|
||||
}
|
||||
|
||||
def handleUserJoinedVoiceFromPhone(msg: VoiceUserJoined) = {
|
||||
val user = users.getUserWithVoiceUserId(msg.voiceUser.userId) match {
|
||||
case Some(user) => {
|
||||
@ -337,8 +335,8 @@ trait UsersApp {
|
||||
|
||||
val uvo = new UserVO(webUserId, webUserId, msg.voiceUser.callerName,
|
||||
Role.VIEWER, raiseHand=false, presenter=false,
|
||||
hasStream=false, locked=false, webcamStream="",
|
||||
phoneUser=true, vu, listenOnly=false, permissions)
|
||||
hasStream=false, locked=getInitialLockStatus(Role.VIEWER), webcamStream="",
|
||||
phoneUser=true, vu, listenOnly=false)
|
||||
|
||||
users.addUser(uvo)
|
||||
logger.info("New user joined voice for user [" + uvo.name + "] userid=[" + msg.voiceUser.webUserId + "]")
|
||||
@ -391,7 +389,7 @@ trait UsersApp {
|
||||
|
||||
def handleVoiceUserMuted(msg: VoiceUserMuted) {
|
||||
users.getUser(msg.userId) foreach {user =>
|
||||
val talking = if (msg.muted) false else user.voiceUser.talking
|
||||
val talking:Boolean = if (msg.muted) false else user.voiceUser.talking
|
||||
val nv = user.voiceUser.copy(muted=msg.muted, talking=talking)
|
||||
val nu = user.copy(voiceUser=nv)
|
||||
users.addUser(nu)
|
||||
|
@ -41,6 +41,7 @@ class UsersClientMessageSender(service: ConnectionInvokerService) extends OutMes
|
||||
case msg: UserRegistered => handleRegisteredUser(msg)
|
||||
case msg: UserListeningOnly => handleUserListeningOnly(msg)
|
||||
case msg: NewPermissionsSetting => handleNewPermissionsSetting(msg)
|
||||
case msg: UserLocked => handleUserLocked(msg)
|
||||
case msg: MeetingMuted => handleMeetingMuted(msg)
|
||||
case msg: MeetingState => handleMeetingState(msg)
|
||||
|
||||
@ -55,6 +56,7 @@ class UsersClientMessageSender(service: ConnectionInvokerService) extends OutMes
|
||||
args.put("disablePrivChat", perms.disablePrivChat:java.lang.Boolean);
|
||||
args.put("disablePubChat", perms.disablePubChat:java.lang.Boolean);
|
||||
args.put("lockedLayout", perms.lockedLayout:java.lang.Boolean);
|
||||
args.put("lockOnJoin", perms.lockOnJoin:java.lang.Boolean);
|
||||
args
|
||||
}
|
||||
|
||||
@ -83,16 +85,7 @@ class UsersClientMessageSender(service: ConnectionInvokerService) extends OutMes
|
||||
wuser.put("phoneUser", user.phoneUser:java.lang.Boolean)
|
||||
wuser.put("voiceUser", vuser)
|
||||
wuser.put("listenOnly", user.listenOnly:java.lang.Boolean)
|
||||
|
||||
val permissions = new HashMap[String, Object]()
|
||||
permissions.put("disableCam", user.permissions.disableCam:java.lang.Boolean)
|
||||
permissions.put("disableMic", user.permissions.disableMic:java.lang.Boolean)
|
||||
permissions.put("disablePrivChat", user.permissions.disablePrivChat:java.lang.Boolean)
|
||||
permissions.put("disablePubChat", user.permissions.disablePubChat:java.lang.Boolean)
|
||||
permissions.put("lockedLayout", user.permissions.lockedLayout:java.lang.Boolean)
|
||||
|
||||
wuser.put("permissions", permissions)
|
||||
|
||||
|
||||
wuser
|
||||
}
|
||||
|
||||
@ -103,6 +96,7 @@ class UsersClientMessageSender(service: ConnectionInvokerService) extends OutMes
|
||||
args.put("disablePrivChat", msg.permissions.disablePrivChat:java.lang.Boolean);
|
||||
args.put("disablePubChat", msg.permissions.disablePubChat:java.lang.Boolean);
|
||||
args.put("lockedLayout", msg.permissions.lockedLayout:java.lang.Boolean);
|
||||
args.put("lockOnJoin", msg.permissions.lockOnJoin:java.lang.Boolean);
|
||||
|
||||
var users = new ArrayList[java.util.HashMap[String, Object]];
|
||||
msg.applyTo.foreach(uvo => {
|
||||
@ -120,6 +114,20 @@ class UsersClientMessageSender(service: ConnectionInvokerService) extends OutMes
|
||||
service.sendMessage(m);
|
||||
}
|
||||
|
||||
private def handleUserLocked(msg: UserLocked) {
|
||||
val args = new java.util.HashMap[String, Object]();
|
||||
args.put("meetingID", msg.meetingID);
|
||||
args.put("user", msg.userId)
|
||||
args.put("lock", msg.lock:java.lang.Boolean)
|
||||
|
||||
val message = new java.util.HashMap[String, Object]()
|
||||
val gson = new Gson();
|
||||
message.put("msg", gson.toJson(args))
|
||||
|
||||
val m = new BroadcastClientMessage(msg.meetingID, "userLocked", message);
|
||||
service.sendMessage(m);
|
||||
}
|
||||
|
||||
private def handleRegisteredUser(msg: UserRegistered) {
|
||||
val args = new java.util.HashMap[String, Object]();
|
||||
args.put("userId", msg.user.id);
|
||||
|
@ -15,9 +15,7 @@ class UsersEventRedisPublisher(service: MessageSender) extends OutMessageListene
|
||||
case msg: PermissionsSettingInitialized => handlePermissionsSettingInitialized(msg)
|
||||
case msg: NewPermissionsSetting => handleNewPermissionsSetting(msg)
|
||||
case msg: UserLocked => handleUserLocked(msg)
|
||||
case msg: UsersLocked => handleUsersLocked(msg)
|
||||
case msg: GetPermissionsSettingReply => handleGetPermissionsSettingReply(msg)
|
||||
case msg: IsMeetingLockedReply => handleIsMeetingLockedReply(msg)
|
||||
case msg: UserRegistered => handleUserRegistered(msg)
|
||||
case msg: UserLeft => handleUserLeft(msg)
|
||||
case msg: PresenterAssigned => handlePresenterAssigned(msg)
|
||||
@ -66,21 +64,11 @@ class UsersEventRedisPublisher(service: MessageSender) extends OutMessageListene
|
||||
val json = UsersMessageToJsonConverter.userLockedToJson(msg)
|
||||
service.send(MessagingConstants.FROM_MEETING_CHANNEL, json)
|
||||
}
|
||||
|
||||
private def handleUsersLocked(msg: UsersLocked) {
|
||||
val json = UsersMessageToJsonConverter.usersLockedToJson(msg)
|
||||
service.send(MessagingConstants.FROM_MEETING_CHANNEL, json)
|
||||
}
|
||||
|
||||
private def handleGetPermissionsSettingReply(msg: GetPermissionsSettingReply) {
|
||||
val json = UsersMessageToJsonConverter.getPermissionsSettingReplyToJson(msg)
|
||||
service.send(MessagingConstants.FROM_MEETING_CHANNEL, json)
|
||||
}
|
||||
|
||||
private def handleIsMeetingLockedReply(msg: IsMeetingLockedReply) {
|
||||
val json = UsersMessageToJsonConverter.isMeetingLockedReplyToJson(msg)
|
||||
service.send(MessagingConstants.FROM_MEETING_CHANNEL, json)
|
||||
}
|
||||
|
||||
private def handleUserRegistered(msg: UserRegistered) {
|
||||
val json = UsersMessageToJsonConverter.userRegisteredToJson(msg)
|
||||
|
@ -24,15 +24,6 @@ object UsersMessageToJsonConverter {
|
||||
wuser += "phone_user" -> user.phoneUser
|
||||
wuser += "listenOnly" -> user.listenOnly
|
||||
|
||||
val permissions = new scala.collection.mutable.HashMap[String, Any]
|
||||
permissions.put("disableCam", user.permissions.disableCam)
|
||||
permissions.put("disableMic", user.permissions.disableMic)
|
||||
permissions.put("disablePrivChat", user.permissions.disablePrivChat)
|
||||
permissions.put("disablePubChat", user.permissions.disablePubChat)
|
||||
permissions.put("lockedLayout", user.permissions.lockedLayout)
|
||||
|
||||
wuser.put("permissions", permissions)
|
||||
|
||||
val vuser = new scala.collection.mutable.HashMap[String, Any]
|
||||
vuser += "userid" -> user.voiceUser.userId
|
||||
vuser += "web_userid" -> user.voiceUser.webUserId
|
||||
@ -79,7 +70,6 @@ object UsersMessageToJsonConverter {
|
||||
def permissionsSettingInitializedToJson(msg: PermissionsSettingInitialized):String = {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.LOCKED, msg.locked)
|
||||
payload.put(Constants.SETTINGS, msg.permissions.toString()) //#todo not tested
|
||||
|
||||
val header = Util.buildHeader(MessageNames.PERMISSION_SETTING_INITIALIZED, msg.version, None)
|
||||
@ -90,10 +80,12 @@ object UsersMessageToJsonConverter {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put("disableCam", msg.permissions.disableCam)
|
||||
payload.put("disableMic", msg.permissions.disableMic)
|
||||
payload.put("disablePrivChat", msg.permissions.disablePrivChat)
|
||||
payload.put("disablePubChat", msg.permissions.disablePubChat)
|
||||
|
||||
payload.put("disableMic", msg.permissions.disableMic)
|
||||
payload.put("disablePrivChat", msg.permissions.disablePrivChat)
|
||||
payload.put("disablePubChat", msg.permissions.disablePubChat)
|
||||
payload.put("lockedLayout", msg.permissions.lockedLayout)
|
||||
payload.put("lockOnJoin", msg.permissions.lockOnJoin)
|
||||
|
||||
val users = new java.util.ArrayList[java.util.Map[String, Any]]
|
||||
msg.applyTo.foreach(uvo => {
|
||||
users.add(userToMap(uvo))
|
||||
@ -115,16 +107,6 @@ object UsersMessageToJsonConverter {
|
||||
Util.buildJson(header, payload)
|
||||
}
|
||||
|
||||
def usersLockedToJson(msg: UsersLocked):String = {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.EXCEPT_USERS, msg.exceptUsers.toString())
|
||||
payload.put(Constants.LOCKED, msg.lock)
|
||||
|
||||
val header = Util.buildHeader(MessageNames.USERS_LOCKED, msg.version, None)
|
||||
Util.buildJson(header, payload)
|
||||
}
|
||||
|
||||
def getPermissionsSettingReplyToJson(msg: GetPermissionsSettingReply):String = {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
@ -133,15 +115,6 @@ object UsersMessageToJsonConverter {
|
||||
val header = Util.buildHeader(MessageNames.GET_PERMISSION_SETTINGS_REPLY, msg.version, None)
|
||||
Util.buildJson(header, payload)
|
||||
}
|
||||
|
||||
def isMeetingLockedReplyToJson(msg: IsMeetingLockedReply):String = {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
payload.put(Constants.MEETING_ID, msg.meetingID)
|
||||
payload.put(Constants.USER_ID, msg.userId)
|
||||
|
||||
val header = Util.buildHeader(MessageNames.IS_MEETING_LOCKED_REPLY, msg.version, None)
|
||||
Util.buildJson(header, payload)
|
||||
}
|
||||
|
||||
def userRegisteredToJson(msg: UserRegistered):String = {
|
||||
val payload = new java.util.HashMap[String, Any]()
|
||||
|
@ -14,14 +14,13 @@ class UsersModelTests {
|
||||
"Asyong Aksaya", "+639175558624",
|
||||
joined = true, locked = false,
|
||||
muted = false, talking = false)
|
||||
val perm = new Permissions
|
||||
|
||||
val userVo = new UserVO("user1", "euser1", name = "Asyong Aksaya",
|
||||
|
||||
val userVo = new UserVO("user1", userID="user1", externUserID = "euser1", name = "Asyong Aksaya",
|
||||
role = MODERATOR, raiseHand = false,
|
||||
presenter = true, hasStream = false,
|
||||
locked = false, webcamStream = "",
|
||||
phoneUser = false, voiceUser = voiceUser,
|
||||
listenOnly = false, permissions = perm)
|
||||
listenOnly = false)
|
||||
|
||||
@BeforeClass
|
||||
def setUp() {
|
||||
|
@ -603,4 +603,5 @@ bbb.lockSettings.microphone = Microphone
|
||||
bbb.lockSettings.layout = Layout
|
||||
bbb.lockSettings.title=Lock Viewers
|
||||
bbb.lockSettings.feature=Feature
|
||||
bbb.lockSettings.enabled=Locked
|
||||
bbb.lockSettings.locked=Locked
|
||||
bbb.lockSettings.lockOnJoin=Lock On Join
|
||||
|
9
bigbluebutton-client/locale/pt_BR/bbbResources.properties
Normal file → Executable file
9
bigbluebutton-client/locale/pt_BR/bbbResources.properties
Normal file → Executable file
@ -130,7 +130,6 @@ bbb.users.settings.lowerAllHands = Baixar todas as mãos
|
||||
bbb.users.raiseHandBtn.toolTip = Levantar a mão
|
||||
bbb.users.raiseHandBtn.toolTip2 = Abaixar a mão
|
||||
bbb.users.roomMuted.text = Participantes silenciados
|
||||
bbb.users.roomLocked.text = Participantes bloqueados
|
||||
bbb.users.pushToTalk.toolTip = Falar
|
||||
bbb.users.pushToMute.toolTip = Silenciar você mesmo
|
||||
bbb.users.muteMeBtnTxt.talk = Falar
|
||||
@ -587,12 +586,13 @@ bbb.users.settings.unlockAll=Liberar todos os participantes
|
||||
bbb.users.settings.roomIsLocked=Bloqueados por padrão
|
||||
bbb.users.settings.roomIsMuted=Silenciados por padrão
|
||||
|
||||
bbb.users.roomLocked.text = Participantes c/ restrições
|
||||
|
||||
bbb.lockSettings.save = Aplicar
|
||||
bbb.lockSettings.save.tooltip = Aplicar configurações de restrição
|
||||
bbb.lockSettings.save.toolTip = Aplicar configurações de restrição
|
||||
bbb.lockSettings.cancel = Cancelar
|
||||
bbb.lockSettings.cancel.toolTip = Fecha esta janela sem aplicar
|
||||
|
||||
bbb.lockSettings.moderatorLocking = Bloqueio de moderador
|
||||
bbb.lockSettings.privateChat = Chat privado
|
||||
bbb.lockSettings.publicChat = Chat público
|
||||
bbb.lockSettings.webcam = Câmera
|
||||
@ -600,4 +600,5 @@ bbb.lockSettings.microphone = Microfone
|
||||
bbb.lockSettings.layout = Layout
|
||||
bbb.lockSettings.title=Restringir participantes
|
||||
bbb.lockSettings.feature=Recurso
|
||||
bbb.lockSettings.enabled=Bloqueado
|
||||
bbb.lockSettings.locked=Restrito
|
||||
bbb.lockSettings.lockOnJoin=Restringir ao entrar
|
||||
|
27
bigbluebutton-client/src/org/bigbluebutton/core/vo/LockSettingsVO.as
Normal file → Executable file
27
bigbluebutton-client/src/org/bigbluebutton/core/vo/LockSettingsVO.as
Normal file → Executable file
@ -24,15 +24,17 @@ package org.bigbluebutton.core.vo
|
||||
private var disableMic:Boolean;
|
||||
private var disablePrivateChat:Boolean;
|
||||
private var disablePublicChat:Boolean;
|
||||
private var lockedLayout:Boolean;
|
||||
private var lockedLayout:Boolean;
|
||||
private var lockOnJoin:Boolean;
|
||||
|
||||
public function LockSettingsVO(pDisableCam:Boolean, pDisableMic:Boolean, pDisablePrivateChat:Boolean, pDisablePublicChat:Boolean, pLockLayout: Boolean)
|
||||
public function LockSettingsVO(pDisableCam:Boolean, pDisableMic:Boolean, pDisablePrivateChat:Boolean, pDisablePublicChat:Boolean, pLockLayout: Boolean, pLockOnJoin:Boolean)
|
||||
{
|
||||
this.disableCam = pDisableCam;
|
||||
this.disableMic = pDisableMic;
|
||||
this.disablePrivateChat = pDisablePrivateChat;
|
||||
this.disablePublicChat = pDisablePublicChat;
|
||||
this.lockedLayout = pLockLayout;
|
||||
this.lockedLayout = pLockLayout;
|
||||
this.lockOnJoin = pLockOnJoin;
|
||||
}
|
||||
|
||||
public function toMap():Object {
|
||||
@ -41,7 +43,8 @@ package org.bigbluebutton.core.vo
|
||||
disableMic: this.disableMic,
|
||||
disablePrivateChat: this.disablePrivateChat,
|
||||
disablePublicChat: this.disablePublicChat,
|
||||
lockedLayout: this.lockedLayout
|
||||
lockedLayout: this.lockedLayout,
|
||||
lockOnJoin: this.lockOnJoin
|
||||
};
|
||||
|
||||
return map;
|
||||
@ -62,9 +65,17 @@ package org.bigbluebutton.core.vo
|
||||
public function getDisablePublicChat():Boolean {
|
||||
return disablePublicChat;
|
||||
}
|
||||
|
||||
public function getLockedLayout():Boolean {
|
||||
return lockedLayout;
|
||||
}
|
||||
|
||||
public function getLockedLayout():Boolean {
|
||||
return lockedLayout;
|
||||
}
|
||||
|
||||
public function getLockOnJoin():Boolean {
|
||||
return lockOnJoin;
|
||||
}
|
||||
|
||||
public function isAnythingLocked():Boolean {
|
||||
return lockedLayout || disableCam || disableMic || disablePrivateChat || disablePublicChat;
|
||||
}
|
||||
}
|
||||
}
|
@ -85,11 +85,6 @@ package org.bigbluebutton.main.model
|
||||
public var userid:String;
|
||||
public var record:Boolean;
|
||||
|
||||
/**
|
||||
* Flag used to start room as locked
|
||||
* */
|
||||
public var lockOnStart:Boolean;
|
||||
|
||||
/**
|
||||
* Flag used to start room as muted
|
||||
* */
|
||||
|
60
bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as
Normal file → Executable file
60
bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as
Normal file → Executable file
@ -74,6 +74,10 @@ package org.bigbluebutton.main.model.users
|
||||
public function set presenter(p:Boolean):void {
|
||||
_presenter = p;
|
||||
verifyUserStatus();
|
||||
|
||||
//As the lock settings are now not applied to presenters, when the presenter flag is changed, we need to apply the lock settings
|
||||
if(me)
|
||||
applyLockSettings();
|
||||
}
|
||||
|
||||
public var raiseHandTime:Date;
|
||||
@ -215,23 +219,20 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
|
||||
public function lockStatusChanged(locked: Boolean):void {
|
||||
userLocked = locked;
|
||||
if(me)
|
||||
applyLockSettings();
|
||||
buildStatus();
|
||||
trace("lockStatusChanged -> " + locked);
|
||||
userLocked = locked;
|
||||
if(me)
|
||||
applyLockSettings();
|
||||
buildStatus();
|
||||
}
|
||||
|
||||
public function changeStatus(status:Status):void {
|
||||
trace("changeStatus -> " + status.name);
|
||||
//_status.changeStatus(status);
|
||||
if (status.name == "presenter") {
|
||||
presenter = status.value
|
||||
}
|
||||
switch (status.name) {
|
||||
case "locked":
|
||||
userLocked = status.value as Boolean;
|
||||
if(me)
|
||||
applyLockSettings();
|
||||
break;
|
||||
case "presenter":
|
||||
presenter = status.value;
|
||||
break;
|
||||
@ -307,32 +308,31 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
|
||||
public function applyLockSettings():void {
|
||||
|
||||
var lockSettings:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings();
|
||||
var lockAppliesToMe:Boolean = me && role != MODERATOR && !presenter && userLocked;
|
||||
|
||||
disableMyCam = lockAppliesToMe && lockSettings.getDisableCam();
|
||||
disableMyMic = lockAppliesToMe && lockSettings.getDisableMic();
|
||||
disableMyPrivateChat = lockAppliesToMe && lockSettings.getDisablePrivateChat();
|
||||
disableMyPublicChat = lockAppliesToMe && lockSettings.getDisablePublicChat();
|
||||
lockedLayout = lockAppliesToMe && lockSettings.getLockedLayout();
|
||||
|
||||
disableMyCam = lockSettings.getDisableCam();
|
||||
disableMyMic = lockSettings.getDisableMic();
|
||||
disableMyPrivateChat = lockSettings.getDisablePrivateChat();
|
||||
disableMyPublicChat = lockSettings.getDisablePublicChat();
|
||||
lockedLayout = lockSettings.getLockedLayout();
|
||||
|
||||
var dispatcher:Dispatcher = new Dispatcher();
|
||||
dispatcher.dispatchEvent(new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS));
|
||||
|
||||
if (me && role != MODERATOR && !presenter) {
|
||||
//If it's sharing webcam, stop it
|
||||
if (disableMyCam && hasStream){
|
||||
dispatcher.dispatchEvent(new ClosePublishWindowEvent());
|
||||
}
|
||||
|
||||
//If it's sharing microphone, mute it
|
||||
if (disableMyMic && !UserManager.getInstance().getConference().isMyVoiceMuted()) {
|
||||
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
|
||||
e.userid = UserManager.getInstance().getConference().getMyUserId();
|
||||
e.mute = true;
|
||||
dispatcher.dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
if (lockAppliesToMe) {
|
||||
//If it's sharing webcam, stop it
|
||||
if (disableMyCam && hasStream){
|
||||
dispatcher.dispatchEvent(new ClosePublishWindowEvent());
|
||||
}
|
||||
//If it's sharing microphone, mute it
|
||||
if (disableMyMic && !UserManager.getInstance().getConference().isMyVoiceMuted()) {
|
||||
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
|
||||
e.userid = UserManager.getInstance().getConference().getMyUserId();
|
||||
e.mute = true;
|
||||
dispatcher.dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -437,12 +437,12 @@ package org.bigbluebutton.main.model.users {
|
||||
public function configLockSettings():void {
|
||||
var config:Config = BBB.initConfigManager().config;
|
||||
|
||||
var allowModeratorLocking:Boolean,
|
||||
disableCam:Boolean,
|
||||
disableMic:Boolean,
|
||||
disablePrivateChat:Boolean,
|
||||
disablePublicChat:Boolean,
|
||||
lockedLayout:Boolean;
|
||||
var disableCam:Boolean,
|
||||
disableMic:Boolean,
|
||||
disablePrivateChat:Boolean,
|
||||
disablePublicChat:Boolean,
|
||||
lockedLayout:Boolean,
|
||||
lockOnJoin:Boolean;
|
||||
|
||||
var lockConfig:XML;
|
||||
|
||||
@ -450,45 +450,45 @@ package org.bigbluebutton.main.model.users {
|
||||
lockConfig = config.lock;
|
||||
}
|
||||
|
||||
try {
|
||||
allowModeratorLocking = (lockConfig.@allowModeratorLocking.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
allowModeratorLocking = false;
|
||||
}
|
||||
|
||||
try {
|
||||
disableCam = (lockConfig.@disableCamForLockedUsers.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
disableCam = false;
|
||||
disableCam = false; //If not set, default to false
|
||||
}
|
||||
|
||||
try {
|
||||
disableMic = (lockConfig.@disableMicForLockedUsers.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
disableMic = false;
|
||||
disableMic = false; //If not set, default to false
|
||||
}
|
||||
|
||||
try {
|
||||
disablePrivateChat = (lockConfig.@disablePrivateChatForLockedUsers.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
disablePrivateChat = false;
|
||||
disablePrivateChat = false; //If not set, default to false
|
||||
}
|
||||
|
||||
try {
|
||||
disablePublicChat = (lockConfig.@disablePublicChatForLockedUsers.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
disablePublicChat = false;
|
||||
disablePublicChat = false; //If not set, default to false
|
||||
}
|
||||
|
||||
try {
|
||||
lockedLayout = (lockConfig.@lockLayoutForLockedUsers.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
lockedLayout = false;
|
||||
}
|
||||
try {
|
||||
lockedLayout = (lockConfig.@lockLayoutForLockedUsers.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
lockedLayout = false; //If not set, default to false
|
||||
}
|
||||
|
||||
try {
|
||||
lockOnJoin = (lockConfig.@lockOnJoin.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
lockOnJoin = true; //If not set, default to true
|
||||
}
|
||||
|
||||
trace(LOG + " init lock settings from config");
|
||||
|
||||
lockSettings = new LockSettingsVO(disableCam, disableMic, disablePrivateChat, disablePublicChat, lockedLayout);
|
||||
lockSettings = new LockSettingsVO(disableCam, disableMic, disablePrivateChat, disablePublicChat, lockedLayout, lockOnJoin);
|
||||
|
||||
setLockSettings(lockSettings);
|
||||
}
|
||||
@ -513,7 +513,7 @@ package org.bigbluebutton.main.model.users {
|
||||
|
||||
public function setLockSettings(lockSettings:LockSettingsVO):void {
|
||||
this.lockSettings = lockSettings;
|
||||
applyLockSettings();
|
||||
applyLockSettings();
|
||||
}
|
||||
|
||||
public function applyLockSettings():void {
|
||||
|
@ -221,12 +221,11 @@ package org.bigbluebutton.main.model.users
|
||||
var uri:String = _applicationURI + "/" + _conferenceParameters.room;
|
||||
|
||||
trace(LOG + "::Connecting to " + uri + " [" + _conferenceParameters.username + "," + _conferenceParameters.role + "," +
|
||||
_conferenceParameters.conference + "," + _conferenceParameters.record + "," + _conferenceParameters.room + "]");
|
||||
_conferenceParameters.conference + "," + _conferenceParameters.record + "," + _conferenceParameters.room + ", " + _conferenceParameters.lockSettings.lockOnJoin + "]");
|
||||
_netConnection.connect(uri, _conferenceParameters.username, _conferenceParameters.role,
|
||||
_conferenceParameters.room, _conferenceParameters.voicebridge,
|
||||
_conferenceParameters.record, _conferenceParameters.externUserID,
|
||||
_conferenceParameters.internalUserID, _conferenceParameters.lockOnStart,
|
||||
_conferenceParameters.muteOnStart, _conferenceParameters.lockSettings);
|
||||
_conferenceParameters.internalUserID, _conferenceParameters.muteOnStart, _conferenceParameters.lockSettings);
|
||||
} catch(e:ArgumentError) {
|
||||
// Invalid parameters.
|
||||
switch (e.errorID) {
|
||||
|
@ -129,21 +129,15 @@ package org.bigbluebutton.main.model.users
|
||||
muteOnStart = false;
|
||||
}
|
||||
|
||||
var lockOnStart:Boolean;
|
||||
try {
|
||||
lockOnStart = (config.meeting.@lockOnStart.toUpperCase() == "TRUE");
|
||||
} catch(e:Error) {
|
||||
lockOnStart = false;
|
||||
}
|
||||
|
||||
_conferenceParameters.muteOnStart = muteOnStart;
|
||||
_conferenceParameters.lockOnStart = lockOnStart;
|
||||
_conferenceParameters.lockSettings = UserManager.getInstance().getConference().getLockSettings().toMap();
|
||||
|
||||
// assign the meeting name to the document title
|
||||
ExternalInterface.call("setTitle", _conferenceParameters.meetingName);
|
||||
|
||||
trace(LOG + " Got the user info from web api.");
|
||||
trace("_conferenceParameters.muteOnStart = " + _conferenceParameters.muteOnStart);
|
||||
|
||||
// assign the meeting name to the document title
|
||||
ExternalInterface.call("setTitle", _conferenceParameters.meetingName);
|
||||
|
||||
trace(LOG + " Got the user info from web api.");
|
||||
/**
|
||||
* Temporarily store the parameters in global BBB so we get easy access to it.
|
||||
*/
|
||||
@ -153,7 +147,7 @@ package org.bigbluebutton.main.model.users
|
||||
e.conference = UserManager.getInstance().getConference();
|
||||
dispatcher.dispatchEvent(e);
|
||||
|
||||
connect();
|
||||
connect();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.core.vo.LockSettingsVO;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.modules.phone.PhoneOptions;
|
||||
import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent;
|
||||
import org.bigbluebutton.modules.phone.events.JoinVoiceConferenceCommand;
|
||||
@ -48,11 +51,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
[Bindable] private var baseIndex:int = 1;
|
||||
|
||||
private function init():void {
|
||||
var conference:Conference = UserManager.getInstance().getConference();
|
||||
|
||||
if (!phoneOptions.listenOnlyMode) btnListenOnly.enabled = false;
|
||||
if (phoneOptions.presenterShareOnly && !UsersUtil.amIPresenter() && !UsersUtil.amIModerator()) btnMicrophone.enabled = false;
|
||||
if (
|
||||
(phoneOptions.presenterShareOnly && !UsersUtil.amIPresenter() && !UsersUtil.amIModerator())
|
||||
) {
|
||||
btnMicrophone.enabled = false;
|
||||
}
|
||||
|
||||
if (phoneOptions.showPhoneOption) {
|
||||
txtPhone.text=ResourceUtil.getInstance().getString('bbb.audioSelection.txtPhone.text', [UserManager.getInstance().getConference().dialNumber, UserManager.getInstance().getConference().voiceBridge]);
|
||||
txtPhone.text=ResourceUtil.getInstance().getString('bbb.audioSelection.txtPhone.text', [conference.dialNumber, conference.voiceBridge]);
|
||||
} else {
|
||||
vrulePhone.visible = vrulePhone.includeInLayout = false;
|
||||
vboxPhone.visible = vboxPhone.includeInLayout = false;
|
||||
|
@ -42,20 +42,22 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
private var images:Images = new Images();
|
||||
|
||||
[Bindable] private var cancelIcon:Class = images.cancel;
|
||||
|
||||
[Bindable] private var baseIndex:int = 1;
|
||||
|
||||
[Bindable] public var disableCam:Boolean = false;
|
||||
[Bindable] public var disableMic:Boolean = false;
|
||||
[Bindable] public var disablePubChat:Boolean = false;
|
||||
[Bindable] public var disablePrivChat:Boolean = false;
|
||||
[Bindable] public var lockedLayout:Boolean = false;
|
||||
|
||||
|
||||
[Bindable] private var baseIndex:int = 1;
|
||||
|
||||
[Bindable] public var disableCam:Boolean = false;
|
||||
[Bindable] public var disableMic:Boolean = false;
|
||||
[Bindable] public var disablePubChat:Boolean = false;
|
||||
[Bindable] public var disablePrivChat:Boolean = false;
|
||||
[Bindable] public var lockedLayout:Boolean = false;
|
||||
[Bindable] public var lockOnJoin:Boolean = false;
|
||||
|
||||
override public function move(x:Number, y:Number):void {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
private function handleKeyDown(event:KeyboardEvent):void {
|
||||
if (event.charCode == Keyboard.ESCAPE) {
|
||||
this.dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
|
||||
@ -65,15 +67,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private function onSaveClicked():void {
|
||||
var event:LockControlEvent = new LockControlEvent(LockControlEvent.SAVE_LOCK_SETTINGS);
|
||||
|
||||
var lockSettings:LockSettingsVO = new LockSettingsVO(enableWebcam.selected,
|
||||
enableMicrophone.selected,
|
||||
enablePrivateChat.selected,
|
||||
enablePublicChat.selected,
|
||||
enableLayout.selected);
|
||||
|
||||
var lockSettings:LockSettingsVO = new LockSettingsVO(chkDisableWebcam.selected, chkDisableMicrophone.selected, chkDisablePrivateChat.selected, chkDisablePublicChat.selected, chkDisableLayout.selected, chkLockOnJoin.selected);
|
||||
event.payload = lockSettings.toMap();
|
||||
|
||||
dispatchEvent(event);
|
||||
|
||||
PopUpManager.removePopUp(this);
|
||||
@ -85,9 +80,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
protected function creationCompleteHandler(event:FlexEvent):void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
<mx:VBox width="100%" height="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
|
||||
@ -97,14 +91,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<mx:HBox verticalAlign="top" width="100%" paddingTop="20">
|
||||
<mx:Label width="70%" styleName="lockSettingsDefaultLabelStyle" text="{ResourceUtil.getInstance().getString('bbb.lockSettings.feature')}" fontWeight="bold" />
|
||||
<mx:Label styleName="lockSettingsDefaultLabelStyle" text="{ResourceUtil.getInstance().getString('bbb.lockSettings.enabled')}" fontWeight="bold" />
|
||||
<mx:Label styleName="lockSettingsDefaultLabelStyle" text="{ResourceUtil.getInstance().getString('bbb.lockSettings.locked')}" fontWeight="bold" />
|
||||
</mx:HBox>
|
||||
<mx:HBox verticalAlign="top" width="100%">
|
||||
<mx:Label width="70%" styleName="lockSettingsDefaultLabelStyle"
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.webcam')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="enableWebcam" selected="{disableCam}" />
|
||||
<mx:CheckBox id="chkDisableWebcam" selected="{disableCam}" />
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
@ -113,7 +107,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.microphone')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="enableMicrophone" selected="{disableMic}"/>
|
||||
<mx:CheckBox id="chkDisableMicrophone" selected="{disableMic}"/>
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
@ -122,7 +116,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.publicChat')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="enablePublicChat" selected="{disablePubChat}"/>
|
||||
<mx:CheckBox id="chkDisablePublicChat" selected="{disablePubChat}"/>
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
@ -131,19 +125,33 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.privateChat')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="enablePrivateChat" selected="{disablePrivChat}"/>
|
||||
<mx:CheckBox id="chkDisablePrivateChat" selected="{disablePrivChat}"/>
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
<mx:HBox verticalAlign="top" width="100%">
|
||||
<mx:Label width="70%" styleName="lockSettingsDefaultLabelStyle"
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.layout')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="enableLayout" selected="{lockedLayout}"/>
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
|
||||
<mx:HBox verticalAlign="top" width="100%">
|
||||
<mx:Label width="70%" styleName="lockSettingsDefaultLabelStyle"
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.layout')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="chkDisableLayout" selected="{lockedLayout}"/>
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
|
||||
<mx:HRule width="100%"/>
|
||||
|
||||
<mx:HBox verticalAlign="top" width="100%">
|
||||
<mx:Label width="70%" styleName="lockSettingsDefaultLabelStyle"
|
||||
text="{ResourceUtil.getInstance().getString('bbb.lockSettings.lockOnJoin')}" />
|
||||
<mx:HBox width="30%">
|
||||
<mx:Spacer width="50%" />
|
||||
<mx:CheckBox id="chkLockOnJoin" selected="{lockOnJoin}"/>
|
||||
<mx:Spacer width="50%" />
|
||||
</mx:HBox>
|
||||
</mx:HBox>
|
||||
|
||||
<mx:HRule width="100%"/>
|
||||
|
||||
<mx:HBox width="100%" horizontalAlign="right" horizontalGap="18" paddingTop="20">
|
||||
|
@ -387,7 +387,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
* pop-up is opened from another pop-up. I delayed the second open to
|
||||
* avoid this case. - Chad
|
||||
*/
|
||||
this.callLater( function() {
|
||||
this.callLater( function():void {
|
||||
var micSettings:FlashMicSettings = PopUpManager.createPopUp(mdiCanvas, FlashMicSettings, true) as FlashMicSettings;
|
||||
micSettings.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void {
|
||||
var point1:Point = new Point();
|
||||
@ -628,22 +628,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function openLockSettingsWindow(event:LockControlEvent):void {
|
||||
var conference:Conference = UserManager.getInstance().getConference();
|
||||
var lsv:LockSettingsVO = conference.getLockSettings();
|
||||
var conference:Conference = UserManager.getInstance().getConference();
|
||||
var lsv:LockSettingsVO = conference.getLockSettings();
|
||||
|
||||
var popUp:IFlexDisplayObject = PopUpManager.createPopUp(mdiCanvas, LockSettings, true);
|
||||
var ls:LockSettings = LockSettings(popUp);
|
||||
ls.disableCam = lsv.getDisableCam();
|
||||
ls.disableMic = lsv.getDisableMic();
|
||||
ls.disablePrivChat = lsv.getDisablePrivateChat();
|
||||
ls.disablePubChat = lsv.getDisablePublicChat();
|
||||
ls.lockedLayout = lsv.getLockedLayout();
|
||||
ls.disableCam = lsv.getDisableCam();
|
||||
ls.disableMic = lsv.getDisableMic();
|
||||
ls.disablePrivChat = lsv.getDisablePrivateChat();
|
||||
ls.disablePubChat = lsv.getDisablePublicChat();
|
||||
ls.lockedLayout = lsv.getLockedLayout();
|
||||
ls.lockOnJoin = lsv.getLockOnJoin();
|
||||
|
||||
var point1:Point = new Point();
|
||||
point1.x = width/2;
|
||||
point1.y = height/2;
|
||||
ls.x = point1.x - (ls.width/2);
|
||||
ls.y = point1.y - (ls.height/2);
|
||||
point1.y = height/2;
|
||||
ls.x = point1.x - (ls.width/2);
|
||||
ls.y = point1.y - (ls.height/2);
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
@ -645,24 +645,21 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function lockSettingsChanged(e:Event):void {
|
||||
applyLockSettings();
|
||||
}
|
||||
|
||||
private function applyLockSettings():void {
|
||||
|
||||
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) return; // Settings only affect viewers.
|
||||
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
if (publicChat) {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat;
|
||||
} else {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat;
|
||||
}
|
||||
applyLockSettings();
|
||||
}
|
||||
|
||||
private function applyLockSettings():void {
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
if (publicChat) {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat;
|
||||
} else {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat;
|
||||
}
|
||||
]]>
|
||||
}
|
||||
]]>
|
||||
|
||||
</mx:Script>
|
||||
|
||||
|
@ -61,6 +61,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.core.vo.LockSettingsVO;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.views.MainToolbar;
|
||||
import org.bigbluebutton.modules.layout.events.ChangeLayoutEvent;
|
||||
import org.bigbluebutton.modules.layout.events.ComboBoxCreatedEvent;
|
||||
@ -88,10 +90,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function lockSettingsChanged(e:LockControlEvent):void {
|
||||
var lockSettings:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings();
|
||||
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) return;
|
||||
|
||||
this.enabled = ! lockSettings.getLockedLayout();
|
||||
var conference:Conference = UserManager.getInstance().getConference();
|
||||
var thisUser:BBBUser = conference.getMyUser();
|
||||
this.enabled = ! thisUser.lockedLayout;
|
||||
}
|
||||
|
||||
private function populateLayoutsList(e:LayoutsReadyEvent):void {
|
||||
|
@ -38,25 +38,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
import flash.system.Security;
|
||||
import flash.system.SecurityPanel;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.views.MainToolbar;
|
||||
import org.bigbluebutton.modules.phone.PhoneOptions;
|
||||
import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent;
|
||||
import org.bigbluebutton.modules.phone.events.FlashJoinedListenOnlyVoiceConferenceEvent;
|
||||
import org.bigbluebutton.modules.phone.events.FlashJoinedVoiceConferenceEvent;
|
||||
import org.bigbluebutton.modules.phone.events.FlashLeftVoiceConferenceEvent;
|
||||
import org.bigbluebutton.modules.phone.events.FlashStopEchoTestCommand;
|
||||
import org.bigbluebutton.modules.phone.events.JoinVoiceConferenceCommand;
|
||||
import org.bigbluebutton.modules.phone.events.LeaveVoiceConferenceCommand;
|
||||
import org.bigbluebutton.modules.phone.events.WebRTCCallEvent;
|
||||
import org.bigbluebutton.modules.phone.views.assets.Images;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
private static const LOG:String = "Phone::ToolbarButton - ";
|
||||
@ -71,16 +69,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
[Bindable] public var phoneOptions:PhoneOptions = new PhoneOptions();
|
||||
|
||||
private function startPhone():void {
|
||||
var conference:Conference = UserManager.getInstance().getConference();
|
||||
var thisUser:BBBUser = conference.getMyUser();
|
||||
|
||||
trace(LOG + "startPhone 1 enabled=[" + enabled + "] selected=[" + selected + "]");
|
||||
// Disable the button right away to prevent the user from clicking
|
||||
// multiple times.
|
||||
this.enabled = false;
|
||||
trace(LOG + "startPhone 2 enabled=[" + enabled + "] selected=[" + selected + "]");
|
||||
if (this.selected) {
|
||||
//trace(LOG + "Sending Join Conference command");
|
||||
//dispatcher.dispatchEvent(new JoinVoiceConferenceCommand());
|
||||
trace(LOG + "Sending Show Audio Selection command");
|
||||
dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION));
|
||||
if(thisUser.disableMyMic){
|
||||
var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
|
||||
command.mic = false;
|
||||
dispatcher.dispatchEvent(command);
|
||||
} else {
|
||||
//trace(LOG + "Sending Join Conference command");
|
||||
//dispatcher.dispatchEvent(new JoinVoiceConferenceCommand());
|
||||
trace(LOG + "Sending Show Audio Selection command");
|
||||
dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION));
|
||||
}
|
||||
} else {
|
||||
trace(LOG + "Sending Leave Conference command");
|
||||
dispatcher.dispatchEvent(new LeaveVoiceConferenceCommand());
|
||||
@ -108,21 +115,27 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function onCreationComplete():void {
|
||||
var conference:Conference = UserManager.getInstance().getConference();
|
||||
var thisUser:BBBUser = conference.getMyUser();
|
||||
|
||||
// when the button is added to the stage display the audio selection window if auto join is true
|
||||
if (phoneOptions.autoJoin) {
|
||||
if (phoneOptions.skipCheck) {
|
||||
var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
|
||||
if (phoneOptions.presenterShareOnly && !UsersUtil.amIPresenter() && !UsersUtil.amIModerator()) {
|
||||
command.mic = false;
|
||||
} else {
|
||||
command.mic = true;
|
||||
}
|
||||
|
||||
dispatcher.dispatchEvent(command);
|
||||
} else {
|
||||
trace(LOG + "Sending Show Audio Selection command");
|
||||
dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION));
|
||||
}
|
||||
if (phoneOptions.skipCheck || thisUser.disableMyMic) {
|
||||
var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
|
||||
if (
|
||||
(phoneOptions.presenterShareOnly && !UsersUtil.amIPresenter() && !UsersUtil.amIModerator())
|
||||
|| thisUser.disableMyMic
|
||||
) {
|
||||
command.mic = false;
|
||||
} else {
|
||||
command.mic = true;
|
||||
}
|
||||
|
||||
dispatcher.dispatchEvent(command);
|
||||
} else {
|
||||
trace(LOG + "Sending Show Audio Selection command");
|
||||
dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
26
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
Normal file → Executable file
26
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
Normal file → Executable file
@ -132,10 +132,24 @@ package org.bigbluebutton.modules.users.services
|
||||
break;
|
||||
case "permissionsSettingsChanged":
|
||||
handlePermissionsSettingsChanged(message);
|
||||
break;
|
||||
case "userLocked":
|
||||
handleUserLocked(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function handleUserLocked(msg:Object):void {
|
||||
trace(LOG + "*** handleUserLocked " + msg.msg + " **** \n");
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
var user:BBBUser = UsersUtil.getUser(map.user);
|
||||
|
||||
if(user.userLocked != map.lock)
|
||||
user.lockStatusChanged(map.lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private function handleMeetingHasEnded(msg: Object):void {
|
||||
trace(LOG + "*** handleMeetingHasEnded " + msg.msg + " **** \n");
|
||||
}
|
||||
@ -147,7 +161,8 @@ package org.bigbluebutton.modules.users.services
|
||||
map.disableMic,
|
||||
map.disablePrivChat,
|
||||
map.disablePubChat,
|
||||
map.lockedLayout);
|
||||
map.lockedLayout,
|
||||
map.lockOnJoin);
|
||||
UserManager.getInstance().getConference().setLockSettings(lockSettings);
|
||||
}
|
||||
|
||||
@ -185,7 +200,7 @@ package org.bigbluebutton.modules.users.services
|
||||
var perm:Object = map.permissions;
|
||||
|
||||
var lockSettings:LockSettingsVO = new LockSettingsVO(perm.disableCam, perm.disableMic,
|
||||
perm.disablePrivChat, perm.disablePubChat, perm.lockedLayout);
|
||||
perm.disablePrivChat, perm.disablePubChat, perm.lockedLayout, perm.lockOnJoin);
|
||||
UserManager.getInstance().getConference().setLockSettings(lockSettings);
|
||||
MeetingModel.getInstance().meetingMuted = map.meetingMuted;
|
||||
|
||||
@ -296,7 +311,7 @@ package org.bigbluebutton.modules.users.services
|
||||
l.voiceMuted = false;
|
||||
l.voiceJoined = false;
|
||||
l.talking = false;
|
||||
l.userLocked = false;
|
||||
//l.userLocked = false;
|
||||
|
||||
trace(LOG + "notifying views that user has left voice. id[" + voiceUser.userId + "]");
|
||||
var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_LEFT);
|
||||
@ -429,7 +444,7 @@ package org.bigbluebutton.modules.users.services
|
||||
bu.voiceMuted = voiceUser.muted;
|
||||
bu.voiceJoined = voiceUser.joined;
|
||||
bu.talking = voiceUser.talking;
|
||||
bu.userLocked = voiceUser.locked;
|
||||
//bu.userLocked = voiceUser.locked;
|
||||
}
|
||||
}
|
||||
|
||||
@ -524,7 +539,8 @@ package org.bigbluebutton.modules.users.services
|
||||
user.externUserID = joinedUser.externUserID;
|
||||
user.isLeavingFlag = false;
|
||||
user.listenOnly = joinedUser.listenOnly;
|
||||
|
||||
user.userLocked = joinedUser.locked;
|
||||
|
||||
trace(LOG + "User status: hasStream " + joinedUser.hasStream);
|
||||
|
||||
trace(LOG + "Joined as [" + user.userID + "," + user.name + "," + user.role + "," + joinedUser.hasStream + "]");
|
||||
|
18
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as
Normal file → Executable file
18
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as
Normal file → Executable file
@ -298,8 +298,22 @@ package org.bigbluebutton.modules.users.services
|
||||
* Set lock state of all users in the room, except the users listed in second parameter
|
||||
* */
|
||||
public function setUserLock(internalUserID:String, lock:Boolean):void {
|
||||
|
||||
return;
|
||||
var message:Object = new Object();
|
||||
message["userId"] = internalUserID;
|
||||
message["lock"] = lock;
|
||||
|
||||
trace("Sending lockRequest");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage(
|
||||
"lock.setUserLock",
|
||||
function(result:String):void { // On successful result
|
||||
LogUtil.debug(result);
|
||||
},
|
||||
function(status:String):void { // status - On error occurred
|
||||
LogUtil.error(status);
|
||||
},
|
||||
message
|
||||
);
|
||||
/*
|
||||
var nc:NetConnection = _module.connection;
|
||||
nc.call(
|
||||
|
@ -31,25 +31,17 @@
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import mx.binding.utils.BindingUtils;
|
||||
import mx.controls.Alert;
|
||||
import mx.events.FlexEvent;
|
||||
import mx.events.ListEvent;
|
||||
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.Role;
|
||||
import org.bigbluebutton.core.events.LockControlEvent;
|
||||
import org.bigbluebutton.core.events.VoiceConfEvent;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.events.StoppedViewingWebcamEvent;
|
||||
import org.bigbluebutton.core.vo.LockSettingsVO;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.model.users.events.KickUserEvent;
|
||||
import org.bigbluebutton.main.model.users.events.LowerHandEvent;
|
||||
import org.bigbluebutton.modules.users.events.UsersRollEvent;
|
||||
import org.bigbluebutton.modules.users.events.ViewCameraEvent;
|
||||
import org.bigbluebutton.modules.users.model.UsersOptions;
|
||||
@ -158,10 +150,11 @@
|
||||
// reset the mute image filter so the talking indicator doesn't stick
|
||||
muteImg.filters = null;
|
||||
|
||||
var ls:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings();
|
||||
|
||||
if (data != null) {
|
||||
kickUserBtn.visible = !data.me && rolledOver && options.allowKickUser;
|
||||
|
||||
|
||||
if (!data.voiceJoined) {
|
||||
if (data.listenOnly) {
|
||||
muteImg.source = images.sound;
|
||||
@ -173,11 +166,10 @@
|
||||
muteImg.visible = false;
|
||||
muteImg.includeInLayout = false;
|
||||
muteBtn.visible = false;
|
||||
muteBtn.includeInLayout = true;
|
||||
muteBtn.includeInLayout = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (data.userLocked && UserManager.getInstance().getConference().getLockSettings().getDisableMic()) {
|
||||
if (data.userLocked && ls.getDisableMic()) {
|
||||
muteImg.visible = true;
|
||||
muteImg.includeInLayout = true;
|
||||
muteBtn.visible = false;
|
||||
@ -197,7 +189,7 @@
|
||||
}
|
||||
|
||||
//If it's not a moderator, it always can be locked.
|
||||
if( data.role != BBBUser.MODERATOR && data.userLocked == true){
|
||||
if( data.role != BBBUser.MODERATOR && ls.isAnythingLocked() ){
|
||||
lockImg.visible = !rolledOver;
|
||||
lockImg.includeInLayout = !rolledOver;
|
||||
lockBtn.visible = rolledOver;
|
||||
@ -240,11 +232,12 @@
|
||||
}
|
||||
|
||||
|
||||
if ((data.role != Role.MODERATOR && !data.presenter) &&
|
||||
(data.disableMyCam || data.disableMyMic || data.disableMyPrivateChat || data.disableMyPublicChat))
|
||||
if ( data.userLocked && !data.presenter && ls.isAnythingLocked() ) {
|
||||
lockImg.source = images.locked_20;
|
||||
else
|
||||
}
|
||||
else {
|
||||
lockImg.source = null;
|
||||
}
|
||||
} else {
|
||||
if (data.voiceMuted == rolledOverMute)
|
||||
muteBtn.setStyle("icon", images.audio);
|
||||
|
@ -125,8 +125,7 @@
|
||||
|
||||
roomMuted = MeetingModel.getInstance().meetingMuted;
|
||||
var lockSettings:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings();
|
||||
roomLocked = lockSettings.getDisableCam() || lockSettings.getDisableMic() || lockSettings.getDisablePrivateChat()
|
||||
|| lockSettings.getDisablePublicChat() || lockSettings.getLockedLayout();
|
||||
roomLocked = lockSettings.isAnythingLocked();
|
||||
|
||||
titleBarOverlay.tabIndex = partOptions.baseTabIndex;
|
||||
minimizeBtn.tabIndex = partOptions.baseTabIndex+1;
|
||||
@ -275,8 +274,7 @@
|
||||
|
||||
private function handleChangedLockSettingsEvent(e:LockControlEvent):void {
|
||||
var lockSettings:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings();
|
||||
roomLocked = lockSettings.getDisableCam() || lockSettings.getDisableMic() || lockSettings.getDisablePrivateChat()
|
||||
|| lockSettings.getDisablePublicChat() || lockSettings.getLockedLayout();
|
||||
roomLocked = lockSettings.isAnythingLocked();
|
||||
}
|
||||
|
||||
private function lockSettings():void {
|
||||
@ -286,7 +284,7 @@
|
||||
dispatcher.dispatchEvent(event);
|
||||
}
|
||||
|
||||
private function unlockAll():void {
|
||||
/*private function unlockAll():void {
|
||||
LogUtil.traceObject("Action: unlockAll");
|
||||
if (amIModerator) {
|
||||
if (roomLocked) {
|
||||
@ -325,6 +323,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private function handleMeetingMuted(e:MeetingMutedEvent):void {
|
||||
roomMuted = MeetingModel.getInstance().meetingMuted;
|
||||
|
21
bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarButton.mxml
Normal file → Executable file
21
bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarButton.mxml
Normal file → Executable file
@ -63,36 +63,28 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
private var dispatcher:Dispatcher;
|
||||
private var _this:Button ;
|
||||
|
||||
public function lockSettingsChanged(e:*):void{
|
||||
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()){
|
||||
// Ignore lock setting changes as
|
||||
// or presenter we are moderator.
|
||||
return;
|
||||
}
|
||||
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
this.visible = !me.disableMyCam;
|
||||
this.includeInLayout = !me.disableMyCam;
|
||||
_this.visible = !me.disableMyCam;
|
||||
_this.includeInLayout = !me.disableMyCam;
|
||||
}
|
||||
|
||||
private function init():void{
|
||||
_this = this;
|
||||
dispatcher = new Dispatcher();
|
||||
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start');
|
||||
this.styleName = "webcamDefaultButtonStyle";
|
||||
this.styleName = "webcamDefaultButtonStyle";
|
||||
this.enabled = true;
|
||||
this.selected = false;
|
||||
_currentState = OFF_STATE;
|
||||
lockSettingsChanged(null);
|
||||
}
|
||||
|
||||
public function set isPresenter(presenter:Boolean):void {
|
||||
visible = presenter;
|
||||
}
|
||||
|
||||
public function remoteClick(e:ShortcutEvent):void{
|
||||
openPublishWindow();
|
||||
dispatchEvent(new ShortcutEvent(ShortcutEvent.REMOTE_FOCUS_WEBCAM));
|
||||
@ -114,6 +106,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
}
|
||||
|
||||
public function set isPresenter (presenter:Boolean):void{
|
||||
//Nothing
|
||||
}
|
||||
|
||||
private function openPublishWindow():void{
|
||||
if(_currentState == ON_STATE) {
|
||||
|
Loading…
Reference in New Issue
Block a user