Merge branch 'bbb-2x-mconf' of github.com:bigbluebutton/bigbluebutton into fix-webcam-state

This commit is contained in:
Anton Georgiev 2017-08-10 15:31:29 -04:00
commit 1e492dba73
34 changed files with 245 additions and 81 deletions

View File

@ -49,6 +49,10 @@ trait SystemConfiguration {
lazy val toVoiceConfRedisChannel = Try(config.getString("redis.toVoiceConfRedisChannel")).getOrElse("to-voice-conf-redis-channel")
lazy val fromVoiceConfRedisChannel = Try(config.getString("redis.fromVoiceConfRedisChannel")).getOrElse("from-voice-conf-redis-channel")
lazy val fromAkkaAppsWbRedisChannel = Try(config.getString("redis.fromAkkaAppsWbRedisChannel")).getOrElse("from-akka-apps-wb-redis-channel")
lazy val fromAkkaAppsChatRedisChannel = Try(config.getString("redis.fromAkkaAppsChatRedisChannel")).getOrElse("from-akka-apps-chat-redis-channel")
lazy val fromAkkaAppsPresRedisChannel = Try(config.getString("redis.fromAkkaAppsPresRedisChannel")).getOrElse("from-akka-apps-pres-redis-channel")
lazy val maxNumberOfNotes = Try(config.getInt("sharedNotes.maxNumberOfNotes")).getOrElse(3)
lazy val maxNumberOfUndos = Try(config.getInt("sharedNotes.maxNumberOfUndos")).getOrElse(30)
}

View File

