Merge branch 'antobinary-fix-webcam-state' into bbb-2x-mconf
This commit is contained in:
commit
774caa5c9c
@ -2,6 +2,7 @@ package org.bigbluebutton.core.apps.presentation
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.running.OutMsgRouter
|
||||
import org.bigbluebutton.core.models.Users2x
|
||||
|
||||
trait SetCurrentPagePubMsgHdlr {
|
||||
this: PresentationApp2x =>
|
||||
@ -23,8 +24,10 @@ trait SetCurrentPagePubMsgHdlr {
|
||||
//record(event)
|
||||
}
|
||||
|
||||
if (setCurrentPage(msg.body.presentationId, msg.body.pageId)) {
|
||||
broadcastEvent(msg)
|
||||
if (Users2x.isPresenter(msg.header.userId, liveMeeting.users2x)) {
|
||||
if (setCurrentPage(msg.body.presentationId, msg.body.pageId)) {
|
||||
broadcastEvent(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,13 @@ object Users2x {
|
||||
}
|
||||
}
|
||||
|
||||
def isPresenter(intId: String, users: Users2x): Boolean = {
|
||||
findWithIntId(users, intId) match {
|
||||
case Some(u) => u.presenter
|
||||
case None => false
|
||||
}
|
||||
}
|
||||
|
||||
def findPresenter(users: Users2x): Option[UserState] = {
|
||||
users.toVector.find(u => u.presenter)
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
package org.bigbluebutton.common2.msgs
|
||||
|
||||
import org.bigbluebutton.common2.domain._
|
||||
|
||||
object MessageBody {
|
||||
|
||||
case class UserEmojiStatusChangeReqMsgBody(userId: String, emoji: String)
|
||||
case class EjectUserFromMeetingReqMsgBody(userId: String, requesterId: String)
|
||||
|
||||
|
||||
case class ChangeUserStatusReqMsgBody(userId: String, status: String, value: String)
|
||||
case class ChangeUserRoleReqMsgBody(userId: String, role: String)
|
||||
case class AssignPresenterReqMsgBody(userId: String, requesterId: String)
|
||||
case class SetRecordingReqMsgBody(recording: Boolean, requesterId: String)
|
||||
case class GetRecordingStatusReqMsgBody(requesterId: String)
|
||||
case class AllowUserToShareDesktopReqMsgBody(userId: String)
|
||||
|
||||
// Presentation Message Bodies
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
/** Event messages sent by Akka apps as result of receiving incoming messages ***/
|
||||
//
|
||||
|
||||
///////////////////////////////////////////
|
||||
// Out Message Bodies
|
||||
///////////////////////////////////////////
|
||||
|
||||
// Presentation Message Bodies
|
||||
|
||||
|
||||
}
|
@ -350,16 +350,36 @@ package org.bigbluebutton.modules.users.services
|
||||
user2x.avatar = avatar;
|
||||
|
||||
LOGGER.debug("USER JOINED = " + JSON.stringify(user2x));
|
||||
|
||||
|
||||
var oldUser: User2x = LiveMeeting.inst().users.getUser(intId);
|
||||
var wasPresenterBefore: Boolean = false;
|
||||
if (oldUser != null && oldUser.presenter) {
|
||||
wasPresenterBefore = true;
|
||||
}
|
||||
|
||||
// remove remaining instance of the user before adding
|
||||
LiveMeeting.inst().users.remove(intId);
|
||||
LiveMeeting.inst().users.add(user2x);
|
||||
|
||||
|
||||
var joinEvent:UserJoinedEvent = new UserJoinedEvent(UserJoinedEvent.JOINED);
|
||||
joinEvent.userID = user2x.intId;
|
||||
dispatcher.dispatchEvent(joinEvent);
|
||||
|
||||
if (UsersUtil.isMe(intId) && wasPresenterBefore != presenter) {
|
||||
UsersUtil.setUserAsPresent(intId, false);
|
||||
sendSwitchedPresenterEvent(false, intId);
|
||||
|
||||
var e:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_VIEWER_MODE);
|
||||
e.userID = intId;
|
||||
e.presenterName = name;
|
||||
e.assignedBy = intId;
|
||||
dispatcher.dispatchEvent(e);
|
||||
dispatcher.dispatchEvent(new UserStatusChangedEvent(intId));
|
||||
}
|
||||
}
|
||||
|
||||
private function handleGetVoiceUsersMeetingRespMsg(msg:Object):void {
|
||||
var body: Object = msg.body as Object
|
||||
var body: Object = msg.body as Object;
|
||||
var users: Array = body.users as Array;
|
||||
LOGGER.debug("Num USERs = " + users.length);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user