Skip to content

Commit

Permalink
Merge remote-tracking branch 'bigbluebutton/v2.0.x-release' into mast…
Browse files Browse the repository at this point in the history
…er-merge-2.0

# Conflicts:
#	akka-bbb-apps/src/main/scala/org/bigbluebutton/core/domain/MeetingStatus.scala
#	akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala
#	bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala
#	bigbluebutton-client/branding/default/style/css/V2Theme.css
#	bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.fla
#	bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.swf
#	bigbluebutton-client/locale/en_US/bbbResources.properties
#	bigbluebutton-client/src/org/bigbluebutton/main/model/users/JoinService.as
#	bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
#	bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml
#	bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml
#	bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AddChatTabBox.mxml
#	bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatMessageRenderer.mxml
#	bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindowEventHandler.as
#	bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
#	bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
#	bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMap.mxml
#	bigbluebutton-html5/private/config/development/server/log.yaml
  • Loading branch information
GhaziTriki committed Jan 23, 2018
2 parents 3cd0625 + 13dc23b commit a2feb9b
Show file tree
Hide file tree
Showing 428 changed files with 96,106 additions and 62,841 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ clients/flash/**/build
clients/flash/**/.gradle
**/.idea/*
*.iml
*~
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.bigbluebutton.core.apps.users

import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter }
import org.bigbluebutton.core2.MeetingStatus2x

trait GetWebcamsOnlyForModeratorReqMsgHdlr {
this: UsersApp =>

val liveMeeting: LiveMeeting
val outGW: OutMsgRouter

def handleGetWebcamsOnlyForModeratorReqMsg(msg: GetWebcamsOnlyForModeratorReqMsg) {

def buildGetWebcamsOnlyForModeratorRespMsg(meetingId: String, userId: String, webcamsOnlyForModerator: Boolean): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, meetingId, userId)
val envelope = BbbCoreEnvelope(GetWebcamsOnlyForModeratorRespMsg.NAME, routing)
val body = GetWebcamsOnlyForModeratorRespMsgBody(webcamsOnlyForModerator, userId)
val header = BbbClientMsgHeader(GetWebcamsOnlyForModeratorRespMsg.NAME, meetingId, userId)
val event = GetWebcamsOnlyForModeratorRespMsg(header, body)

BbbCommonEnvCoreMsg(envelope, event)
}

val event = buildGetWebcamsOnlyForModeratorRespMsg(liveMeeting.props.meetingProp.intId, msg.body.requestedBy,
MeetingStatus2x.webcamsOnlyForModeratorEnabled(liveMeeting.status))
outGW.send(event)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.bigbluebutton.core.apps.users

import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter }
import org.bigbluebutton.core2.MeetingStatus2x

trait UpdateWebcamsOnlyForModeratorCmdMsgHdlr {
this: UsersApp =>

val liveMeeting: LiveMeeting
val outGW: OutMsgRouter

def handleUpdateWebcamsOnlyForModeratorCmdMsg(msg: UpdateWebcamsOnlyForModeratorCmdMsg) {
log.info("Change webcams only for moderator status. meetingId=" + liveMeeting.props.meetingProp.intId + " webcamsOnlyForModeratorrecording=" + msg.body.webcamsOnlyForModerator)
if (MeetingStatus2x.webcamsOnlyForModeratorEnabled(liveMeeting.status) != msg.body.webcamsOnlyForModerator) {
MeetingStatus2x.setWebcamsOnlyForModerator(liveMeeting.status, msg.body.webcamsOnlyForModerator)

val event = buildWebcamsOnlyForModeratorChangedEvtMsg(liveMeeting.props.meetingProp.intId, msg.body.setBy, msg.body.webcamsOnlyForModerator)
outGW.send(event)
}

def buildWebcamsOnlyForModeratorChangedEvtMsg(meetingId: String, userId: String, webcamsOnlyForModerator: Boolean): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId)
val envelope = BbbCoreEnvelope(WebcamsOnlyForModeratorChangedEvtMsg.NAME, routing)
val body = WebcamsOnlyForModeratorChangedEvtMsgBody(webcamsOnlyForModerator, userId)
val header = BbbClientMsgHeader(WebcamsOnlyForModeratorChangedEvtMsg.NAME, meetingId, userId)
val event = WebcamsOnlyForModeratorChangedEvtMsg(header, body)

BbbCommonEnvCoreMsg(envelope, event)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ class UsersApp(
with LogoutAndEndMeetingCmdMsgHdlr
with MeetingActivityResponseCmdMsgHdlr
with SetRecordingStatusCmdMsgHdlr
with UpdateWebcamsOnlyForModeratorCmdMsgHdlr
with GetRecordingStatusReqMsgHdlr
with GetWebcamsOnlyForModeratorReqMsgHdlr
with AssignPresenterReqMsgHdlr
with EjectDuplicateUserReqMsgHdlr
with EjectUserFromMeetingCmdMsgHdlr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ class ReceivedJsonMsgHandlerActor(
routeGenericMsg[GetRecordingStatusReqMsg](envelope, jsonNode)
case GetScreenshareStatusReqMsg.NAME =>
routeGenericMsg[GetScreenshareStatusReqMsg](envelope, jsonNode)
case GetWebcamsOnlyForModeratorReqMsg.NAME =>
routeGenericMsg[GetWebcamsOnlyForModeratorReqMsg](envelope, jsonNode)
case UpdateWebcamsOnlyForModeratorCmdMsg.NAME =>
routeGenericMsg[UpdateWebcamsOnlyForModeratorCmdMsg](envelope, jsonNode)

// Lock settings
case LockUserInMeetingCmdMsg.NAME =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/

package org.bigbluebutton.core.record.events;

class WebcamsOnlyForModeratorRecordEvent extends AbstractParticipantRecordEvent {
import WebcamsOnlyForModeratorRecordEvent._

setEvent("WebcamsOnlyForModeratorEvent")

def setUserId(userId: String) {
eventMap.put(USER_ID, userId)
}

def setWebcamsOnlyForModerator(webcamsOnlyForModerator: Boolean) {
eventMap.put(WEBCAMS_ONLY_FOR_MODERATOR, webcamsOnlyForModerator.toString)
}
}

object WebcamsOnlyForModeratorRecordEvent {
protected final val USER_ID = "userId"
protected final val WEBCAMS_ONLY_FOR_MODERATOR = "webacmsOnlyForModerator"
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ class MeetingActor(
MeetingStatus2x.unmuteMeeting(liveMeeting.status)
}

// Set webcamsOnlyForModerator property in case we didn't after meeting creation
MeetingStatus2x.setWebcamsOnlyForModerator(liveMeeting.status, liveMeeting.props.usersProp.webcamsOnlyForModerator)

/*******************************************************************/
// Helper to create fake users for testing (ralam jan 5, 2018)
//object FakeTestData extends FakeTestData
Expand Down Expand Up @@ -223,6 +226,8 @@ class MeetingActor(
case m: MeetingActivityResponseCmdMsg => state = usersApp.handleMeetingActivityResponseCmdMsg(m, state)
case m: LogoutAndEndMeetingCmdMsg => usersApp.handleLogoutAndEndMeetingCmdMsg(m, state)
case m: SetRecordingStatusCmdMsg => usersApp.handleSetRecordingStatusCmdMsg(m)
case m: GetWebcamsOnlyForModeratorReqMsg => usersApp.handleGetWebcamsOnlyForModeratorReqMsg(m)
case m: UpdateWebcamsOnlyForModeratorCmdMsg => usersApp.handleUpdateWebcamsOnlyForModeratorCmdMsg(m)
case m: GetRecordingStatusReqMsg => usersApp.handleGetRecordingStatusReqMsg(m)
case m: ChangeUserEmojiCmdMsg => handleChangeUserEmojiCmdMsg(m)
// Client requested to eject user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class AnalyticsActor extends Actor with ActorLogging {
case m: ValidateAuthTokenRespMsg => logMessage(msg)
case m: UserJoinedMeetingEvtMsg => logMessage(msg)
case m: RecordingStatusChangedEvtMsg => logMessage(msg)
case m: WebcamsOnlyForModeratorChangedEvtMsg => logMessage(msg)
case m: UserLeftMeetingEvtMsg => logMessage(msg)
case m: PresenterUnassignedEvtMsg => logMessage(msg)
case m: PresenterAssignedEvtMsg => logMessage(msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ object MeetingStatus2x {
def isRecording(status: MeetingStatus2x): Boolean = status.recording
def setVoiceRecordingFilename(status: MeetingStatus2x, path: String) = status.voiceRecordingFilename = path
def getVoiceRecordingFilename(status: MeetingStatus2x): String = status.voiceRecordingFilename
def setWebcamsOnlyForModerator(status: MeetingStatus2x, value: Boolean) = status.webcamsOnlyForModerator = value
def webcamsOnlyForModeratorEnabled(status: MeetingStatus2x): Boolean = status.webcamsOnlyForModerator
def permisionsInitialized(status: MeetingStatus2x): Boolean = status.permissionsInited
def initializePermissions(status: MeetingStatus2x) = status.permissionsInited = true
def audioSettingsInitialized(status: MeetingStatus2x): Boolean = status.audioSettingsInited
Expand Down Expand Up @@ -85,5 +87,7 @@ class MeetingStatus2x {
private var voiceRecordingFilename: String = ""

private var extension = new MeetingExtensionProp

private var webcamsOnlyForModerator = false

}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class RedisRecorderActor(val system: ActorSystem)

// Meeting
case m: RecordingStatusChangedEvtMsg => handleRecordingStatusChangedEvtMsg(m)
case m: WebcamsOnlyForModeratorChangedEvtMsg => handleWebcamsOnlyForModeratorChangedEvtMsg(m)
case m: EndAndKickAllSysMsg => handleEndAndKickAllSysMsg(m)

// Recording
Expand Down Expand Up @@ -462,6 +463,15 @@ class RedisRecorderActor(val system: ActorSystem)

record(msg.header.meetingId, ev.toMap)
}

private def handleWebcamsOnlyForModeratorChangedEvtMsg(msg: WebcamsOnlyForModeratorChangedEvtMsg) {
val ev = new WebcamsOnlyForModeratorRecordEvent()
ev.setMeetingId(msg.header.meetingId)
ev.setUserId(msg.body.setBy)
ev.setWebcamsOnlyForModerator(msg.body.webcamsOnlyForModerator)

record(msg.header.meetingId, ev.toMap)
}

private def handleEndAndKickAllSysMsg(msg: EndAndKickAllSysMsg): Unit = {
val ev = new EndAndKickAllRecordEvent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,13 @@ object GetRecordingStatusReqMsg { val NAME = "GetRecordingStatusReqMsg" }
case class GetRecordingStatusReqMsg(header: BbbClientMsgHeader, body: GetRecordingStatusReqMsgBody) extends StandardMsg
case class GetRecordingStatusReqMsgBody(requestedBy: String)


/**
* Sent by user as response to get recording mark.
* Sent to user as response to get recording mark.
*/
object GetRecordingStatusRespMsg { val NAME = "GetRecordingStatusRespMsg" }
case class GetRecordingStatusRespMsg(header: BbbClientMsgHeader, body: GetRecordingStatusRespMsgBody) extends BbbCoreMsg
case class GetRecordingStatusRespMsgBody(recording: Boolean, requestedBy: String)


/**
* Sent by user to start recording mark.
*/
Expand All @@ -107,6 +105,34 @@ object RecordingStatusChangedEvtMsg { val NAME = "RecordingStatusChangedEvtMsg"
case class RecordingStatusChangedEvtMsg(header: BbbClientMsgHeader, body: RecordingStatusChangedEvtMsgBody) extends BbbCoreMsg
case class RecordingStatusChangedEvtMsgBody(recording: Boolean, setBy: String)

/**
* Sent by user to update webcamsOnlyForModerator meeting property.
*/
object UpdateWebcamsOnlyForModeratorCmdMsg { val NAME = "UpdateWebcamsOnlyForModeratorCmdMsg" }
case class UpdateWebcamsOnlyForModeratorCmdMsg(header: BbbClientMsgHeader, body: UpdateWebcamsOnlyForModeratorCmdMsgBody) extends StandardMsg
case class UpdateWebcamsOnlyForModeratorCmdMsgBody(webcamsOnlyForModerator: Boolean, setBy: String)

/**
* Sent by user to get the value of webcamsOnlyForModerator mark.
*/
object GetWebcamsOnlyForModeratorReqMsg { val NAME = "GetWebcamsOnlyForModeratorReqMsg" }
case class GetWebcamsOnlyForModeratorReqMsg(header: BbbClientMsgHeader, body: GetWebcamsOnlyForModeratorReqMsgBody) extends StandardMsg
case class GetWebcamsOnlyForModeratorReqMsgBody(requestedBy: String)

/**
* Sent to user as response to get webcamsOnlyForModerator mark.
*/
object GetWebcamsOnlyForModeratorRespMsg { val NAME = "GetWebcamsOnlyForModeratorRespMsg" }
case class GetWebcamsOnlyForModeratorRespMsg(header: BbbClientMsgHeader, body: GetWebcamsOnlyForModeratorRespMsgBody) extends BbbCoreMsg
case class GetWebcamsOnlyForModeratorRespMsgBody(webcamsOnlyForModerator: Boolean, requestedBy: String)

/**
* Sent to all users about webcam only for moderator value.
*/
object WebcamsOnlyForModeratorChangedEvtMsg { val NAME = "WebcamsOnlyForModeratorChangedEvtMsg" }
case class WebcamsOnlyForModeratorChangedEvtMsg(header: BbbClientMsgHeader, body: WebcamsOnlyForModeratorChangedEvtMsgBody) extends BbbCoreMsg
case class WebcamsOnlyForModeratorChangedEvtMsgBody(webcamsOnlyForModerator: Boolean, setBy: String)

/**
* Sent by user to get status of screenshare (meant for late joiners).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ private void handleCreateMeeting(Meeting m) {
logData.put("name", m.getName());
logData.put("duration", m.getDuration());
logData.put("isBreakout", m.isBreakout());
logData.put("webcamsOnlyForModerator", m.getWebcamsOnlyForModerator());
logData.put("record", m.isRecord());
logData.put("event", "create_meeting");
logData.put("description", "Create meeting.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,9 @@ boolean record = processRecordMeeting(params.get("record"));
Boolean muteOnStart = defaultMuteOnStart;
if (!StringUtils.isEmpty(params.get("muteOnStart"))) {
muteOnStart = Boolean.parseBoolean(params.get("muteOnStart"));
meeting.setMuteOnStart(muteOnStart);
}

meeting.setMuteOnStart(muteOnStart);
return meeting;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ public long getCreateTime() {
return createdTime;
}

public Integer setSequence(Integer s) {
return sequence = s;
public void setSequence(Integer s) {
sequence = s;
}

public Integer getSequence() {
Expand Down Expand Up @@ -263,8 +263,8 @@ public String getInternalId() {
return intMeetingId;
}

public String setParentMeetingId(String p) {
return parentMeetingId = p;
public void setParentMeetingId(String p) {
parentMeetingId = p;
}

public String getParentMeetingId() {
Expand Down
Loading

0 comments on commit a2feb9b

Please sign in to comment.