update presenter group on add/remove

This commit is contained in:
Anton Georgiev 2017-10-21 08:19:52 -04:00
parent 325a6ef8f2
commit 6b19800836
3 changed files with 26 additions and 12 deletions

View File

@ -181,18 +181,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function handleUserAddedToPresenterGroupEvent(event: UserAddedToPresenterGroupEvent): void {
populatePodDropdown();
}
private function handleUserRemovedFromPresenterGroupEvent(event: UserRemovedFromPresenterGroupEvent): void {
populatePodDropdown();
}
public function onPodCreated(_podId: String, _ownerId: String):void {
this.podId = _podId;
this.ownerId = _ownerId;
listOfPodControls.push({label: _podId,
private function populatePodDropdown(): void {
listOfPodControls = [];
listOfPodControls.push({label: this.podId,
icon: getStyle('iconClearStatus'), handler: setPresenterInPodHandler});
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen'),
@ -205,11 +203,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var presGroup: ArrayCollection = UsersUtil.getPresenterGroup();
for (var j:int = 0; j < presGroup.length; j++) {
listOfPodControls.push({label: UsersUtil.getUserName(presGroup.getItemAt(j) as String),
icon: getStyle('iconClearStatus'), handler: setPresenterInPodHandler});
icon: getStyle('iconClearStatus'), handler: setPresenterInPodHandler});
}
}
public function onPodCreated(_podId: String, _ownerId: String):void {
this.podId = _podId;
this.ownerId = _ownerId;
populatePodDropdown();
}
public function getPodId(): String { return this.podId; }
public function getOwnerId(): String { return this.ownerId; }

View File

@ -863,13 +863,11 @@ package org.bigbluebutton.modules.users.services
private function handleUserAddedToPresenterGroupEvtMsg(msg: Object): void {
var userId: String = msg.body.userId;
dispatcher.dispatchEvent(new UserAddedToPresenterGroupEvent(userId));
LiveMeeting.inst().users.addToPresenterGroup(userId);
}
private function handleUserRemovedFromPresenterGroupEvtMsg(msg: Object): void {
var userId: String = msg.body.userId;
dispatcher.dispatchEvent(new UserRemovedFromPresenterGroupEvent(userId));
LiveMeeting.inst().users.removeFromPresenterGroup(userId);
}
public function handleGuestPolicyChanged(msg:Object):void {

View File

@ -51,6 +51,8 @@ $Id: $
<mate:Listener type="{BBBEvent.USER_VOICE_MUTED}" method="handleUserMutedEvent" />
<mate:Listener type="{EventConstants.USER_TALKING}" method="handleUserTalkingEvent" />
<mate:Listener type="{UserLeftEvent.LEFT}" method="handleUserLeftEvent" />
<mate:Listener type="{UserAddedToPresenterGroupEvent.USER_ADDED_TO_PRESENTER_GROUP}" method="handleUserAddedToPresenterGroupEvent" />
<mate:Listener type="{UserRemovedFromPresenterGroupEvent.USER_REMOVED_FROM_PRESENTER_GROUP}" method="handleUserRemovedFromPresenterGroupEvent" />
<mate:Listener type="{UserEmojiChangedEvent.USER_EMOJI_CHANGED}" method="handleUserEmojiChangedEvent" />
<mate:Listener type="{SwitchedPresenterEvent.SWITCHED_PRESENTER}" method="handleSwitchedPresenterEvent" />
<mate:Listener type="{StoppedViewingWebcamEvent.STOPPED_VIEWING_WEBCAM}" method="handleStoppedViewingWebcamEvent" />
@ -113,6 +115,8 @@ $Id: $
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
import org.bigbluebutton.main.model.users.events.StreamStoppedEvent;
import org.bigbluebutton.main.model.users.events.UserAddedToPresenterGroupEvent;
import org.bigbluebutton.main.model.users.events.UserRemovedFromPresenterGroupEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.main.views.WellPositionedMenu;
import org.bigbluebutton.modules.users.events.MeetingMutedEvent;
@ -209,7 +213,15 @@ $Id: $
private function handleUserLeftEvent(event: UserLeftEvent): void {
handler.handleUserLeftEvent(event.userID);
}
private function handleUserAddedToPresenterGroupEvent(event: UserAddedToPresenterGroupEvent): void {
LiveMeeting.inst().users.addToPresenterGroup(event.userId);
}
private function handleUserRemovedFromPresenterGroupEvent(event: UserRemovedFromPresenterGroupEvent): void {
LiveMeeting.inst().users.removeFromPresenterGroup(event.userId);
}
private function handleStoppedViewingWebcamEvent(event: StoppedViewingWebcamEvent): void {
handler.handleStoppedViewingWebcamEvent(event);
}
@ -241,7 +253,7 @@ $Id: $
private function onCreationComplete():void {
dispatcher = new Dispatcher();
handler.populateAllUsers(usersGrid)
handler.populateAllUsers(usersGrid);
users = handler.users;
breakoutRoomsList = LiveMeeting.inst().breakoutRooms.breakoutRooms;