Port of guest role to bbb-090

**WARNING**: Not tested yet.
bbb-client and bbb-web compile.
bbb-apps does not compile yet.

@bbb-apps: Missing scala implementation.
@bbb-client: Missing message receiver implementation.
Conflicts:
	bbb-api-demo/src/main/webapp/bbb_api.jsp
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/ParticipantUpdatingRoomListener.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/Room.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/RoomListener.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/RoomsManager.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/User.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/messaging/MessagingConstants.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsApplication.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsEventSender.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsHandler.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsService.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/recorder/participants/ParticipantsEventRecorder.java
	bigbluebutton-client/branding/default/style/css/BBBDefault.css
	bigbluebutton-client/locale/en_US/bbbResources.properties
	bigbluebutton-client/locale/pt_BR/bbbResources.properties
	bigbluebutton-client/src/org/bigbluebutton/main/events/BBBEvent.as
	bigbluebutton-client/src/org/bigbluebutton/main/maps/ApplicationEventMap.mxml
	bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as
	bigbluebutton-client/src/org/bigbluebutton/main/model/users/JoinService.as
	bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as
	bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
	bigbluebutton-client/src/org/bigbluebutton/main/model/users/UsersSOService.as
	bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/UsersConnectionEvent.as
	bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml
	bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
	bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml
	bigbluebutton-web/grails-app/conf/BigBlueButtonFilters.groovy
	bigbluebutton-web/grails-app/conf/bigbluebutton.properties
	bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy
	bigbluebutton-web/src/java/org/bigbluebutton/api/MeetingService.java
	bigbluebutton-web/src/java/org/bigbluebutton/api/domain/UserSession.java
	bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessageListener.java
	bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/RedisMessagingService.java
This commit is contained in:
Mateus Dalepiane 2014-10-16 16:58:10 -03:00
commit 36af1da3df
65 changed files with 2628 additions and 1065 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,8 @@ with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>.
Author: Fred Dixon <ffdixon@bigbluebutton.org>
-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
@ -197,6 +198,16 @@ if (request.getParameterMap().isEmpty()) {
<td>
<input type="password" required name="password" /></td>
</tr>
<tr>
<td>
&nbsp;</td>
<td style="text-align: right; ">
Guest:</td>
<td>
&nbsp;</td>
<td>
<input type="checkbox" name="guest" value="guest" /></td>
</tr>
<tr>
<td>
&nbsp;</td>
@ -272,8 +283,12 @@ Error: createMeeting() failed
//
// We've got a valid meeting_ID and passoword -- let's join!
//
String joinURL = getJoinMeetingURL(username, meeting_ID, password, null);
String joinURL;
if(request.getParameter("guest") != null)
joinURL = getJoinMeetingURL(username, meeting_ID, password, null, true);
else
joinURL = getJoinMeetingURL(username, meeting_ID, password, null);
%>
<script language="javascript" type="text/javascript">

View File

@ -136,6 +136,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
String externalUserID = ((String) params[5]).toString();
String internalUserID = ((String) params[6]).toString();
boolean guest = ((Boolean) params[7]);
Boolean locked = false;
if (params.length >= 7 && ((Boolean) params[7])) {
@ -161,7 +162,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
}
BigBlueButtonSession bbbSession = new BigBlueButtonSession(room, internalUserID, username, role,
voiceBridge, record, externalUserID, muted);
voiceBridge, record, externalUserID, muted, guest);
connection.setAttribute(Constants.SESSION, bbbSession);
connection.setAttribute("INTERNAL_USER_ID", internalUserID);

View File