@ -72,7 +72,7 @@ class BigBlueButtonActor(
case m: CreateMeetingReqMsg => handleCreateMeetingReqMsg(m)
case m: RegisterUserReqMsg => handleRegisterUserReqMsg(m)
case m: GetAllMeetingsReqMsg => handleGetAllMeetingsReqMsg(m)
case m: PubSubPingSysReqMsg => handlePubSubPingSysReqMsg(m)
case m: CheckAlivePingSysMsg => handleCheckAlivePingSysMsg(m)
case _ => log.warning("Cannot handle " + msg.envelope.name)
}
}
@ -125,8 +125,8 @@ class BigBlueButtonActor(
})
}
private def handlePubSubPingSysReqMsg(msg: PubSubPingSysReqMsg): Unit = {
val event = MsgBuilder.buildPubSubPongSysRespMsg(msg.body.system, msg.body.timestamp)
private def handleCheckAlivePingSysMsg(msg: CheckAlivePingSysMsg): Unit = {
val event = MsgBuilder.buildCheckAlivePingSysMsg(msg.body.system, msg.body.timestamp)
outGW.send(event)
}

View File

@ -11,7 +11,6 @@ import org.bigbluebutton.core.running.LiveMeeting
object Polls {
def handleStartPollReqMsg(userId: String, pollId: String, pollType: String, lm: LiveMeeting): Option[SimplePollOutVO] = {
println("Received StartPollReqMsg for pollType=[" + pollType + "]")
def createPoll(pollId: String, numRespondents: Int): Option[Poll] = {
for {
poll <- PollFactory.createPoll(pollId, pollType, numRespondents, None)
@ -402,7 +401,6 @@ object PollFactory {
}
private def createQuestion(qType: String, answers: Option[Seq[String]]): Option[Question] = {
println("**** Creating quesion")
val qt = qType.toUpperCase()
var questionOption: Option[Question] = None

View File

@ -48,6 +48,10 @@ class ReceivedJsonMsgHandlerActor(
// log.debug("Route envelope name " + envelope.name)
envelope.name match {
// System
case CheckAlivePingSysMsg.NAME =>
route[CheckAlivePingSysMsg](meetingManagerChannel, envelope, jsonNode)
case CreateMeetingReqMsg.NAME =>
route[CreateMeetingReqMsg](meetingManagerChannel, envelope, jsonNode)
case ValidateAuthTokenReqMsg.NAME =>
@ -144,6 +148,8 @@ class ReceivedJsonMsgHandlerActor(
routeGenericMsg[UserLeaveReqMsg](envelope, jsonNode)
case ChangeUserEmojiCmdMsg.NAME =>
routeGenericMsg[ChangeUserEmojiCmdMsg](envelope, jsonNode)
case ChangeUserRoleCmdMsg.NAME =>
routeGenericMsg[ChangeUserRoleCmdMsg](envelope, jsonNode)
// Whiteboard
case SendCursorPositionPubMsg.NAME =>

View File

@ -193,6 +193,7 @@ class MeetingActor(
case m: ChangeUserEmojiCmdMsg => handleChangeUserEmojiCmdMsg(m)
case m: EjectUserFromMeetingCmdMsg => usersApp.handleEjectUserFromMeetingCmdMsg(m)
case m: GetUsersMeetingReqMsg => usersApp.handleGetUsersMeetingReqMsg(m)
case m: ChangeUserRoleCmdMsg => usersApp.handleChangeUserRoleCmdMsg(m)
// Whiteboard
case m: SendCursorPositionPubMsg => handleSendCursorPositionPubMsg(m)

View File

@ -47,6 +47,52 @@ class FromAkkaAppsMsgSenderActor(msgSender: MessageSender)
case TransferUserToVoiceConfSysMsg.NAME =>
msgSender.send(toVoiceConfRedisChannel, json)
//==================================================================
// Send chat, presentation, and whiteboard in different channels so as not to
// flood other applications (e.g. bbb-web) with unnecessary messages
// Whiteboard
case SendWhiteboardAnnotationEvtMsg.NAME =>
msgSender.send(fromAkkaAppsWbRedisChannel, json)
case SendCursorPositionEvtMsg.NAME =>
msgSender.send(fromAkkaAppsWbRedisChannel, json)
case ClearWhiteboardEvtMsg.NAME =>
msgSender.send(fromAkkaAppsWbRedisChannel, json)
case UndoWhiteboardEvtMsg.NAME =>
msgSender.send(fromAkkaAppsWbRedisChannel, json)
// Chat
case SendPublicMessageEvtMsg.NAME =>
msgSender.send(fromAkkaAppsChatRedisChannel, json)
case ClearPublicChatHistoryEvtMsg.NAME =>
msgSender.send(fromAkkaAppsChatRedisChannel, json)
// Presentation
case PresentationConversionCompletedEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case SetCurrentPageEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case ResizeAndMovePageEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case RemovePresentationEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case SetCurrentPresentationEvtMsg.NAME =>
// Breakout
case UpdateBreakoutUsersEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case BreakoutRoomsListEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case BreakoutRoomJoinURLEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case BreakoutRoomsTimeRemainingUpdateEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case BreakoutRoomStartedEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
case MeetingTimeRemainingUpdateEvtMsg.NAME =>
msgSender.send(fromAkkaAppsPresRedisChannel, json)
//==================================================================
case _ => msgSender.send(fromAkkaAppsRedisChannel, json)
}
}

View File

@ -197,12 +197,12 @@ object MsgBuilder {
BbbCommonEnvCoreMsg(envelope, event)
}
def buildPubSubPongSysRespMsg(system: String, timestamp: Long): BbbCommonEnvCoreMsg = {
def buildCheckAlivePingSysMsg(system: String, timestamp: Long): BbbCommonEnvCoreMsg = {
val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka")
val envelope = BbbCoreEnvelope(PubSubPongSysRespMsg.NAME, routing)
val body = PubSubPongSysRespMsgBody(system, timestamp)
val header = BbbCoreBaseHeader(PubSubPongSysRespMsg.NAME)
val event = PubSubPongSysRespMsg(header, body)
val envelope = BbbCoreEnvelope(CheckAlivePongSysMsg.NAME, routing)
val body = CheckAlivePongSysMsgBody(system, timestamp)
val header = BbbCoreBaseHeader(CheckAlivePongSysMsg.NAME)
val event = CheckAlivePongSysMsg(header, body)
BbbCommonEnvCoreMsg(envelope, event)
}

View File

@ -20,4 +20,8 @@ trait SystemConfiguration {
lazy val toAkkaAppsJsonChannel = Try(config.getString("eventBus.toAkkaAppsChannel")).getOrElse("to-akka-apps-json-channel")
lazy val fromAkkaAppsJsonChannel = Try(config.getString("eventBus.fromAkkaAppsChannel")).getOrElse("from-akka-apps-json-channel")
lazy val fromAkkaAppsOldJsonChannel = Try(config.getString("eventBus.fromAkkaAppsOldChannel")).getOrElse("from-akka-apps-old-json-channel")
lazy val fromAkkaAppsWbRedisChannel = Try(config.getString("redis.fromAkkaAppsWbRedisChannel")).getOrElse("from-akka-apps-wb-redis-channel")
lazy val fromAkkaAppsChatRedisChannel = Try(config.getString("redis.fromAkkaAppsChatRedisChannel")).getOrElse("from-akka-apps-chat-redis-channel")
lazy val fromAkkaAppsPresRedisChannel = Try(config.getString("redis.fromAkkaAppsPresRedisChannel")).getOrElse("from-akka-apps-pres-redis-channel")
}

View File

@ -15,7 +15,7 @@ import redis.api.servers.ClientSetname
object AppsRedisSubscriberActor extends SystemConfiguration {
val channels = Seq(fromAkkaAppsRedisChannel)
val channels = Seq(fromAkkaAppsRedisChannel, fromAkkaAppsWbRedisChannel, fromAkkaAppsChatRedisChannel, fromAkkaAppsPresRedisChannel)
val patterns = Seq("bigbluebutton:from-bbb-apps:*")
def props(jsonMsgBus: JsonMsgFromAkkaAppsBus, oldMessageEventBus: OldMessageEventBus): Props =
@ -48,7 +48,7 @@ class AppsRedisSubscriberActor(jsonMsgBus: JsonMsgFromAkkaAppsBus, oldMessageEve
def onMessage(message: Message) {
//log.error(s"SHOULD NOT BE RECEIVING: $message")
if (message.channel == fromAkkaAppsRedisChannel) {
if (channels.contains(message.channel)) {
log.debug(s"RECEIVED:\n ${message.data.utf8String} \n")
val receivedJsonMessage = new JsonMsgFromAkkaApps(message.channel, message.data.utf8String)
jsonMsgBus.publish(JsonMsgFromAkkaAppsEvent(fromAkkaAppsJsonChannel, receivedJsonMessage))

View File

@ -114,7 +114,12 @@ case class MeetingIsActiveEvtMsg(header: BbbClientMsgHeader,
case class MeetingIsActiveEvtMsgBody(meetingId: String)
case class AkkaAppsCheckAliveReqBody(timestamp: Long)
case class AkkaAppsCheckAliveReqMsg(header: BbbCoreHeader, body: AkkaAppsCheckAliveReqBody)
case class AkkaAppsCheckAliveReq(envelope: BbbCoreEnvelope, msg: AkkaAppsCheckAliveReqMsg) extends BbbCoreMsg
object CheckAlivePingSysMsg { val NAME = "CheckAlivePingSysMsg" }
case class CheckAlivePingSysMsg(header: BbbCoreBaseHeader,
body: CheckAlivePingSysMsgBody) extends BbbCoreMsg
case class CheckAlivePingSysMsgBody(system: String, timestamp: Long)
object CheckAlivePongSysMsg { val NAME = "CheckAlivePongSysMsg" }
case class CheckAlivePongSysMsg(header: BbbCoreBaseHeader,
body: CheckAlivePongSysMsgBody) extends BbbCoreMsg
case class CheckAlivePongSysMsgBody(system: String, timestamp: Long)

View File

@ -79,8 +79,7 @@ public class KeepAliveService implements MessageListener {
}
public boolean isDown() {
//return !available;
return false;
return !available;
}
private void queueMessage(KeepAliveMessage msg) {

View File

@ -152,6 +152,9 @@ class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW,
}
def sendKeepAlive(system: String, timestamp: java.lang.Long): Unit = {
val event = MsgBuilder.buildCheckAlivePingSysMsg(system, timestamp.longValue())
println(event)
msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, event))
}

View File

@ -46,6 +46,15 @@ object MsgBuilder {
BbbCommonEnvCoreMsg(envelope, req)
}
def buildCheckAlivePingSysMsg(system: String, timestamp: Long): BbbCommonEnvCoreMsg = {
val routing = collection.immutable.HashMap("sender" -> "bbb-web")
val envelope = BbbCoreEnvelope(CheckAlivePingSysMsg.NAME, routing)
val header = BbbCoreBaseHeader(CheckAlivePingSysMsg.NAME)
val body = CheckAlivePingSysMsgBody(system, timestamp)
val req = CheckAlivePingSysMsg(header, body)
BbbCommonEnvCoreMsg(envelope, req)
}
def buildPresentationPageGeneratedPubMsg(msg: DocPageGeneratedProgress): BbbCommonEnvCoreMsg = {
val routing = collection.immutable.HashMap("sender" -> "bbb-web")
val envelope = BbbCoreEnvelope(PresentationPageGeneratedSysPubMsg.NAME, routing)

View File

@ -65,8 +65,8 @@ class ReceivedJsonMsgHdlrActor(val msgFromAkkaAppsEventBus: MsgFromAkkaAppsEvent
route[MeetingEndedEvtMsg](envelope, jsonNode)
case MeetingDestroyedEvtMsg.NAME =>
route[MeetingDestroyedEvtMsg](envelope, jsonNode)
case PubSubPongSysRespMsg.NAME =>
route[PubSubPongSysRespMsg](envelope, jsonNode)
case CheckAlivePongSysMsg.NAME =>
route[CheckAlivePongSysMsg](envelope, jsonNode)
case UserEmojiChangedEvtMsg.NAME =>
route[UserEmojiChangedEvtMsg](envelope, jsonNode)
case UserJoinedMeetingEvtMsg.NAME =>

View File

@ -24,7 +24,7 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
case m: MeetingCreatedEvtMsg => handleMeetingCreatedEvtMsg(m)
case m: MeetingEndedEvtMsg => handleMeetingEndedEvtMsg(m)
case m: MeetingDestroyedEvtMsg => handleMeetingDestroyedEvtMsg(m)
case m: PubSubPongSysRespMsg => handlePubSubPongSysRespMsg(m)
case m: CheckAlivePongSysMsg => handleCheckAlivePongSysMsg(m)
case m: UserEmojiChangedEvtMsg => handleUserEmojiChangedEvtMsg(m)
case m: UserJoinedMeetingEvtMsg => handleUserJoinedMeetingEvtMsg(m)
case m: UserLeftMeetingEvtMsg => handleUserLeftMeetingEvtMsg(m)
@ -66,7 +66,7 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
}
def handlePubSubPongSysRespMsg(msg: PubSubPongSysRespMsg): Unit = {
def handleCheckAlivePongSysMsg(msg: CheckAlivePongSysMsg): Unit = {
olgMsgGW.handle(new org.bigbluebutton.api.messaging.messages.KeepAliveReply(msg.body.system, msg.body.timestamp))
}

View File

@ -40,11 +40,7 @@ global {
fontFamily : "Source Sans Pro", Arial, sans-serif;
fontSize : 13;
color : #2A2D33;
selectionColor : #1070D7;
textSelectedColor : #FFFFFF;
focusColor : #1070D7;
rollOverColor : #0A5EAC;
textRollOverColor : #FFFFFF;
}
.defaultShellStyle {
@ -679,6 +675,28 @@ mx|DataGrid {
icon : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_Deny");
}
/*
//------------------------------
// Item renderers
//------------------------------
*/
.itemRendererDefault {
color : #2A2D33;
}
.itemRendererOver {
color : #FFFFFF;
}
.itemRendererSeleted {
color : #FFFFFF;
}
.itemRendererDisabled {
color : #F0F2F6;
}
/*
//------------------------------
// Layout
@ -836,15 +854,15 @@ flexlibcontainers|MDIWindowControlsContainer {
}
.videoDockStyleFocusChatLayout {
borderStyle : none;
borderColor: #42444C;
backgroundColor: #42444C;
borderStyle : none;
borderColor : #42444C;
backgroundColor : #42444C;
}
.videoDockStyleNoFocusChatLayout {
borderStyle : none;
borderColor: #42444C;
backgroundColor: #42444C;
borderStyle : none;
borderColor : #42444C;
backgroundColor : #42444C;
}
/*

View File

@ -71,7 +71,7 @@ package org.bigbluebutton.core {
logData.option = name;
logData.tags = ["options", "config", "xml"];
logData.message = "Parsing XML options";
LOGGER.info(JSON.stringify(logData));
//LOGGER.info(JSON.stringify(logData));
for each (var att:XML in vxml.@*) {
var property:String = att.name().localName;
if (property != "name" && this.hasOwnProperty(property)) {

View File

@ -84,11 +84,11 @@ package org.bigbluebutton.core.managers {
if (xml.returncode == "FAILED") {
trace("Getting configXML failed [{0}]", [xml]);
// trace("Getting configXML failed [{0}]", [xml]);
dispatcher.dispatchEvent(new MeetingNotFoundEvent(xml.response.logoutURL));
} else {
trace("Getting configXML passed [{0}]", [xml]);
// trace("Getting configXML passed [{0}]", [xml]);
_config = new Config(new XML(e.target.data));
trace("Initializing logging.");
@ -110,4 +110,4 @@ package org.bigbluebutton.core.managers {
return _config.getModuleFor(name);
}
}
}
}

View File

@ -152,8 +152,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
queryForChatHistory();
chatMessagesList.accessibilityProperties.description = ResourceUtil.getInstance().getString('bbb.accessibility.chat.initialDescription');
if (chatMessagesList.accessibilityProperties != null) {
chatMessagesList.accessibilityProperties.description = ResourceUtil.getInstance().getString('bbb.accessibility.chat.initialDescription');
}
LOGGER.debug(" onCreationComplete. Apply lock settings");
applyLockSettings();

View File

@ -48,6 +48,7 @@ package org.bigbluebutton.modules.users.services
import org.bigbluebutton.main.events.UserLeftEvent;
import org.bigbluebutton.main.model.users.BreakoutRoom;
import org.bigbluebutton.main.model.users.IMessageListener;
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
import org.bigbluebutton.main.model.users.events.StreamStoppedEvent;
import org.bigbluebutton.modules.screenshare.events.WebRTCViewStreamEvent;
@ -186,6 +187,8 @@ package org.bigbluebutton.modules.users.services
case "guest_access_denied":
handleGuestAccessDenied(message);
break;
case "UserRoleChangedEvtMsg":
handleUserRoleChangedEvtMsg(message);
}
}
@ -826,5 +829,20 @@ package org.bigbluebutton.modules.users.services
dispatcher.dispatchEvent(new LogoutEvent(LogoutEvent.MODERATOR_DENIED_ME));
}
}
public function handleUserRoleChangedEvtMsg(msg:Object):void {
var header: Object = msg.header as Object;
var body: Object = msg.body as Object;
var userId: String = body.userId as String;
var role: String = body.role as String;
LiveMeeting.inst().users.setRoleForUser(userId, role);
if (UsersUtil.isMe(userId)) {
LiveMeeting.inst().me.role = role;
dispatcher.dispatchEvent(new ChangeMyRole(role));
}
dispatcher.dispatchEvent(new UserStatusChangedEvent(userId));
}
}
}

View File

@ -344,7 +344,7 @@
}
]]>
</fx:Script>
<mx:Canvas id="webcamCanvas" width="28" height="20" visible="{webcamImg.visible || webcamBtn.visible}" includeInLayout="{webcamCanvas.visible}">
<mx:Canvas id="webcamCanvas" width="28" height="20" visible="{webcamImg.visible || webcamBtn.visible}">
<mx:Image id="webcamImg" visible="false" source="{getStyle('iconWebcam')}"
horizontalCenter="0" verticalCenter="0"
toolTip="{ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.webcam')}" />
@ -354,7 +354,7 @@
toolTip="{ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.webcamBtn')}" />
</mx:Canvas>
<mx:Canvas id="muteCanvas" width="20" height="20" visible="{muteImg.visible || muteBtn.visible}" includeInLayout="{muteCanvas.visible}">
<mx:Canvas id="muteCanvas" width="20" height="20" visible="{muteImg.visible || muteBtn.visible}">
<mx:Image id="muteImg" visible="false" includeInLayout="true"
horizontalCenter="0" verticalCenter="0" />
<mx:Button id="muteBtn" visible="false" includeInLayout="false" enabled="false" icon="{getStyle('iconAudio')}"
@ -365,7 +365,7 @@
toolTip="{data.muted ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToTalk',[data.name]) : ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToMute',[data.name])}" />
</mx:Canvas>
<mx:Canvas id="lockCanvas" width="20" height="20" visible="{lockImg.visible || lockBtn.visible}" includeInLayout="{lockCanvas.visible}">
<mx:Canvas id="lockCanvas" width="20" height="20" visible="{lockImg.visible || lockBtn.visible}">
<mx:Image id="lockImg" visible="false" includeInLayout="false"
horizontalCenter="0" verticalCenter="0" />
<mx:Button id="lockBtn" visible="false" includeInLayout="false" enabled="false"

View File

@ -22,10 +22,13 @@
<mx:Box xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:fx="http://ns.adobe.com/mxml/2009"
styleName="{data.breakoutRooms.length > 0 ? 'itemRendererDisabled' : 'itemRendererDefault'}"
width="100%"
verticalScrollPolicy="off"
horizontalScrollPolicy="off">
<mx:Label id="nameLabel"
width="100%"
text="{data.name}"
color="{data.breakoutRooms.length > 0 ? 0xcccccc : 0x000000}"
toolTip="{data.name}" />
</mx:Box>

View File

@ -41,6 +41,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<fx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import mx.core.UIComponent;
@ -62,6 +65,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const LOGGER:ILogger = getClassLogger(UserGraphicHolder);
private var videoOptions:VideoConfOptions;
[Bindable]
@ -91,12 +96,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
protected function onCreationComplete():void {
// There must be a better way!
_newParent = parent.parent.parent.parent.parent;
_newParent = getBBBDisplayObjectContainer();
fullScreenIcon.source = getStyle("iconFullScreen");
closeIcon.source = getStyle("iconClose");
}
private function getBBBDisplayObjectContainer():DisplayObjectContainer {
var p:DisplayObjectContainer = parent;
var displayName:String = "";
while (p) {
displayName = p.name;
if (displayName.indexOf("BigBlueButton") >= 0) {
return p;
}
p = p.parent;
}
LOGGER.warn("Could not get the correct DisplayObjectContainer");
return parent;
}
private function handleUserJoinedEvent(event:UserJoinedEvent):void {
// this is just to enforce the update of the BBBUser reference when the user reconnect
if (user && event.userID == user.intId) {
@ -377,6 +395,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
_newParent.addChildAt(this, 0);
this.move(0, 0);
this.percentHeight = 100;
this.percentWidth = 100;

View File

@ -49,7 +49,7 @@ package org.bigbluebutton.util
for (var i:int = 0; i < params.length; i++) {
var tempA:Array = params[i].split("=");
LOGGER.debug("{0} {1}", [String(tempA[0]).toUpperCase(), String(tempA[1]).toUpperCase()]);
//LOGGER.debug("{0} {1}", [String(tempA[0]).toUpperCase(), String(tempA[1]).toUpperCase()]);
if (String(tempA[0]).toUpperCase() == key.toUpperCase()) {
value = String(tempA[1])

View File

@ -57,7 +57,7 @@ package org.bigbluebutton.util.i18n
[Bindable] public var locales:Array = new Array();
private var eventDispatcher:IEventDispatcher;
//private var eventDispatcher:IEventDispatcher;
private var resourceManager:IResourceManager;
private var preferredLocale:String
private var masterLocaleLoaded:Boolean = false;
@ -99,6 +99,7 @@ package org.bigbluebutton.util.i18n
preferredLocale = getDefaultLocale();
if (preferredLocale != MASTER_LOCALE) {
trace("Preferred locale=" + preferredLocale + " is not the same as master locale=" + MASTER_LOCALE);
loadMasterLocale(MASTER_LOCALE);
}
setPreferredLocale(preferredLocale);
@ -178,7 +179,8 @@ package org.bigbluebutton.util.i18n
locales.sort(localesCompareFunction);
}
private function loadMasterLocale(locale:String):void {
private function loadMasterLocale(locale:String):void {
trace("Loading master locale=" + locale);
/**
* http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/resources/IResourceManager.html#localeChain
* Always load the default language, so if the chosen language
@ -189,10 +191,10 @@ package org.bigbluebutton.util.i18n
}
private function onMasterLocaleLoaded(event:ResourceEvent):void {
LOGGER.debug("Master locale is loaded");
trace("Master locale is loaded");
masterLocaleLoaded = true;
if (masterLocaleLoadedCallback != null) {
LOGGER.debug("Calling callback to load a second language");
trace("Calling callback to load a second language");
masterLocaleLoadedCallback();
}
}
@ -202,6 +204,7 @@ package org.bigbluebutton.util.i18n
var date:Date = new Date();
var localeURI:String = buildRequestURL() + 'client/locale/' + language + '_resources.swf?a=' + date.time;
trace("Loading locale " + localeURI);
return resourceManager.loadResourceModule( localeURI, false);
}
@ -213,17 +216,17 @@ package org.bigbluebutton.util.i18n
}
private function changeLocaleHelper(locale:String):void {
eventDispatcher = loadResource(locale);
var eventDispatcher:IEventDispatcher = loadResource(locale);
eventDispatcher.addEventListener(ResourceEvent.COMPLETE, localeChangeComplete);
eventDispatcher.addEventListener(ResourceEvent.ERROR, handleResourceNotLoaded);
}
public function changeLocale(locale:String):void {
if (masterLocaleLoaded || locale == MASTER_LOCALE) {
LOGGER.debug("Loading immediately " + locale);
trace("Loading immediately " + locale);
changeLocaleHelper(locale);
} else {
LOGGER.debug("Registering callback to load " + locale + " later");
trace("Registering callback to load " + locale + " later");
masterLocaleLoadedCallback = function():void {
changeLocaleHelper(locale);
}
@ -239,17 +242,18 @@ package org.bigbluebutton.util.i18n
var logData:Object = UsersUtil.initLogData();
logData.tags = ["locale"];
logData.message = "Failed to load locale = " + preferredLocale;
LOGGER.info(JSON.stringify(logData));
trace(JSON.stringify(logData));
}
masterLocaleLoaded = true;
resourceManager.localeChain = [MASTER_LOCALE];
preferredLocale = MASTER_LOCALE;
}
sendAppAndLocaleVersions();
update();
}
private function sendAppAndLocaleVersions():void {
trace("Sending locale version");
var dispatcher:Dispatcher = new Dispatcher();
var versionEvent:AppVersionEvent = new AppVersionEvent();
versionEvent.configLocaleVersion = false;
@ -261,15 +265,15 @@ package org.bigbluebutton.util.i18n
* @param event
*/
private function handleResourceNotLoaded(event:ResourceEvent):void{
LOGGER.debug("Resource locale [" + preferredLocale + "] could not be loaded.");
resourceManager.localeChain = [MASTER_LOCALE];
preferredLocale = MASTER_LOCALE;
update();
trace("Resource locale [" + preferredLocale + "] could not be loaded.");
resourceManager.localeChain = [MASTER_LOCALE];
preferredLocale = MASTER_LOCALE;
update();
}
public function update():void{
reloadLocaleNames();
sendAppAndLocaleVersions();
var dispatcher:Dispatcher = new Dispatcher;
dispatcher.dispatchEvent(new LocaleChangeEvent(LocaleChangeEvent.LOCALE_CHANGED));
dispatchEvent(new Event(Event.CHANGE));

View File

@ -1,8 +1,11 @@
import { Meteor } from 'meteor/meteor';
import mapToAcl from '/imports/startup/mapToAcl';
import listenOnlyToggle from './methods/listenOnlyToggle';
import muteToggle from './methods/muteToggle';
Meteor.methods(mapToAcl(['methods.listenOnlyToggle',
Meteor.methods(mapToAcl(['methods.listenOnlyToggle', 'methods.toggleSelfVoice', 'methods.toggleVoice',
], {
listenOnlyToggle,
toggleSelfVoice: (credentials) => { muteToggle(credentials, credentials.requesterUserId); },
toggleVoice: muteToggle,
}));

View File

@ -0,0 +1,27 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis2x';
export default function muteToggle(credentials, userId) {
const REDIS_CONFIG = Meteor.settings.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'MuteUserCmdMsg';
const { meetingId, requesterUserId } = credentials;
check(meetingId, String);
check(requesterUserId, String);
const header = {
name: EVENT_NAME,
meetingId,
userId,
};
const payload = {
userId,
mutedBy: requesterUserId,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, header);
}

View File

@ -13,15 +13,7 @@ export default createContainer(() => {
const { muted, joined, talking } = voiceUser;
let callback = () => { };
if (joined && !muted) {
callback = () => makeCall('muteUser', userId);
}
if (joined && muted) {
callback = () => makeCall('unmuteUser', userId);
}
const callback = () => makeCall('toggleSelfVoice');
const data = {
isInAudio: joined,

View File

@ -280,12 +280,12 @@ class UserList extends Component {
},
mute: {
label: intl.formatMessage(intlMessages.MuteUserAudioLabel),
handler: user => makeCall('muteUser', user.id),
handler: user => makeCall('toggleVoice', user.id),
icon: 'audio_off',
},
unmute: {
label: intl.formatMessage(intlMessages.UnmuteUserAudioLabel),
handler: user => makeCall('unmuteUser', user.id),
handler: user => makeCall('toggleVoice', user.id),
icon: 'audio_on',
},
};
@ -335,7 +335,7 @@ class UserList extends Component {
</div>
);
}
render() {
return (
<div className={styles.userList}>

View File

@ -17,14 +17,14 @@ acl:
- 'listenOnlyToggle'
- 'userLogout'
- 'setEmojiStatus'
- 'toggleSelfVoice'
- 'publishVote'
- 'sendChat'
moderator:
methods:
- 'assignPresenter'
- 'kickUser'
- 'muteUser'
- 'unmuteUser'
- 'toggleVoice'
- 'clearPublicChatHistory'
presenter:
methods:

View File

@ -27,13 +27,13 @@ class BigBlueButtonFilters {
response.setHeader("Access-Control-Allow-Origin", "${grailsApplication.config.accessControlAllowOrigin}")
}
}
// serviceUnavailable(controller:'api',action:'(create|join|isMeetingRunning|end|getMeetingInfo|getMeetings|enter|signOut)') {
// before = {
// if (keepAliveService.isDown()) {
// response.sendError(503, "BigBlueButton")
// return false
// }
// }
// }
serviceUnavailable(controller:'api',action:'(create|join|isMeetingRunning|end|getMeetingInfo|getMeetings|enter|signOut)') {
before = {
if (keepAliveService.isDown()) {
render(view: "error", status: 503)
return false
}
}
}
}
}

View File

@ -0,0 +1,4 @@
<response>
<returncode>503</returncode>
<reason>API Service Unavailable</reason>
</response>