diff --git a/clients/flash/air-client/src/Default.css b/clients/flash/air-client/src/Default.css
index ddd0a0e86b..d9cea22e4b 100755
--- a/clients/flash/air-client/src/Default.css
+++ b/clients/flash/air-client/src/Default.css
@@ -4,6 +4,7 @@
@namespace main "org.bigbluebutton.air.main.views.*";
@namespace participants "org.bigbluebutton.lib.participants.views.*";
@namespace users "org.bigbluebutton.lib.user.views.*";
+@namespace usersAIR "org.bigbluebutton.air.users.views.*";
@namespace settings "org.bigbluebutton.lib.settings.views.*";
@namespace audio "org.bigbluebutton.lib.settings.views.audio.*";
@namespace chat "org.bigbluebutton.lib.settings.views.chat.*";
@@ -95,6 +96,12 @@ participants|ParticipantsViewBase s|List{
contentBackgroundColor : PropertyReference("white");
}
+usersAIR|UserDetailsView {
+ color : PropertyReference("grey700");
+ headerBackground : PropertyReference("blue500");
+ separatorColor : PropertyReference("grey200");
+}
+
libChat|ChatViewBase {
inputBackgroundColor : PropertyReference("grey100");
inputBorderColor : PropertyReference("grey300");
@@ -103,6 +110,7 @@ libChat|ChatViewBase {
s|ToggleSwitch {
accentColor : PropertyReference("green500");
color : PropertyReference("white");
+ fontFamily : SourceSansProMX;
skinClass : ClassReference("org.bigbluebutton.air.common.views.skins.MobileToggleSwitchSkin");
}
@@ -112,6 +120,7 @@ s|HSlider {
s|CheckBox {
skinClass : ClassReference("org.bigbluebutton.air.common.views.skins.MobileCheckBoxSkin");
+ fontFamily : SourceSansProMX;
chromeColor : PropertyReference("white");
}
diff --git a/clients/flash/air-client/src/css/xhdpi.css b/clients/flash/air-client/src/css/xhdpi.css
old mode 100644
new mode 100755
index 7c7fa3d066..2dbc367eb1
--- a/clients/flash/air-client/src/css/xhdpi.css
+++ b/clients/flash/air-client/src/css/xhdpi.css
@@ -5,6 +5,7 @@
@namespace views "org.bigbluebutton.air.common.views.*";
@namespace libChat "org.bigbluebutton.lib.chat.views.*";
@namespace users "org.bigbluebutton.lib.user.views.*";
+@namespace usersAIR "org.bigbluebutton.air.users.views.*";
@namespace settings "org.bigbluebutton.lib.settings.views.*";
@namespace audio "org.bigbluebutton.lib.settings.views.audio.*";
@namespace chat "org.bigbluebutton.lib.settings.views.chat.*";
@@ -60,6 +61,10 @@
padding: 30;
}
+ usersAIR|UserDetailsView {
+ groupsPadding : 40;
+ }
+
settings|SettingsItemRenderer {
fontSize : 34;
iconSize : 44;
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as
index 213a41b343..c66d9d90c7 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as
@@ -1,6 +1,5 @@
package org.bigbluebutton.air {
- import org.bigbluebutton.air.main.commands.AuthenticationCommandAIR;
import org.bigbluebutton.air.main.commands.ConnectingFinishedCommandAIR;
import org.bigbluebutton.air.main.commands.DisconnectUserCommandAIR;
import org.bigbluebutton.air.main.models.IUISession;
@@ -15,7 +14,6 @@ package org.bigbluebutton.air {
import org.bigbluebutton.lib.common.services.IBaseConnection;
import org.bigbluebutton.lib.deskshare.services.DeskshareConnection;
import org.bigbluebutton.lib.deskshare.services.IDeskshareConnection;
- import org.bigbluebutton.lib.main.commands.AuthenticationSignal;
import org.bigbluebutton.lib.main.commands.ConnectCommand;
import org.bigbluebutton.lib.main.commands.ConnectSignal;
import org.bigbluebutton.lib.main.commands.ConnectingFinishedSignal;
@@ -26,7 +24,9 @@ package org.bigbluebutton.air {
import org.bigbluebutton.lib.main.commands.PresenterSignal;
import org.bigbluebutton.lib.main.models.ConferenceParameters;
import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.MeetingData;
import org.bigbluebutton.lib.main.models.UserSession;
import org.bigbluebutton.lib.main.services.BigBlueButtonConnection;
import org.bigbluebutton.lib.main.services.IBigBlueButtonConnection;
@@ -45,7 +45,7 @@ package org.bigbluebutton.air {
import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap;
import robotlegs.bender.framework.api.IConfig;
- import robotlegs.bender.framework.api.IInjector;
+ import robotlegs.bender.framework.api.IInjector;
public class AppConfig implements IConfig {
@@ -59,6 +59,7 @@ package org.bigbluebutton.air {
// Singleton mapping
injector.map(IUISession).toSingleton(UISession);
injector.map(IUserSession).toSingleton(UserSession);
+ injector.map(IMeetingData).toSingleton(MeetingData);
injector.map(IConferenceParameters).toSingleton(ConferenceParameters);
injector.map(IUsersService).toSingleton(UsersService);
injector.map(IPresentationService).toSingleton(PresentationService);
@@ -75,7 +76,6 @@ package org.bigbluebutton.air {
injector.map(IVideoConnection).toType(VideoConnection);
// Signal to Command mapping
signalCommandMap.map(ConnectSignal).toCommand(ConnectCommand);
- signalCommandMap.map(AuthenticationSignal).toCommand(AuthenticationCommandAIR);
signalCommandMap.map(DisconnectUserSignal).toCommand(DisconnectUserCommandAIR);
signalCommandMap.map(ConnectingFinishedSignal).toCommand(ConnectingFinishedCommandAIR);
signalCommandMap.map(PresenterSignal).toCommand(PresenterCommand);
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatRoomsMediatorAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatRoomsMediatorAIR.as
index af8ee21b5f..c6eda96b2e 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatRoomsMediatorAIR.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatRoomsMediatorAIR.as
@@ -12,7 +12,7 @@ package org.bigbluebutton.air.chat.views {
override protected function onListIndexChangeEvent(e:IndexChangeEvent):void {
var item:Object = dataProvider.getItemAt(e.newIndex);
- uiSession.pushPage(PageEnum.CHAT, {userId: item.userId, publicChat: item.isPublic});
+ uiSession.pushPage(PageEnum.CHAT, {intId: item.userId, publicChat: item.isPublic});
//uiSession.chatInfo = new ChatRoomVO(item.userId, item.isPublic);
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatViewMediatorAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatViewMediatorAIR.as
index 7f3e99fc06..dd8e6d3ba3 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatViewMediatorAIR.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/ChatViewMediatorAIR.as
@@ -1,7 +1,7 @@
package org.bigbluebutton.air.chat.views {
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.chat.views.ChatViewMediatorBase;
- import org.bigbluebutton.lib.user.models.User;
+ import org.bigbluebutton.lib.user.models.User2x;
public class ChatViewMediatorAIR extends ChatViewMediatorBase {
@@ -18,11 +18,11 @@ package org.bigbluebutton.air.chat.views {
_publicChat = true;
openChat(chatMessagesSession.publicConversation);
} else {
- var user:User = userSession.userList.getUserByUserId(data.userId);
+ var user:User2x = meetingData.users.getUser(data.intId);
_publicChat = false;
if (user != null) {
_user = user;
- openChat(chatMessagesSession.getPrivateMessages(user.userId, user.name));
+ openChat(chatMessagesSession.getPrivateMessages(user.intId, user.name));
}
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/common/PageEnum.as b/clients/flash/air-client/src/org/bigbluebutton/air/common/PageEnum.as
index 3189b52045..15c9cf513c 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/common/PageEnum.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/common/PageEnum.as
@@ -10,6 +10,7 @@ package org.bigbluebutton.air.common {
import org.bigbluebutton.air.settings.views.camera.CameraSettingsView;
import org.bigbluebutton.air.settings.views.chat.ChatSettingsView;
import org.bigbluebutton.air.settings.views.lock.LockSettingsView;
+ import org.bigbluebutton.air.users.views.UserDetailsView;
public class PageEnum {
public static const MAIN:String = "main";
@@ -56,10 +57,9 @@ package org.bigbluebutton.air.common {
dic[CHATSETTINGS] = ChatSettingsView;
dic[LOCKSETTINGS] = LockSettingsView;
// dic[PROFILE] = ProfileView;
- // dic[USER_DETAILS] = UserDetailsView;
+ dic[USER_DETAILS] = UserDetailsView;
// dic[VIDEO_CHAT] = VideoChatView;
// dic[CHATROOMS] = ChatRoomsView;
- // dic[PARTICIPANTS] = ParticipantsView;
// dic[SELECT_PARTICIPANT] = SelectParticipantView;
// dic[DISCONNECT] = DisconnectPageView;
// dic[DESKSHARE] = DeskshareView;
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/AuthenticationCommandAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/AuthenticationCommandAIR.as
deleted file mode 100755
index f722b4f62d..0000000000
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/AuthenticationCommandAIR.as
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.bigbluebutton.air.main.commands {
-
- import org.bigbluebutton.air.main.models.IUISession;
- import robotlegs.bender.bundles.mvcs.Command;
-
- public class AuthenticationCommandAIR extends Command {
-
- [Inject]
- public var command:String;
-
- [Inject]
- public var uiSession:IUISession;
-
- override public function execute():void {
- switch (command) {
- case "timeOut":
- uiSession.setLoading(false, "Auth token timed out");
- //userUISession.loading = false;
- //userUISession.joinFailureSignal.dispatch("authTokenTimedOut");
- break;
- case "invalid":
- default:
- uiSession.setLoading(false, "Auth token invalid");
- //userUISession.loading = false;
- //userUISession.joinFailureSignal.dispatch("authTokenInvalid");
- break;
- }
- }
- }
-}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as
index b6d53f941a..e2e1019808 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as
@@ -42,7 +42,8 @@ package org.bigbluebutton.air.main.views {
//var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=AIR&meetingID=Demo+Meeting&password=mp&redirect=false&checksum=3fdf56e9915c1031c3ea012b4ec8823cedd7c272";
//var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=User+2021828&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=8751963df96437c7d435eac8124e4fb3ec147115";
//var url:String = "bigbluebutton://bbb.riadvice.com/bigbluebutton/api/join?fullName=User+6571157&meetingID=Mobile+Meeting&password=mp&redirect=true&checksum=ed779570bbfa11a2e857ffb36eda5184d70bc6ca";
- var url:String = "bigbluebutton://dev.bigbluebutton.org/bigbluebutton/api/join?fullName=AIR+Client&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=f1671c5e125522f69da92e46353cc6c75df4b31d";
+ //var url:String = "bigbluebutton://dev.bigbluebutton.org/bigbluebutton/api/join?fullName=AIR+Client&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=f1671c5e125522f69da92e46353cc6c75df4b31d";
+ var url:String = "http://192.168.204.137/bigbluebutton/api/join?fullName=AIR+User&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=83e3b776471db343fddd9dfd71e7f499157e0a00";
joinRoom(url);
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/TopToolbarMediatorAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/TopToolbarMediatorAIR.as
index e999ecf12a..06246e2288 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/TopToolbarMediatorAIR.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/TopToolbarMediatorAIR.as
@@ -4,7 +4,7 @@ package org.bigbluebutton.air.main.views {
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.main.views.TopToolbarMediatorBase;
- import org.bigbluebutton.lib.user.models.User;
+ import org.bigbluebutton.lib.user.models.User2x;
public class TopToolbarMediatorAIR extends TopToolbarMediatorBase {
@@ -13,20 +13,22 @@ package org.bigbluebutton.air.main.views {
override protected function setTitle():void {
if (uiSession.currentPage == PageEnum.CHAT) {
- var data:Object = uiSession.currentPageDetails;
+ var chatData:Object = uiSession.currentPageDetails;
- if (data != null) {
- if (data.publicChat) {
+ if (chatData != null) {
+ if (chatData.publicChat) {
view.titleLabel.text = "Public Chat";
} else {
- var user:User = userSession.userList.getUserByUserId(data.userId);
- view.titleLabel.text = user.name;
+ var userC:User2x = meetingData.users.getUser(chatData.intId);
+ view.titleLabel.text = userC.name;
}
}
} else if (uiSession.currentPage == PageEnum.PARTICIPANTS) {
view.titleLabel.text = "Participants";
} else if (uiSession && uiSession.currentPage.indexOf("Settings") > 0) {
view.titleLabel.text = uiSession.currentPage.replace(/([A-Z])/g, ' $1');
+ } else if (uiSession.currentPage == PageEnum.USER_DETAILS) {
+ view.titleLabel.text = "User Details";
} else {
view.titleLabel.text = conferenceParameters.meetingName;
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/camera/CameraSettingsViewMediatorAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/camera/CameraSettingsViewMediatorAIR.as
old mode 100644
new mode 100755
index dcacd5531b..c43cc7ead4
--- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/camera/CameraSettingsViewMediatorAIR.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/camera/CameraSettingsViewMediatorAIR.as
@@ -101,9 +101,9 @@ package org.bigbluebutton.air.settings.views.camera {
}
override protected function displayPreviewCamera():void {
- var profile:VideoProfile = userSession.videoConnection.selectedCameraQuality
+ var profile:VideoProfile = userSession.videoConnection.selectedCameraQuality;
var camera:Camera = getCamera(userSession.videoConnection.cameraPosition);
- if (camera) {
+ if (camera && profile) {
var myCam:Video = new Video();
var screenAspectRatio:Number = (view.cameraHolder.width / profile.width) / (view.cameraHolder.height / profile.height);
if (screenAspectRatio > 1) { //landscape
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/UsersConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/UsersConfig.as
index 642e5d191f..31b280647c 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/users/UsersConfig.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/UsersConfig.as
@@ -1,6 +1,12 @@
package org.bigbluebutton.air.users {
+ import org.bigbluebutton.air.users.views.UserDetailsView;
+ import org.bigbluebutton.air.users.views.UserDetailsViewMediator;
import org.bigbluebutton.air.users.views.UsersViewMediatorAIR;
+ import org.bigbluebutton.lib.main.commands.ClearUserStatusCommand;
+ import org.bigbluebutton.lib.main.commands.ClearUserStatusSignal;
+ import org.bigbluebutton.lib.main.commands.EmojiCommand;
+ import org.bigbluebutton.lib.main.commands.EmojiSignal;
import org.bigbluebutton.lib.user.views.UsersViewBase;
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
@@ -25,20 +31,18 @@ package org.bigbluebutton.air.users {
*/
private function mediators():void {
mediatorMap.map(UsersViewBase).toMediator(UsersViewMediatorAIR);
- //mediatorMap.map(IUserDetailsView).toMediator(UserDetailsViewMediator);
+ mediatorMap.map(UserDetailsView).toMediator(UserDetailsViewMediator);
}
/**
* Maps signals to commands using the signalCommandMap.
*/
private function signals():void {
- /*
signalCommandMap.map(EmojiSignal).toCommand(EmojiCommand);
- signalCommandMap.map(MuteAllUsersSignal).toCommand(MuteAllUsersCommand);
- signalCommandMap.map(MuteAllUsersExpectPresenterSignal).toCommand(MuteAllUsersExpectPresenterCommand);
- signalCommandMap.map(SaveLockSettingsSignal).toCommand(SaveLockSettingsCommand);
+ //signalCommandMap.map(MuteAllUsersSignal).toCommand(MuteAllUsersCommand);
+ //signalCommandMap.map(MuteAllUsersExpectPresenterSignal).toCommand(MuteAllUsersExpectPresenterCommand);
+ //signalCommandMap.map(SaveLockSettingsSignal).toCommand(SaveLockSettingsCommand);
signalCommandMap.map(ClearUserStatusSignal).toCommand(ClearUserStatusCommand);
- */
}
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/TopToolbarUserDetails.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/TopToolbarUserDetails.as
new file mode 100755
index 0000000000..4eb83d77ef
--- /dev/null
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/TopToolbarUserDetails.as
@@ -0,0 +1,12 @@
+package org.bigbluebutton.air.users.views {
+ import org.bigbluebutton.air.main.views.TopToolbarAIR;
+
+ public class TopToolbarUserDetails extends TopToolbarAIR {
+ public function TopToolbarUserDetails() {
+ super();
+
+ leftButton.styleName = "icon-left-arrow topButton topLeftButton";
+ rightButton.styleName = "icon-presentation topButton topRightButton";
+ }
+ }
+}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UserDetailsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UserDetailsView.as
new file mode 100755
index 0000000000..b44e319e2a
--- /dev/null
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UserDetailsView.as
@@ -0,0 +1,267 @@
+package org.bigbluebutton.air.users.views {
+ import mx.core.ScrollPolicy;
+ import mx.graphics.SolidColor;
+
+ import spark.components.Button;
+ import spark.components.Group;
+ import spark.components.HGroup;
+ import spark.components.Image;
+ import spark.components.Label;
+ import spark.components.Scroller;
+ import spark.components.SkinnableContainer;
+ import spark.components.VGroup;
+ import spark.layouts.VerticalLayout;
+ import spark.primitives.Rect;
+
+ import org.bigbluebutton.air.common.views.NoTabView;
+ import org.bigbluebutton.air.main.views.TopToolbarAIR;
+ import org.bigbluebutton.air.users.views.models.UserDetailsVM;
+ import org.bigbluebutton.lib.common.views.ParticipantIcon;
+ import org.bigbluebutton.lib.user.models.EmojiStatus;
+ import org.bigbluebutton.lib.user.utils.UserUtils;
+
+ public class UserDetailsView extends NoTabView {
+ private var _participantIcon:ParticipantIcon;
+
+ private var _participantLabel:Label;
+
+ private var _participantBackground:Rect;
+
+ private var _showCameraButton:Button;
+
+ public function get showCameraButton():Button {
+ return _showCameraButton;
+ }
+
+ private var _privateChatButton:Button;
+
+ public function get privateChatButton():Button {
+ return _privateChatButton;
+ }
+
+ private var _clearStatusButton:Button;
+
+ public function get clearStatusButton():Button {
+ return _clearStatusButton;
+ }
+
+ private var _makePresenterButton:Button;
+
+ public function get makePresenterButton():Button {
+ return _makePresenterButton;
+ }
+
+ private var _promoteButton:Button;
+
+ public function get promoteButton():Button {
+ return _promoteButton;
+ }
+
+ private var _lockButton:Button;
+
+ public function get lockButton():Button {
+ return _lockButton;
+ }
+
+ private var _unlockButton:Button;
+
+ public function get unlockButton():Button {
+ return _unlockButton;
+ }
+
+ private var _viewModel:UserDetailsVM;
+
+ public function UserDetailsView() {
+ super();
+
+ styleName = "mainView";
+
+ var l:VerticalLayout = new VerticalLayout();
+ l.gap = 0;
+ l.horizontalAlign = "center";
+ layout = l;
+
+ var skinnableWrapper:SkinnableContainer = new SkinnableContainer();
+ skinnableWrapper.styleName = "subViewContent";
+ skinnableWrapper.percentWidth = 100;
+ skinnableWrapper.percentHeight = 100;
+
+ var scroller:Scroller = new Scroller();
+ scroller.percentWidth = 100;
+ scroller.percentHeight = 100;
+ scroller.setStyle("horizontalScrollPolicy", "off");
+
+ var sGroup:VGroup = new VGroup();
+ sGroup.percentWidth = 100;
+ sGroup.percentHeight = 100;
+ sGroup.horizontalAlign = "center";
+ sGroup.setStyle("horizontalScrollPolicy", "off");
+ scroller.viewport = sGroup;
+
+ var participantHolder:Group = new Group();
+ participantHolder.percentWidth = 100;
+ sGroup.addElement(participantHolder);
+
+ _participantBackground = new Rect();
+ _participantBackground.percentHeight = 100;
+ _participantBackground.percentWidth = 100;
+ _participantBackground.fill = new SolidColor();
+ participantHolder.addElement(_participantBackground);
+
+ _participantIcon = new ParticipantIcon();
+ _participantIcon.horizontalCenter = 0;
+ _participantIcon.styleName = "participantIconSettings";
+ participantHolder.addElement(_participantIcon);
+
+ _participantLabel = new Label();
+ _participantLabel.horizontalCenter = 0;
+ participantHolder.addElement(_participantLabel);
+
+ _showCameraButton = new Button();
+ _showCameraButton.percentWidth = 90;
+ _showCameraButton.label= "Show Camera"; //{resourceManager.getString('resources', 'userDetail.cameraBtn.text')}"
+ _showCameraButton.styleName="userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_showCameraButton);
+
+ _privateChatButton = new Button();
+ _privateChatButton.percentWidth = 90;
+ _privateChatButton.label = "Private Chat"; //{resourceManager.getString('resources', 'userDetail.privateChatBtn.text')}"
+ _privateChatButton.styleName = "userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_privateChatButton);
+
+ _clearStatusButton = new Button();
+ _clearStatusButton.percentWidth = 90;
+ _clearStatusButton.label = "Clear Status"; //{resourceManager.getString('resources', 'userDetail.clearStatus')}"
+ _clearStatusButton.styleName = "userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_clearStatusButton);
+
+ _makePresenterButton = new Button();
+ _makePresenterButton.percentWidth
+ _makePresenterButton.label= "Make Presenter"; //{resourceManager.getString('resources', 'userDetail.presenterBtn.text')}"
+ _makePresenterButton.styleName="userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_makePresenterButton);
+
+ _promoteButton = new Button();
+ _promoteButton.percentWidth = 90;
+ _promoteButton.label = "Promote to Moderator";
+ _promoteButton.styleName="userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_promoteButton);
+
+ _lockButton = new Button();
+ _lockButton.percentWidth = 90;
+ _lockButton.label="Lock User"; //{resourceManager.getString('resources', 'userDetail.lockButton.text')}"
+ _lockButton.styleName="userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_lockButton);
+
+ _unlockButton = new Button();
+ _unlockButton.percentWidth = 90;
+ _unlockButton.label="Unlock User"; //{resourceManager.getString('resources', 'userDetail.unlockButton.text')}"
+ _unlockButton.styleName="userSettingsButton logoutButton contentFontSize";
+ sGroup.addElement(_unlockButton);
+
+ skinnableWrapper.addElement(scroller);
+
+ addElement(skinnableWrapper);
+ }
+
+ override protected function createToolbar():TopToolbarAIR {
+ return new TopToolbarUserDetails();
+ }
+
+ public function setViewModel(vm:UserDetailsVM):void {
+ _viewModel = vm;
+ }
+
+ public function update():void {
+ if (_viewModel != null) {
+ /*
+ if (_isMe) {
+ userNameText.text = _user.name + " " + resourceManager.getString('resources', 'userDetail.you');
+ } else {
+ userNameText.text = _user.name;
+ }
+ if (_user.presenter) {
+ roleText.text = resourceManager.getString('resources', 'participants.status.presenter');
+ if (_user.role == UserRole.MODERATOR) {
+ roleText.text += "/" + resourceManager.getString('resources', 'participants.status.moderator');
+ }
+ } else if (_user.role == UserRole.MODERATOR) {
+ roleText.text = resourceManager.getString('resources', 'participants.status.moderator');
+ } else {
+ roleText.text = "";
+ }
+ */
+
+ _participantIcon.displayInitials = UserUtils.getInitials(_viewModel.userName);
+ _participantLabel.text = _viewModel.userName;
+
+ if (_viewModel.userEmoji != EmojiStatus.NO_STATUS && _viewModel.amIModerator) {
+ clearStatusButton.includeInLayout = true;
+ clearStatusButton.visible = true;
+ } else {
+ clearStatusButton.includeInLayout = false;
+ clearStatusButton.visible = false;
+ }
+ if (!_viewModel.userPresenter && _viewModel.amIModerator) {
+ makePresenterButton.includeInLayout = true;
+ makePresenterButton.visible = true;
+ } else {
+ makePresenterButton.includeInLayout = false;
+ makePresenterButton.visible = false;
+ }
+ if (!_viewModel.userModerator && _viewModel.amIModerator) {
+ promoteButton.includeInLayout = true;
+ promoteButton.visible = true;
+ } else {
+ promoteButton.includeInLayout = false;
+ promoteButton.visible = false;
+ }
+ //cameraIcon.visible = cameraIcon.includeInLayout = false;// _user.hasStream;
+ //micIcon.visible = micIcon.includeInLayout = false; //(_user.voiceJoined && !_user.muted);
+ //micOffIcon.visible = micOffIcon.includeInLayout = false; //(_user.voiceJoined && _user.muted);
+ //noMediaText.visible = noMediaText.includeInLayout = false; //(!_user.voiceJoined && !_user.hasStream);
+ //TODO: buttons
+ showCameraButton.includeInLayout = false; //_user.hasStream;
+ showCameraButton.visible = false; //_user.hasStream;
+ privateChatButton.includeInLayout = !_viewModel.me;
+ privateChatButton.visible = !_viewModel.me;
+
+ if (_viewModel.amIModerator && _viewModel.roomLocked && !_viewModel.userModerator) {
+ if (_viewModel.userLocked) {
+ unlockButton.visible = true;
+ unlockButton.includeInLayout = true;
+ lockButton.visible = false;
+ lockButton.includeInLayout = false;
+ } else {
+ unlockButton.visible = false;
+ unlockButton.includeInLayout = false;
+ lockButton.visible = true;
+ lockButton.includeInLayout = true;
+ }
+ } else {
+ unlockButton.visible = false;
+ unlockButton.includeInLayout = false;
+ lockButton.visible = false;
+ lockButton.includeInLayout = false;
+ }
+ }
+ }
+
+ override protected function updateDisplayList(w:Number, h:Number):void {
+ super.updateDisplayList(w, h);
+
+ setParticipantStyle();
+ }
+
+ private function setParticipantStyle():void {
+ var groupsPadding:Number = getStyle("groupsPadding");
+
+ SolidColor(_participantBackground.fill).color = getStyle("headerBackground");
+ _participantIcon.top = groupsPadding * 1.75;
+ _participantLabel.setStyle("color", _participantIcon.getStyle("color"));
+ _participantLabel.setStyle("fontSize", _participantIcon.getStyle("fontSize") * 0.65);
+ _participantLabel.setStyle("paddingBottom", groupsPadding);
+ _participantLabel.y = _participantIcon.y + _participantIcon.height + groupsPadding;
+ }
+ }
+}
\ No newline at end of file
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UserDetailsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UserDetailsViewMediator.as
new file mode 100755
index 0000000000..2da3f95f84
--- /dev/null
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UserDetailsViewMediator.as
@@ -0,0 +1,153 @@
+package org.bigbluebutton.air.users.views {
+
+ import flash.events.MouseEvent;
+
+ import org.bigbluebutton.air.common.PageEnum;
+ import org.bigbluebutton.air.common.TransitionAnimationEnum;
+ import org.bigbluebutton.air.main.models.IUISession;
+ import org.bigbluebutton.air.users.views.models.UserDetailsVM;
+ import org.bigbluebutton.lib.main.commands.ClearUserStatusSignal;
+ import org.bigbluebutton.lib.main.commands.LockUserSignal;
+ import org.bigbluebutton.lib.main.commands.PresenterSignal;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
+ import org.bigbluebutton.lib.main.models.LockSettings2x;
+ import org.bigbluebutton.lib.user.models.User2x;
+ import org.bigbluebutton.lib.user.models.UserChangeEnum;
+ import org.bigbluebutton.lib.user.models.UserRole;
+
+ import robotlegs.bender.bundles.mvcs.Mediator;
+
+ public class UserDetailsViewMediator extends Mediator {
+
+ [Inject]
+ public var view:UserDetailsView;
+
+ [Inject]
+ public var meetingData:IMeetingData;
+
+ [Inject]
+ public var userUISession:IUISession;
+
+ [Inject]
+ public var clearUserStatusSignal:ClearUserStatusSignal;
+
+ [Inject]
+ public var presenterSignal:PresenterSignal;
+
+ [Inject]
+ public var lockUserSignal:LockUserSignal;
+
+ protected var _user:User2x;
+
+ protected var _viewModel:UserDetailsVM;
+
+ override public function initialize():void {
+ var selectedUserId:String = userUISession.currentPageDetails as String;
+ meetingData.users.userChangeSignal.add(onUserChanged);
+ _user = meetingData.users.getUser(selectedUserId);
+
+ _viewModel = new UserDetailsVM();
+ _viewModel.userName = _user.name;
+ _viewModel.userModerator = _user.role == UserRole.MODERATOR;
+ _viewModel.userPresenter = _user.presenter;
+ _viewModel.userEmoji = _user.emoji;
+ _viewModel.userLocked = _user.locked;
+ // user webcam, voicejoined, muted
+ _viewModel.amIModerator = meetingData.users.me.role == UserRole.MODERATOR;
+ _viewModel.me = _user.intId == meetingData.users.me.intId;
+ _viewModel.roomLocked = meetingData.meetingStatus.lockSettings.isRoomLocked();
+ view.setViewModel(_viewModel);
+ view.update();
+
+ meetingData.meetingStatus.lockSettingsChangeSignal.add(onLockSettingsChange);
+ view.showCameraButton.addEventListener(MouseEvent.CLICK, onShowCameraButton);
+ view.privateChatButton.addEventListener(MouseEvent.CLICK, onShowPrivateChatButton);
+ view.clearStatusButton.addEventListener(MouseEvent.CLICK, onClearStatusButton);
+ view.makePresenterButton.addEventListener(MouseEvent.CLICK, onMakePresenterButton);
+ view.lockButton.addEventListener(MouseEvent.CLICK, onLockUser);
+ view.unlockButton.addEventListener(MouseEvent.CLICK, onUnlockUser);
+ }
+
+ protected function onLockUser(event:MouseEvent):void {
+ //dispatch lock signal
+ lockUserSignal.dispatch(_user.intId, true);
+ userUISession.popPage();
+ }
+
+ protected function onUnlockUser(event:MouseEvent):void {
+ //dispatch lock signal
+ lockUserSignal.dispatch(_user.intId, false);
+ userUISession.popPage();
+ }
+
+ protected function onShowCameraButton(event:MouseEvent):void {
+ trace("onShowCameraButton clicked - Implementation missing");
+ //userUISession.pushPage(PageEnum.VIDEO_CHAT, _user, TransitionAnimationEnum.APPEAR);
+ }
+
+ protected function onShowPrivateChatButton(event:MouseEvent):void {
+ userUISession.pushPage(PageEnum.CHAT, {publicChat: false, intId: _user.intId}, TransitionAnimationEnum.APPEAR);
+ }
+
+ protected function onClearStatusButton(event:MouseEvent):void {
+ clearUserStatusSignal.dispatch(_user.intId);
+ view.clearStatusButton.includeInLayout = false;
+ view.clearStatusButton.visible = false;
+ userUISession.popPage();
+ }
+
+ protected function onMakePresenterButton(event:MouseEvent):void {
+ presenterSignal.dispatch(_user);
+ userUISession.popPage();
+ }
+
+ private function onUserChanged(user:User2x, prop:int):void {
+ if (_user.intId == user.intId) {
+ switch (prop) {
+ case UserChangeEnum.LEAVE:
+ userUISession.popPage();
+ break;
+ case UserChangeEnum.EMOJI:
+ _viewModel.userEmoji = user.emoji;
+ view.update();
+ break;
+ case UserChangeEnum.LOCKED:
+ _viewModel.userLocked = user.locked;
+ view.update();
+ break;
+ case UserChangeEnum.PRESENTER:
+ _viewModel.userPresenter = user.presenter;
+ view.update();
+ break;
+ case UserChangeEnum.ROLE:
+ _viewModel.userModerator = user.role == UserRole.MODERATOR;
+ view.update();
+ break;
+ }
+ } else if (_user.intId == meetingData.users.me.intId) {
+ if (prop == UserChangeEnum.ROLE) {
+ _viewModel.amIModerator = user.role == UserRole.MODERATOR;
+ view.update();
+ }
+ }
+ }
+
+ private function onLockSettingsChange(lockSettings:LockSettings2x):void {
+ _viewModel.roomLocked = lockSettings.isRoomLocked();
+ view.update();
+ }
+
+ override public function destroy():void {
+ super.destroy();
+ view.clearStatusButton.removeEventListener(MouseEvent.CLICK, onClearStatusButton);
+ view.makePresenterButton.removeEventListener(MouseEvent.CLICK, onMakePresenterButton);
+ view.lockButton.removeEventListener(MouseEvent.CLICK, onLockUser);
+ view.unlockButton.removeEventListener(MouseEvent.CLICK, onUnlockUser);
+ view.showCameraButton.removeEventListener(MouseEvent.CLICK, onShowCameraButton);
+ view.privateChatButton.removeEventListener(MouseEvent.CLICK, onShowPrivateChatButton);
+ meetingData.users.userChangeSignal.remove(onUserChanged);
+ meetingData.meetingStatus.lockSettingsChangeSignal.remove(onLockSettingsChange);
+ view = null;
+ }
+ }
+}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UsersViewMediatorAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UsersViewMediatorAIR.as
index f602fc581e..783ba90ea2 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UsersViewMediatorAIR.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/UsersViewMediatorAIR.as
@@ -1,7 +1,16 @@
package org.bigbluebutton.air.users.views {
+ import org.bigbluebutton.air.common.PageEnum;
+ import org.bigbluebutton.air.main.models.IUISession;
+ import org.bigbluebutton.lib.user.events.UserItemSelectedEvent;
import org.bigbluebutton.lib.user.views.UsersViewMediatorBase;
public class UsersViewMediatorAIR extends UsersViewMediatorBase {
+ [Inject]
+ public var uiSession:IUISession;
+
+ override protected function onUserItemSelected(e:UserItemSelectedEvent):void {
+ uiSession.pushPage(PageEnum.USER_DETAILS, e.user.intId);
+ }
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/models/UserDetailsVM.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/models/UserDetailsVM.as
new file mode 100755
index 0000000000..da443642e2
--- /dev/null
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/models/UserDetailsVM.as
@@ -0,0 +1,27 @@
+package org.bigbluebutton.air.users.views.models {
+ import org.bigbluebutton.lib.user.models.EmojiStatus;
+
+ public class UserDetailsVM {
+ public var userName:String = "";
+
+ public var userModerator:Boolean = false;
+
+ public var userPresenter:Boolean = false;
+
+ public var userEmoji:String = EmojiStatus.NO_STATUS;
+
+ public var userLocked:Boolean = false;
+
+ public var userHasWebcam:Boolean = false;
+
+ public var userVoiceJoined:Boolean = false;
+
+ public var userMuted:Boolean = false;
+
+ public var amIModerator:Boolean = false;
+
+ public var me:Boolean = false;
+
+ public var roomLocked:Boolean = false;
+ }
+}
\ No newline at end of file
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/IUserDetailsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/IUserDetailsView.as
deleted file mode 100644
index c054e99302..0000000000
--- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/IUserDetailsView.as
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.bigbluebutton.air.users.views.userdetails {
-
- import spark.components.Button;
-
- import org.bigbluebutton.air.common.views.IView;
- import org.bigbluebutton.lib.user.models.User;
-
- public interface IUserDetailsView extends IView {
- function set user(u:User):void;
- function set userMe(u:User):void;
- function get user():User;
- function get userMe():User;
- function update():void;
- function get showCameraButton():Button;
- function get showPrivateChat():Button;
- function get clearStatusButton():Button;
- function get makePresenterButton():Button;
- function get promoteButton():Button;
- function get lockButton():Button;
- function get unlockButton():Button;
- function updateLockButtons(isRoomLocked:Boolean):void;
- }
-}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsView.as
deleted file mode 100644
index 343541dd96..0000000000
--- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsView.as
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.bigbluebutton.air.users.views.userdetails {
-
- import mx.core.FlexGlobals;
-
- import spark.components.Button;
-
- import org.bigbluebutton.lib.user.models.User;
-
- public class UserDetailsView extends UserDetailsViewBase implements IUserDetailsView {
-
- protected var _user:User;
-
- protected var _userMe:User;
-
- public function set user(u:User):void {
- _user = u;
- update();
- }
-
- public function set userMe(u:User):void {
- _userMe = u;
- update();
- }
-
- public function get user():User {
- return _user;
- }
-
- public function get userMe():User {
- return _userMe;
- }
-
- public function update():void {
- if (user != null && FlexGlobals.topLevelApplication.mainshell != null && userMe != null) {
- if (_user.me) {
- userNameText.text = _user.name + " " + resourceManager.getString('resources', 'userDetail.you');
- } else {
- userNameText.text = _user.name;
- }
- if (_user.presenter) {
- roleText.text = resourceManager.getString('resources', 'participants.status.presenter');
- if (_user.role == User.MODERATOR) {
- roleText.text += "/" + resourceManager.getString('resources', 'participants.status.moderator');
- }
- } else if (_user.role == User.MODERATOR) {
- roleText.text = resourceManager.getString('resources', 'participants.status.moderator');
- } else {
- roleText.text = "";
- }
- if (_user.status != User.NO_STATUS && _userMe.role == User.MODERATOR) {
- clearStatusButton.includeInLayout = true;
- clearStatusButton.visible = true;
- } else {
- clearStatusButton.includeInLayout = false;
- clearStatusButton.visible = false;
- }
- if (!_user.presenter && _userMe.role == User.MODERATOR) {
- makePresenterButton.includeInLayout = true;
- makePresenterButton.visible = true;
- } else {
- makePresenterButton.includeInLayout = false;
- makePresenterButton.visible = false;
- }
- clearStatusButton.label = resourceManager.getString('resources', 'profile.emojiStatus.clear');
- cameraIcon.visible = cameraIcon.includeInLayout = _user.hasStream;
- micIcon.visible = micIcon.includeInLayout = (_user.voiceJoined && !_user.muted);
- micOffIcon.visible = micOffIcon.includeInLayout = (_user.voiceJoined && _user.muted);
- noMediaText.visible = noMediaText.includeInLayout = (!_user.voiceJoined && !_user.hasStream);
- //TODO: buttons
- showCameraButton0.includeInLayout = _user.hasStream;
- showCameraButton0.visible = _user.hasStream;
- showPrivateChat0.includeInLayout = !_user.me;
- showPrivateChat0.visible = !_user.me;
- }
- }
-
- public function updateLockButtons(isRoomLocked:Boolean):void {
- if (_userMe.role == User.MODERATOR && isRoomLocked && _user.role != User.MODERATOR) {
- if (_user.locked) {
- unlockButton.visible = true;
- unlockButton.includeInLayout = true;
- lockButton.visible = false;
- lockButton.includeInLayout = false;
- } else {
- unlockButton.visible = false;
- unlockButton.includeInLayout = false;
- lockButton.visible = true;
- lockButton.includeInLayout = true;
- }
- } else {
- unlockButton.visible = false;
- unlockButton.includeInLayout = false;
- lockButton.visible = false;
- lockButton.includeInLayout = false;
- }
- }
-
- public function dispose():void {
- }
-
- public function get showCameraButton():Button {
- return showCameraButton0;
- }
-
- public function get showPrivateChat():Button {
- return showPrivateChat0;
- }
-
- public function get clearStatusButton():Button {
- return clearStatusButton0;
- }
-
- public function get promoteButton():Button {
- return promoteButton0;
- }
-
- public function get makePresenterButton():Button {
- return makePresenterButton0;
- }
-
- public function get lockButton():Button {
- return lockButton0;
- }
-
- public function get unlockButton():Button {
- return unlockButton0;
- }
- }
-}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsViewBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsViewBase.mxml
deleted file mode 100644
index a48dd27f6b..0000000000
--- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsViewBase.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsViewMediator.as
deleted file mode 100755
index 5630a47f9c..0000000000
--- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/userdetails/UserDetailsViewMediator.as
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.bigbluebutton.air.users.views.userdetails {
-
- import flash.events.MouseEvent;
-
- import mx.core.FlexGlobals;
-
- import org.bigbluebutton.air.common.PageEnum;
- import org.bigbluebutton.air.common.TransitionAnimationEnum;
- import org.bigbluebutton.air.main.models.IUISession;
- import org.bigbluebutton.lib.main.commands.ClearUserStatusSignal;
- import org.bigbluebutton.lib.main.commands.LockUserSignal;
- import org.bigbluebutton.lib.main.commands.PresenterSignal;
- import org.bigbluebutton.lib.main.models.IUserSession;
- import org.bigbluebutton.lib.user.models.User;
-
- import robotlegs.bender.bundles.mvcs.Mediator;
-
- public class UserDetailsViewMediator extends Mediator {
-
- [Inject]
- public var view:IUserDetailsView;
-
- [Inject]
- public var userSession:IUserSession;
-
- [Inject]
- public var userUISession:IUISession;
-
- [Inject]
- public var clearUserStatusSignal:ClearUserStatusSignal;
-
- [Inject]
- public var presenterSignal:PresenterSignal;
-
- [Inject]
- public var lockUserSignal:LockUserSignal;
-
- protected var _user:User;
-
- override public function initialize():void {
- _user = userUISession.currentPageDetails as User;
- userSession.userList.userChangeSignal.add(userChanged);
- userSession.userList.userRemovedSignal.add(userRemoved);
- view.user = _user;
- view.userMe = userSession.userList.me;
- view.showCameraButton.addEventListener(MouseEvent.CLICK, onShowCameraButton);
- view.showPrivateChat.addEventListener(MouseEvent.CLICK, onShowPrivateChatButton);
- view.clearStatusButton.addEventListener(MouseEvent.CLICK, onClearStatusButton);
- view.makePresenterButton.addEventListener(MouseEvent.CLICK, onMakePresenterButton);
- view.updateLockButtons(isRoomLocked());
- view.lockButton.addEventListener(MouseEvent.CLICK, onLockUser);
- view.unlockButton.addEventListener(MouseEvent.CLICK, onUnlockUser);
- FlexGlobals.topLevelApplication.topActionBar.pageName.text = view.user.name;
- }
-
- protected function onLockUser(event:MouseEvent):void {
- //dispatch lock signal
- lockUserSignal.dispatch(_user.userID, true);
- userUISession.popPage();
- }
-
- protected function onUnlockUser(event:MouseEvent):void {
- //dispatch lock signal
- lockUserSignal.dispatch(_user.userID, false);
- userUISession.popPage();
- }
-
- private function isRoomLocked():Boolean {
- return userSession.lockSettings.disableCam || userSession.lockSettings.disableMic || userSession.lockSettings.disablePrivateChat || userSession.lockSettings.disablePublicChat || userSession.lockSettings.lockedLayout;
- }
-
- protected function onShowCameraButton(event:MouseEvent):void {
- userUISession.pushPage(PageEnum.VIDEO_CHAT, _user, TransitionAnimationEnum.APPEAR);
- }
-
- protected function onShowPrivateChatButton(event:MouseEvent):void {
- userUISession.pushPage(PageEnum.CHAT, _user, TransitionAnimationEnum.APPEAR);
- }
-
- protected function onClearStatusButton(event:MouseEvent):void {
- clearUserStatusSignal.dispatch(_user.userID);
- userSession.userList.getUser(_user.userID).status = User.NO_STATUS;
- view.clearStatusButton.includeInLayout = false;
- view.clearStatusButton.visible = false;
- userUISession.popPage();
- }
-
- protected function onMakePresenterButton(event:MouseEvent):void {
- presenterSignal.dispatch(_user, userSession.userList.me.userID);
- userUISession.popPage();
- }
-
- private function userRemoved(userID:String):void {
- if (_user.userID == userID) {
- userUISession.popPage();
- }
- }
-
- private function userChanged(user:User, type:int):void {
- if (_user.userID == user.userID || user.me) {
- view.update();
- view.updateLockButtons(isRoomLocked());
- }
- }
-
- override public function destroy():void {
- super.destroy();
- view.clearStatusButton.removeEventListener(MouseEvent.CLICK, onClearStatusButton);
- view.makePresenterButton.removeEventListener(MouseEvent.CLICK, onMakePresenterButton);
- view.lockButton.removeEventListener(MouseEvent.CLICK, onLockUser);
- view.unlockButton.removeEventListener(MouseEvent.CLICK, onUnlockUser);
- view.showCameraButton.removeEventListener(MouseEvent.CLICK, onShowCameraButton);
- view.showPrivateChat.removeEventListener(MouseEvent.CLICK, onShowPrivateChatButton);
- userSession.userList.userChangeSignal.remove(userChanged);
- userSession.userList.userRemovedSignal.remove(userRemoved);
- view.dispose();
- view = null;
- }
- }
-}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/video/commands/ShareCameraCommand.as b/clients/flash/air-client/src/org/bigbluebutton/air/video/commands/ShareCameraCommand.as
old mode 100644
new mode 100755
index 8ab9fa6e10..472b152002
--- a/clients/flash/air-client/src/org/bigbluebutton/air/video/commands/ShareCameraCommand.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/video/commands/ShareCameraCommand.as
@@ -89,13 +89,15 @@ package org.bigbluebutton.air.video.commands {
}
private function enableCamera(position:String):void {
- userSession.videoConnection.camera = setupCamera(position);
- userSession.videoConnection.selectCameraQuality(userSession.videoConnection.selectedCameraQuality);
- var userId:String = userSession.userId;
- if (userSession.videoConnection.camera) {
- var streamName:String = buildStreamName(userSession.videoConnection.camera.width, userSession.videoConnection.camera.height, userId);
- usersService.addStream(userId, streamName);
- userSession.videoConnection.startPublishing(userSession.videoConnection.camera, streamName);
+ if (position && userSession.videoConnection.selectedCameraQuality) {
+ userSession.videoConnection.camera = setupCamera(position);
+ userSession.videoConnection.selectCameraQuality(userSession.videoConnection.selectedCameraQuality);
+ var userId:String = userSession.userId;
+ if (userSession.videoConnection.camera) {
+ var streamName:String = buildStreamName(userSession.videoConnection.camera.width, userSession.videoConnection.camera.height, userId);
+ usersService.addStream(userId, streamName);
+ userSession.videoConnection.startPublishing(userSession.videoConnection.camera, streamName);
+ }
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessage.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessage.as
old mode 100644
new mode 100755
index 8ce31b9988..1f52293c7f
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessage.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessage.as
@@ -7,31 +7,15 @@ package org.bigbluebutton.lib.chat.models {
public var senderId:String;
- public var senderLanguage:String;
-
- public var receiverLanguage:String;
-
- public var translate:Boolean;
-
public var senderColor:uint;
- public var translateLocale:String = "";
-
- public var translatedLocaleTooltip:String = "";
-
public var name:String;
public var time:String;
public var lastTime:String;
- public var senderText:String;
-
- public var translatedText:String;
-
- public var translated:Boolean = false;
-
- public var translatedColor:uint;
+ public var message:String;
// Stores the time (millis) when the sender sent the message.
public var fromTime:Number;
@@ -46,7 +30,7 @@ package org.bigbluebutton.lib.chat.models {
public function toString():String {
var result:String;
// Remember to localize this later
- result = "Chat message " + name + " said " + stripTags(translatedText) + " at " + time;
+ result = "Chat message " + name + " said " + stripTags(message) + " at " + time;
return result;
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessageVO.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessageVO.as
old mode 100644
new mode 100755
index 175ea3faf9..79f46c0d1d
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessageVO.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/ChatMessageVO.as
@@ -1,11 +1,8 @@
package org.bigbluebutton.lib.chat.models {
public class ChatMessageVO {
- // The type of chat (PUBLIC or PRIVATE)
- public var chatType:String;
-
// The sender
- public var fromUserID:String;
+ public var fromUserId:String;
public var fromUsername:String;
@@ -18,10 +15,8 @@ package org.bigbluebutton.lib.chat.models {
// sent. This is used by the receiver to convert to locale time.
public var fromTimezoneOffset:Number;
- public var fromLang:String;
-
// The receiver.
- public var toUserID:String = "public_chat_userid";
+ public var toUserId:String = "public_chat_userid";
public var toUsername:String = "public_chat_username";
@@ -29,15 +24,13 @@ package org.bigbluebutton.lib.chat.models {
public function toObj():Object {
var m:Object = new Object();
- m.chatType = chatType;
- m.fromUserID = fromUserID;
+ m.fromUserId = fromUserId;
m.fromUsername = fromUsername;
m.fromColor = fromColor;
m.fromTime = fromTime;
m.fromTimezoneOffset = fromTimezoneOffset;
- m.fromLang = fromLang;
m.message = message;
- m.toUserID = toUserID;
+ m.toUserId = toUserId;
m.toUsername = toUsername;
return m;
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/Conversation.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/Conversation.as
old mode 100644
new mode 100755
index dec2cd4f72..11db147edd
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/Conversation.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/models/Conversation.as
@@ -30,14 +30,10 @@ package org.bigbluebutton.lib.chat.models {
cm.lastSenderId = getLastSender();
cm.lastTime = getLastTime();
}
- cm.senderId = msg.fromUserID;
- cm.senderLanguage = msg.fromLang;
- cm.receiverLanguage = ChatUtil.getUserLang();
- cm.translatedText = msg.message;
- cm.senderText = msg.message;
+ cm.senderId = msg.fromUserId;
cm.name = msg.fromUsername;
cm.senderColor = uint(msg.fromColor);
- cm.translatedColor = uint(msg.fromColor);
+ cm.message = msg.message;
cm.fromTime = msg.fromTime;
cm.fromTimezoneOffset = msg.fromTimezoneOffset;
var sentTime:Date = new Date();
@@ -61,7 +57,7 @@ package org.bigbluebutton.lib.chat.models {
var allText:String = "";
for (var i:int = 0; i < messages.length; i++) {
var item:ChatMessage = messages.getItemAt(i) as ChatMessage;
- allText += "\n" + item.name + " - " + item.time + " : " + item.translatedText;
+ allText += "\n" + item.name + " - " + item.time + " : " + item.message;
}
return allText;
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageReceiver.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageReceiver.as
old mode 100644
new mode 100755
index 406626273a..f94f01aef4
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageReceiver.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageReceiver.as
@@ -5,77 +5,89 @@ package org.bigbluebutton.lib.chat.services {
import org.bigbluebutton.lib.chat.models.ChatMessageVO;
import org.bigbluebutton.lib.chat.models.IChatMessagesSession;
import org.bigbluebutton.lib.common.models.IMessageListener;
- import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IUserSession;
public class ChatMessageReceiver implements IMessageListener {
- public var userSession:IUserSession;
+ private const LOG:String = "ChatMessageReceiver::";
- public var chatMessagesSession:IChatMessagesSession;
+ private var userSession:IUserSession;
- public function ChatMessageReceiver(userSession:IUserSession, chatMessagesSession:IChatMessagesSession) {
+ private var conferenceParameters:IConferenceParameters;
+
+ private var chatMessagesSession:IChatMessagesSession;
+
+ public function ChatMessageReceiver(userSession:IUserSession, conferenceParameters:IConferenceParameters, chatMessagesSession:IChatMessagesSession) {
this.userSession = userSession;
+ this.conferenceParameters = conferenceParameters;
this.chatMessagesSession = chatMessagesSession;
}
public function onMessage(messageName:String, message:Object):void {
switch (messageName) {
- case "ChatReceivePublicMessageCommand":
- handleChatReceivePublicMessageCommand(message);
+ case "GetChatHistoryRespMsg":
+ handleGetChatHistoryRespMsg(message);
break;
- case "ChatReceivePrivateMessageCommand":
- handleChatReceivePrivateMessageCommand(message);
+ case "SendPublicMessageEvtMsg":
+ handleSendPublicMessageEvtMsg(message);
break;
- case "ChatRequestMessageHistoryReply":
- handleChatRequestMessageHistoryReply(message);
+ case "SendPrivateMessageEvtMsg":
+ handleSendPrivateMessageEvtMsg(message);
+ break;
+ case "ClearPublicChatHistoryEvtMsg":
+ handleClearPublicChatHistoryEvtMsg(message);
break;
default:
// LogUtil.warn("Cannot handle message [" + messageName + "]");
}
}
- private function handleChatRequestMessageHistoryReply(message:Object):void {
- var messages:Array = JSON.parse(message.msg as String) as Array;
+ private function handleGetChatHistoryRespMsg(msg:Object):void {
+ trace(LOG + "Received [GetChatHistoryRespMsg] from server.");
+ var messages:Array = msg.body.history as Array;
var msgCount:Number = messages.length;
+
chatMessagesSession.publicConversation.messages = new ArrayCollection();
chatMessagesSession.publicConversation.newMessages = 0; //resetNewMessages();
for (var i:int = 0; i < msgCount; i++) {
- handleChatReceivePublicMessageCommand(messages[i]);
+ var cm:ChatMessageVO = processIncomingChatMessage(messages[i]);
+ chatMessagesSession.newPublicMessage(cm);
}
userSession.loadedMessageHistorySignal.dispatch();
}
- private function handleChatReceivePublicMessageCommand(message:Object):void {
- trace("Handling public chat message [" + message.message + "]");
- var msg:ChatMessageVO = new ChatMessageVO();
- msg.chatType = message.chatType;
- msg.fromUserID = message.fromUserID;
- msg.fromUsername = message.fromUsername;
- msg.fromColor = message.fromColor;
- msg.fromLang = message.fromLang;
- msg.fromTime = message.fromTime;
- msg.fromTimezoneOffset = message.fromTimezoneOffset;
- msg.toUserID = message.toUserID;
- msg.toUsername = message.toUsername;
- msg.message = message.message;
- chatMessagesSession.newPublicMessage(msg);
+ private function handleSendPublicMessageEvtMsg(msg:Object):void {
+ trace(LOG + "Received [SendPublicMessageEvtMsg] from server.");
+ var cm:ChatMessageVO = processIncomingChatMessage(msg.body.message);
+
+ chatMessagesSession.newPublicMessage(cm);
}
- private function handleChatReceivePrivateMessageCommand(message:Object):void {
- trace("Handling private chat message");
+ private function handleSendPrivateMessageEvtMsg(msg:Object):void {
+ trace(LOG + "Received [SendPrivateMessageEvtMsg] from server.");
+ var cm:ChatMessageVO = processIncomingChatMessage(msg.body.message);
+
+ var userId:String = (cm.fromUserId == userSession.userId ? cm.toUserId : cm.fromUserId);
+ var userName:String = (cm.fromUserId == userSession.userId ? cm.toUsername : cm.fromUsername);
+ chatMessagesSession.newPrivateMessage(userId, userName, cm);
+ }
+
+ private function handleClearPublicChatHistoryEvtMsg(message:Object):void {
+ trace(LOG + "Received [ClearPublicChatHistoryEvtMsg] from server.");
+ trace("ClearPublicChatHistoryEvtMsg isn't being handled yet");
+ }
+
+ private function processIncomingChatMessage(rawMessage:Object):ChatMessageVO {
var msg:ChatMessageVO = new ChatMessageVO();
- msg.chatType = message.chatType;
- msg.fromUserID = message.fromUserID;
- msg.fromUsername = message.fromUsername;
- msg.fromColor = message.fromColor;
- msg.fromLang = message.fromLang;
- msg.fromTime = message.fromTime;
- msg.fromTimezoneOffset = message.fromTimezoneOffset;
- msg.toUserID = message.toUserID;
- msg.toUsername = message.toUsername;
- msg.message = message.message;
- var userId:String = (msg.fromUserID == userSession.userId ? msg.toUserID : msg.fromUserID);
- var userName:String = (msg.fromUserID == userSession.userId ? msg.toUsername : msg.fromUsername);
- chatMessagesSession.newPrivateMessage(userId, userName, msg);
+ msg.fromUserId = rawMessage.fromUserId;
+ msg.fromUsername = rawMessage.fromUsername;
+ msg.fromColor = rawMessage.fromColor;
+ msg.fromTime = rawMessage.fromTime;
+ msg.fromTimezoneOffset = rawMessage.fromTimezoneOffset;
+ msg.toUserId = rawMessage.toUserId;
+ msg.toUsername = rawMessage.toUsername;
+ msg.message = rawMessage.message;
+ return msg;
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageSender.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageSender.as
old mode 100644
new mode 100755
index 72d340af02..42a4b72a6a
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageSender.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageSender.as
@@ -1,63 +1,72 @@
package org.bigbluebutton.lib.chat.services {
import org.bigbluebutton.lib.chat.models.ChatMessageVO;
+ import org.bigbluebutton.lib.main.models.IConferenceParameters;
import org.bigbluebutton.lib.main.models.IUserSession;
- import org.osflash.signals.ISignal;
- import org.osflash.signals.Signal;
+ import org.osflash.signals.ISignal;
public class ChatMessageSender {
private const LOG:String = "ChatMessageSender::";
- public var userSession:IUserSession;
+ private var userSession:IUserSession;
+
+ private var conferenceParameters:IConferenceParameters;
private var successSendingMessageSignal:ISignal;
private var failureSendingMessageSignal:ISignal;
- public function ChatMessageSender(userSession:IUserSession, successSendMessageSignal:ISignal, failureSendingMessageSignal:ISignal) {
+ public function ChatMessageSender(userSession:IUserSession, conferenceParameters:IConferenceParameters, successSendMessageSignal:ISignal, failureSendingMessageSignal:ISignal) {
this.userSession = userSession;
+ this.conferenceParameters = conferenceParameters;
this.successSendingMessageSignal = successSendMessageSignal;
this.failureSendingMessageSignal = failureSendingMessageSignal;
}
public function getPublicChatMessages():void {
- trace(LOG + "Sending [chat.getPublicMessages] to server.");
- userSession.mainConnection.sendMessage("chat.sendPublicChatHistory", function(result:String):void { // On successful result
- publicChatMessagesOnSuccessSignal.dispatch(result);
- }, function(status:String):void { // status - On error occurred
- publicChatMessagesOnFailureSignal.dispatch(status);
- });
+ trace(LOG + "Sending [GetChatHistoryReqMsg] to server.");
+ var message:Object = {
+ header: {name: "GetChatHistoryReqMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {}
+ };
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
- public function sendPublicMessage(message:ChatMessageVO):void {
- trace(LOG + "Sending [chat.sendPublicMessage] to server. [" + message.message + "]");
- userSession.mainConnection.sendMessage("chat.sendPublicMessage", function(result:String):void { // On successful result
- successSendingMessageSignal.dispatch(result);
- }, function(status:String):void { // status - On error occurred
- failureSendingMessageSignal.dispatch(status);
- }, message.toObj());
+ public function sendPublicMessage(cm:ChatMessageVO):void {
+ trace(LOG + "Sending [SendPublicMessagePubMsg] to server. [" + cm + "]");
+ var message:Object = {
+ header: {name: "SendPublicMessagePubMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {message: cm}
+ };
+ userSession.mainConnection.sendMessage2x(sendChatSuccessResponse, sendChatFailureResponse, message);
}
- public function sendPrivateMessage(message:ChatMessageVO):void {
- trace(LOG + "Sending [chat.sendPrivateMessage] to server.");
- trace(LOG + "Sending fromUserID [" + message.fromUserID + "] to toUserID [" + message.toUserID + "]");
- userSession.mainConnection.sendMessage("chat.sendPrivateMessage", function(result:String):void { // On successful result
- successSendingMessageSignal.dispatch(result);
- }, function(status:String):void { // status - On error occurred
- failureSendingMessageSignal.dispatch(status);
- }, message.toObj());
+ public function sendPrivateMessage(cm:ChatMessageVO):void {
+ trace(LOG + "Sending [SendPrivateMessagePubMsg] to server.");
+ trace(LOG + "Sending fromUserID [" + cm.fromUserId + "] to toUserID [" + cm.toUserId + "]");
+ var message:Object = {
+ header: {name: "SendPrivateMessagePubMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {message: cm}
+ };
+ userSession.mainConnection.sendMessage2x(sendChatSuccessResponse, sendChatFailureResponse, message);
}
- private var _publicChatMessagesOnSuccessSignal:Signal = new Signal();
+ // The default callbacks of userSession.mainconnection.sendMessage
+ private function defaultSuccessResponse(result:String):void {
+ trace(result);
+ };
- private var _publicChatMessagesOnFailureSignal:Signal = new Signal();
+ private function defaultFailureResponse(status:String):void {
+ trace(status);
+ };
- public function get publicChatMessagesOnSuccessSignal():Signal {
- return _publicChatMessagesOnSuccessSignal;
- }
+ // The callbacks when sending chat messages
+ private function sendChatSuccessResponse(result:String):void {
+ successSendingMessageSignal.dispatch(result);
+ };
- public function get publicChatMessagesOnFailureSignal():Signal {
- return _publicChatMessagesOnFailureSignal;
- }
+ private function sendChatFailureResponse(status:String):void {
+ failureSendingMessageSignal.dispatch(status);
+ };
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageService.as
old mode 100644
new mode 100755
index e45f34cbb0..a7cfc06611
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageService.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/services/ChatMessageService.as
@@ -38,8 +38,8 @@ package org.bigbluebutton.lib.chat.services {
}
public function setupMessageSenderReceiver():void {
- chatMessageSender = new ChatMessageSender(userSession, _sendMessageOnSuccessSignal, _sendMessageOnFailureSignal);
- chatMessageReceiver = new ChatMessageReceiver(userSession, chatMessagesSession);
+ chatMessageSender = new ChatMessageSender(userSession, conferenceParameters, _sendMessageOnSuccessSignal, _sendMessageOnFailureSignal);
+ chatMessageReceiver = new ChatMessageReceiver(userSession, conferenceParameters, chatMessagesSession);
userSession.mainConnection.addMessageListener(chatMessageReceiver);
}
@@ -64,18 +64,16 @@ package org.bigbluebutton.lib.chat.services {
var welcome:String = conferenceParameters.welcome;
if (welcome != "") {
var msg:ChatMessageVO = new ChatMessageVO();
- msg.chatType = "PUBLIC_CHAT"
- msg.fromUserID = " ";
+ msg.fromUserId = " ";
msg.fromUsername = " ";
msg.fromColor = "86187";
- msg.fromLang = "en";
msg.fromTime = new Date().time;
msg.fromTimezoneOffset = new Date().timezoneOffset;
- msg.toUserID = " ";
+ msg.toUserId = " ";
msg.toUsername = " ";
msg.message = welcome;
// imitate new public message being sent
- chatMessageReceiver.onMessage("ChatReceivePublicMessageCommand", msg);
+ chatMessagesSession.newPublicMessage(msg);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatItemRenderer.mxml b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatItemRenderer.mxml
old mode 100644
new mode 100755
index e7f675a71c..df039609cd
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatItemRenderer.mxml
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatItemRenderer.mxml
@@ -29,10 +29,10 @@
var m:ChatMessage = obj as ChatMessage;
if (m) {
time.text = m.time
- if (!isHTMLString(m.senderText)) {
- message.text = m.senderText;
+ if (!isHTMLString(m.message)) {
+ message.text = m.message;
} else {
- message.textFlow = TextConverter.importToFlow(m.senderText, TextConverter.TEXT_FIELD_HTML_FORMAT);
+ message.textFlow = TextConverter.importToFlow(m.message, TextConverter.TEXT_FIELD_HTML_FORMAT);
}
var sameUser:Boolean = (m.lastSenderId == m.senderId);
var sameTime:Boolean = (m.lastTime == m.time);
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as
old mode 100644
new mode 100755
index cffefd89b0..bfedf95554
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as
@@ -9,8 +9,9 @@ package org.bigbluebutton.lib.chat.views {
import org.bigbluebutton.lib.chat.models.Conversation;
import org.bigbluebutton.lib.chat.models.IChatMessagesSession;
import org.bigbluebutton.lib.chat.services.IChatMessageService;
- import org.bigbluebutton.lib.main.models.IUserSession;
- import org.bigbluebutton.lib.user.models.User;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
+ import org.bigbluebutton.lib.user.models.User2x;
+ import org.bigbluebutton.lib.user.models.UserChangeEnum;
import robotlegs.bender.bundles.mvcs.Mediator;
@@ -26,17 +27,16 @@ package org.bigbluebutton.lib.chat.views {
public var chatMessagesSession:IChatMessagesSession;
[Inject]
- public var userSession:IUserSession;
+ public var meetingData:IMeetingData;
protected var _publicChat:Boolean = true;
- protected var _user:User;
+ protected var _user:User2x;
override public function initialize():void {
chatMessageService.sendMessageOnSuccessSignal.add(onSendSuccess);
chatMessageService.sendMessageOnFailureSignal.add(onSendFailure);
- userSession.userList.userRemovedSignal.add(userRemoved);
- userSession.userList.userAddedSignal.add(userAdded);
+ meetingData.users.userChangeSignal.add(onUserChange);
view.textInput.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
view.sendButton.addEventListener(MouseEvent.CLICK, sendButtonClickHandler);
@@ -56,12 +56,23 @@ package org.bigbluebutton.lib.chat.views {
view.textInput.enabled = true;
}
+ private function onUserChange(user:User2x, prop:int):void {
+ switch (prop) {
+ case UserChangeEnum.JOIN:
+ userAdded(user);
+ break;
+ case UserChangeEnum.LEAVE:
+ userRemoved(user);
+ break;
+ }
+ }
+
/**
* When user left the conference, add '[Offline]' to the username
* and disable text input
*/
- protected function userRemoved(userID:String):void {
- if (view != null && _user && _user.userId == userID) {
+ protected function userRemoved(user:User2x):void {
+ if (view != null && _user && _user.intId == user.intId) {
view.textInput.enabled = false;
}
}
@@ -70,8 +81,8 @@ package org.bigbluebutton.lib.chat.views {
* When user returned(refreshed the page) to the conference, remove '[Offline]' from the username
* and enable text input
*/
- protected function userAdded(newuser:User):void {
- if ((view != null) && (_user != null) && (_user.userId == newuser.userId)) {
+ protected function userAdded(newuser:User2x):void {
+ if ((view != null) && (_user != null) && (_user.intId == newuser.intId)) {
view.textInput.enabled = true;
}
}
@@ -91,20 +102,17 @@ package org.bigbluebutton.lib.chat.views {
var currentDate:Date = new Date();
//TODO get info from the right source
var m:ChatMessageVO = new ChatMessageVO();
- m.fromUserID = userSession.userId;
- m.fromUsername = userSession.userList.getUser(userSession.userId).name;
+ m.fromUserId = meetingData.users.me.intId;
+ m.fromUsername = meetingData.users.me.name;
m.fromColor = "0";
m.fromTime = currentDate.time;
m.fromTimezoneOffset = currentDate.timezoneOffset;
- m.fromLang = "en";
m.message = message;
- m.toUserID = _publicChat ? "public_chat_userid" : _user.userId;
+ m.toUserId = _publicChat ? "public_chat_userid" : _user.intId;
m.toUsername = _publicChat ? "public_chat_username" : _user.name;
if (_publicChat) {
- m.chatType = "PUBLIC_CHAT";
chatMessageService.sendPublicMessage(m);
} else {
- m.chatType = "PRIVATE_CHAT";
chatMessageService.sendPrivateMessage(m);
}
}
@@ -113,8 +121,7 @@ package org.bigbluebutton.lib.chat.views {
override public function destroy():void {
chatMessageService.sendMessageOnSuccessSignal.remove(onSendSuccess);
chatMessageService.sendMessageOnFailureSignal.remove(onSendFailure);
- userSession.userList.userRemovedSignal.remove(userRemoved);
- userSession.userList.userAddedSignal.remove(userAdded);
+ meetingData.users.userChangeSignal.remove(onUserChange);
view.textInput.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
view.sendButton.removeEventListener(MouseEvent.CLICK, sendButtonClickHandler);
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/BaseConnection.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/BaseConnection.as
index b44844f934..8991d9a2e9 100755
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/BaseConnection.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/BaseConnection.as
@@ -58,12 +58,7 @@ package org.bigbluebutton.lib.common.services {
public function connect(uri:String, ... parameters):void {
_uri = uri;
- // The connect call needs to be done properly. At the moment lock settings
- // are not implemented in the mobile client, so parameters[7] and parameters[8]
- // are "faked" in order to connect (without them, I couldn't get the connect
- // call to work...) - Adam
- parameters[7] = false;
- parameters[8] = false;
+
try {
trace("Trying to connect to [" + uri + "] ...");
trace("parameters: " + parameters);
@@ -156,21 +151,26 @@ package org.bigbluebutton.lib.common.services {
sendConnectionFailedSignal(ConnectionFailedEvent.UNKNOWN_REASON);
}
- public function sendMessage(service:String, onSuccess:Function, onFailure:Function, message:Object = null):void {
- trace(LOG + "SENDING MESSAGE: [" + service + "]");
- var responder:Responder = new Responder(function(result:Object):void { // On successful result
- onSuccess("SUCCESSFULLY SENT: [" + service + "].");
- }, function(status:Object):void { // status - On error occurred
- var errorReason:String = "FAILED TO SEND: [" + service + "]:";
- for (var x:Object in status) {
- errorReason += "\n - " + x + " : " + status[x];
+ public function sendMessage2x(onSuccess:Function, onFailure:Function, message:Object):void {
+
+ var service: String = "onMessageFromClient";
+
+ var responder:Responder = new Responder(
+ function(result:Object):void { // On successful result
+ onSuccess("Successfully sent [" + service + "].");
+ },
+ function(status:Object):void { // status - On error occurred
+ var errorReason:String = "Failed to send [" + service + "]:\n";
+ for (var x:Object in status) {
+ errorReason += "\t" + x + " : " + status[x];
+ }
}
- onFailure(errorReason);
- });
+ );
+
if (message == null) {
_netConnection.call(service, responder);
} else {
- _netConnection.call(service, responder, message);
+ _netConnection.call(service, responder, JSON.stringify(message));
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/DefaultConnectionCallback.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/DefaultConnectionCallback.as
old mode 100644
new mode 100755
index 1080c842cc..444dfacd2d
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/DefaultConnectionCallback.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/DefaultConnectionCallback.as
@@ -28,6 +28,20 @@ package org.bigbluebutton.lib.common.services {
notifyListeners(messageName, result);
}
+ public function onMessageFromServer2x(messageName:String, msg:String):void {
+ if (messageName != "SendCursorPositionEvtMsg" && messageName != "UpdateBreakoutUsersEvtMsg" && messageName != "BreakoutRoomsTimeRemainingUpdateEvtMsg" && messageName != "UserTalkingVoiceEvtMsg" && messageName != "MeetingTimeRemainingUpdateEvtMsg") {
+ trace("onMessageFromServer2x - " + msg);
+ }
+
+ var map:Object = JSON.parse(msg);
+ var header:Object = map.header as Object;
+ var body:Object = map.body as Object;
+
+ var msgName:String = header.name
+
+ notifyListeners(messageName, map);
+ }
+
public function addMessageListener(listener:IMessageListener):void {
_messageListeners.push(listener);
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/IBaseConnection.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/IBaseConnection.as
old mode 100644
new mode 100755
index 45eb696e2e..3e3df8ece2
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/IBaseConnection.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/services/IBaseConnection.as
@@ -8,7 +8,7 @@ package org.bigbluebutton.lib.common.services {
function get connection():NetConnection;
function connect(uri:String, ... parameters):void;
function disconnect(onUserCommand:Boolean):void;
- function sendMessage(service:String, onSuccess:Function, onFailure:Function, message:Object = null):void;
+ function sendMessage2x(onSuccess:Function, onFailure:Function, message:Object):void;
function init(callback:DefaultConnectionCallback):void;
function get connectionSuccessSignal():ISignal;
function get connectionFailureSignal():ISignal;
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/AuthenticationSignal.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/AuthenticationSignal.as
deleted file mode 100644
index c0411541c8..0000000000
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/AuthenticationSignal.as
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.bigbluebutton.lib.main.commands {
-
- import org.osflash.signals.Signal;
-
- public class AuthenticationSignal extends Signal {
- public function AuthenticationSignal() {
- super(String);
- }
- }
-}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ClearUserStatusCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ClearUserStatusCommand.as
old mode 100644
new mode 100755
index 071ce7a87b..5fdaed8bbe
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ClearUserStatusCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ClearUserStatusCommand.as
@@ -18,11 +18,11 @@ package org.bigbluebutton.lib.main.commands {
public var userService:IUsersService;
[Inject]
- public var userID:String;
+ public var userId:String;
override public function execute():void {
trace("ClearUserStatusCommand.execute() - clear status");
- userService.clearUserStatus(userID);
+ userService.clearUserStatus(userId);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ConnectCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ConnectCommand.as
index c0b0736abd..83b1cde9a8 100755
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ConnectCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/ConnectCommand.as
@@ -1,11 +1,17 @@
package org.bigbluebutton.lib.main.commands {
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
+
import org.bigbluebutton.lib.chat.services.IChatMessageService;
import org.bigbluebutton.lib.deskshare.services.IDeskshareConnection;
import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
import org.bigbluebutton.lib.main.models.IUserSession;
import org.bigbluebutton.lib.main.services.IBigBlueButtonConnection;
+ import org.bigbluebutton.lib.main.utils.DisconnectEnum;
import org.bigbluebutton.lib.presentation.services.IPresentationService;
+ import org.bigbluebutton.lib.user.models.User2x;
import org.bigbluebutton.lib.user.services.IUsersService;
import org.bigbluebutton.lib.video.commands.ShareCameraSignal;
import org.bigbluebutton.lib.video.services.IVideoConnection;
@@ -14,7 +20,7 @@ package org.bigbluebutton.lib.main.commands {
import org.bigbluebutton.lib.voice.services.IVoiceConnection;
import org.bigbluebutton.lib.whiteboard.services.IWhiteboardService;
- import robotlegs.bender.bundles.mvcs.Command;
+ import robotlegs.bender.bundles.mvcs.Command;
public class ConnectCommand extends Command {
private const LOG:String = "ConnectCommand::";
@@ -22,6 +28,9 @@ package org.bigbluebutton.lib.main.commands {
[Inject]
public var userSession:IUserSession;
+ [Inject]
+ public var meetingData:IMeetingData;
+
[Inject]
public var conferenceParameters:IConferenceParameters;
@@ -67,6 +76,8 @@ package org.bigbluebutton.lib.main.commands {
[Inject]
public var shareCameraSignal:ShareCameraSignal;
+ private var authTokenTimeout:Timer;
+
override public function execute():void {
loadConfigOptions();
connection.uri = uri;
@@ -81,14 +92,11 @@ package org.bigbluebutton.lib.main.commands {
userSession.skipCamSettingsCheck = (userSession.config.getConfigFor("VideoconfModule").@skipCamSettingsCheck.toString().toUpperCase() == "TRUE") ? true : false;
}
-
-
private function connectionSuccess():void {
trace(LOG + "successConnected()");
userSession.mainConnection = connection;
chatService.setupMessageSenderReceiver();
whiteboardService.setupMessageSenderReceiver();
- userSession.userId = connection.userId;
// Set up users message sender in order to send the "joinMeeting" message:
usersService.setupMessageSenderReceiver();
//send the join meeting message, then wait for the response
@@ -97,17 +105,30 @@ package org.bigbluebutton.lib.main.commands {
usersService.validateToken();
connection.connectionSuccessSignal.remove(connectionSuccess);
connection.connectionFailureSignal.remove(connectionFailure);
+
+ authTokenTimeout = new Timer(10000, 1);
+ authTokenTimeout.addEventListener(TimerEvent.TIMER, onAuthTokenTimeout);
+ authTokenTimeout.start();
}
private function onAuthTokenReply(tokenValid:Boolean):void {
userSession.authTokenSignal.remove(onAuthTokenReply);
+ authTokenTimeout.stop();
+
if (tokenValid) {
joiningMeetingSuccess();
} else {
- // TODO disconnect
+ joiningMeetingFailure(DisconnectEnum.AUTH_TOKEN_INVALID);
}
}
+ private function onAuthTokenTimeout(e:TimerEvent):void {
+ trace(LOG + "onAuthTokenTimeout - timeout hit");
+ userSession.authTokenSignal.remove(onAuthTokenReply);
+
+ joiningMeetingFailure(DisconnectEnum.AUTH_TOKEN_TIMEOUT);
+ }
+
private function joiningMeetingSuccess():void {
// Set up remaining message sender and receivers:
presentationService.setupMessageSenderReceiver();
@@ -142,22 +163,26 @@ package org.bigbluebutton.lib.main.commands {
chatService.sendWelcomeMessage();
chatService.getPublicChatMessages();
presentationService.getPresentationInfo();
- userSession.userList.allUsersAddedSignal.add(successUsersAdded);
+ meetingData.users.userChangeSignal.add(successUsersAdded);
+ usersService.joinMeeting();
usersService.queryForParticipants();
usersService.queryForRecordingStatus();
userSession.successJoiningMeetingSignal.remove(joiningMeetingSuccess);
userSession.failureJoiningMeetingSignal.remove(joiningMeetingFailure);
- //usersService.getRoomLockState();
+ usersService.getRoomLockState();
}
- private function joiningMeetingFailure():void {
+ // reason is one of the DisconnectEnum types
+ private function joiningMeetingFailure(reason:int):void {
trace(LOG + "joiningMeetingFailure() -- Failed to join the meeting!!!");
userSession.successJoiningMeetingSignal.remove(joiningMeetingSuccess);
userSession.failureJoiningMeetingSignal.remove(joiningMeetingFailure);
+
+ disconnectUserSignal.dispatch(reason);
}
- protected function successUsersAdded():void {
- userSession.userList.allUsersAddedSignal.remove(successUsersAdded);
+ protected function successUsersAdded(user:User2x, property:int):void {
+ meetingData.users.userChangeSignal.remove(successUsersAdded);
connectingFinishedSignal.dispatch();
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/EmojiCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/EmojiCommand.as
old mode 100644
new mode 100755
index ae736d8c1a..9ef6622cb6
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/EmojiCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/EmojiCommand.as
@@ -1,9 +1,10 @@
package org.bigbluebutton.lib.main.commands {
import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.user.models.EmojiStatus;
import org.bigbluebutton.lib.user.services.IUsersService;
- import robotlegs.bender.bundles.mvcs.Command;
+ import robotlegs.bender.bundles.mvcs.Command;
public class EmojiCommand extends Command {
@@ -17,8 +18,12 @@ package org.bigbluebutton.lib.main.commands {
public var status:String;
override public function execute():void {
- trace("EmojiCommand.execute() - change emoji statu");
- userService.emojiStatus(status);
+ trace("EmojiCommand.execute() - change emoji status");
+ if (EmojiStatus.STATUS_ARRAY.indexOf(status) != -1) {
+ userService.emojiStatus(status);
+ } else {
+ trace("Emoji status ["+status+"] not supported");
+ }
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/GoToSlideCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/GoToSlideCommand.as
old mode 100644
new mode 100755
index 8468f7c3b7..6b615ea75e
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/GoToSlideCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/GoToSlideCommand.as
@@ -9,11 +9,14 @@ package org.bigbluebutton.lib.main.commands {
public var presentationService:IPresentationService;
[Inject]
- public var slide:String;
+ public var presentationId:String;
+
+ [Inject]
+ public var pageId:String;
override public function execute():void {
trace("GoToSlideCommand.execute()");
- presentationService.gotoSlide(slide);
+ presentationService.setCurrentPage(presentationId, pageId);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/LockUserCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/LockUserCommand.as
old mode 100644
new mode 100755
index 727cc4f9e5..cf3f74b93a
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/LockUserCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/LockUserCommand.as
@@ -1,26 +1,22 @@
package org.bigbluebutton.lib.main.commands {
- import org.bigbluebutton.lib.main.models.IUserSession;
import org.bigbluebutton.lib.user.services.IUsersService;
import robotlegs.bender.bundles.mvcs.Command;
public class LockUserCommand extends Command {
- [Inject]
- public var userSession:IUserSession;
-
[Inject]
public var userService:IUsersService;
[Inject]
- public var userID:String;
+ public var userId:String;
[Inject]
public var lock:Boolean;
override public function execute():void {
- userService.setUserLock(userID, lock);
+ userService.setUserLock(userId, lock);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterCommand.as
old mode 100644
new mode 100755
index 67de8a5d4c..70a6e265cc
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterCommand.as
@@ -1,28 +1,21 @@
package org.bigbluebutton.lib.main.commands {
- import org.bigbluebutton.lib.main.models.IUserSession;
- import org.bigbluebutton.lib.user.models.User;
+ import org.bigbluebutton.lib.user.models.User2x;
import org.bigbluebutton.lib.user.services.IUsersService;
- import robotlegs.bender.bundles.mvcs.Command;
+ import robotlegs.bender.bundles.mvcs.Command;
public class PresenterCommand extends Command {
- [Inject]
- public var userSession:IUserSession;
-
[Inject]
public var userService:IUsersService;
[Inject]
- public var user:User;
-
- [Inject]
- public var userMeID:String;
+ public var user:User2x;
override public function execute():void {
trace("PresenterCommand.execute() -assign presenter");
- userService.assignPresenter(user.userId, user.name, userMeID);
+ userService.assignPresenter(user.intId, user.name);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterSignal.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterSignal.as
old mode 100644
new mode 100755
index 898e19975e..4429b9abfd
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterSignal.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/commands/PresenterSignal.as
@@ -1,14 +1,14 @@
package org.bigbluebutton.lib.main.commands {
- import org.bigbluebutton.lib.user.models.User;
- import org.osflash.signals.Signal;
+ import org.bigbluebutton.lib.user.models.User2x;
+ import org.osflash.signals.Signal;
public class PresenterSignal extends Signal {
public function PresenterSignal() {
/**
- * @1 user, userMe.userID
+ * @1 user
*/
- super(User, String);
+ super(User2x);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/ConferenceParameters.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/ConferenceParameters.as
old mode 100644
new mode 100755
index cafdacf06b..05fcfa256d
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/ConferenceParameters.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/ConferenceParameters.as
@@ -72,11 +72,6 @@ package org.bigbluebutton.lib.main.models {
*/
private var _connection:NetConnection;
- /**
- * The unique userid internal to bbb-client.
- */
- private var _userid:String;
-
private var _record:Boolean;
private var _authToken:String;
@@ -224,15 +219,6 @@ package org.bigbluebutton.lib.main.models {
_changedSignal.dispatch();
}
- public function get userid():String {
- return _userid;
- }
-
- public function set userid(userid:String):void {
- _userid = userid;
- _changedSignal.dispatch();
- }
-
public function get record():Boolean {
return _record;
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IConferenceParameters.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IConferenceParameters.as
old mode 100644
new mode 100755
index 7d0d758569..531adeedeb
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IConferenceParameters.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IConferenceParameters.as
@@ -33,8 +33,6 @@ package org.bigbluebutton.lib.main.models {
function set logoutUrl(logoutUrl:String):void;
function get connection():NetConnection;
function set connection(connection:NetConnection):void;
- function get userid():String;
- function set userid(userid:String):void;
function get record():Boolean;
function set record(record:Boolean):void;
function get authToken():String;
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IMeetingData.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IMeetingData.as
new file mode 100755
index 0000000000..bdf7a57d32
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/IMeetingData.as
@@ -0,0 +1,8 @@
+package org.bigbluebutton.lib.main.models {
+ import org.bigbluebutton.lib.user.models.Users2x;
+
+ public interface IMeetingData {
+ function get users():Users2x;
+ function get meetingStatus():MeetingStatus;
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/LockSettings2x.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/LockSettings2x.as
new file mode 100755
index 0000000000..c76b02b575
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/LockSettings2x.as
@@ -0,0 +1,32 @@
+package org.bigbluebutton.lib.main.models {
+
+ public class LockSettings2x {
+ public var disableCam:Boolean;
+
+ public var disableMic:Boolean;
+
+ public var disablePrivChat:Boolean;
+
+ public var disablePubChat:Boolean;
+
+ public var lockedLayout:Boolean;
+
+ public var lockOnJoin:Boolean;
+
+ public var lockOnJoinConfigurable:Boolean;
+
+ public function LockSettings2x() {
+ disableCam = false;
+ disableMic = false;
+ disablePrivChat = false;
+ disablePubChat = false;
+ lockedLayout = false;
+ lockOnJoin = true;
+ lockOnJoinConfigurable = false;
+ }
+
+ public function isRoomLocked():Boolean {
+ return disableCam || disableMic || disablePrivChat || disablePubChat || lockedLayout;
+ }
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/MeetingData.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/MeetingData.as
new file mode 100755
index 0000000000..c06cbf068e
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/MeetingData.as
@@ -0,0 +1,28 @@
+package org.bigbluebutton.lib.main.models {
+ import org.bigbluebutton.lib.user.models.Users2x;
+
+ public class MeetingData implements IMeetingData {
+ private var _users:Users2x = new Users2x();
+
+ public function get users():Users2x {
+ return _users;
+ }
+
+ //public var webcams: Webcams = new Webcams();
+ //public var voiceUsers: VoiceUsers2x = new VoiceUsers2x();
+ //public var guestsWaiting: GuestsApp = new GuestsApp();
+
+ private var _meetingStatus: MeetingStatus = new MeetingStatus();
+
+ public function get meetingStatus():MeetingStatus {
+ return _meetingStatus;
+ }
+
+ //public var meeting: Meeting = new Meeting();
+ //public var config: Config;
+ //public var sharedNotes: SharedNotes = new SharedNotes();
+
+ //public var breakoutRooms: BreakoutRooms = new BreakoutRooms();
+ //public var whiteboardModel: WhiteboardModel = new WhiteboardModel();
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/MeetingStatus.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/MeetingStatus.as
new file mode 100755
index 0000000000..a565b7ed7f
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/models/MeetingStatus.as
@@ -0,0 +1,27 @@
+package org.bigbluebutton.lib.main.models {
+ import org.osflash.signals.Signal;
+
+ public class MeetingStatus {
+ private var _lockSettings:LockSettings2x = new LockSettings2x();
+
+ private var _lockSettingsChangeSignal:Signal = new Signal();
+
+ public function get lockSettingsChangeSignal():Signal {
+ return _lockSettingsChangeSignal;
+ }
+
+ public function get lockSettings():LockSettings2x {
+ return _lockSettings;
+ }
+
+ //public var isRecording: Boolean = false;
+ //public var isMeetingMuted: Boolean = false;
+ //public var guestPolicy: String = "ASK_MODERATOR";
+ //public var guestPolicySetBy: String = null;
+
+ public function changeLockSettings(newSettings:LockSettings2x):void {
+ _lockSettings = newSettings;
+ _lockSettingsChangeSignal.dispatch(newSettings);
+ }
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/BigBlueButtonConnection.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/BigBlueButtonConnection.as
index 043895d6e6..41a2cf0d1c 100755
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/BigBlueButtonConnection.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/BigBlueButtonConnection.as
@@ -25,8 +25,6 @@ package org.bigbluebutton.lib.main.services {
private var _tried_tunneling:Boolean = false;
- private var _userId:String;
-
[PostConstruct]
public function init():void {
baseConnection.init(this);
@@ -39,19 +37,7 @@ package org.bigbluebutton.lib.main.services {
}
private function onConnectionSuccess():void {
- getMyUserId();
- }
-
- private function getMyUserId():void {
- baseConnection.connection.call("participants.getMyUserId", new Responder(function(result:String):void {
- trace("Success connected: My user ID is [" + result + "]");
- _userId = result;
- connectionSuccessSignal.dispatch();
- }, function(status:Object):void {
- trace("Error occurred");
- trace(ObjectUtil.toString(status));
- connectionFailureSignal.dispatch("Failed to get the userId");
- }));
+ connectionSuccessSignal.dispatch();
}
public function get connectionFailureSignal():ISignal {
@@ -87,8 +73,20 @@ package org.bigbluebutton.lib.main.services {
_conferenceParameters = params;
_tried_tunneling = tunnel;
var uri:String = _applicationURI + "/" + _conferenceParameters.room;
- var lockSettings:Object = {disableCam: false, disableMic: false, disablePrivateChat: false, disablePublicChat: false, lockedLayout: false, lockOnJoin: false, lockOnJoinConfigurable: false};
- var connectParams:Array = [_conferenceParameters.username, _conferenceParameters.role, _conferenceParameters.room, _conferenceParameters.voicebridge, _conferenceParameters.record, _conferenceParameters.externUserID, _conferenceParameters.internalUserID, _conferenceParameters.muteOnStart, lockSettings];
+
+ var username:String = _conferenceParameters.username;
+ var role:String = _conferenceParameters.role;
+ var intMeetingId:String = _conferenceParameters.room;
+ var voiceConf:String = _conferenceParameters.voicebridge;
+ var recorded:Boolean = _conferenceParameters.record;
+ var extUserId:String = _conferenceParameters.externUserID;
+ var intUserId:String = _conferenceParameters.internalUserID;
+ var muteOnStart:Boolean = _conferenceParameters.muteOnStart;
+ var guest:Boolean = false; // false for now because no guest support
+ var authToken:String = _conferenceParameters.authToken;
+
+ var connectParams:Array = [username, role, intMeetingId, voiceConf, recorded, extUserId, intUserId, muteOnStart, guest, authToken];
+
trace("BBB Apps connect: " + connectParams);
baseConnection.connect.apply(null, new Array(uri).concat(connectParams));
}
@@ -97,12 +95,13 @@ package org.bigbluebutton.lib.main.services {
baseConnection.disconnect(onUserCommand);
}
- public function get userId():String {
- return _userId;
+ /**** NEED TO REMOVE THIS BEFORE CONVERSION IS FINISHED ******/
+ public function sendMessage(service:String, onSuccess:Function, onFailure:Function, message:Object = null):void {
+ //baseConnection.sendMessage(service, onSuccess, onFailure, message);
}
- public function sendMessage(service:String, onSuccess:Function, onFailure:Function, message:Object = null):void {
- baseConnection.sendMessage(service, onSuccess, onFailure, message);
+ public function sendMessage2x(onSuccess:Function, onFailure:Function, message:Object):void {
+ baseConnection.sendMessage2x(onSuccess, onFailure, message);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IBigBlueButtonConnection.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IBigBlueButtonConnection.as
old mode 100644
new mode 100755
index 01a16fb503..611cfe57b9
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IBigBlueButtonConnection.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IBigBlueButtonConnection.as
@@ -13,9 +13,9 @@ package org.bigbluebutton.lib.main.services {
function connect(params:IConferenceParameters, tunnel:Boolean = false):void;
function disconnect(logoutOnUserCommand:Boolean):void;
function sendMessage(service:String, onSuccess:Function, onFailure:Function, message:Object = null):void;
+ function sendMessage2x(onSuccess:Function, onFailure:Function, message:Object):void;
function get connectionFailureSignal():ISignal;
function get connectionSuccessSignal():ISignal;
- function get userId():String;
function addMessageListener(listener:IMessageListener):void
function removeMessageListener(listener:IMessageListener):void
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/utils/DisconnectEnum.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/utils/DisconnectEnum.as
old mode 100644
new mode 100755
index 41384016fb..89b7852aa1
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/utils/DisconnectEnum.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/utils/DisconnectEnum.as
@@ -8,5 +8,9 @@ package org.bigbluebutton.lib.main.utils {
public static const CONNECTION_STATUS_USER_LOGGED_OUT:int = 3;
public static const CONNECTION_STATUS_USER_KICKED_OUT:int = 4;
+
+ public static const AUTH_TOKEN_TIMEOUT:int = 5;
+
+ public static const AUTH_TOKEN_INVALID:int = 6;
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/views/TopToolbarMediatorBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/views/TopToolbarMediatorBase.as
index c9eed84135..fc96c772d8 100755
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/views/TopToolbarMediatorBase.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/views/TopToolbarMediatorBase.as
@@ -2,7 +2,7 @@ package org.bigbluebutton.lib.main.views {
import flash.events.MouseEvent;
import org.bigbluebutton.lib.main.models.IConferenceParameters;
- import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
import robotlegs.bender.bundles.mvcs.Mediator;
@@ -12,7 +12,7 @@ package org.bigbluebutton.lib.main.views {
public var view:TopToolbarBase;
[Inject]
- public var userSession:IUserSession;
+ public var meetingData:IMeetingData;
[Inject]
public var conferenceParameters:IConferenceParameters;
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/commands/LoadSlideCommand.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/commands/LoadSlideCommand.as
old mode 100644
new mode 100755
index 6d504cb4cc..83728b309d
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/commands/LoadSlideCommand.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/commands/LoadSlideCommand.as
@@ -25,8 +25,13 @@ package org.bigbluebutton.lib.presentation.commands {
override public function execute():void {
if (slide != null) {
- _loadSlideService = new LoadSlideService(slide);
- whiteboardService.getAnnotationHistory(presentationID, slide.slideNumber);
+ if (!slide.loadRequested) {
+ slide.loadRequested = true;
+ _loadSlideService = new LoadSlideService(slide);
+ whiteboardService.getAnnotationHistory(presentationID, slide.slideNumber);
+ } else {
+ trace("LoadSlideCommand: load request has already been received, ignoring the repeat request");
+ }
} else {
trace("LoadSlideCommand: requested slide is null and cannot be loaded");
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Presentation.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Presentation.as
old mode 100644
new mode 100755
index bf0bdc7620..ae6e9febf4
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Presentation.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Presentation.as
@@ -1,5 +1,7 @@
package org.bigbluebutton.lib.presentation.models {
+ import mx.collections.ArrayCollection;
+
import org.bigbluebutton.lib.whiteboard.models.AnnotationStatus;
import org.bigbluebutton.lib.whiteboard.models.IAnnotation;
import org.osflash.signals.ISignal;
@@ -10,24 +12,27 @@ package org.bigbluebutton.lib.presentation.models {
private var _id:String = "";
- private var _slides:Vector. = new Vector.();
+ private var _slides:ArrayCollection;
private var _changePresentation:Function;
- private var _currentSlideNum:int = -1;
+ private var _currentSlide:Slide;
private var _current:Boolean = false;
+ private var _downloadable:Boolean = false;
+
private var _slideChangeSignal:ISignal = new Signal();
private var _loaded:Boolean = false;
- public function Presentation(fileName:String, id:String, changePresentation:Function, numOfSlides:int, isCurrent:Boolean):void {
+ public function Presentation(fileName:String, id:String, changePresentation:Function, numOfSlides:int, isCurrent:Boolean, downloadable:Boolean):void {
_fileName = fileName;
_id = id;
- _slides = new Vector.(numOfSlides);
+ _slides = new ArrayCollection();
_changePresentation = changePresentation;
_current = isCurrent;
+ _downloadable = downloadable;
}
public function get fileName():String {
@@ -38,22 +43,25 @@ package org.bigbluebutton.lib.presentation.models {
return _id;
}
- public function get slides():Vector. {
+ public function get slides():ArrayCollection {
return _slides;
}
- public function getSlideAt(num:int):Slide {
- if (_slides.length > num) {
- return _slides[num];
+ public function getSlideById(slideId:String):Slide {
+ for each (var slide:Slide in _slides) {
+ if (slide.id == slideId) {
+ return slide;
+ }
}
- trace("getSlideAt failed: Slide index out of bounds");
+
+ trace("getSlideById failed: Slide not found");
return null;
}
public function add(slide:Slide):void {
- _slides[slide.slideNumber - 1] = slide;
+ _slides.addItem(slide);
if (slide.current == true) {
- _currentSlideNum = slide.slideNumber - 1;
+ _currentSlide = slide;
}
}
@@ -74,17 +82,8 @@ package org.bigbluebutton.lib.presentation.models {
return _loaded;
}
- public function set currentSlideNum(n:int):void {
- if (_currentSlideNum >= 0) {
- _slides[_currentSlideNum].current = false;
- }
- _currentSlideNum = n - 1;
- _slides[_currentSlideNum].current = true;
- _slideChangeSignal.dispatch();
- }
-
- public function get currentSlideNum():int {
- return _currentSlideNum;
+ public function get currentSlide():Slide {
+ return _currentSlide;
}
public function set current(b:Boolean):void {
@@ -103,6 +102,29 @@ package org.bigbluebutton.lib.presentation.models {
_slides = new Vector.();
}
+ public function setCurrentSlide(slideId:String):void {
+ if (_currentSlide) {
+ _currentSlide.current = false;
+ _currentSlide = null;
+ }
+ var newCurrentSlide:Slide = getSlideById(slideId);
+ if (newCurrentSlide) {
+ newCurrentSlide.current = true;
+ _currentSlide = newCurrentSlide;
+ }
+ _slideChangeSignal.dispatch();
+ }
+
+ public function setViewedRegion(slideId:String, x:Number, y:Number, widthPercent:Number, heightPercent:Number):Boolean {
+ var slide:Slide = getSlideById(slideId);
+ if (slide != null) {
+ slide.setViewedRegion(x, y, widthPercent, heightPercent);
+ return true;
+ }
+ return false;
+ }
+
+ /*
public function addAnnotationHistory(slideNum:int, annotationHistory:Array):Boolean {
var slide:Slide = getSlideAt(slideNum);
if (slide != null) {
@@ -143,14 +165,6 @@ package org.bigbluebutton.lib.presentation.models {
}
return null;
}
-
- public function setViewedRegion(slideNum:Number, x:Number, y:Number, widthPercent:Number, heightPercent:Number):Boolean {
- var slide:Slide = getSlideAt(slideNum);
- if (slide != null) {
- slide.setViewedRegion(x, y, widthPercent, heightPercent);
- return true;
- }
- return false;
- }
+ */
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/PresentationList.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/PresentationList.as
old mode 100644
new mode 100755
index 64460150da..c069119d2d
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/PresentationList.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/PresentationList.as
@@ -26,8 +26,6 @@ package org.bigbluebutton.lib.presentation.models {
private var _viewedRegionChangeSignal:ISignal = new Signal();
- private var _cursorUpdateSignal:ISignal = new Signal();
-
private var _annotationHistorySignal:ISignal = new Signal();
private var _annotationUpdatedSignal:ISignal = new Signal();
@@ -36,14 +34,10 @@ package org.bigbluebutton.lib.presentation.models {
private var _annotationClearSignal:ISignal = new Signal();
- private var _cursorXPercent:Number = -1;
-
- private var _cursorYPercent:Number = -1;
-
public function PresentationList() {
}
- public function addPresentation(presentationName:String, id:String, numberOfSlides:int, current:Boolean):Presentation {
+ public function addPresentation(presentationName:String, id:String, numberOfSlides:int, current:Boolean, downloadable:Boolean):Presentation {
trace("Adding presentation " + presentationName);
for (var i:int = 0; i < _presentations.length; i++) {
var p:Presentation = _presentations[i];
@@ -51,7 +45,7 @@ package org.bigbluebutton.lib.presentation.models {
return p;
}
}
- var presentation:Presentation = new Presentation(presentationName, id, changeCurrentPresentation, numberOfSlides, current);
+ var presentation:Presentation = new Presentation(presentationName, id, changeCurrentPresentation, numberOfSlides, current, downloadable);
presentation.slideChangeSignal.add(slideChangeSignal.dispatch);
_presentations.addItem(presentation);
return presentation;
@@ -89,16 +83,8 @@ package org.bigbluebutton.lib.presentation.models {
return null;
}
- public function cursorUpdate(xPercent:Number, yPercent:Number):void {
- _cursorXPercent = xPercent;
- _cursorYPercent = yPercent;
- if (_currentPresentation != null && _currentPresentation.currentSlideNum >= 0) {
- _cursorUpdateSignal.dispatch(xPercent, yPercent);
- }
- }
-
public function addAnnotationHistory(whiteboardID:String, annotationArray:Array):void {
- var whiteboardIDParts:Array = whiteboardID.split("/");
+/* var whiteboardIDParts:Array = whiteboardID.split("/");
var presentationID:String = whiteboardIDParts[0];
var pageNumber:int = parseInt(whiteboardIDParts[1]) - 1;
var presentation:Presentation = getPresentationByID(presentationID);
@@ -108,36 +94,36 @@ package org.bigbluebutton.lib.presentation.models {
_annotationHistorySignal.dispatch();
}
}
- }
+ }*/
}
public function addAnnotation(annotation:IAnnotation):void {
- var newAnnotation:IAnnotation = _currentPresentation.addAnnotation(_currentPresentation.currentSlideNum, annotation);
+/* var newAnnotation:IAnnotation = _currentPresentation.addAnnotation(_currentPresentation.currentSlideNum, annotation);
if (newAnnotation != null) {
_annotationUpdatedSignal.dispatch(newAnnotation);
- }
+ }*/
}
public function clearAnnotations():void {
- if (_currentPresentation != null && _currentPresentation.currentSlideNum >= 0) {
+/* if (_currentPresentation != null && _currentPresentation.currentSlideNum >= 0) {
if (_currentPresentation.clearAnnotations(_currentPresentation.currentSlideNum)) {
_annotationClearSignal.dispatch();
}
- }
+ }*/
}
public function undoAnnotation():void {
- if (_currentPresentation != null && _currentPresentation.currentSlideNum >= 0) {
+/* if (_currentPresentation != null && _currentPresentation.currentSlideNum >= 0) {
var removedAnnotation:IAnnotation = _currentPresentation.undoAnnotation(_currentPresentation.currentSlideNum);
if (removedAnnotation != null) {
_annotationUndoSignal.dispatch(removedAnnotation);
}
- }
+ }*/
}
- public function setViewedRegion(x:Number, y:Number, widthPercent:Number, heightPercent:Number):void {
- if (_currentPresentation != null && _currentPresentation.currentSlideNum >= 0) {
- if (_currentPresentation.setViewedRegion(_currentPresentation.currentSlideNum, x, y, widthPercent, heightPercent)) {
+ public function setViewedRegion(presentationId:String, pageId:String, x:Number, y:Number, widthPercent:Number, heightPercent:Number):void {
+ if (_currentPresentation != null) {
+ if (_currentPresentation.setViewedRegion(pageId, x, y, widthPercent, heightPercent)) {
_viewedRegionChangeSignal.dispatch(x, y, widthPercent, heightPercent);
}
}
@@ -172,10 +158,6 @@ package org.bigbluebutton.lib.presentation.models {
return _viewedRegionChangeSignal;
}
- public function get cursorUpdateSignal():ISignal {
- return _cursorUpdateSignal;
- }
-
public function get annotationHistorySignal():ISignal {
return _annotationHistorySignal;
}
@@ -191,13 +173,5 @@ package org.bigbluebutton.lib.presentation.models {
public function get annotationClearSignal():ISignal {
return _annotationClearSignal;
}
-
- public function get cursorXPercent():Number {
- return _cursorXPercent;
- }
-
- public function get cursorYPercent():Number {
- return _cursorYPercent;
- }
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Slide.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Slide.as
old mode 100644
new mode 100755
index 5cc0e5e075..6a3b74717a
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Slide.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/models/Slide.as
@@ -9,8 +9,12 @@ package org.bigbluebutton.lib.presentation.models {
import org.osflash.signals.Signal;
public class Slide {
+ public var loadRequested:Boolean = false;
+
private var _loaded:Boolean = false;
+ private var _id:String;
+
private var _slideURI:String;
private var _slideNum:Number;
@@ -39,7 +43,8 @@ package org.bigbluebutton.lib.presentation.models {
private var _slideLoadedSignal:ISignal = new Signal;
- public function Slide(slideNum:Number, slideURI:String, thumbURI:String, txtURI:String, current:Boolean, x:Number, y:Number, widthPercent:Number, heightPercent:Number) {
+ public function Slide(id:String, slideNum:Number, slideURI:String, thumbURI:String, txtURI:String, current:Boolean, x:Number, y:Number, widthPercent:Number, heightPercent:Number) {
+ _id = id;
_slideNum = slideNum;
_slideURI = slideURI;
_thumbURI = thumbURI;
@@ -52,6 +57,10 @@ package org.bigbluebutton.lib.presentation.models {
_sizeSynced = true;
}
+ public function get id():String {
+ return _id;
+ }
+
public function get thumb():String {
return _thumbURI;
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/IPresentationService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/IPresentationService.as
old mode 100644
new mode 100755
index c8a25ae05f..78bd83c0f1
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/IPresentationService.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/IPresentationService.as
@@ -3,10 +3,9 @@ package org.bigbluebutton.lib.presentation.services {
public interface IPresentationService {
function setupMessageSenderReceiver():void;
function getPresentationInfo():void;
- function gotoSlide(id:String):void;
- function move(xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void;
- function removePresentation(name:String):void;
- function sendCursorUpdate(xPercent:Number, yPercent:Number):void;
- function sharePresentation(share:Boolean, presentationName:String):void;
+ function setCurrentPage(presentationId: String, pageId: String):void;
+ function move(presentationId:String, pageId:String, xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void;
+ function removePresentation(presentationId:String):void;
+ function setCurrentPresentation(presentationId:String):void;
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageReceiver.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageReceiver.as
old mode 100644
new mode 100755
index 211add22a3..d780653183
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageReceiver.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageReceiver.as
@@ -6,16 +6,6 @@ package org.bigbluebutton.lib.presentation.services {
import org.bigbluebutton.lib.presentation.models.Slide;
public class PresentMessageReceiver implements IMessageListener {
- private static const SO_NAME:String = "presentationSO";
-
- private static const PRESENTER:String = "presenter";
-
- private static const SHARING:String = "sharing";
-
- private static const UPDATE_MESSAGE:String = "updateMessage";
-
- private static const CURRENT_PAGE:String = "currentPage";
-
private static const OFFICE_DOC_CONVERSION_SUCCESS_KEY:String = "OFFICE_DOC_CONVERSION_SUCCESS";
private static const OFFICE_DOC_CONVERSION_FAILED_KEY:String = "OFFICE_DOC_CONVERSION_FAILED";
@@ -43,27 +33,13 @@ package org.bigbluebutton.lib.presentation.services {
public function onMessage(messageName:String, message:Object):void {
switch (messageName) {
- case "PresentationCursorUpdateCommand":
- handlePresentationCursorUpdateCommand(message);
- break;
- case "moveCallback":
- handleMoveCallback(message);
- break;
- case "goToSlideCallback":
- handleGoToSlideCallback(message);
- break;
- case "conversionCompletedUpdateMessageCallback":
- handleConversionCompletedUpdateMessageCallback(message);
- break;
+
case "conversionUpdateMessageCallback":
handleConversionUpdateMessageCallback(message);
break;
case "generatedSlideUpdateMessageCallback":
handleGeneratedSlideUpdateMessageCallback(message);
break;
- case "getPresentationInfoReply":
- handleGetPresentationInfoReply(message)
- break;
case "pageCountExceededUpdateMessageCallback":
handlePageCountExceededUpdateMessageCallback(message);
break;
@@ -72,60 +48,72 @@ package org.bigbluebutton.lib.presentation.services {
break;
case "sharePresentationCallback":
handleSharePresentationCallback(message);
+
+
+
+
+ case "GetPresentationInfoRespMsg":
+ handleGetPresentationInfoRespMsg(message)
+ break;
+ case "PresentationConversionCompletedEvtMsg":
+ handlePresentationConversionCompletedEvtMsg(message);
+ break;
+ case "SetCurrentPageEvtMsg":
+ handleSetCurrentPageEvtMsg(message);
+ break;
+ case "ResizeAndMovePageEvtMsg":
+ handleResizeAndMovePageEvtMsg(message);
+ break;
default:
break;
}
}
- private function handleGetPresentationInfoReply(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- if (msg.presentations) {
- for (var i:int = 0; i < msg.presentations.length; i++) {
- addPresentation(msg.presentations[i]);
+ private function handleGetPresentationInfoRespMsg(msg:Object):void {
+ trace("PresentMessageReceiver::handleGetPresentationInfoRespMsg()");
+ var presentations:Array = msg.body.presentations as Array;
+ if (msg.body.presentations) {
+ for (var i:int = 0; i < presentations.length; i++) {
+ addPresentation(presentations[i]);
}
}
}
- private function handleGoToSlideCallback(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace("PresentMessageReceiver::handleGoToSlideCallback() -- going to slide number [" + msg.num + "]");
- userSession.presentationList.currentPresentation.currentSlideNum = int(msg.num);
+ private function addPresentation(presentationObject:Object):void {
+ var length:int = presentationObject.pages.length;
+ var presentation:Presentation = userSession.presentationList.addPresentation(presentationObject.name, presentationObject.id, length, presentationObject.current, presentationObject.downloadable);
+ // Add all the slides to the presentation:
+ for (var i:int = 0; i < length; i++) {
+ var s:Object = presentationObject.pages[i];
+ presentation.add(new Slide(s.id, s.num, s.swfUri, s.thumbUri, s.txtUri, s.current, s.xOffset, s.yOffset, s.widthRatio, s.heightRatio));
+ }
+ if (presentation.current) {
+ presentation.show();
+ }
}
- private function handleMoveCallback(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace("PresentMessageReceiver::handleMoveCallback()");
- userSession.presentationList.setViewedRegion(msg.xOffset, msg.yOffset, msg.widthRatio, msg.heightRatio);
- /* Properties of msg:
- current
- heightRatio
- id
- num
- pngUri
- swfUri
- thumbUri
- txtUri
- widthRatio
- xOffset
- yOffset
- /*
-
- /*
- var e:MoveEvent = new MoveEvent(MoveEvent.MOVE);
- e.xOffset = xOffset;
- e.yOffset = yOffset;
- e.slideToCanvasWidthRatio = widthRatio;
- e.slideToCanvasHeightRatio = heightRatio;
- dispatcher.dispatchEvent(e);
- */
+ public function handlePresentationConversionCompletedEvtMsg(msg:Object):void {
+ trace("PresentMessageReceiver::handlePresentationConversionCompletedEvtMsg() -- new presentation [" + msg.body.presentation.name + "] uploaded");
+ addPresentation(msg.body.presentation);
}
- private function handlePresentationCursorUpdateCommand(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace("PresentMessageReceiver::handlePresentationCursorUpdateCommand() -- cursing moving [" + msg.xPercent + ", " + msg.yPercent + "]");
- userSession.presentationList.cursorUpdate(msg.xPercent, msg.yPercent);
+ private function handleSetCurrentPageEvtMsg(msg:Object):void {
+ trace("PresentMessageReceiver::handleSetCurrentPageEvtMsg() -- going to slide number [" + msg.body.pageId + "]");
+ userSession.presentationList.currentPresentation.setCurrentSlide(msg.body.pageId);
}
+ private function handleResizeAndMovePageEvtMsg(msg:Object):void {
+ trace("PresentMessageReceiver::handleResizeAndMovePageEvtMsg()");
+ userSession.presentationList.setViewedRegion(msg.body.presentationId, msg.body.pageId, msg.body.xOffset, msg.body.yOffset, msg.body.widthRatio, msg.body.heightRatio);
+ }
+
+
+
+
+
+
+
+
private function handleRemovePresentationCallback(m:Object):void {
var msg:Object = JSON.parse(m.msg);
trace("PresentMessageReceiver::handleRemovePresentationCallback() -- removing presentation [" + msg.name + "]");
@@ -160,30 +148,6 @@ package org.bigbluebutton.lib.presentation.services {
*/
}
- public function handleConversionCompletedUpdateMessageCallback(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace("PresentMessageReceiver::handleConversionCompletedUpdateMessageCallback() -- new presentation [" + msg.presentation.name + "] uploaded");
- addPresentation(msg.presentation);
- }
-
- private function addPresentation(presentationObject:Object):void {
- var length:int = presentationObject.pages.length;
- trace("PresentMessageReceiver::handleGetPresentationInfoReply() -- adding presentation [" + presentationObject.name + "] to the presentation list");
- var presentation:Presentation = userSession.presentationList.addPresentation(presentationObject.name, presentationObject.id, length, presentationObject.current);
- // Add all the slides to the presentation:
- for (var i:int = 0; i < length; i++) {
- var s:Object = presentationObject.pages[i];
- if (s.swfUri) {
- presentation.add(new Slide(s.num, s.swfUri, s.thumbUri, s.txtUri, s.current, s.xOffset, s.yOffset, s.widthRatio, s.heightRatio));
- } else if (s.swf_uri) {
- presentation.add(new Slide(s.num, s.swf_uri, s.thumb_uri, s.txt_uri, s.current, s.x_offset, s.y_offset, s.width_ratio, s.height_ratio));
- }
- }
- if (presentation.current) {
- presentation.show();
- }
- }
-
public function handleConversionUpdateMessageCallback(m:Object):void {
var msg:Object = JSON.parse(m.msg);
trace("PresentMessageReceiver::handleConversionUpdateMessageCallback()");
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageSender.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageSender.as
old mode 100644
new mode 100755
index b6a9a2eeae..97f1ca0d76
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageSender.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentMessageSender.as
@@ -1,10 +1,13 @@
package org.bigbluebutton.lib.presentation.services {
- import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IUserSession;
public class PresentMessageSender {
public var userSession:IUserSession;
+ public var conferenceParameters:IConferenceParameters;
+
// The default callbacks of userSession.mainconnection.sendMessage
private var defaultSuccessResponse:Function = function(result:String):void {
trace(result);
@@ -14,65 +17,49 @@ package org.bigbluebutton.lib.presentation.services {
trace(status);
};
- private var presenterViewedRegionX:Number = 0;
-
- private var presenterViewedRegionY:Number = 0;
-
- private var presenterViewedRegionW:Number = 100;
-
- private var presenterViewedRegionH:Number = 100;
-
public function getPresentationInfo():void {
- trace("PresentMessageSender::getPresentationInfo() -- Sending [presentation.getPresentationInfo] message to server");
- userSession.mainConnection.sendMessage("presentation.getPresentationInfo", defaultSuccessResponse, defaultFailureResponse);
+ trace("PresentMessageSender::getPresentationInfo() -- Sending [GetPresentationInfoReqMsg] message to server");
+ var message:Object = {
+ header: {name: "GetPresentationInfoReqMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {userId: conferenceParameters.internalUserID}
+ };
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
- public function gotoSlide(id:String):void {
- trace("PresentMessageSender::gotoSlide() -- Sending [presentation.gotoSlide] message to server with message [page:" + String + "]");
- var message:Object = new Object();
- message["page"] = id;
- userSession.mainConnection.sendMessage("presentation.gotoSlide", defaultSuccessResponse, defaultFailureResponse, message);
+ public function setCurrentPage(presentationId: String, pageId: String):void {
+ trace("PresentMessageSender::setCurrentPage() -- Sending [SetCurrentPagePubMsg] message to server with message [page:" + pageId + "]");
+ var message:Object = {
+ header: {name: "SetCurrentPagePubMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {presentationId: presentationId, pageId: pageId}
+ };
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
- /***
- * A hack for the viewer to sync with the presenter. Have the viewer query the presenter for it's x,y,width and height info.
- */
- public function move(xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void {
- trace("PresentMessageSender::move() -- Sending [presentation.resizeAndMoveSlide] message to server with message " + "[xOffset:" + xOffset + ", yOffset:" + yOffset + ", widthRatio:" + widthRatio + ", heightRatio:" + heightRatio + "]");
- var message:Object = new Object();
- message["xOffset"] = xOffset;
- message["yOffset"] = yOffset;
- message["widthRatio"] = widthRatio;
- message["heightRatio"] = heightRatio;
- userSession.mainConnection.sendMessage("presentation.resizeAndMoveSlide", defaultSuccessResponse, defaultFailureResponse, message);
- presenterViewedRegionX = xOffset;
- presenterViewedRegionY = yOffset;
- presenterViewedRegionW = widthRatio;
- presenterViewedRegionH = heightRatio;
+ public function move(presentationId: String, pageId: String, xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void {
+ trace("PresentMessageSender::move() -- Sending [ResizeAndMovePagePubMsg] message to server with message " + "[xOffset:" + xOffset + ", yOffset:" + yOffset + ", widthRatio:" + widthRatio + ", heightRatio:" + heightRatio + "]");
+ var message:Object = {
+ header: {name: "ResizeAndMovePagePubMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {presentationId: presentationId, pageId: pageId, xOffset: xOffset, yOffset: yOffset, widthRatio: widthRatio, heightRatio: heightRatio}
+ };
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
- public function removePresentation(name:String):void {
- trace("PresentMessageSender::removePresentation() -- Sending [presentation.removePresentation] message to server with message [presentationID:" + name + "]");
- trace(" |- name : " + name);
- var message:Object = new Object();
- message["presentationID"] = name;
- userSession.mainConnection.sendMessage("presentation.removePresentation", defaultSuccessResponse, defaultFailureResponse, message);
+ public function removePresentation(presentationId:String):void {
+ trace("PresentMessageSender::removePresentation() -- Sending [RemovePresentationPubMsg] message to server with message [presentationId:" + presentationId + "]");
+ var message:Object = {
+ header: {name: "RemovePresentationPubMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {presentationId: presentationId}
+ };
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
- public function sendCursorUpdate(xPercent:Number, yPercent:Number):void {
- trace("PresentMessageSender::sendCursorUpdate() -- Sending [presentation.sendCursorUpdate] message to server with message [xPercent:" + xPercent + ", yPercent:" + yPercent);
- var message:Object = new Object();
- message["xPercent"] = xPercent;
- message["yPercent"] = yPercent;
- userSession.mainConnection.sendMessage("presentation.sendCursorUpdate", defaultSuccessResponse, defaultFailureResponse, message);
- }
-
- public function sharePresentation(share:Boolean, presentationID:String):void {
- trace("PresentMessageSender::sharePresentation() -- Sending [presentation.sharePresentation] message to server with message [presentationID:" + presentationID + ", share:" + share);
- var message:Object = new Object();
- message["presentationID"] = presentationID;
- message["share"] = share;
- userSession.mainConnection.sendMessage("presentation.sharePresentation", defaultSuccessResponse, defaultFailureResponse, message);
+ public function setCurrentPresentation(presentationId:String):void {
+ trace("PresentMessageSender::setCurrentPresentation() -- Sending [SetCurrentPresentationPubMsg] message to server with message [presentationId:" + presentationId + "]");
+ var message:Object = {
+ header: {name: "SetCurrentPresentationPubMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {presentationId: presentationId}
+ };
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentationService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentationService.as
old mode 100644
new mode 100755
index 86dbc567d5..9a3f14f174
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentationService.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/services/PresentationService.as
@@ -22,6 +22,7 @@ package org.bigbluebutton.lib.presentation.services {
public function setupMessageSenderReceiver():void {
presentMessageSender.userSession = userSession;
+ presentMessageSender.conferenceParameters = conferenceParameters;
presentMessageReceiver.userSession = userSession;
userSession.mainConnection.addMessageListener(presentMessageReceiver);
}
@@ -30,24 +31,20 @@ package org.bigbluebutton.lib.presentation.services {
presentMessageSender.getPresentationInfo();
}
- public function gotoSlide(id:String):void {
- presentMessageSender.gotoSlide(id);
+ public function setCurrentPage(presentationId: String, pageId: String):void {
+ presentMessageSender.setCurrentPage(presentationId, pageId);
}
- public function move(xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void {
- presentMessageSender.move(xOffset, yOffset, widthRatio, heightRatio);
+ public function move(presentationId:String, pageId:String, xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void {
+ presentMessageSender.move(presentationId, pageId, xOffset, yOffset, widthRatio, heightRatio);
}
- public function removePresentation(name:String):void {
- presentMessageSender.removePresentation(name);
+ public function removePresentation(presentationId:String):void {
+ presentMessageSender.removePresentation(presentationId);
}
- public function sendCursorUpdate(xPercent:Number, yPercent:Number):void {
- presentMessageSender.sendCursorUpdate(xPercent, yPercent);
- }
-
- public function sharePresentation(share:Boolean, presentationName:String):void {
- presentMessageSender.sharePresentation(share, presentationName);
+ public function setCurrentPresentation(presentationId:String):void {
+ presentMessageSender.setCurrentPresentation(presentationId);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/views/PresentationMediatorBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/views/PresentationMediatorBase.as
old mode 100644
new mode 100755
index 57ef0b546c..3a8e07c103
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/views/PresentationMediatorBase.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/presentation/views/PresentationMediatorBase.as
@@ -25,19 +25,14 @@ package org.bigbluebutton.lib.presentation.views {
protected var _currentPresentation:Presentation;
- protected var _currentSlideNum:int = -1;
-
protected var _currentSlide:Slide;
protected var _slideModel:SlideModel = new SlideModel();
- protected var _cursor:CursorIndicator = new CursorIndicator();
-
override public function initialize():void {
view.addEventListener(ResizeEvent.RESIZE, viewResizeHandler);
userSession.presentationList.presentationChangeSignal.add(presentationChangeHandler);
userSession.presentationList.viewedRegionChangeSignal.add(viewedRegionChangeHandler);
- userSession.presentationList.cursorUpdateSignal.add(cursorUpdateHandler);
view.swfLoader.addEventListener(Event.COMPLETE, handleLoadingComplete);
_slideModel.parentChange(view.width, view.height);
setPresentation(userSession.presentationList.currentPresentation);
@@ -47,8 +42,8 @@ package org.bigbluebutton.lib.presentation.views {
if (_currentSlide != null) {
_currentSlide.slideLoadedSignal.remove(slideLoadedHandler);
}
- if (_currentPresentation != null && _currentSlideNum >= 0) {
- _currentSlide = _currentPresentation.getSlideAt(_currentSlideNum);
+ if (_currentPresentation != null) {
+ _currentSlide = _currentPresentation.currentSlide;
if (_currentSlide != null) {
// @fixme: needs to be improved as the view is sometimes null
if (_currentSlide.loaded && view != null) {
@@ -76,10 +71,9 @@ package org.bigbluebutton.lib.presentation.views {
if (_slideModel && view && view.swfLoader) {
_slideModel.resetForNewSlide(view.swfLoader.contentWidth, view.swfLoader.contentHeight);
if (userSession.presentationList.currentPresentation) {
- var currentSlide:Slide = userSession.presentationList.currentPresentation.getSlideAt(_currentSlideNum);
+ var currentSlide:Slide = userSession.presentationList.currentPresentation.currentSlide;
if (currentSlide) {
resetSize(currentSlide.x, currentSlide.y, currentSlide.widthPercent, currentSlide.heightPercent);
- _cursor.draw(view.viewport, userSession.presentationList.cursorXPercent, userSession.presentationList.cursorYPercent);
//resetSize(_currentSlide.x, _currentSlide.y, _currentSlide.widthPercent, _currentSlide.heightPercent);
}
}
@@ -126,30 +120,27 @@ package org.bigbluebutton.lib.presentation.views {
view.wbCanvas.y = view.swfLoader.y;
}
- protected function cursorUpdateHandler(xPercent:Number, yPercent:Number):void {
- _cursor.draw(view.viewport, xPercent, yPercent);
- }
-
protected function presentationChangeHandler():void {
setPresentation(userSession.presentationList.currentPresentation);
}
protected function slideChangeHandler():void {
- setCurrentSlideNum(userSession.presentationList.currentPresentation.currentSlideNum);
- _cursor.remove(view.viewport);
+ setCurrentSlide();
}
protected function setPresentation(p:Presentation):void {
- _currentPresentation = p;
if (_currentPresentation != null) {
_currentPresentation.slideChangeSignal.remove(slideChangeHandler);
+ }
+
+ _currentPresentation = p;
+ if (_currentPresentation != null) {
_currentPresentation.slideChangeSignal.add(slideChangeHandler);
- setCurrentSlideNum(p.currentSlideNum);
+ setCurrentSlide();
}
}
- protected function setCurrentSlideNum(n:int):void {
- _currentSlideNum = n;
+ protected function setCurrentSlide():void {
displaySlide();
}
@@ -161,10 +152,12 @@ package org.bigbluebutton.lib.presentation.views {
view.swfLoader.removeEventListener(Event.COMPLETE, handleLoadingComplete);
userSession.presentationList.presentationChangeSignal.remove(presentationChangeHandler);
userSession.presentationList.viewedRegionChangeSignal.remove(viewedRegionChangeHandler);
- userSession.presentationList.cursorUpdateSignal.remove(cursorUpdateHandler);
if (_currentPresentation != null) {
_currentPresentation.slideChangeSignal.remove(slideChangeHandler);
}
+ if (_currentSlide != null) {
+ _currentSlide.slideLoadedSignal.remove(slideLoadedHandler);
+ }
super.destroy();
view = null;
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewBase.as
old mode 100644
new mode 100755
index a5c1b66654..83f7c1256b
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewBase.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewBase.as
@@ -69,8 +69,8 @@ package org.bigbluebutton.lib.settings.views {
_settingsList = new List();
_settingsList.percentWidth = 100;
- // @fixme height must be dynamic depending on the resolùution
- _settingsList.height = 560;
+ // TODO @fixme height must be dynamic depending on the resolùution
+ //_settingsList.height = 560;
_settingsList.itemRenderer = new ClassFactory(getItemRendererClass());
var listLayout:VerticalLayout = new VerticalLayout();
@@ -92,6 +92,8 @@ package org.bigbluebutton.lib.settings.views {
}
private function setParticipantStyle():void {
+ var groupsPadding:Number = getStyle("groupsPadding")
+
SolidColor(_participantBackground.fill).color = getStyle("headerBackground");
_participantIcon.top = getStyle("groupsPadding") * 1.75;
_participantLabel.setStyle("color", _participantIcon.getStyle("color"));
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewMediatorBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewMediatorBase.as
old mode 100644
new mode 100755
index c127010ecd..465d0d6aea
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewMediatorBase.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/SettingsViewMediatorBase.as
@@ -3,7 +3,7 @@ package org.bigbluebutton.lib.settings.views {
import spark.events.IndexChangeEvent;
- import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
import org.bigbluebutton.lib.user.utils.UserUtils;
import robotlegs.bender.bundles.mvcs.Mediator;
@@ -14,13 +14,13 @@ package org.bigbluebutton.lib.settings.views {
public var view:SettingsViewBase;
[Inject]
- public var userSession:IUserSession;
+ public var meetingData:IMeetingData;
protected var dataProvider:ArrayCollection;
override public function initialize():void {
- view.participantIcon.displayInitials = UserUtils.getInitials(userSession.userList.me.name);
- view.participantLabel.text = userSession.userList.me.name;
+ view.participantIcon.displayInitials = UserUtils.getInitials(meetingData.users.me.name);
+ view.participantLabel.text = meetingData.users.me.name;
view.settingsList.dataProvider = dataProvider = new ArrayCollection([{label: "Audio", icon: "icon-unmute", page: "audio"}, {label: "Video", icon: "icon-video", page: "camera"}, {label: "Application", icon: "icon-application", page: "chat"}, {label: "Participants", icon: "icon-user", page: "lock"}, {label: "Leave Session", icon: "icon-logout", page: "exit"}]);
view.settingsList.addEventListener(IndexChangeEvent.CHANGE, onListIndexChangeEvent);
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/audio/AudioSettingsViewBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/audio/AudioSettingsViewBase.as
old mode 100644
new mode 100755
index 75d755a230..5256bdf6c4
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/audio/AudioSettingsViewBase.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/audio/AudioSettingsViewBase.as
@@ -67,7 +67,7 @@ package org.bigbluebutton.lib.settings.views.audio {
addElement(microphoneGroup);
var microphoneLabel:Label = new Label();
- microphoneLabel.text = "Enable mirohpone";
+ microphoneLabel.text = "Enable microphone";
microphoneLabel.percentWidth = 100;
microphoneGroup.addElement(microphoneLabel);
@@ -85,7 +85,7 @@ package org.bigbluebutton.lib.settings.views.audio {
addElement(gainGroup);
var gainLabel:Label = new Label();
- gainLabel.text = "Mirohpone level";
+ gainLabel.text = "Microphone level";
gainGroup.addElement(gainLabel);
// Gain sub-group
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/camera/CameraProfileItemRenderer.mxml b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/camera/CameraProfileItemRenderer.mxml
old mode 100644
new mode 100755
index 24a02f45cf..7a14dea6fb
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/camera/CameraProfileItemRenderer.mxml
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/settings/views/camera/CameraProfileItemRenderer.mxml
@@ -15,11 +15,20 @@
labelField.setStyle('paddingLeft', getStyle('padding'));
labelField.setStyle('fontSize', getStyle('fontSize'));
}
+
+ override public function set data(value:Object):void {
+ super.data = value;
+
+ if (value != null) {
+ labelField.text = value.name;
+ } else {
+ labelField.text = "";
+ }
+ }
]]>
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/events/UserItemSelectedEvent.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/events/UserItemSelectedEvent.as
old mode 100644
new mode 100755
index 59eb333ce0..ab591a270b
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/events/UserItemSelectedEvent.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/events/UserItemSelectedEvent.as
@@ -2,17 +2,17 @@ package org.bigbluebutton.lib.user.events {
import flash.events.Event;
import flash.geom.Point;
- import org.bigbluebutton.lib.user.models.User;
+ import org.bigbluebutton.lib.user.views.models.UserVM;
public class UserItemSelectedEvent extends Event {
public static var SELECTED:String = "USER_ITEM_SELECTED_EVENT";
- public var user:User;
+ public var user:UserVM;
public var globalPos:Point;
public var width:Number;
public var height:Number;
- public function UserItemSelectedEvent(u:User, gp:Point, w:Number, h:Number) {
+ public function UserItemSelectedEvent(u:UserVM, gp:Point, w:Number, h:Number) {
super(SELECTED, true, false);
user = u;
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/EmojiStatus.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/EmojiStatus.as
new file mode 100755
index 0000000000..54de72614e
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/EmojiStatus.as
@@ -0,0 +1,22 @@
+package org.bigbluebutton.lib.user.models {
+
+ public class EmojiStatus {
+ public static const NO_STATUS:String = "none";
+
+ public static const RAISE_HAND:String = "raiseHand";
+
+ public static const HAPPY:String = "happy";
+
+ public static const SMILE:String = "smile";
+
+ public static const NEUTRAL:String = "neutral";
+
+ public static const SAD:String = "sad";
+
+ public static const CONFUSED:String = "confused";
+
+ public static const AWAY:String = "away";
+
+ public static const STATUS_ARRAY:Array = [RAISE_HAND, HAPPY, SMILE, NEUTRAL, SAD, CONFUSED, AWAY];
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/User2x.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/User2x.as
new file mode 100755
index 0000000000..cbc5035628
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/User2x.as
@@ -0,0 +1,16 @@
+package org.bigbluebutton.lib.user.models {
+
+ public class User2x {
+ public var intId: String;
+ public var extId: String;
+ public var name: String;
+ public var role: String;
+ public var guest: Boolean;
+ public var authed: Boolean;
+ public var waitingForAcceptance: Boolean;
+ public var emoji: String;
+ public var locked: Boolean;
+ public var presenter: Boolean;
+ public var avatar: String;
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/UserChangeEnum.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/UserChangeEnum.as
new file mode 100755
index 0000000000..2711aa1dcc
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/UserChangeEnum.as
@@ -0,0 +1,16 @@
+package org.bigbluebutton.lib.user.models {
+
+ public class UserChangeEnum {
+ public static const JOIN:int = 0;
+
+ public static const LEAVE:int = 1;
+
+ public static const PRESENTER:int = 2;
+
+ public static const LOCKED:int = 3;
+
+ public static const EMOJI:int = 4;
+
+ public static const ROLE:int = 5;
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/UserRole.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/UserRole.as
new file mode 100755
index 0000000000..7accd7509f
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/UserRole.as
@@ -0,0 +1,8 @@
+package org.bigbluebutton.lib.user.models {
+
+ public class UserRole {
+ public static const MODERATOR:String = "MODERATOR";
+
+ public static const VIEWER:String = "VIEWER";
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/Users2x.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/Users2x.as
new file mode 100755
index 0000000000..38f937a244
--- /dev/null
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/models/Users2x.as
@@ -0,0 +1,85 @@
+package org.bigbluebutton.lib.user.models {
+ import mx.collections.ArrayCollection;
+
+ import org.osflash.signals.Signal;
+
+ public class Users2x {
+ private var _users:ArrayCollection;
+
+ private var _userChangeSignal:Signal = new Signal();
+
+ public var me:User2x;
+
+ public function get userChangeSignal():Signal {
+ return _userChangeSignal;
+ }
+
+ public function Users2x() {
+ _users = new ArrayCollection();
+ }
+
+ public function getUsers():Array {
+ return _users.toArray();
+ }
+
+ public function add(user:User2x):void {
+ if (getUserIndex(user.intId) == -1) {
+ _users.addItem(user);
+ _userChangeSignal.dispatch(user, UserChangeEnum.JOIN);
+ }
+ }
+
+ public function remove(intId:String):User2x {
+ var index:int = getUserIndex(intId);
+ if (index >= 0) {
+ var removedUser:User2x = _users.removeItemAt(index) as User2x;
+ _userChangeSignal.dispatch(removedUser, UserChangeEnum.LEAVE);
+ return removedUser;
+ }
+
+ return null;
+ }
+
+ public function getUser(intId:String):User2x {
+ var user:User2x;
+ for (var i:int = 0; i < _users.length; i++) {
+ user = _users.getItemAt(i) as User2x;
+
+ if (user.intId == intId) {
+ return user;
+ }
+ }
+
+ return null;
+ }
+
+ public function getUserIndex(intId:String):int {
+ var user:User2x;
+ for (var i:int = 0; i < _users.length; i++) {
+ user = _users.getItemAt(i) as User2x;
+
+ if (user.intId == intId) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ public function changeUserLocked(intId:String, locked:Boolean):void {
+ var user:User2x = getUser(intId);
+ if (user != null) {
+ user.locked = locked;
+ _userChangeSignal.dispatch(user, UserChangeEnum.LOCKED);
+ }
+ }
+
+ public function changePresenter(intId:String, presenter:Boolean):void {
+ var user:User2x = getUser(intId);
+ if (user != null) {
+ user.presenter = presenter;
+ _userChangeSignal.dispatch(user, UserChangeEnum.PRESENTER);
+ }
+ }
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/IUsersService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/IUsersService.as
old mode 100644
new mode 100755
index 0fbf28673d..01866c7465
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/IUsersService.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/IUsersService.as
@@ -4,23 +4,23 @@ package org.bigbluebutton.lib.user.services {
public interface IUsersService {
function setupMessageSenderReceiver():void;
- function kickUser(userID:String):void;
+ function kickUser(userId:String):void;
function queryForParticipants():void;
- function assignPresenter(userid:String, name:String, assignedBy:String):void;
+ function assignPresenter(userId:String, name:String):void;
function emojiStatus(status:String):void;
- function clearUserStatus(userID:String):void
- function addStream(userID:String, streamName:String):void;
- function removeStream(userID:String, streamName:String):void;
+ function clearUserStatus(userId:String):void
+ function addStream(userId:String, streamName:String):void;
+ function removeStream(userId:String, streamName:String):void;
function queryForRecordingStatus():void;
- function changeRecordingStatus(userID:String, recording:Boolean):void;
+ function changeRecordingStatus(userId:String, recording:Boolean):void;
function muteAllUsers(mute:Boolean):void;
function muteAllUsersExceptPresenter(mute:Boolean):void;
- function muteUnmuteUser(userid:String, mute:Boolean):void;
- function ejectUser(userid:String):void;
+ function muteUnmuteUser(userId:String, mute:Boolean):void;
+ function ejectUser(userId:String):void;
function getRoomMuteState():void;
function getRoomLockState():void;
function setAllUsersLock(lock:Boolean, except:Array = null):void;
- function setUserLock(internalUserID:String, lock:Boolean):void;
+ function setUserLock(internalUserId:String, lock:Boolean):void;
function getLockSettings():void;
function saveLockSettings(newLockSettings:Object):void;
function muteMe():void;
@@ -28,5 +28,6 @@ package org.bigbluebutton.lib.user.services {
function mute(user:User):void;
function unmute(user:User):void;
function validateToken():void;
+ function joinMeeting():void;
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageReceiver.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageReceiver.as
index c031b5a007..3bf47a28db 100755
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageReceiver.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageReceiver.as
@@ -2,38 +2,33 @@ package org.bigbluebutton.lib.user.services {
import mx.utils.ObjectUtil;
import org.bigbluebutton.lib.common.models.IMessageListener;
- import org.bigbluebutton.lib.main.commands.AuthenticationSignal;
import org.bigbluebutton.lib.main.commands.DisconnectUserSignal;
+ import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.LockSettings2x;
import org.bigbluebutton.lib.main.utils.DisconnectEnum;
- import org.bigbluebutton.lib.user.models.User;
+ import org.bigbluebutton.lib.user.models.User2x;
public class UsersMessageReceiver implements IMessageListener {
private const LOG:String = "UsersMessageReceiver::";
public var userSession:IUserSession;
- public var authenticationSignal:AuthenticationSignal;
+ public var meetingData:IMeetingData;
+
+ public var conferenceParameters:IConferenceParameters;
public var disconnectUserSignal:DisconnectUserSignal;
- private var lastSipEvent:Object = null;
-
public function UsersMessageReceiver() {
}
public function onMessage(messageName:String, message:Object):void {
- trace(LOG + "RECEIVED MESSAGE: [" + messageName + "]");
switch (messageName) {
case "voiceUserTalking":
handleVoiceUserTalking(message);
break;
- case "participantJoined":
- handleParticipantJoined(message);
- break;
- case "participantLeft":
- handleParticipantLeft(message);
- break;
case "userJoinedVoice":
handleUserJoinedVoice(message);
break;
@@ -50,9 +45,6 @@ package org.bigbluebutton.lib.user.services {
case "userListeningOnly":
handleUserListeningOnly(message);
break;
- case "assignPresenterCallback":
- handleAssignPresenterCallback(message);
- break;
case "voiceUserMuted":
handleVoiceUserMuted(message);
break;
@@ -62,9 +54,6 @@ package org.bigbluebutton.lib.user.services {
case "joinMeetingReply":
handleJoinedMeeting(message);
break
- case "getUsersReply":
- handleGetUsersReply(message);
- break;
case "getRecordingStatusReply":
handleGetRecordingStatusReply(message);
break;
@@ -75,40 +64,52 @@ package org.bigbluebutton.lib.user.services {
case "userEmojiStatus":
handleEmojiStatus(message);
break;
- case "validateAuthTokenTimedOut":
- handleValidateAuthTokenTimedOut(message);
- break;
- case "validateAuthTokenReply":
- handleValidateAuthTokenReply(message);
- break;
case "meetingState":
handleMeetingState(message);
break;
- case "permissionsSettingsChanged":
- handlePermissionsSettingsChanged(message);
- break;
case "meetingMuted":
handleMeetingMuted(message);
break;
- case "userLocked":
- handleUserLocked(message);
+
+
+
+
+
+ case "GetUsersMeetingRespMsg":
+ handleGetUsersMeetingRespMsg(message);
+ break;
+ case "UserJoinedMeetingEvtMsg":
+ handleUserJoinedMeetingEvtMsg(message);
+ break;
+ case "UserLeftMeetingEvtMsg":
+ handleUserLeftMeetingEvtMsg(message);
+ break;
+ case "UserLockedInMeetingEvtMsg":
+ handleUserLockedInMeetingEvtMsg(message);
+ break;
+ case "PresenterAssignedEvtMsg":
+ handlePresenterAssignedEvtMsg(message);
+ break;
+ case "PresenterUnassignedEvtMsg":
+ handlePresenterUnassignedEvtMsg(message);
+ break;
+ case "LockSettingsInMeetingChangedEvtMsg":
+ handleLockSettingsInMeetingChangedEvtMsg(message);
+ break;
+ case "GetLockSettingsRespMsg":
+ handleGetLockSettingsRespMsg(message);
+ break;
+ case "LockSettingsNotInitializedRespMsg":
+ handleLockSettingsNotInitializedRespMsg(message);
+ break;
+ case "ValidateAuthTokenRespMsg":
+ handleValidateAuthTokenRespMsg(message);
break;
default:
break;
}
}
- private function handleUserLocked(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace("handleUserLocked: " + ObjectUtil.toString(msg));
- trace("your id: " + userSession.userList.me.userId);
- var user:User = userSession.userList.getUserByUserId(msg.user);
- user.locked = msg.lock;
- if (userSession.userList.me.userId == msg.user) {
- userSession.dispatchLockSettings();
- }
- }
-
private function handleMeetingMuted(m:Object):void {
var msg:Object = JSON.parse(m.msg);
trace("handleMeetingMuted: " + ObjectUtil.toString(msg));
@@ -121,24 +122,6 @@ package org.bigbluebutton.lib.user.services {
updateLockSettings(msg.permissions);
}
- private function handlePermissionsSettingsChanged(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace("permissionsSettingsChanged: " + ObjectUtil.toString(msg));
- updateLockSettings(msg);
- }
-
- private function updateLockSettings(msg:Object):void {
- userSession.lockSettings.disableCam = msg.disableCam;
- userSession.lockSettings.disableMic = msg.disableMic;
- // bbb 1.0 compatibility: different variable names
- userSession.lockSettings.disablePrivateChat = msg.hasOwnProperty("disablePrivChat") ? msg.disablePrivChat : msg.disablePrivateChat;
- userSession.lockSettings.disablePublicChat = msg.hasOwnProperty("disablePubChat") ? msg.disablePubChat : msg.disablePublicChat;
- userSession.lockSettings.lockedLayout = msg.lockedLayout;
- userSession.lockSettings.lockOnJoin = msg.lockOnJoin;
- userSession.lockSettings.lockOnJoinConfigurable = msg.lockOnJoinConfigurable;
- userSession.dispatchLockSettings();
- }
-
private function handleEmojiStatus(m:Object):void {
var msg:Object = JSON.parse(m.msg);
trace("UsersMessageReceiver::handleEmojiStatusHand() -- user [" + msg.userId + "," + msg.emojiStatus + "] ");
@@ -151,52 +134,6 @@ package org.bigbluebutton.lib.user.services {
userSession.userList.userTalkingChange(msg.voiceUserId, msg.talking);
}
- private function handleGetUsersReply(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- for (var i:int; i < msg.users.length; i++) {
- var newUser:Object = msg.users[i];
- addParticipant(newUser);
- }
- userSession.userList.allUsersAddedSignal.dispatch();
- }
-
- private function handleParticipantJoined(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- var newUser:Object = msg.user;
- addParticipant(newUser);
- }
-
- private function addParticipant(newUser:Object):void {
- var user:User = new User;
- user.hasStream = newUser.hasStream;
- user.streamName = newUser.webcamStream;
- user.locked = newUser.locked;
- user.name = newUser.name;
- user.phoneUser = newUser.phoneUser;
- user.presenter = newUser.presenter;
- user.role = newUser.role;
- user.userId = newUser.userId;
- user.voiceJoined = newUser.voiceUser.joined;
- user.voiceUserId = newUser.voiceUser.userId;
- user.isLeavingFlag = false;
- user.listenOnly = newUser.listenOnly;
- user.muted = newUser.voiceUser.muted;
- user.status = newUser.status;
- userSession.userList.addUser(user);
- }
-
- private function handleParticipantLeft(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace(LOG + "handleParticipantLeft() -- user [" + msg.user.userId + "] has left the meeting");
- userSession.userList.removeUser(msg.user.userId);
- }
-
- private function handleAssignPresenterCallback(m:Object):void {
- var msg:Object = JSON.parse(m.msg);
- trace(LOG + "handleAssignPresenterCallback() -- user [" + msg.newPresenterID + "] is now the presenter");
- userSession.userList.assignPresenter(msg.newPresenterID);
- }
-
private function handleUserJoinedVoice(m:Object):void {
var msg:Object = JSON.parse(m.msg);
var voiceUser:Object = msg.user.voiceUser;
@@ -259,27 +196,105 @@ package org.bigbluebutton.lib.user.services {
userSession.recordingStatusChanged(msg.recording);
}
- private function handleValidateAuthTokenTimedOut(msg:Object):void {
- trace(LOG + "handleValidateAuthTokenTimedOut() " + msg.msg);
- authenticationSignal.dispatch("timedOut");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private function handleGetUsersMeetingRespMsg(msg:Object):void {
+ var users:Array = msg.body.users as Array;
+
+ for (var i:int; i < users.length; i++) {
+ var newUser:Object = users[i];
+ addUser(newUser);
+ }
}
- private function handleValidateAuthTokenReply(msg:Object):void {
- trace(LOG + "*** handleValidateAuthTokenReply " + msg.msg);
- var map:Object = JSON.parse(msg.msg);
- var tokenValid:Boolean = map.valid as Boolean;
- var userId:String = map.userId as String;
- trace(LOG + "handleValidateAuthTokenReply() valid=" + tokenValid);
- if (!tokenValid) {
- authenticationSignal.dispatch("invalid");
- } else {
- // why 2 different signals for authentication??
- //userUISession.loading = false; in authentication command can break order of functions
- trace(LOG + "got here!");
- if (userSession == null)
- trace(LOG + "User Session is NULL!!!!");
- userSession.authTokenSignal.dispatch(true);
+ private function handleUserJoinedMeetingEvtMsg(msg:Object):void {
+ addUser(msg.body);
+ }
+
+ private function addUser(newUser:Object):void {
+ var user:User2x = new User2x();
+ user.intId = newUser.intId;
+ user.extId = newUser.extId;
+ user.name = newUser.name;
+ user.role = newUser.role;
+ user.guest = newUser.guest;
+ user.authed = newUser.authed;
+ user.waitingForAcceptance = newUser.waitingForAcceptance;
+ user.emoji = newUser.emoji;
+ user.locked = newUser.locked;
+ user.presenter = newUser.presenter;
+ user.avatar = newUser.avatar;
+
+ if (user.intId == conferenceParameters.internalUserID) {
+ meetingData.users.me = user;
}
+ meetingData.users.add(user);
+ }
+
+ private function handleUserLeftMeetingEvtMsg(msg:Object):void {
+ trace(LOG + "handleUserLeftMeetingEvtMsg() -- user [" + msg.body.intId + "] has left the meeting");
+ meetingData.users.remove(msg.intId);
+ }
+
+ private function handleUserLockedInMeetingEvtMsg(msg:Object):void {
+ trace(LOG + "handleUserLockedInMeetingEvtMsg: " + ObjectUtil.toString(msg));
+ meetingData.users.changeUserLocked(msg.body.userId, msg.body.locked);
+ }
+
+ private function handlePresenterAssignedEvtMsg(msg:Object):void {
+ trace(LOG + "handlePresenterAssignedEvtMsg() -- user [" + msg.body.presenterId + "] is now the presenter");
+ meetingData.users.changePresenter(msg.body.presenterId, true);
+ }
+
+ private function handlePresenterUnassignedEvtMsg(msg:Object):void {
+ trace(LOG + "handlePresenterUnassignedEvtMsg() -- user [" + msg.body.intId + "] is no longer the presenter");
+ meetingData.users.changePresenter(msg.body.intId, false);
+ }
+
+ private function handleLockSettingsInMeetingChangedEvtMsg(msg:Object):void {
+ trace(LOG + "handleLockSettingsInMeetingChangedEvtMsg: " + ObjectUtil.toString(msg));
+ updateLockSettings(msg.body);
+ }
+
+ private function handleGetLockSettingsRespMsg(msg:Object):void {
+ trace(LOG + "handleGetLockSettingsRespMsg: " + ObjectUtil.toString(msg));
+ updateLockSettings(msg.body);
+ }
+
+ private function updateLockSettings(body:Object):void {
+ var newLockSettings:LockSettings2x = new LockSettings2x();
+ newLockSettings.disableCam = body.disableCam;
+ newLockSettings.disableMic = body.disableMic;
+ newLockSettings.disablePrivChat = body.disablePrivChat;
+ newLockSettings.disablePubChat = body.disablePubChat;
+ newLockSettings.lockedLayout = body.lockedLayout;
+ newLockSettings.lockOnJoin = body.lockOnJoin;
+ newLockSettings.lockOnJoinConfigurable = body.lockOnJoinConfigurable;
+ meetingData.meetingStatus.changeLockSettings(newLockSettings);
+ }
+
+ private function handleLockSettingsNotInitializedRespMsg(msg:Object):void {
+ trace(LOG + "handleLockSettingsNotInitializedRespMsg: " + ObjectUtil.toString(msg));
+ trace("***** NEED TO ACTUALLY HANDLE THE LOCK INITIALIZATION *****");
+ }
+
+ private function handleValidateAuthTokenRespMsg(msg:Object):void {
+ var tokenValid:Boolean = msg.body.valid as Boolean;
+ trace(LOG + "handleValidateAuthTokenReply() valid=" + tokenValid);
+ userSession.userId = msg.body.userId;
+ userSession.authTokenSignal.dispatch(tokenValid);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageSender.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageSender.as
old mode 100644
new mode 100755
index e3045856b9..445c9bfa83
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageSender.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersMessageSender.as
@@ -1,9 +1,11 @@
package org.bigbluebutton.lib.user.services {
- import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IUserSession;
public class UsersMessageSender {
public var userSession:IUserSession;
+ public var conferenceParameters:IConferenceParameters;
// The default callbacks of userSession.mainconnection.sendMessage
private var defaultSuccessResponse:Function = function(result:String):void {
@@ -17,6 +19,15 @@ package org.bigbluebutton.lib.user.services {
public function UsersMessageSender() {
}
+ public function joinMeeting():void {
+ var message:Object = {
+ header: {name: "UserJoinMeetingReqMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {userId: conferenceParameters.internalUserID, authToken: conferenceParameters.authToken}
+ };
+
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
+ }
+
public function kickUser(userID:String):void {
trace("UsersMessageSender::kickUser() -- Sending [participants.kickUser] message to server.. with message [userID:" + userID + "]");
var message:Object = new Object();
@@ -25,8 +36,14 @@ package org.bigbluebutton.lib.user.services {
}
public function queryForParticipants():void {
- trace("UsersMessageSender::queryForParticipants() -- Sending [participants.getParticipants] message to server");
- userSession.mainConnection.sendMessage("participants.getParticipants", defaultSuccessResponse, defaultFailureResponse);
+ trace("UsersMessageSender::queryForParticipants() -- Sending [GetUsersMeetingReqMsg] message to server");
+
+ var message:Object = {
+ header: {name: "GetUsersMeetingReqMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {userId: conferenceParameters.internalUserID}
+ };
+
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
public function assignPresenter(userid:String, name:String, assignedBy:String):void {
@@ -130,11 +147,13 @@ package org.bigbluebutton.lib.user.services {
}
public function validateToken(internalUserID:String, authToken:String):void {
- trace("UsersMessageSender::validateToken() -- Sending [validateToken] message to server");
- var message:Object = new Object();
- message["userId"] = internalUserID;
- message["authToken"] = authToken;
- userSession.mainConnection.sendMessage("validateToken", defaultSuccessResponse, defaultFailureResponse, message);
+ trace("UsersMessageSender::validateToken() -- Sending [ValidateAuthTokenReqMsg] message to server");
+ var message:Object = {
+ header: {name: "ValidateAuthTokenReqMsg", meetingId: conferenceParameters.meetingID, userId: conferenceParameters.internalUserID},
+ body: {userId: internalUserID, authToken: authToken}
+ };
+
+ userSession.mainConnection.sendMessage2x(defaultSuccessResponse, defaultFailureResponse, message);
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersService.as
old mode 100644
new mode 100755
index a5a490c4a8..4c9ada61e4
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersService.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/services/UsersService.as
@@ -1,9 +1,10 @@
package org.bigbluebutton.lib.user.services {
- import org.bigbluebutton.lib.main.commands.AuthenticationSignal;
import org.bigbluebutton.lib.main.commands.DisconnectUserSignal;
import org.bigbluebutton.lib.main.models.IConferenceParameters;
+ import org.bigbluebutton.lib.main.models.IMeetingData;
import org.bigbluebutton.lib.main.models.IUserSession;
+ import org.bigbluebutton.lib.user.models.EmojiStatus;
import org.bigbluebutton.lib.user.models.User;
public class UsersService implements IUsersService {
@@ -15,7 +16,7 @@ package org.bigbluebutton.lib.user.services {
public var userSession:IUserSession;
[Inject]
- public var authenticationSignal:AuthenticationSignal;
+ public var meetingData:IMeetingData;
[Inject]
public var disconnectUserSignal:DisconnectUserSignal;
@@ -31,9 +32,11 @@ package org.bigbluebutton.lib.user.services {
public function setupMessageSenderReceiver():void {
usersMessageReceiver.userSession = userSession;
- usersMessageReceiver.authenticationSignal = authenticationSignal;
+ usersMessageReceiver.meetingData = meetingData;
+ usersMessageReceiver.conferenceParameters = conferenceParameters;
usersMessageReceiver.disconnectUserSignal = disconnectUserSignal;
usersMessageSender.userSession = userSession;
+ usersMessageSender.conferenceParameters = conferenceParameters;
userSession.mainConnection.addMessageListener(usersMessageReceiver);
userSession.logoutSignal.add(logout);
}
@@ -81,28 +84,28 @@ package org.bigbluebutton.lib.user.services {
usersMessageSender.emojiStatus(userSession.userList.me.userId, status);
}
- public function clearUserStatus(userID:String):void {
- usersMessageSender.emojiStatus(userID, User.NO_STATUS);
+ public function clearUserStatus(userId:String):void {
+ usersMessageSender.emojiStatus(userId, EmojiStatus.NO_STATUS);
}
- public function kickUser(userID:String):void {
- usersMessageSender.kickUser(userID);
+ public function kickUser(userId:String):void {
+ usersMessageSender.kickUser(userId);
}
public function queryForParticipants():void {
usersMessageSender.queryForParticipants();
}
- public function assignPresenter(userid:String, name:String, assignedBy:String):void {
- usersMessageSender.assignPresenter(userid, name, assignedBy);
+ public function assignPresenter(userId:String, name:String):void {
+ usersMessageSender.assignPresenter(userId, name, meetingData.users.me.intId);
}
public function queryForRecordingStatus():void {
usersMessageSender.queryForRecordingStatus();
}
- public function changeRecordingStatus(userID:String, recording:Boolean):void {
- usersMessageSender.changeRecordingStatus(userID, recording);
+ public function changeRecordingStatus(userId:String, recording:Boolean):void {
+ usersMessageSender.changeRecordingStatus(userId, recording);
}
public function muteAllUsers(mute:Boolean):void {
@@ -113,12 +116,12 @@ package org.bigbluebutton.lib.user.services {
usersMessageSender.muteAllUsersExceptPresenter(mute);
}
- public function muteUnmuteUser(userid:String, mute:Boolean):void {
- usersMessageSender.muteUnmuteUser(userid, mute);
+ public function muteUnmuteUser(userId:String, mute:Boolean):void {
+ usersMessageSender.muteUnmuteUser(userId, mute);
}
- public function ejectUser(userid:String):void {
- usersMessageSender.ejectUser(userid);
+ public function ejectUser(userId:String):void {
+ usersMessageSender.ejectUser(userId);
}
public function getRoomMuteState():void {
@@ -133,8 +136,8 @@ package org.bigbluebutton.lib.user.services {
usersMessageSender.setAllUsersLock(lock, except);
}
- public function setUserLock(internalUserID:String, lock:Boolean):void {
- usersMessageSender.setUserLock(internalUserID, lock);
+ public function setUserLock(internalUserId:String, lock:Boolean):void {
+ usersMessageSender.setUserLock(internalUserId, lock);
}
public function getLockSettings():void {
@@ -148,6 +151,9 @@ package org.bigbluebutton.lib.user.services {
public function validateToken():void {
usersMessageSender.validateToken(conferenceParameters.internalUserID, conferenceParameters.authToken);
}
-
+
+ public function joinMeeting():void {
+ usersMessageSender.joinMeeting();
+ }
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/utils/UserUtils.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/utils/UserUtils.as
old mode 100644
new mode 100755
index a73c8c63ea..fcd24a1ac1
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/utils/UserUtils.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/utils/UserUtils.as
@@ -6,8 +6,12 @@ package org.bigbluebutton.lib.user.utils {
* words number is used
*/
public static function getInitials(name:String):String {
- var matches:Array = name.match(/\b\w/g) || [];
- return ((matches.shift() || '') + (matches.pop() || '')).toUpperCase();
+ if (name) {
+ var matches:Array = name.match(/\b\w/g) || [];
+ return ((matches.shift() || '') + (matches.pop() || '')).toUpperCase();
+ } else {
+ return "";
+ }
}
}
}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/views/UserItemRenderer.mxml b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/views/UserItemRenderer.mxml
index e0cd517380..4cf0cc37ec 100755
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/views/UserItemRenderer.mxml
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/user/views/UserItemRenderer.mxml
@@ -19,8 +19,8 @@
-1) && (EmojiStatus.STATUS_ARRAY.indexOf(bu.emoji) > -1)) {
+ // do nothing go to the end and check names
+ } else if (EmojiStatus.STATUS_ARRAY.indexOf(au.emoji) > -1)
+ return -1;
+ else if (EmojiStatus.STATUS_ARRAY.indexOf(au.emoji) > -1)
+ return 1;
+ else if (au.phoneUser && bu.phoneUser) {
+ } else if (au.phoneUser)
+ return -1;
+ else if (bu.phoneUser)
+ return 1;
+ /**
+ * Check name (case-insensitive) in the event of a tie up above. If the name
+ * is the same then use userID which should be unique making the order the same
+ * across all clients.
+ */
+ if (au.name.toLowerCase() < bu.name.toLowerCase())
+ return -1;
+ else if (au.name.toLowerCase() > bu.name.toLowerCase())
+ return 1;
+ else if (au.intId.toLowerCase() > bu.intId.toLowerCase())
+ return -1;
+ else if (au.intId.toLowerCase() < bu.intId.toLowerCase())
+ return 1;
+ return 0;
+ }
+ }
+}
diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/whiteboard/views/WhiteboardCanvasMediator.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/whiteboard/views/WhiteboardCanvasMediator.as
old mode 100644
new mode 100755
index 1871d86a26..b9a9369ffb
--- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/whiteboard/views/WhiteboardCanvasMediator.as
+++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/whiteboard/views/WhiteboardCanvasMediator.as
@@ -53,7 +53,7 @@ package org.bigbluebutton.lib.whiteboard.views {
private function drawAllAnnotations():void {
trace("++ draw draw Draw");
- var annotations:Array = userSession.presentationList.currentPresentation.getSlideAt(userSession.presentationList.currentPresentation.currentSlideNum).annotations;
+ var annotations:Array = userSession.presentationList.currentPresentation.currentSlide.annotations;
for (var i:int = 0; i < annotations.length; i++) {
var an:IAnnotation = annotations[i] as IAnnotation;
an.draw(view, _zoom);