@ -28,10 +28,11 @@ public class BigBlueButtonSession {
private final Boolean record;
private final String externalUserID;
private final Boolean startAsMuted;
private final Boolean guest;
public BigBlueButtonSession(String room, String internalUserID, String username,
String role, String voiceBridge, Boolean record,
String externalUserID, Boolean startAsMuted){
String externalUserID, Boolean startAsMuted, Boolean guest){
this.internalUserID = internalUserID;
this.username = username;
this.role = role;
@ -40,6 +41,7 @@ public class BigBlueButtonSession {
this.record = record;
this.externalUserID = externalUserID;
this.startAsMuted = startAsMuted;
this.guest = guest;
}
public String getUsername() {
@ -73,4 +75,8 @@ public class BigBlueButtonSession {
public Boolean getStartAsMuted() {
return startAsMuted;
}
public Boolean isGuest() {
return guest;
}
}

View File

@ -43,7 +43,8 @@ public class MeetingMessageHandler implements MessageHandler {
bbbGW.createMeeting2(emm.id, emm.name, emm.record, emm.voiceBridge, emm.duration);
} else if (msg instanceof RegisterUserMessage) {
RegisterUserMessage emm = (RegisterUserMessage) msg;
bbbGW.registerUser(emm.meetingID, emm.internalUserId, emm.fullname, emm.role, emm.externUserID, emm.authToken);
//TODO: Change this
bbbGW.registerUser(emm.meetingID, emm.internalUserId, emm.fullname, emm.role, emm.externUserID, emm.authToken, false);
} else if (msg instanceof DestroyMeetingMessage) {
DestroyMeetingMessage emm = (DestroyMeetingMessage) msg;
log.debug("Received destroy meeting request. Meeting id [{}]", emm.meetingId);

View File

@ -51,4 +51,8 @@ public class MessagingConstants {
public static final String USER_STATUS_CHANGE_EVENT = "UserStatusChangeEvent";
public static final String SEND_POLLS_EVENT = "SendPollsEvent";
public static final String RECORD_STATUS_EVENT = "RecordStatusEvent";
public static final String GUEST_ASK_TO_ENTER_EVENT = "guestAskToEnter";
public static final String MODERATOR_RESPONSE_EVENT = "responseToGuest";
public static final String GUESTS_WAITING_EVENT = "guestsWaitingEvent";
public static final String NEW_GUEST_POLICY = "newGuestPolicy";
}

View File

@ -62,8 +62,8 @@ public class ParticipantsApplication {
return true;
}
public boolean registerUser(String roomName, String userid, String username, String role, String externUserID) {
bbbInGW.registerUser(roomName, userid, username, role, externUserID, userid);
public boolean registerUser(String roomName, String userid, String username, String role, String externUserID, Boolean guest) {
bbbInGW.registerUser(roomName, userid, username, role, externUserID, userid, guest);
return true;
}
@ -86,4 +86,28 @@ public class ParticipantsApplication {
public void getRecordingStatus(String meetingId, String userId) {
bbbInGW.getRecordingStatus(meetingId, userId);
}
public void askingToEnter(String meetingId, String userId) {
bbbInGW.userRequestToEnter(meetingId, userId);
}
public void getGuestPolicy(String meetingId, String requesterId) {
bbbInGW.getGuestPolicy(meetingId, requesterId);
}
public void newGuestPolicy(String meetingId, String guestPolicy) {
bbbInGW.setGuestPolicy(meetingId, guestPolicy);
}
public void askingForGuestWaiting(String meetingId, String userId) {
bbbInGW.getGuestsWaiting(meetingId, userId);
}
public void responseToGuest(String meetingId, String userId, Boolean resp) {
bbbInGW.responseToGuest(meetingId, userId, resp);
}
public void responseToAllGuests(String meetingId, Boolean resp) {
bbbInGW.responseToAllGuests(meetingId, resp);
}
}

View File

@ -118,6 +118,7 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
String username = bbbSession.getUsername();
String role = bbbSession.getRole();
String room = bbbSession.getRoom();
Boolean guest = bbbSession.isGuest();
log.debug(APP + ":participantJoin - [" + room + "] [" + userid + ", " + username + ", " + role + "]");
Map<String, Boolean> status = new HashMap<String, Boolean>();
@ -125,7 +126,7 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
status.put("presenter", false);
status.put("hasStream", false);
participantsApplication.registerUser(room, userid, username, role, bbbSession.getExternUserID());
participantsApplication.registerUser(room, userid, username, role, bbbSession.getExternUserID(), guest);
}
}

View File

@ -104,4 +104,37 @@ public class ParticipantsService {
return (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION);
}
//TODO: does using internalUserId here make any sense?
public void askingToEnter() {
String userId = getBbbSession().getInternalUserID();
String roomName = Red5.getConnectionLocal().getScope().getName();
application.askingToEnter(roomName, userId);
}
public void getGuestPolicy() {
String requesterId = getBbbSession().getInternalUserID();
String roomName = Red5.getConnectionLocal().getScope().getName();
application.getGuestPolicy(roomName, requesterId);
}
public void newGuestPolicy(String guestPolicy) {
String roomName = Red5.getConnectionLocal().getScope().getName();
application.newGuestPolicy(roomName, guestPolicy);
}
public void askingForGuestWaiting() {
String userId = getBbbSession().getInternalUserID();
String roomName = Red5.getConnectionLocal().getScope().getName();
application.askingForGuestWaiting(roomName, userId);
}
public void responseToAllGuests(Boolean resp) {
String roomName = Red5.getConnectionLocal().getScope().getName();
application.responseToAllGuests(roomName, resp);
}
public void responseToGuest(String userId, Boolean resp) {
String roomName = Red5.getConnectionLocal().getScope().getName();
application.responseToGuest(roomName, userId, resp);
}
}

View File

@ -0,0 +1,19 @@
package org.bigbluebutton.conference.service.recorder.participants;
public class GuestAskToEnterRecordEvent extends AbstractParticipantRecordEvent {
public GuestAskToEnterRecordEvent() {
super();
setEvent("GuestAskToEnterEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
public void setName(String name) {
eventMap.put("name", name);
}
}

View File

@ -0,0 +1,14 @@
package org.bigbluebutton.conference.service.recorder.participants;
public class GuestPolicyEvent extends AbstractParticipantRecordEvent {
public GuestPolicyEvent() {
super();
setEvent("GuestPolicyEvent");
}
public void setPolicy(String guestPolicy) {
eventMap.put("guestPolicy", guestPolicy);
}
}

View File

@ -0,0 +1,19 @@
package org.bigbluebutton.conference.service.recorder.participants;
public class ModeratorResponseEvent extends AbstractParticipantRecordEvent {
public ModeratorResponseEvent() {
super();
setEvent("ModeratorResponseEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
public void setResp(Boolean resp) {
eventMap.put("resp", resp.toString());
}
}

View File

@ -0,0 +1,17 @@
package org.bigbluebutton.conference.service.recorder.participants;
public class WaitingForModeratorEvent extends AbstractParticipantRecordEvent {
public WaitingForModeratorEvent() {
super();
setEvent("WaitingForModeratorEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
public void setArg(String arg) {
eventMap.put("userId_userName", arg);
}
}

View File

@ -26,7 +26,7 @@ public interface IBigBlueButtonInGW {
// Users
void validateAuthToken(String meetingId, String userId, String token, String correlationId);
void registerUser(String roomName, String userid, String username, String role, String externUserID, String authToken);
void registerUser(String roomName, String userid, String username, String role, String externUserID, String authToken, Boolean guest);
void userRaiseHand(String meetingId, String userId);
void lowerHand(String meetingId, String userId, String loweredBy);
void shareWebcam(String meetingId, String userId, String stream);
@ -41,7 +41,13 @@ public interface IBigBlueButtonInGW {
void getRecordingStatus(String meetingId, String userId);
void userConnectedToGlobalAudio(String voiceConf, String userid, String name);
void userDisconnectedFromGlobalAudio(String voiceConf, String userid, String name);
void userRequestToEnter(String meetingID, String userID);
void getGuestPolicy(String meetingID, String userID);
void setGuestPolicy(String meetingID, String guestPolicy);
void getGuestsWaiting(String meetingID, String requesterID);
void responseToGuest(String meetingID, String userID, Boolean response);
void responseToAllGuests(String meetingID, Boolean response);
// Voice
void muteAllExceptPresenter(String meetingID, String requesterID, Boolean mute);
void muteAllUsers(String meetingID, String requesterID, Boolean mute);

View File

@ -60,7 +60,7 @@ ToolTip {
color: #e1e2e5;
}
Button, .logoutButtonStyle, .chatSendButtonStyle, .helpLinkButtonStyle, .cameraDisplaySettingsWindowChangeResolutionCombo, .languageSelectorStyle, .testJavaLinkButtonStyle, .recordButtonStyleNormal, .recordButtonStyleStart, .recordButtonStyleStop, .micSettingsWindowHelpButtonStyle {
Button, .logoutButtonStyle, .chatSendButtonStyle, .helpLinkButtonStyle, .cameraDisplaySettingsWindowChangeResolutionCombo, .languageSelectorStyle, .testJavaLinkButtonStyle, .recordButtonStyleNormal, .recordButtonStyleStart, .recordButtonStyleStop, .micSettingsWindowHelpButtonStyle, .settingsButtonStyle {
textIndent: 0;
paddingLeft: 10;
paddingRight: 10;
@ -130,6 +130,10 @@ Button, .logoutButtonStyle, .chatSendButtonStyle, .helpLinkButtonStyle, .cameraD
icon: Embed('assets/images/logout.png');
}
.settingsButtonStyle {
icon: Embed('assets/images/wrench.png');
}
DataGrid {
backgroundColor: #e1e2e5;
rollOverColor: #f3f3f3;

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

View File

@ -72,6 +72,7 @@ bbb.mainToolbar.logoutBtn.toolTip = Log Out
bbb.mainToolbar.langSelector = Select language
bbb.mainToolbar.settingsBtn = Settings
bbb.mainToolbar.settingsBtn.toolTip = Open Settings
<<<<<<< HEAD
bbb.mainToolbar.shortcutBtn = Shortcut Keys
bbb.mainToolbar.shortcutBtn.toolTip = Open Shortcut Keys Window
bbb.mainToolbar.recordBtn.toolTip.start = Start recording
@ -86,6 +87,20 @@ bbb.mainToolbar.recordBtn..notification.message1 = You can record this meeting.
bbb.mainToolbar.recordBtn..notification.message2 = You must click the Start/Stop Recording button in the title bar to begin/end recording.
bbb.mainToolbar.recordingLabel.recording = (Recording)
bbb.mainToolbar.recordingLabel.notRecording = Not Recording
bbb.waitWindow.waitMessage.message = You are a guest, please wait moderator approval.
bbb.waitWindow.waitMessage.title = Waiting
bbb.guests.title = Guests
bbb.guests.message.singular = {0} user wants to join this meeting
bbb.guests.message.plural = {0} users want to join this meeting
bbb.guests.allowBtn.toolTip = Allow
bbb.guests.allowEveryoneBtn.text = Allow everyone
bbb.guests.denyBtn.toolTip = Deny
bbb.guests.denyEveryoneBtn.text = Deny everyone
bbb.guests.rememberAction.text = Remember choice
bbb.guests.alwaysAccept = Always accept
bbb.guests.alwaysDeny = Always deny
bbb.guests.askModerator = Ask moderator
bbb.guests.Management = Guest management
bbb.window.minimizeBtn.toolTip = Minimize
bbb.window.maximizeRestoreBtn.toolTip = Maximize
bbb.window.closeBtn.toolTip = Close
@ -301,9 +316,14 @@ bbb.logout.connectionfailed = The connection to the server has failed
bbb.logout.rejected = The connection to the server has been rejected
bbb.logout.invalidapp = The red5 app does not exist
bbb.logout.unknown = Your client has lost connection with the server
bbb.logout.guestkickedout = The moderator didn't allow you to join this meeting
bbb.logout.usercommand = You have logged out of the conference
bbb.logout.refresh.message = If this logout was unexpected click the button below to reconnect.
bbb.logout.refresh.label = Reconnect
bbb.settings.title = Settings
bbb.settings.ok = OK
bbb.settings.cancel = Cancel
bbb.settings.btn.toolTip = Open configuration window
bbb.logout.confirm.title = Confirm Logout
bbb.logout.confirm.message = Are you sure you want to log out?
bbb.logout.confirm.yes = Yes

View File

@ -86,6 +86,20 @@ bbb.mainToolbar.recordBtn..notification.message1 = Você pode gravar esta sessã
bbb.mainToolbar.recordBtn..notification.message2 = Você precisa clicar no botão de Iniciar/Encerrar gravação na barra superior para começar/terminar a gravação.
bbb.mainToolbar.recordingLabel.recording = (Gravando)
bbb.mainToolbar.recordingLabel.notRecording = Não gravando
bbb.waitWindow.waitMessage.message = Você é um convidado, por favor aguarde a aprovação do moderador da sessão.
bbb.waitWindow.waitMessage.title = Aguardando
bbb.guests.title = Convidados
bbb.guests.message.singular = {0} usuário deseja entrar na sessão
bbb.guests.message.plural = {0} usuários desejam entrar na sessão
bbb.guests.allowBtn.toolTip = Permitir
bbb.guests.allowEveryoneBtn.text = Permitir todos
bbb.guests.denyBtn.toolTip = Rejeitar
bbb.guests.denyEveryoneBtn.text = Rejeitar todos
bbb.guests.rememberAction.text = Lembrar escolha
bbb.guests.alwaysAccept = Sempre permitir
bbb.guests.alwaysDeny = Sempre rejeitar
bbb.guests.askModerator = Perguntar para o moderador
bbb.guests.Management = Gerenciar convidados
bbb.window.minimizeBtn.toolTip = Minimizar
bbb.window.maximizeRestoreBtn.toolTip = Maximizar
bbb.window.closeBtn.toolTip = Fechar
@ -301,6 +315,11 @@ bbb.logout.connectionfailed = A conexão com o servidor falhou
bbb.logout.rejected = A conexão com o servidor foi rejeitada
bbb.logout.invalidapp = O aplicativo red5 não existe
bbb.logout.unknown = Seu cliente perdeu conexão com o servidor
bbb.logout.guestkickedout = O moderador não permitiu sua entrada na sala
bbb.settings.title = Configurações
bbb.settings.ok = OK
bbb.settings.cancel = Cancelar
bbb.settings.btn.toolTip = Abrir janela de configurações
bbb.logout.usercommand = Você saiu da conferência
# bbb.logout.refresh.message = If this logout was unexpected click the button below to reconnect.
# bbb.logout.refresh.label = Reconnect

View File

@ -205,6 +205,12 @@ package org.bigbluebutton.common
[Embed(source="assets/images/control_play_blue.png")]
public var control_play:Class;
[Embed(source="assets/images/accept.png")]
public var accept_user:Class;
[Embed(source="assets/images/cancel.png")]
public var cancel_user:Class;
[Embed(source="assets/images/shape_move_front.png")]
public var layout:Class;

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

View File

@ -0,0 +1,40 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.common.events
{
import flash.events.Event;
import mx.core.UIComponent;
public class SettingsComponentEvent extends Event
{
public static const ADD:String = "Add Component Event";
public static const REMOVE:String = "Remove Component Event";
public var component:UIComponent;
public function SettingsComponentEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}
}
}

View File

@ -64,9 +64,13 @@ package org.bigbluebutton.core.managers
connDelegate.sendMessage(service, onSuccess, onFailure, message);
}
public function forceClose():void {
connDelegate.forceClose();
}
public function forceClose():void {
connDelegate.forceClose();
}
public function guestDisconnect():void {
connDelegate.guestDisconnect();
}
}
}

View File

@ -12,6 +12,7 @@ package org.bigbluebutton.core.model
internal var logoutURL:String;
internal var dialNumber:String;
internal var role:String;
internal var guest:Boolean;
internal var customData:Object;
public function MeBuilder(id: String, name: String) {
@ -58,7 +59,12 @@ package org.bigbluebutton.core.model
role = value;
return this;
}
public function withGuest(value: Boolean):MeBuilder {
guest = value;
return this;
}
public function withCustomData(value: Object):MeBuilder {
customData = value;
return this;
@ -68,4 +74,4 @@ package org.bigbluebutton.core.model
return new Me(this);
}
}
}
}

View File

@ -43,7 +43,11 @@ package org.bigbluebutton.core.model.users
public function withRole(value: String):UserBuilder {
return this;
}
public function withGuest(value: Boolean):UserBuilder {
return this;
}
public function withCustomData(value: String):UserBuilder {
return this;
}
@ -53,4 +57,4 @@ package org.bigbluebutton.core.model.users
}
}
}
}

View File

@ -0,0 +1,36 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
public class AddGuestEvent extends Event
{
public static const ADD_GUEST:String = "AddGuest";
public var userid:String;
public var name:String;
public function AddGuestEvent(type:String = ADD_GUEST)
{
super(type, true, false);
}
}
}

View File

@ -31,7 +31,7 @@ package org.bigbluebutton.main.events {
public static const VIDEO_STARTED:String = 'BBB_VIDEO_STARTED';
public static const START_DESKSHARE:String = 'BBB_START_DESKSHARE';
public static const DESKSHARE_STARTED:String = 'BBB_DESKSHARE_STARTED';
public static const USER_VOICE_JOINED:String = 'user voice joined event';
public static const USER_VOICE_JOINED:String = 'user voice joined event';
public static const USER_VOICE_MUTED:String = "user voice muted event";
public static const USER_LOCKED:String = "user locked event";
public static const USER_VOICE_LEFT:String = "user voice left event";
@ -42,7 +42,19 @@ package org.bigbluebutton.main.events {
public static const CAM_SETTINGS_CLOSED:String = "CAM_SETTINGS_CLOSED";
public static const JOIN_VOICE_FOCUS_HEAD:String = "JOIN_VOICE_FOCUS_HEAD";
public static const CHANGE_RECORDING_STATUS:String = "CHANGE_RECORDING_STATUS";
public static const SETTINGS_CONFIRMED:String = "BBB_SETTINGS_CONFIRMED";
public static const SETTINGS_CANCELLED:String = "BBB_SETTINGS_CANCELLED";
public static const ACCEPT_ALL_WAITING_GUESTS:String = "BBB_ACCEPT_ALL_WAITING_GUESTS";
public static const DENY_ALL_WAITING_GUESTS:String = "BBB_DENY_ALL_WAITING_GUESTS";
public static const DENY_GUEST:String = "BBB_DENY_GUEST";
public static const ACCEPT_GUEST:String = "BBB_ACCEPT_GUEST";
public static const ASK_TO_ACCEPT_GUEST:String = "BBB_ASK_TO_ACCEPT_GUEST";
public static const BROADCAST_GUEST_POLICY:String = "BBB_BROADCAST_GUEST_POLICY";
public static const RETRIEVE_GUEST_POLICY:String = "BBB_RETRIEVE_GUEST_POLICY";
public var message:String;
public var payload:Object = new Object();
@ -51,4 +63,4 @@ package org.bigbluebutton.main.events {
this.message = message;
}
}
}
}

View File

@ -25,6 +25,7 @@ package org.bigbluebutton.main.events
public static const USER_LOGGED_OUT:String = "USER_LOGGED_OUT";
public static const DISCONNECT_TEST:String = "disconnect_test";
public static const USER_KICKED_OUT:String = "USER_KICKED_OUT";
public static const GUEST_KICKED_OUT:String = "GUEST_KICKED_OUT";
public static const CONFIRM_LOGOUT:String = "CONFIRM_LOGOUT";
public static const REFOCUS_CONFIRM:String = "REFOCUS_CONFIRM";

View File

@ -0,0 +1,32 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
public class ModeratorRespEvent extends Event
{
public static const GUEST_ALLOWED:String = "GuestAllowed";
public function ModeratorRespEvent(type:String)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,40 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
import org.bigbluebutton.main.model.users.BBBUser;
public class NewGuestEvent extends Event
{
public static const NEW_GUEST_EVENT:String = "NewGuestEvent";
public var userid:String;
public var name:String;
public function NewGuestEvent(type:String)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,34 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
public class RefreshGuestEvent extends Event
{
public static const REFRESH_GUEST_VIEW:String = "RefreshGuestView";
public var listOfGuests:Object;
public function RefreshGuestEvent(type:String = REFRESH_GUEST_VIEW)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,35 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
public class RemoveGuestEvent extends Event
{
public static const REMOVE_GUEST:String = "RemoveGuest";
public static const REMOVE_ALL:String = "RemoveAllGuests";
public var userid:String;
public function RemoveGuestEvent(type:String = REMOVE_GUEST)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,34 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
public class RemoveGuestFromViewEvent extends Event
{
public static const REMOVE_GUEST:String = "RemoveGuest";
public var userid:String;
public function RemoveGuestFromViewEvent(type:String = REMOVE_GUEST)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,38 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
public class RemoveGuestRequestEvent extends Event
{
public static const GUEST_EVENT:String = "GuestEvent";
public var userid:String;
public function RemoveGuestRequestEvent(type:String)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,41 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
import org.bigbluebutton.main.model.ConferenceParameters;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.ConferenceParameters;
public class ResponseModeratorEvent extends Event
{
public static const RESPONSE:String = "Response";
public static const RESPONSE_ALL:String = "RESPONSE_ALL";
public var userid:String;
public var resp:Boolean;
public function ResponseModeratorEvent(type:String)
{
super(type, true, false);
}
}
}

View File

@ -0,0 +1,36 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.events
{
import flash.events.Event;
import org.bigbluebutton.main.model.ConferenceParameters;
public class WaitModeratorEvent extends Event
{
public static const USER_LOGGED_IN:String = "UserLoggedIn";
public var conferenceParameters:ConferenceParameters;
public function WaitModeratorEvent(type:String)
{
super(type, true, false);
}
}
}

View File

@ -30,6 +30,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
-->
<ObjectBuilder generator="{ModulesProxy}" cache="global" />
<ObjectBuilder generator="{ConfigManager}" cache="global" />
<ObjectBuilder generator="{GuestManager}" cache="global" />
<!--
Disabling temporarily the stream monitor
-->
@ -40,6 +41,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<MethodInvoker generator="{ModulesProxy}" method="testRTMP" />
</EventHandlers>
<EventHandlers type="{AddGuestEvent.ADD_GUEST}" >
<MethodInvoker generator="{GuestManager}" method="addGuest" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{PortTestEvent.PORT_TEST_SUCCESS}" >
<MethodInvoker generator="{ModulesProxy}" method="portTestSuccess" arguments="{event.protocol}" />
</EventHandlers>
@ -47,15 +53,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<EventHandlers type="{PortTestEvent.PORT_TEST_FAILED}" >
<MethodInvoker generator="{ModulesProxy}" method="testRTMPT" arguments="{event.protocol}" />
</EventHandlers>
<!--
<EventHandlers type="{SuccessfulLoginEvent.USER_LOGGED_IN}" >
<MethodInvoker generator="{ModulesProxy}" method="loadAllModules" arguments="{event.conferenceParameters}" />
<MethodInvoker generator="{UserService}" method="getAllGuests" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{LogoutEvent.USER_LOGGED_OUT}" >
<MethodInvoker generator="{ModulesProxy}" method="handleLogout" />
</EventHandlers>
-->
<EventHandlers type="{ConfigEvent.CONFIG_EVENT}" >
<MethodInvoker generator="{ConfigManager}" method="setConfig" arguments="{event.config}" />
<MethodInvoker generator="{SkinningService}" method="loadSkins" arguments="{event.config.skinning}" />
@ -78,7 +82,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.core.managers.ConfigManager;
import org.bigbluebutton.core.services.SkinningService;
import org.bigbluebutton.core.services.StreamMonitor;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.ConfigEvent;
import org.bigbluebutton.main.events.AddGuestEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.ModuleLoadEvent;
import org.bigbluebutton.main.events.PortTestEvent;
@ -86,7 +92,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.main.events.SuccessfulLoginEvent;
import org.bigbluebutton.main.model.PortTestProxy;
import org.bigbluebutton.main.model.modules.ModulesProxy;
import org.bigbluebutton.main.model.GuestManager;
]]>
</mx:Script>

View File

@ -60,6 +60,8 @@ package org.bigbluebutton.main.model
* Voice conference bridge that external SIP clients use. Usually the same as webvoiceconf
*/
public var voicebridge:String;
public var guest:Boolean;
/**
* The welcome string, as passed in through the API /create call.
@ -100,4 +102,4 @@ package org.bigbluebutton.main.model
* */
public var lockSettings:Object;
}
}
}

View File

@ -0,0 +1,57 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2013 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 2.1 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/>.
*
* author:
*/
package org.bigbluebutton.main.model
{
public class Guest
{
private var listOfGuests:Object = new Object();
private var numberOfGuests:Number = 0;
public function hasGuest():Boolean {
return numberOfGuests > 0;
}
public function getNumberOfGuests():Number {
return numberOfGuests;
}
public function addGuest(userid:String, username:String):void {
listOfGuests[userid] = username;
numberOfGuests++;
}
public function getGuests():Object {
return this.listOfGuests;
}
public function removeAllGuests():void {
listOfGuests = new Object();
numberOfGuests = 0;
}
public function remove(userid:String):void {
if (listOfGuests[userid] != null) {
numberOfGuests--;
delete listOfGuests[userid];
}
}
}
}

View File

@ -0,0 +1,64 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2013 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 2.1 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/>.
*
* author:
*/
package org.bigbluebutton.main.model
{
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.main.events.RefreshGuestEvent;
import org.bigbluebutton.main.events.AddGuestEvent;
import org.bigbluebutton.main.events.RemoveGuestFromViewEvent;
public class GuestManager
{
private var guest:Guest;
private var dispatcher:Dispatcher;
function GuestManager() {
this.dispatcher = new Dispatcher();
this.guest = new Guest();
}
public function addGuest(evt:AddGuestEvent):void {
guest.addGuest(evt.userid, evt.name);
refreshGuestView();
}
private function refreshGuestView():void {
var refreshGuestEvent:RefreshGuestEvent = new RefreshGuestEvent();
refreshGuestEvent.listOfGuests = guest.getGuests();
dispatcher.dispatchEvent(refreshGuestEvent);
}
public function removeAllGuests():void {
guest.removeAllGuests();
}
private function removeGuestFromView(userid:String):void {
var removeGuestFromViewEvent:RemoveGuestFromViewEvent = new RemoveGuestFromViewEvent();
removeGuestFromViewEvent.userid = userid;
dispatcher.dispatchEvent(removeGuestFromViewEvent);
}
public function removeGuest(userid:String):void {
guest.remove(userid);
removeGuestFromView(userid);
}
}
}

View File

@ -28,5 +28,6 @@ package org.bigbluebutton.main.model
public var role:String;
public var isPresenter:Boolean;
public var authToken:String;
public var guest:Boolean;
}
}
}

View File

@ -40,7 +40,7 @@ package org.bigbluebutton.main.model.users
[Bindable] public var me:Boolean = false;
[Bindable] public var userID:String = "UNKNOWN USER";
[Bindable] public var externUserID:String = "UNKNOWN USER";
[Bindable] public var externUserID:String = "UNKNOWN USER";
[Bindable] public var name:String;
[Bindable] public var talking:Boolean = false;
[Bindable] public var phoneUser:Boolean = false;
@ -52,6 +52,10 @@ package org.bigbluebutton.main.model.users
[Bindable] public var disableMyPublicChat:Boolean = false;
[Bindable] public var lockedLayout:Boolean = false;
[Bindable] public var waitingForMod:Boolean = false;
[Bindable] public var guest:Boolean;
[Bindable] public var acceptedJoin:Boolean = false;
private var _hasStream:Boolean = false;
[Bindable]
public function get hasStream():Boolean {
@ -149,6 +153,10 @@ package org.bigbluebutton.main.model.users
_userStatus = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.viewer');
}
public function amIGuest():Boolean {
return guest;
}
/*
* This variable is for accessibility for the Users Window. It can't be manually set
* and only changes when one of the relevant media variables changes. Use the verifyMedia
@ -298,6 +306,8 @@ package org.bigbluebutton.main.model.users
n.disableMyMic = user.disableMyMic;
n.disableMyPrivateChat = user.disableMyPrivateChat;
n.disableMyPublicChat = user.disableMyPublicChat;
n.guest = user.guest;
return n;
}
@ -335,4 +345,4 @@ package org.bigbluebutton.main.model.users
}
}
}
}
}

View File

@ -143,6 +143,14 @@ package org.bigbluebutton.main.model.users {
public function getDefaultLayout():String {
return defaultLayout;
}
public function amIWaitForModerator():Boolean {
return me.waitingForMod;
}
public function setWaitForModerator(state:Boolean):void {
me.waitingForMod = state;
}
public function hasUser(userID:String):Boolean {
var p:Object = getUserIndex(userID);
@ -363,6 +371,14 @@ package org.bigbluebutton.main.model.users {
public function setMyRole(role:String):void {
me.role = role;
}
public function isGuest():Boolean {
return me.guest;
}
public function setGuest(guest:Boolean):void {
me.guest = guest;
}
public function setMyRoom(room:String):void {
me.room = room;

View File

@ -100,6 +100,7 @@ package org.bigbluebutton.main.model.users
response.externUserID = result.response.externUserID;
response.internalUserId = result.response.internalUserID;
response.role = result.response.role;
response.guest = result.response.guest;
response.room = result.response.room;
response.authToken = result.response.room;
response.record = result.response.record;
@ -136,7 +137,8 @@ package org.bigbluebutton.main.model.users
.withExternalId(response.externUserID).withToken(response.authToken)
.withLayout(response.defaultLayout).withWelcome(response.welcome)
.withDialNumber(response.dialnumber).withRole(response.role)
.withCustomData(response.customData).build();
.withCustomData(response.customData)
.withGuest(response.guest.toUpperCase() == "TRUE").build();
MeetingModel.getInstance().meeting = new MeetingBuilder(response.conference, response.conferenceName)
.withDefaultLayout(response.defaultLayout).withVoiceConf(response.voiceBridge)
@ -154,4 +156,4 @@ package org.bigbluebutton.main.model.users
return this.urlLoader;
}
}
}
}

View File

@ -31,7 +31,7 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.main.events.InvalidAuthTokenEvent;
import org.bigbluebutton.main.model.ConferenceParameters;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
public class NetConnectionDelegate
{
@ -52,6 +52,7 @@ package org.bigbluebutton.main.model.users
private var _room:String;
private var tried_tunneling:Boolean = false;
private var logoutOnUserCommand:Boolean = false;
private var guestKickedOutCommand:Boolean = false;
private var backoff:Number = 2000;
private var dispatcher:Dispatcher;
@ -218,7 +219,8 @@ package org.bigbluebutton.main.model.users
_conferenceParameters.room, _conferenceParameters.voicebridge,
_conferenceParameters.record, _conferenceParameters.externUserID,
_conferenceParameters.internalUserID, _conferenceParameters.lockOnStart,
_conferenceParameters.muteOnStart, _conferenceParameters.lockSettings);
_conferenceParameters.muteOnStart, _conferenceParameters.lockSettings,
_conferenceParameters.guest);
} catch(e:ArgumentError) {
// Invalid parameters.
switch (e.errorID) {
@ -236,13 +238,19 @@ package org.bigbluebutton.main.model.users
this.logoutOnUserCommand = logoutOnUserCommand;
_netConnection.close();
}
public function forceClose():void {
_netConnection.close();
}
protected function netStatus(event:NetStatusEvent):void {
public function guestDisconnect() : void
{
this.guestKickedOutCommand = true;
_netConnection.close();
}
public function forceClose():void {
_netConnection.close();
}
protected function netStatus( event : NetStatusEvent ) : void
{
handleResult( event );
}
@ -355,6 +363,10 @@ package org.bigbluebutton.main.model.users
sendUserLoggedOutEvent();
return;
}
if (this.guestKickedOutCommand) {
sendGuestUserKickedOutEvent();
return;
}
var e:ConnectionFailedEvent = new ConnectionFailedEvent(reason);
dispatcher.dispatchEvent(e);
@ -366,6 +378,11 @@ package org.bigbluebutton.main.model.users
var e:ConnectionFailedEvent = new ConnectionFailedEvent(ConnectionFailedEvent.USER_LOGGED_OUT);
dispatcher.dispatchEvent(e);
}
private function sendGuestUserKickedOutEvent():void {
var e:ConnectionFailedEvent = new ConnectionFailedEvent(ConnectionFailedEvent.GUEST_KICKED_OUT);
dispatcher.dispatchEvent(e);
}
private function attemptReconnect(backoff:Number):void{
var retryTimer:Timer = new Timer(backoff, 1);

View File

@ -36,11 +36,14 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.core.managers.ConnectionManager;
import org.bigbluebutton.core.managers.UserConfigManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.Config;
import org.bigbluebutton.core.model.MeetingModel;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.core.model.Config
import org.bigbluebutton.common.Role;
import org.bigbluebutton.main.events.SuccessfulLoginEvent;
import org.bigbluebutton.main.events.WaitModeratorEvent;
import org.bigbluebutton.main.events.UserServicesEvent;
import org.bigbluebutton.main.events.ResponseModeratorEvent;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.model.ConferenceParameters;
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
@ -88,6 +91,7 @@ package org.bigbluebutton.main.model.users
UserManager.getInstance().getConference().setMyName(result.username);
UserManager.getInstance().getConference().setMyRole(result.role);
UserManager.getInstance().getConference().setMyRoom(result.room);
UserManager.getInstance().getConference().setGuest(result.guest == "true");
UserManager.getInstance().getConference().setMyAuthToken(result.authToken);
UserManager.getInstance().getConference().setMyCustomData(result.customdata);
UserManager.getInstance().getConference().setDefaultLayout(result.defaultLayout);
@ -110,6 +114,7 @@ package org.bigbluebutton.main.model.users
_conferenceParameters.externMeetingID = result.externMeetingID;
_conferenceParameters.conference = result.conference;
_conferenceParameters.username = result.username;
_conferenceParameters.guest = result.guest;
_conferenceParameters.role = result.role;
_conferenceParameters.room = result.room;
_conferenceParameters.webvoiceconf = result.webvoiceconf;
@ -189,12 +194,50 @@ package org.bigbluebutton.main.model.users
sender.queryForParticipants();
sender.queryForRecordingStatus();
sender.queryForGuestPolicy();
if(UserManager.getInstance().getConference().isGuest() == false) {
var loadCommand:SuccessfulLoginEvent = new SuccessfulLoginEvent(SuccessfulLoginEvent.USER_LOGGED_IN);
loadCommand.conferenceParameters = _conferenceParameters;
dispatcher.dispatchEvent(loadCommand);
}
}
public function askToAccept():void {
UserManager.getInstance().getConference().setWaitForModerator(true);
var guestCommand:WaitModeratorEvent = new WaitModeratorEvent(WaitModeratorEvent.USER_LOGGED_IN);
guestCommand.conferenceParameters = _conferenceParameters;
dispatcher.dispatchEvent(guestCommand);
}
public function acceptGuest():void {
var loadCommand:SuccessfulLoginEvent = new SuccessfulLoginEvent(SuccessfulLoginEvent.USER_LOGGED_IN);
loadCommand.conferenceParameters = _conferenceParameters;
dispatcher.dispatchEvent(loadCommand);
dispatcher.dispatchEvent(loadCommand);
}
public function denyGuest():void {
dispatcher.dispatchEvent(new LogoutEvent(LogoutEvent.GUEST_KICKED_OUT));
}
public function newGuestPolicy(event:BBBEvent):void {
sender.setGuestPolicy(event.payload['guestPolicy']);
// _userSOService.newGuestPolicy(event.payload['guestPolicy']);
}
public function getAllGuests(e:SuccessfulLoginEvent):void {
if(UserManager.getInstance().getConference().amIModerator()) {
sender.queryForGuestsWaiting();
// _userSOService.askForGuestWaiting(numberId);
}
}
public function guestDisconnect():void {
sender.guestDisconnect();
// _userSOService.guestDisconnect();
}
public function isModerator():Boolean {
return UserManager.getInstance().getConference().amIModerator();
}
@ -215,6 +258,20 @@ package org.bigbluebutton.main.model.users
sender.raiseHand(UserManager.getInstance().getConference().getMyUserId(), e.raised);
}
public function askToEnter(e:WaitModeratorEvent):void {
sender.askToEnter();
// _userSOService.askToEnter(UserManager.getInstance().getConference().getMyUserId());
}
public function responseToGuest(e:ResponseModeratorEvent):void {
sender.responseToGuest(e.userid, e.resp);
// _userSOService.responseToGuest(e.userid, e.resp);
}
public function responseToAllGuests(e:ResponseModeratorEvent):void {
sender.responseToAllGuests(e.resp);
// _userSOService.responseToAllGuests(e.resp);
}
public function lowerHand(e:LowerHandEvent):void {
if (this.isModerator()) sender.raiseHand(e.userid, false);
}

View File

@ -30,10 +30,11 @@ package org.bigbluebutton.main.model.users.events
public static const CONNECTION_REJECTED:String = "connectionRejected";
public static const ASYNC_ERROR:String = "asyncError";
public static const USER_LOGGED_OUT:String = "userHasLoggedOut";
public static const GUEST_KICKED_OUT:String = "guestKickedOut";
public function ConnectionFailedEvent(type:String)
{
super(type, true, false);
}
}
}
}

View File

@ -0,0 +1,36 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.main.model.users.events
{
import flash.events.Event;
import flash.net.NetConnection;
public class GuestConnectionEvent extends Event
{
public static const GUEST_CONNECTION:String = "guestConnection";
public var connection:NetConnection;
public var userid:Number;
public function UsersConnectionEvent(type:String)
{
super(type, true, false);
}
}
}

View File

@ -25,10 +25,12 @@ package org.bigbluebutton.main.model.users.events
{
public static const CONNECTION_SUCCESS:String = "usersConnectionSuccess";
public var userid:String;
public var connection:NetConnection;
public var userid:String;
public var guest:Boolean;
public function UsersConnectionEvent(type:String) {
super(type, true, false);
}
}
}
}

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
showCloseButton="false"
xmlns:mate="http://mate.asfusion.com/"
minWidth="250"
creationComplete="init()"
title="{ResourceUtil.getInstance().getString('bbb.settings.title')}" >
<mx:Script>
<![CDATA[
import mx.events.ItemClickEvent;
import mx.managers.PopUpManager;
import mx.core.UIComponent;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.common.events.SettingsComponentEvent;
private function init():void {
this.x = (this.parent.width - this.width) / 2;
this.y = (this.parent.height - this.height) / 2;
}
public function pushComponents(components:Array):void {
for (var i:int = 0; i < components.length; ++i) {
addedComponents.addChildAt(components[i] as UIComponent, 0);
}
}
private function onCancelClicked():void {
var event:BBBEvent = new BBBEvent(BBBEvent.SETTINGS_CANCELLED);
dispatchEvent(event);
close();
}
private function onOkClicked():void {
var event:BBBEvent = new BBBEvent(BBBEvent.SETTINGS_CONFIRMED);
dispatchEvent(event);
close();
}
private function close():void {
PopUpManager.removePopUp(this);
}
]]>
</mx:Script>
<mx:VBox id="addedComponents" height="100%" />
<mx:ControlBar width="100%" horizontalAlign="center">
<mx:Button id="okBtn" label="{ResourceUtil.getInstance().getString('bbb.settings.ok')}" width="100" click="onOkClicked()"/>
<mx:Spacer width="10"/>
<mx:Button id="cancelBtn" label="{ResourceUtil.getInstance().getString('bbb.settings.cancel')}" width="100" click="onCancelClicked()"/>
</mx:ControlBar>
</mx:TitleWindow>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org
Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below).
BigBlueButton 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 2.1 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/>.
$Id: $
-->
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
verticalAlign="middle" width="100%" >
<mx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import mx.managers.PopUpManager;
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.ResponseModeratorEvent;
import org.bigbluebutton.main.events.ModuleLoadEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
import mx.containers.HBox;
import mx.controls.Button;
import mx.controls.Spacer;
import org.bigbluebutton.main.events.BBBEvent;
private var dispatcher:Dispatcher = new Dispatcher();
private var images:Images = new Images();
[Bindable] public var acceptUserIcon:Class = images.accept_user;
[Bindable] public var rejectUserIcon:Class = images.cancel_user;
[Bindable] private var username:String = "";
private var userid:String;
public function setUser(username:String, userid:String):void {
this.username = username;
this.userid = userid;
}
private function onRejectUserBtnClick():void {
sendResponseToServer(false);
}
private function onAcceptUserBtnClick():void {
sendResponseToServer(true);
}
private function sendResponseToServer(accept:Boolean):void {
var respCommand:ResponseModeratorEvent = new ResponseModeratorEvent(ResponseModeratorEvent.RESPONSE);
respCommand.userid = userid;
respCommand.resp = accept;
dispatcher.dispatchEvent(respCommand);
}
]]>
</mx:Script>
<mx:Label text="{username}" maxWidth="150" />
<mx:Spacer width="100%" />
<mx:Button icon="{rejectUserIcon}" toolTip="{ResourceUtil.getInstance().getString('bbb.guests.denyBtn.toolTip')}" click="onRejectUserBtnClick()" />
<mx:Button icon="{acceptUserIcon}" toolTip="{ResourceUtil.getInstance().getString('bbb.guests.allowBtn.toolTip')}" click="onAcceptUserBtnClick()" />
</mx:HBox>

View File

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:mate="http://mate.asfusion.com/"
width="400" >
<mate:Listener type="{BBBEvent.RETRIEVE_GUEST_POLICY}" method="refreshGuestPolicy"/>
<mate:Listener type="{BBBEvent.SETTINGS_CONFIRMED}" method="onOkClicked"/>
<mate:Listener type="{BBBEvent.SETTINGS_CANCELLED}" method="onCancelClicked"/>
<mx:Script>
<![CDATA[
import mx.events.ItemClickEvent;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.common.events.SettingsComponentEvent;
import com.asfusion.mate.events.Dispatcher;
private var option:Number = 0;
private var guestPolicy:String;
private function refreshGuestPolicy(event:BBBEvent):void {
setGuestPolicy(event.payload.guestPolicy);
}
public function setGuestPolicy(guestPolicy:String):void {
this.guestPolicy = guestPolicy;
if(guestPolicy == "ASK_MODERATOR") {
guestManagement.selectedValue = 0;
option = 0;
} else if(guestPolicy == "ALWAYS_ACCEPT") {
guestManagement.selectedValue = 1;
option = 1;
} else {
guestManagement.selectedValue = 2;
option = 2;
}
}
public function addToSettings():void {
var addGuestManagement:SettingsComponentEvent = new SettingsComponentEvent(SettingsComponentEvent.ADD);
addGuestManagement.component = this;
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(addGuestManagement);
}
private function onCancelClicked(e:Event = null):void {
setGuestPolicy(guestPolicy);
}
private function handleGuestClick(event:ItemClickEvent):void {
option = event.currentTarget.selectedValue;
}
private function onOkClicked(e:Event = null):void {
var event:BBBEvent = new BBBEvent(BBBEvent.BROADCAST_GUEST_POLICY);
if(option == 0) {
event.payload['guestPolicy'] = "ASK_MODERATOR";
dispatchEvent(event);
}
else if(option == 1) {
event.payload['guestPolicy'] = "ALWAYS_ACCEPT";
dispatchEvent(event);
dispatchEvent(new BBBEvent(BBBEvent.ACCEPT_ALL_WAITING_GUESTS));
}
else {
event.payload['guestPolicy'] = "ALWAYS_DENY";
dispatchEvent(event);
dispatchEvent(new BBBEvent(BBBEvent.DENY_ALL_WAITING_GUESTS));
}
LogUtil.debug("SENDING TO SERVER POLICY");
}
]]>
</mx:Script>
<mx:VBox width="30%">
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.guests.Management')}"/>
</mx:VBox>
<mx:Spacer width="30" />
<mx:VBox width="70%">
<mx:RadioButtonGroup id="guestManagement" itemClick="handleGuestClick(event);"/>
<mx:RadioButton groupName="guestManagement"
id="askModerator"
label="{ResourceUtil.getInstance().getString('bbb.guests.askModerator')}"
value="0"
/>
<mx:RadioButton groupName="guestManagement"
id="alwaysAccept"
label="{ResourceUtil.getInstance().getString('bbb.guests.alwaysAccept')}"
value="1"
/>
<mx:RadioButton groupName="guestManagement"
id="AlwaysDeny"
label="{ResourceUtil.getInstance().getString('bbb.guests.alwaysDeny')}"
value="2"
/>
</mx:VBox>
</mx:HBox>

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org
Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below).
BigBlueButton 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 2.1 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/>.
$Id: $
-->
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
title="{ResourceUtil.getInstance().getString('bbb.guests.title')}" showCloseButton="false" creationComplete="init()"
x="0" y="0" layout="vertical" width="320" horizontalAlign="center"
xmlns:mate="http://mate.asfusion.com/" >
<mate:Listener type="{BBBEvent.ACCEPT_ALL_WAITING_GUESTS}" method="acceptAllWaitingGuests" />
<mate:Listener type="{BBBEvent.DENY_ALL_WAITING_GUESTS}" method="denyAllWaitingGuests" />
<mate:Listener type="{RemoveGuestFromViewEvent.REMOVE_GUEST}" receive="{remove(event.userid)}" />
<mx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import mx.managers.PopUpManager;
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.ModuleLoadEvent;
import org.bigbluebutton.main.events.RemoveGuestEvent;
import org.bigbluebutton.main.events.ResponseModeratorEvent;
import org.bigbluebutton.main.events.RemoveGuestFromViewEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
import mx.containers.HBox;
import mx.controls.Button;
import mx.controls.Spacer;
import mx.events.CloseEvent;
import org.bigbluebutton.main.events.BBBEvent;
private var guestButtons:Object = new Object();
[Bindable] private var numberOfGuests:Number = 0;
private var dispatcher:Dispatcher = new Dispatcher();
public function init():void {
//Uncomment this line to make titlewindow undraggable
//this.isPopUp = false;
}
public function refreshGuestView(listOfGuests:Object):void {
for (var userid:String in listOfGuests) {
if(guestButtons[userid] == null) {
var guestItem:GuestItem = new GuestItem();
guestItem.setUser(listOfGuests[userid], userid);
guestListBox.addChild(guestItem);
guestButtons[userid] = guestItem;
numberOfGuests++;
}
}
this.visible = true;
}
public function sendResponseToAllGuests(resp:Boolean):void {
removeAllGuests();
var respCommand:ResponseModeratorEvent = new ResponseModeratorEvent(ResponseModeratorEvent.RESPONSE_ALL);
respCommand.resp = resp;
dispatcher.dispatchEvent(respCommand);
}
public function sendResponseToAllGuestsCheckBox(resp:Boolean):void {
if(rememberCheckBox.selected) {
var event:BBBEvent = new BBBEvent(BBBEvent.BROADCAST_GUEST_POLICY);
if (resp) {
event.payload['guestPolicy'] = "ALWAYS_ACCEPT";
} else {
event.payload['guestPolicy'] = "ALWAYS_DENY";
}
dispatcher.dispatchEvent(event);
}
sendResponseToAllGuests(resp);
}
public function acceptAllWaitingGuests(event:BBBEvent):void {
sendResponseToAllGuests(true);
}
public function denyAllWaitingGuests(event:BBBEvent):void {
sendResponseToAllGuests(false);
}
public function removeAllGuests():void {
var removeGuestEvent:RemoveGuestEvent = new RemoveGuestEvent(RemoveGuestEvent.REMOVE_ALL);
dispatcher.dispatchEvent(removeGuestEvent);
closeWindow();
}
public function remove(userid:String):void {
if (guestButtons[userid] != null) {
numberOfGuests = numberOfGuests - 1;
guestListBox.removeChild(guestButtons[userid]);
delete guestButtons[userid];
var removeGuestEvent:RemoveGuestEvent = new RemoveGuestEvent();
removeGuestEvent.userid = userid;
dispatcher.dispatchEvent(removeGuestEvent);
if (!hasGuest()) {
closeWindow();
}
}
}
public function hasGuest():Boolean {
return numberOfGuests > 0;
}
public function closeWindow():void {
this.visible = false;
PopUpManager.removePopUp(this);
dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
}
]]>
</mx:Script>
<mx:Label text="{numberOfGuests > 1? ResourceUtil.getInstance().getString('bbb.guests.message.plural', [String(numberOfGuests)]): ResourceUtil.getInstance().getString('bbb.guests.message.singular', [String(numberOfGuests)])}"/>
<mx:HRule width="100%"/>
<mx:Button id="allowEveryoneBtn" label="{ResourceUtil.getInstance().getString('bbb.guests.allowEveryoneBtn.text')}" width="70%" click="sendResponseToAllGuestsCheckBox(true)" toolTip="{allowEveryoneBtn.label}"/>
<mx:Button id="denyEveryoneBtn" label="{ResourceUtil.getInstance().getString('bbb.guests.denyEveryoneBtn.text')}" width="70%" click="sendResponseToAllGuestsCheckBox(false)" toolTip="{denyEveryoneBtn.label}"/>
<mx:CheckBox id="rememberCheckBox" label="{ResourceUtil.getInstance().getString('bbb.guests.rememberAction.text')}"/>
<mx:HRule width="100%"/>
<mx:VBox id="guestListBox" width="100%" height="100%" maxHeight="200" paddingLeft="10" paddingRight="10" paddingBottom="2" />
</mx:TitleWindow>

View File

@ -49,6 +49,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
numModules++;
}
this.label = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.loading', [numModules]);
this.visible = true;
}
private function moduleLoadProgress(e:ModuleLoadEvent):void{

View File

@ -106,6 +106,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
message = ResourceUtil.getInstance().getString('bbb.logout.usercommand');
redirect(); // we know that the disconnect was requested so automatically redirect
break;
case ConnectionFailedEvent.GUEST_KICKED_OUT:
message = ResourceUtil.getInstance().getString('bbb.logout.guestkickedout');
break;
}
}
@ -121,4 +124,4 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Text width="380" textAlign="center" text="{ResourceUtil.getInstance().getString('bbb.logout.refresh.message')}" />
<mx:Button id="reconnectBtn" label="{ResourceUtil.getInstance().getString('bbb.logout.refresh.label')}" click="reconnect()" />
</mx:VBox>
</mx:TitleWindow>
</mx:TitleWindow>

View File

@ -33,7 +33,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{OpenWindowEvent.OPEN_WINDOW_EVENT}" method="handleOpenWindowEvent" />
<mate:Listener type="{CloseWindowEvent.CLOSE_WINDOW_EVENT}" method="handleCloseWindowEvent"/>
<mate:Listener type="{AddUIComponentToMainCanvas.ADD_COMPONENT}" method="addComponentToCanvas" />
<mate:Listener type="{AddUIComponentToMainCanvas.ADD_COMPONENT}" method="addComponentToCanvas" />
<mate:Listener type="{AppVersionEvent.APP_VERSION_EVENT}" method="handleApplicationVersionEvent" />
<mate:Listener type="{MeetingNotFoundEvent.MEETING_NOT_FOUND}" method="handleMeetingNotFoundEvent" />
<mate:Listener type="{ConnectionFailedEvent.USER_LOGGED_OUT}" method="handleLogout" />
@ -58,6 +58,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{LockControlEvent.OPEN_LOCK_SETTINGS}" method="openLockSettingsWindow" />
<mate:Listener type="{InvalidAuthTokenEvent.INVALID_AUTH_TOKEN}" method="handleInvalidAuthToken" />
<mate:Listener type="{BBBEvent.RETRIEVE_GUEST_POLICY}" method="setGuestPolicy"/>
<mate:Listener type="{ConnectionFailedEvent.GUEST_KICKED_OUT}" method="handleLogout" />
<mate:Listener type="{ModeratorRespEvent.GUEST_ALLOWED}" method="guestAllowed" />
<mate:Listener type="{RefreshGuestEvent.REFRESH_GUEST_VIEW}" method="refreshGuestView" />
<mate:Listener type="{RemoveGuestRequestEvent.GUEST_EVENT}" method="removeGuestWindow" />
<mate:Listener type="{WaitModeratorEvent.USER_LOGGED_IN}" method="openWaitWindow" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
@ -84,7 +91,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.common.events.AddUIComponentToMainCanvas;
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.common.events.SettingsComponentEvent;
import org.bigbluebutton.common.events.ToolbarButtonEvent;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.events.LockControlEvent;
import org.bigbluebutton.core.managers.UserManager;
@ -95,10 +105,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.main.events.InvalidAuthTokenEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.MeetingNotFoundEvent;
import org.bigbluebutton.main.events.ModeratorRespEvent;
import org.bigbluebutton.main.events.ModuleLoadEvent;
import org.bigbluebutton.main.events.PortTestEvent;
import org.bigbluebutton.main.events.RefreshGuestEvent;
import org.bigbluebutton.main.events.RemoveGuestRequestEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.events.SuccessfulLoginEvent;
import org.bigbluebutton.main.events.WaitModeratorEvent;
import org.bigbluebutton.main.model.Guest;
import org.bigbluebutton.main.model.LayoutOptions;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
@ -120,9 +135,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var images:Images = new Images();
private var stoppedModules:ArrayCollection;
private var logs:Logger = new Logger();
private var logWindow:LogWindow;
private var scWindow:ShortcutHelpWindow;
private var logoutWindow:LoggedOutWindow;
private var waitWindow:WaitingWindow = null;
private var guestWindow:GuestWindow = null;
private var scWindow:ShortcutHelpWindow;
private var logoutWindow:LoggedOutWindow;
private var connectionLostWindow:ConnectionLostWindow;
[Bindable] private var baseIndex:int = 100000;
@ -140,14 +158,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var receivedConfigLocaleVer:Boolean = false;
private var receivedResourceLocaleVer:Boolean = false;
public function get mode():String {
return _mode;
}
[Bindable] private var layoutOptions:LayoutOptions;
[Bindable] private var showToolbarOpt:Boolean = true;
private var guestManagement:GuestManagement = null;
private var guest:Guest = new Guest();
private var guestPolicy:String = "ASK_MODERATOR";
public function get mode():String {
return _mode;
}
[Bindable] private var layoutOptions:LayoutOptions;
[Bindable] private var showToolbarOpt:Boolean = true;
[Bindable] private var toolbarHeight:Number = 32;
[Bindable] private var toolbarPaddingTop:Number = 4;
[Bindable] private var showFooterOpt:Boolean = true;
@ -187,6 +208,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
copyrightLabel2.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCopyrightLabelDimensions);
updateCopyrightLabelDimensions();
}
private function setGuestPolicy(event:BBBEvent):void {
guestPolicy = event.payload.guestPolicy;
if(guestManagement == null) {
LogUtil.debug("ADD Guest Event");
guestManagement = new GuestManagement();
guestManagement.setGuestPolicy(guestPolicy);
guestManagement.addToSettings();
}
}
private function updateCopyrightLabelDimensions(e:Event = null):void {
var screenRect:Rectangle = systemManager.screen;
@ -223,11 +254,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
trace("Comparing locale versions.");
if (!event.suppressLocaleWarning) checkLocaleVersion(localeVersion);
if (sendStartModulesEvent) {
sendStartModulesEvent = false;
sendStartAllModulesEvent();
}
}
sendStartModulesEvent = false;
sendStartAllModulesEvent();
}
}
}
public function sendStartAllModulesEvent():void{
@ -235,29 +266,68 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new ModuleLoadEvent(ModuleLoadEvent.START_ALL_MODULES));
}
private function fullScreenHandler(evt:FullScreenEvent):void {
dispState = stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
LogUtil.debug("Switching to full screen");
/* Do something specific here if we switched to full screen mode. */
} else {
LogUtil.debug("Switching to normal screen");
/* Do something specific here if we switched to normal mode. */
public function guestAllowed(evt:ModeratorRespEvent):void {
progressBar.visible = true;
waitWindow.guestAllowed();
}
private function fullScreenHandler(evt:FullScreenEvent):void {
dispState = stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
LogUtil.debug("Switching to full screen");
/* Do something specific here if we switched to full screen mode. */
} else {
LogUtil.debug("Switching to normal screen");
/* Do something specific here if we switched to normal mode. */
}
}
private function closeGuestWindow(e:Event):void {
if(guestWindow != null) {
guestWindow.closeWindow();
guestWindow = null;
}
}
private function refreshGuestView(evt:RefreshGuestEvent):void {
LogUtil.debug("REFRESH GUEST");
if(guestWindow == null) {
guestWindow = PopUpManager.createPopUp( mdiCanvas, GuestWindow, false) as GuestWindow;
guestWindow.addEventListener(Event.CLOSE, closeGuestWindow);
guestWindow.x = systemManager.screen.width - guestWindow.width - 20;
guestWindow.y = 20;
}
guestWindow.refreshGuestView(evt.listOfGuests);
}
public function removeGuestWindow(evt:RemoveGuestRequestEvent):void {
if(guestWindow != null)
guestWindow.remove(evt.userid);
}
private function openWaitWindow(evt:WaitModeratorEvent):void {
progressBar.visible = false;
waitWindow = PopUpManager.createPopUp( mdiCanvas, WaitingWindow, false) as WaitingWindow;
waitWindow.conferenceParameters = evt.conferenceParameters;
// Calculate position of TitleWindow in Application's coordinates.
waitWindow.x = (systemManager.screen.width - waitWindow.width) / 2;
waitWindow.y = (systemManager.screen.height - waitWindow.height) / 2;
}
private function openLogWindow():void {
if (logWindow == null){
logWindow = new LogWindow();
logWindow.logs = logs;
}
mdiCanvas.windowManager.add(logWindow);
mdiCanvas.windowManager.absPos(logWindow, 50, 50);
logWindow.width = mdiCanvas.width - 100;
logWindow.height = mdiCanvas.height - 100;
}
private function openLogWindow():void {
if (logWindow == null){
logWindow = new LogWindow();
logWindow.logs = logs;
}
mdiCanvas.windowManager.add(logWindow);
mdiCanvas.windowManager.absPos(logWindow, 50, 50);
logWindow.width = mdiCanvas.width - 100;
logWindow.height = mdiCanvas.height - 100;
}
public function openShortcutHelpWindow(e:Event = null):void{
if (scWindow == null) {
@ -489,13 +559,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
return logoutUrl;
}
private function handleLogout(e:ConnectionFailedEvent):void {
private function handleLogout(e:ConnectionFailedEvent):void {
if(progressBar != null)
progressBar.visible = false;
if(waitWindow != null)
waitWindow.removeWindow();
if(guestWindow != null) {
guestWindow.closeWindow();
}
if (e is ConnectionFailedEvent) {
showlogoutWindow((e as ConnectionFailedEvent).type);
}
else showlogoutWindow("You have logged out of the conference");
}
}
private function redirectToLogoutUrl ():void {
var logoutURL:String = getLogoutUrl();
var request:URLRequest = new URLRequest(logoutURL);
@ -610,7 +690,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<views:LoadingBar id="progressBar" horizontalCenter="0" verticalCenter="0" width="50%" />
<views:BrandingLogo x="{this.width - 300}" y="{this.height - 300}" />
</views:MainCanvas>
<mx:ControlBar width="100%" height="{footerHeight}" paddingTop="0" id="controlBar">
<mx:Label
htmlText="{ResourceUtil.getInstance().getString('bbb.mainshell.copyrightLabel2',[appVersion])}"

View File

@ -37,6 +37,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{ShortcutEvent.FOCUS_SHORTCUT_BUTTON}" method="focusShortcutButton" />
<mate:Listener type="{ShortcutEvent.FOCUS_LOGOUT_BUTTON}" method="focusLogoutButton" />
<mate:Listener type="{ConferenceCreatedEvent.CONFERENCE_CREATED_EVENT}" method="retrieveMeetingName" />
<mate:Listener type="{ConnectionFailedEvent.GUEST_KICKED_OUT}" method="hideToolbar" />
<mate:Listener type="{SettingsComponentEvent.ADD}" method="addSettingsComponent" />
<mate:Listener type="{SettingsComponentEvent.REMOVE}" method="removeSettingsComponent"/>
<mate:Listener type="{BBBEvent.CHANGE_RECORDING_STATUS}" method="onRecordingStatusChanged" />
<mx:Script>
@ -45,12 +48,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import mx.accessibility.AlertAccImpl;
import mx.controls.Alert;
import mx.core.UIComponent;
import mx.events.CloseEvent;
import mx.events.CloseEvent;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.IBbbToolbarComponent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.common.events.ToolbarButtonEvent;
import org.bigbluebutton.common.events.SettingsComponentEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.services.BandwidthMonitor;
@ -59,6 +64,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.SettingsEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.events.SuccessfulLoginEvent;
import org.bigbluebutton.main.model.LayoutOptions;
import org.bigbluebutton.main.model.users.events.ConferenceCreatedEvent;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
@ -71,7 +77,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
[Bindable] private var showHelpBtn:Boolean = false;
[Bindable] private var showToolbar:Boolean = false;
[Bindable] public var toolbarOptions:LayoutOptions = new LayoutOptions();
[Bindable] private var showConfigurationsButton:Boolean = false;
[Bindable] public var toolbarOptions:LayoutOptions = new LayoutOptions();
[Bindable] private var baseIndex:int;
[Bindable] private var numButtons:int;
@ -84,7 +91,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*/
private var xml:XML;
private var settingsComponents:Array = new Array();
private var settingsPopup:BBBSettings = null;
private function init():void{
if (Capabilities.hasAccessibility) {
AlertAccImpl.enableAccessibility();
@ -98,6 +107,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
timer.addEventListener(TimerEvent.TIMER, checkAccessiblity);
timer.start();
}
private function onCreationComplete():void {
@ -152,16 +163,19 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
showHelpBtn = false;
}
}
private function retrieveMeetingName(e:ConferenceCreatedEvent):void {
if (toolbarOptions.showMeetingName) {
var meetingTitle:String = BBB.initUserConfigManager().getMeetingTitle();
var meetingTitle:String = BBB.initUserConfigManager().getMeetingTitle();
if (meetingTitle != null) {
meetingNameLbl.text = meetingTitle;
}
}
}
// need to put it here because on init() the conference object
// still doesn't have the updated information
showConfigurationsButton = UserManager.getInstance().getConference().amIModerator();
}
public function addButton(name:String):Button{
var btn:Button = new Button();
btn.id = name;
@ -334,6 +348,19 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
private function addSettingsComponent(e:SettingsComponentEvent = null):void {
settingsComponents.push(e.component);
}
private function removeSettingsComponent(e:SettingsComponentEvent = null):void {
throw("Not implemented");
}
private function onSettingsButtonClick():void {
settingsPopup = BBBSettings(PopUpManager.createPopUp(this.parent, BBBSettings, true));
settingsPopup.pushComponents(settingsComponents);
}
]]>
</mx:Script>
@ -359,6 +386,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Label id="meetingNameLbl" styleName="meetingNameLabelStyle" />
<mx:Spacer width="50%"/>
<mx:Button
id="bbbSettings"
visible="{showConfigurationsButton}"
includeInLayout="{showConfigurationsButton}"
toolTip="{ResourceUtil.getInstance().getString('bbb.settings.btn.toolTip')}"
click="onSettingsButtonClick()"
styleName="settingsButtonStyle"
height="22"
/>
<views:LanguageSelector id="langSelector"
visible="false"
tabIndex="{baseIndex+numButtons+11}"
accessibilityName="{ResourceUtil.getInstance().getString('bbb.mainToolbar.langSelector')}"
styleName="languageSelectorStyle" />
<!--
<mx:Button label="DISCONNECT!" click="BBB.initConnectionManager().forceClose()" height="22" toolTip="Click to simulate disconnection" />
-->

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org
Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below).
BigBlueButton 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 2.1 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/>.
$Id: $
-->
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
title="{ResourceUtil.getInstance().getString('bbb.waitWindow.waitMessage.title')}" showCloseButton="false"
layout="vertical" width="350" horizontalAlign="center">
<mx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import mx.managers.PopUpManager;
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.SuccessfulLoginEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.main.model.ConferenceParameters;
public var conferenceParameters:ConferenceParameters;
private var urlLoader:URLLoader;
public function guestAllowed():void {
var dispatcher:Dispatcher = new Dispatcher();
var loadCommand:SuccessfulLoginEvent = new SuccessfulLoginEvent(SuccessfulLoginEvent.USER_LOGGED_IN);
loadCommand.conferenceParameters = conferenceParameters;
dispatcher.dispatchEvent(loadCommand);
PopUpManager.removePopUp(this);
}
public function removeWindow():void {
PopUpManager.removePopUp(this);
}
]]>
</mx:Script>
<mx:Text text="{ResourceUtil.getInstance().getString('bbb.waitWindow.waitMessage.message')}" width="100%" textAlign="center" />
</mx:TitleWindow>

View File

@ -28,7 +28,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.core.events.VoiceConfEvent;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.LogoutEvent;
<!--TODO: Move guest events to user events? -->
import org.bigbluebutton.main.events.AddGuestEvent;
import org.bigbluebutton.main.events.RemoveGuestRequestEvent;
import org.bigbluebutton.main.events.ResponseModeratorEvent;
import org.bigbluebutton.main.events.UserServicesEvent;
import org.bigbluebutton.main.events.WaitModeratorEvent;
import org.bigbluebutton.main.model.GuestManager;
import org.bigbluebutton.main.model.users.UserService;
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
@ -140,4 +146,49 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<EventHandlers type="{RoleChangeEvent.ASSIGN_PRESENTER}">
<MethodInvoker generator="{UserService}" method="assignPresenter" arguments="{event}" />
</EventHandlers>
<!-- End Lock Events -->
<!-- Guest Events -->
<EventHandlers type="{LogoutEvent.GUEST_KICKED_OUT}" >
<MethodInvoker generator="{UserService}" method="guestDisconnect" />
<MethodInvoker generator="{UserService}" method="logoutUser" />
</EventHandlers>
<EventHandlers type="LOAD_MODULE_GUEST_AUTO_ACCEPT">
<MethodInvoker generator="{UserService}" method="loadModulesCommand"/>
</EventHandlers>
<EventHandlers type="{WaitModeratorEvent.USER_LOGGED_IN}" >
<MethodInvoker generator="{UserService}" method="askToEnter" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{ResponseModeratorEvent.RESPONSE}" >
<MethodInvoker generator="{UserService}" method="responseToGuest" arguments="{event}" />
<MethodInvoker generator="{GuestManager}" method="removeGuest" arguments="{event.userid}" />
</EventHandlers>
<EventHandlers type="{RemoveGuestRequestEvent.GUEST_EVENT}" >
<MethodInvoker generator="{GuestManager}" method="removeGuest" arguments="{event.userid}" />
</EventHandlers>
<EventHandlers type="{ResponseModeratorEvent.RESPONSE_ALL}" >
<MethodInvoker generator="{UserService}" method="responseToAllGuests" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{BBBEvent.ASK_TO_ACCEPT_GUEST}" >
<MethodInvoker generator="{UserService}" method="askToAccept" />
</EventHandlers>
<EventHandlers type="{BBBEvent.ACCEPT_GUEST}" >
<MethodInvoker generator="{UserService}" method="acceptGuest" />
</EventHandlers>
<EventHandlers type="{BBBEvent.DENY_GUEST}" >
<MethodInvoker generator="{UserService}" method="denyGuest" />
</EventHandlers>
<EventHandlers type="{BBBEvent.BROADCAST_GUEST_POLICY}" >
<MethodInvoker generator="{UserService}" method="newGuestPolicy" arguments="{event}" />
</EventHandlers>
<!-- End Guest Events -->
</EventMap>

View File

@ -357,5 +357,33 @@ package org.bigbluebutton.modules.users.services
newLockSettings
);
}
public function queryForGuestPolicy():void {
}
public function setGuestPolicy(policy:String):void {
}
public function queryForGuestsWaiting():void {
}
public function guestDisconnect():void {
}
public function askToEnter():void {
}
public function responseToGuest(userId:String, response:Boolean):void {
}
public function responseToAllGuests(response:Boolean):void {
}
}
}
}

View File

@ -203,6 +203,12 @@ class ApiController {
errors.missingParamError("checksum");
}
String guest;
if (!StringUtils.isEmpty(params.guest) && params.guest.equalsIgnoreCase("true"))
guest = "true";
else
guest = "false";
// Do we have a name for the user joining? If none, complain.
String fullName = params.fullName
if (StringUtils.isEmpty(fullName)) {
@ -359,6 +365,7 @@ class ApiController {
us.mode = "LIVE"
us.record = meeting.isRecord()
us.welcome = meeting.getWelcomeMessage()
us.guest = guest
us.logoutUrl = meeting.getLogoutUrl();
us.configXML = configxml;
@ -1353,6 +1360,7 @@ class ApiController {
externUserID = us.externUserID
internalUserID = us.internalUserId
role = us.role
guest = us.guest
conference = us.conference
room = us.room
voicebridge = us.voicebridge

View File

@ -416,7 +416,7 @@ public class MeetingService implements MessageListener {
log.debug("User joined in meeting[{}]", message.meetingId);
Meeting m = getMeeting(message.meetingId);
if (m != null) {
User user = new User(message.userId, message.externalUserId, message.name, message.role);
User user = new User(message.userId, message.externalUserId, message.name, message.role, message.guest);
m.userJoined(user);
log.info("New user in meeting [" + message.meetingId + "] user [" + user.getFullname() + "]");
return;

View File

@ -28,12 +28,14 @@ public class User {
private String fullname;
private String role;
private Map<String,String> status;
private Boolean guest;
public User(String internalUserId, String externalUserId, String fullname, String role) {
public User(String internalUserId, String externalUserId, String fullname, String role, Boolean guest) {
this.internalUserId = internalUserId;
this.externalUserId = externalUserId;
this.fullname = fullname;
this.role = role;
this.guest = guest;
this.status = new ConcurrentHashMap<String, String>();
}
@ -51,6 +53,14 @@ public class User {
public void setExternalUserId(String externalUserId){
this.externalUserId = externalUserId;
}
public void setGuest(Boolean guest) {
this.guest = guest;
}
public Boolean isGuest() {
return this.guest;
}
public String getFullname() {
return fullname;

View File

@ -29,6 +29,7 @@ public class UserSession {
public String role = null;
public String conference = null;
public String room = null;
public String guest = "false";
public String voicebridge = null;
public String webvoiceconf = null;
public String mode = null;

View File

@ -99,9 +99,10 @@ public class MeetingMessageHandler implements MessageHandler {
String externuserid = user.get("extern_userid").getAsString();
String username = user.get("name").getAsString();
String role = user.get("role").getAsString();
Boolean guest = user.get("guest").getAsBoolean();
for (MessageListener listener : listeners) {
listener.handle(new UserJoined(meetingId, userid, externuserid, username, role));
listener.handle(new UserJoined(meetingId, userid, externuserid, username, role, guest));
}
} else if(MessagingConstants.USER_STATUS_CHANGE_EVENT.equalsIgnoreCase(messageName)) {
System.out.println("Handling [" + messageName + "] message.");

View File

@ -6,12 +6,14 @@ public class UserJoined implements IMessage {
public final String externalUserId;
public final String name;
public final String role;
public final Boolean guest;
public UserJoined(String meetingId, String userId, String externalUserId, String name, String role) {
public UserJoined(String meetingId, String userId, String externalUserId, String name, String role, Boolean guest) {
this.meetingId = meetingId;
this.userId = userId;
this.externalUserId = externalUserId;
this.name = name;
this.role = role;
this.guest = guest;
}
}