From f81ba4c9bd5377e8a3d0559cd157647203d610b3 Mon Sep 17 00:00:00 2001 From: Ghaz Triki Date: Sun, 3 Apr 2016 11:30:38 +0100 Subject: [PATCH] - Updated top and bottom menus. - Updated presentation and participants views. --- clients/flash/air-client/src/Default.css | 594 ++++++++++++++++-- .../src/locale/en_US/resources.properties | 42 +- .../air/chat/views/chat/ChatItemRenderer.mxml | 60 +- .../air/chat/views/chat/ChatView.as | 2 +- .../air/chat/views/chat/ChatViewBase.mxml | 25 +- .../chatrooms/ChatRoomsItemRenderer.mxml | 33 +- .../chat/views/chatrooms/ChatRoomsList.mxml | 8 +- .../air/common/views/PagesENUM.as | 2 - .../air/common/views/ParticipantIcon.mxml | 45 ++ .../air/common/views/SelectionIcon.mxml | 16 + .../deskshare/views/DeskshareViewMediator.as | 6 +- .../DisconnectPageViewMediator.as | 2 +- .../main/views/exit/ExitPageViewMediator.as | 2 +- .../main/views/guest/GuestPageViewMediator.as | 2 +- .../openroom/OpenRoomViewMediator.as | 4 +- .../recentrooms/RecentRoomsViewMediator.as | 7 - .../views/menubuttons/IMenuButtonsView.as | 10 +- .../main/views/menubuttons/MenuButtons.mxml | 80 +-- .../views/menubuttons/MenuButtonsConfig.as | 7 + .../main/views/menubuttons/MenuButtonsView.as | 25 +- .../menubuttons/MenuButtonsViewMediator.as | 200 ++---- .../changestatus/ChangeStatusConfig.as} | 6 +- .../changestatus/ChangeStatusPopUp.as | 13 + .../changestatus/ChangeStatusPopUpBase.mxml | 42 ++ .../changestatus/ChangeStatusPopUpMediator.as | 77 +++ .../HorizontalStatusItemRenderer.mxml | 106 ++++ .../changestatus/IChangeStatusPopUp.as | 10 + .../changestatus/StatusItemRenderer.mxml | 118 ++++ .../air/main/views/profile/IProfileView.as | 5 +- .../air/main/views/profile/ProfileView.as | 13 +- .../main/views/profile/ProfileViewBase.mxml | 145 +++-- .../main/views/profile/ProfileViewMediator.as | 37 +- .../views/skins/NavigationButtonSkin.mxml | 16 +- .../views/skins/PresentationButtonSkin.mxml | 37 ++ .../skins/UserSettingsParticipantBtnSkin.mxml | 3 +- .../skins/VideoAudioSettingsBtnSkin.mxml | 4 +- .../views/IPresentationViewAir.as | 13 +- .../presentation/views/PresentationView.as | 62 +- .../views/PresentationViewBase.mxml | 36 +- .../views/PresentationViewMediator.as | 489 +++++++++++++- .../views/selectWebcam/ISelectStreamPopUp.as | 13 + .../views/selectWebcam/SelectStreamConfig.as | 46 ++ .../views/selectWebcam/SelectStreamPopUp.as | 20 + .../selectWebcam/SelectStreamPopUpBase.mxml | 81 +++ .../selectWebcam/SelectStreamPopUpMediator.as | 221 +++++++ .../selectWebcam/StreamItemRenderer.mxml | 83 +++ .../views/audio/AudioSettingsViewMediator.as | 6 +- .../views/lock/LockSettingsViewMediator.as | 12 +- .../air/settings/views/status/IStatusView.as | 14 - .../views/status/StatusItemRenderer.mxml | 66 -- .../air/settings/views/status/StatusView.as | 25 - .../settings/views/status/StatusViewBase.mxml | 33 - .../views/status/StatusViewMediator.as | 91 --- .../views/participants/IParticipantsView.as | 1 + .../participants/ParticipantItemRenderer.mxml | 56 +- .../views/participants/ParticipantsList.mxml | 3 +- .../views/participants/ParticipantsView.as | 4 + .../participants/ParticipantsViewBase.mxml | 134 ++-- .../participants/ParticipantsViewMediator.as | 92 ++- .../skins/UserSettingsParticipantBtnSkin.mxml | 7 +- .../views/videochat/VideoChatViewMediator.as | 6 +- 61 files changed, 2613 insertions(+), 805 deletions(-) create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/common/views/ParticipantIcon.mxml create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/common/views/SelectionIcon.mxml rename clients/flash/air-client/src/org/bigbluebutton/air/{settings/views/status/StatusConfig.as => main/views/menubuttons/changestatus/ChangeStatusConfig.as} (84%) create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUp.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpBase.mxml create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpMediator.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/HorizontalStatusItemRenderer.mxml create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/IChangeStatusPopUp.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/StatusItemRenderer.mxml create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/PresentationButtonSkin.mxml create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/ISelectStreamPopUp.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamConfig.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUp.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpBase.mxml create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpMediator.as create mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/StreamItemRenderer.mxml delete mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/IStatusView.as delete mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusItemRenderer.mxml delete mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusView.as delete mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewBase.mxml delete mode 100644 clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewMediator.as diff --git a/clients/flash/air-client/src/Default.css b/clients/flash/air-client/src/Default.css index b6a8c07f3a..5054108af3 100644 --- a/clients/flash/air-client/src/Default.css +++ b/clients/flash/air-client/src/Default.css @@ -4,6 +4,8 @@ @namespace navigationbutton "org.bigbluebutton.air.main.views.ui.navigationbutton.*"; @namespace skins "org.bigbluebutton.air.main.views.skins.*"; @namespace common "org.bigbluebutton.view.navigation.pages.common.*"; +@namespace presentation "org.bigbluebutton.air.presentation.views.*"; +@namespace selectWebcam "org.bigbluebutton.air.presentation.views.selectWebcam.*"; s|List.cameraProfilesListStyle { @@ -11,7 +13,82 @@ s|List.cameraProfilesListStyle } s|Button { - fontWeight: normal; + fontWeight: normal; +} + +selectWebcam|SelectStreamPopUpBase +{ + modalTransparency: .8; + modalTransparencyBlur: .25; + modalTransparencyColor: #000000; +} + +.selectStreamTitle { + color: #8898A5; +} + +.selectStreamPopUp { + closeButtonColor: #8F9EAA; +} + +.streamItemStyle +{ + selectedColor: #63D79F; + normalColor: #D0D6DC; + selectionColor: #FFFFFF; + lineColor: #F4F6F7; + lineWeight: 1; +} + +s|Group.participantIconStyle +{ + circleColor: #8898A5; +} + +s|Button.bottomPresentationBtnStyle +{ + backgroundColor: #4998D0; + selectedBackgroundColor: #DBDBDB; + color: #FFFFFF; + skinClass: ClassReference("org.bigbluebutton.air.main.views.skins.PresentationButtonSkin"); +} + +s|View.participantsViewStyle +{ + subRectangleColor: #F1F3F7; +} + +s|Group.bottomMenuStyle +{ + gradientColor: #2A2D33; +} + +.settingsStyle +{ + backgroundColor: #FFFFFF; + rectangleColor: #4998D0; + subRectangleColor: #F1F3F7; + circleColor: #FFFFFF; +} + +.videoStreamNamePresenter +{ + color: #A3AFB9; +} + +s|Label.settingsUserNameStyle +{ + color: #FFFFFF; +} + +s|Label.settingsSubtitleStyle +{ + color: #ABB6C0; +} + +.settingsUserFirstLettersStyle +{ + color: #FFFFFF; } s|Group.videoTextFieldStyle @@ -62,18 +139,25 @@ navigationbutton|NavigationButton s|Label.chatTimeColor { - color: #C3C3C3; + color: #8898A5; } s|Button.logoutButtonStyle { backgroundColor: #3385FF; textColor:#FFFFFF; +s|Label.showSharedCamsLabel { + color:#CCCDCE; + textDecoration: underline; } s|Button.userSettingsButtonStyle { onClickBackgroundColor:#DBDBDB; + backgroundColor: #4998D0; + disabledBackgroundColor: #A4CBE7; + textColor:#FDFEFE; + disabledTextColor:#CCE2F1; skinClass: ClassReference("org.bigbluebutton.air.main.views.skins.UserSettingsParticipantBtnSkin"); } @@ -96,7 +180,7 @@ s|Button.pushToTalkStyle s|Button.videoAudioSettingStyle { - backgroundColor:#FFFFFF; + backgroundColor:#F1F3F7; onClickBackgroundColor:#DBDBDB; skinClass: ClassReference("org.bigbluebutton.air.main.views.skins.VideoAudioSettingsBtnSkin"); labelTextAlign:left; @@ -127,7 +211,7 @@ s|Button.topButtonStyle s|Button.newMessagesButtonStyle { - fillColor: #777777; + fillColor: #F0625F; textColor: #FFFFFF; skinClass: ClassReference("org.bigbluebutton.air.main.views.skins.NewMessagesButtonSkin"); } @@ -166,6 +250,11 @@ s|SkinnableContainer.containerStyle skinClass: ClassReference("org.bigbluebutton.air.main.views.skins.ProfileViewContainerSkin"); } +s|Button +{ + fontWeight: normal; +} + global { font-family: Helvetica; @@ -175,13 +264,19 @@ global content-background-color: #FFFFFF; symbol-color: #F6F2F2; chrome-color: #0C0B0B; - color: #777777; + color: #43474F; +} + +common|NoTabView +{ + backgroundColor: #FFFFFF; } .presentationStyle, .loadingScreenStyle { backgroundColor: #2A2D33; } + .loadingScreenStyle { lineColor: #959699; @@ -193,6 +288,17 @@ s|Image.bigbbbLogoStyle skinClass: ClassReference("org.bigbluebutton.air.main.views.skins.BBBLogoSkin"); } +s|View.chatViewStyle +{ + backgroundColor: #F1F3F7; +} + +s|TextInput.msgInputBoxStyle +{ + borderVisible: false; +} + + @media (application-dpi: 160) { s|Application.mainshellStyle @@ -206,6 +312,13 @@ s|Image.bigbbbLogoStyle toolBarHeight:48; itemPaddingLeft:6; itemPaddingRight:6; + itemHeight:32; + } + + s|View.settingsStyle + { + itemHeight:32; + topRectHeight:160; } s|Button.recordingStatusIconStyle @@ -321,6 +434,11 @@ s|Image.bigbbbLogoStyle fontSize:18; } + .selectStreamTitle + { + fontSize:18; + } + .loadingScreenTitle { fontSize:21; @@ -350,6 +468,11 @@ s|Image.bigbbbLogoStyle itemPaddingRight:6; } + s|ItemRenderer.streamItemStyle + { + itemHeight:64; + } + s|ItemRenderer.cameraProfileItemStyle { itemHeight:48; @@ -462,6 +585,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-mdpi/chat.png"); } + s|Button.chatNewMessagesButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/chat_new_message.png"); + } + s|Button.MuteButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/micOffIcon_dark.png"); @@ -505,6 +633,16 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-mdpi/settings.png"); } + s|Button.presentationButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/presentation.png"); + } + + s|Button.presentationButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/presentation.png"); + } + s|Button.backButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/backButton.png"); @@ -521,7 +659,7 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-mdpi/video.png"); } - s|Image.iconStyle + s|Image.iconStyle, s|Group.participantIconStyle { width: 32; height: 32; @@ -532,6 +670,16 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-mdpi/video.png"); } + s|Image.selectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/selected.png"); + } + + s|Image.unselectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/unselected.png"); + } + s|Image.userDetailIconStyle { width: 72; @@ -579,54 +727,99 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-mdpi/presentation.png"); } + s|Image.handIconStyle, s|Button.handStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/hand.png"); + } + + s|Button.camOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/cam.png"); + } + + s|Button.camOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/cam_off.png"); + } + + s|Button.micOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/mic.png"); + } + + s|Button.micOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/mic_off.png"); + } + s|Image.agreeIconStyle, s|Button.agreeStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/icon-6-thumb-up.png"); } - s|Image.disagreeIconStyle, s|Button.disagreeStatusButtonStyle + s|Button.disagreeStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/icon-7-thumb-down.png"); } - s|Image.speakLouderIconStyle, s|Button.speakLouderStatusButtonStyle + s|Button.speakLouderStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/ic_volume_up.png"); } - s|Image.speakSofterIconStyle, s|Button.speakSofterStatusButtonStyle + s|Button.speakSofterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/ic_volume_down.png"); } - s|Image.speakFasterIconStyle, s|Button.speakFasterStatusButtonStyle + s|Button.speakFasterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/ic_fast_forward.png"); } - s|Image.speakSlowerIconStyle, s|Button.speakSlowerStatusButtonStyle + s|Button.speakSlowerStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/ic_fast_rewind.png"); } - s|Image.beRightBackIconStyle, s|Button.beRightBackStatusButtonStyle + s|Button.beRightBackStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/ic_access_time.png"); } - s|Image.laughterIconStyle, s|Button.laughterStatusButtonStyle + s|Button.confusedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/confused.png"); + } + + s|Button.undecidedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/undecided.png"); + } + + s|Button.happyStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/icon-6-smiling-face.png"); } - s|Image.sadIconStyle, s|Button.sadStatusButtonStyle + s|Button.sadStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-mdpi/icon-7-sad-face.png"); } - s|Image.userIconStyle, s|Button.noStatusButtonStyle + s|Button.clearStatusButtonStyle { - backgroundImage: Embed(source="assets/res/drawable-mdpi/user.png"); + backgroundImage: Embed(source="assets/res/drawable-mdpi/clear_status.png"); + } + + s|Image.publicChatIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/publicChat.png"); + } + + s|Image.participantInitialsCircleIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-mdpi/participantCircle.png"); } s|Image.arrowRightStyle @@ -636,10 +829,10 @@ s|Image.bigbbbLogoStyle s|Button.newMessagesButtonStyle { - width: 38; + width: 41; height: 30; - radiusX: 4; - radiusY: 4; + radiusX: 16; + radiusY: 16; fontSize:12; } @@ -678,6 +871,13 @@ s|Image.bigbbbLogoStyle toolBarHeight:72; itemPaddingLeft:9; itemPaddingRight:9; + itemHeight:48; + } + + s|View.settingsStyle + { + itemHeight:48; + topRectHeight:240; } s|Button.recordingStatusIconStyle @@ -725,7 +925,6 @@ s|Image.bigbbbLogoStyle s|RichEditableText.msgTextStyle { - paddingLeft:18; paddingRight:18; paddingBottom:18; } @@ -792,6 +991,16 @@ s|Image.bigbbbLogoStyle fontSize:27; } + .selectStreamTitle + { + fontSize:27; + } + + .settingsUserFirstLettersStyle + { + fontSize:35; + } + s|Button.topButtonStyle { width: 72; @@ -813,7 +1022,12 @@ s|Image.bigbbbLogoStyle fontSize:18; } - s|ItemRenderer.participantItemStyle, s|ItemRenderer.roomItemStyle + .nameIconText + { + fontSize:12; + } + + s|ItemRenderer.chatRoomItemStyle, s|ItemRenderer.participantItemStyle, s|ItemRenderer.roomItemStyle, s|ItemRenderer.statusItemStyle { itemHeight:96; lineColor: #F2F2F2; @@ -822,6 +1036,11 @@ s|Image.bigbbbLogoStyle itemPaddingRight:9; } + s|ItemRenderer.streamItemStyle + { + itemHeight:96; + } + s|ItemRenderer.cameraProfileItemStyle { itemHeight:72; @@ -904,6 +1123,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-hdpi/chat.png"); } + s|Button.chatNewMessagesButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/chat_new_message.png"); + } + s|Button.MuteButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/micOffIcon_dark.png"); @@ -969,6 +1193,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-hdpi/settings.png"); } + s|Button.presentationButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/presentation.png"); + } + s|Button.backButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/backButton.png"); @@ -985,7 +1214,7 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-hdpi/video.png"); } - s|Image.iconStyle + s|Image.iconStyle, s|Group.participantIconStyle { width: 48; height: 48; @@ -996,6 +1225,16 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-hdpi/video.png"); } + s|Image.selectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/selected.png"); + } + + s|Image.unselectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/unselected.png"); + } + s|Image.userDetailIconStyle { width: 96; @@ -1048,49 +1287,94 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-hdpi/icon-6-thumb-up.png"); } - s|Image.disagreeIconStyle, s|Button.disagreeStatusButtonStyle + s|Image.handIconStyle, s|Button.handStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/hand.png"); + } + + s|Button.camOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/cam.png"); + } + + s|Button.camOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/cam_off.png"); + } + + s|Button.micOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/mic.png"); + } + + s|Button.micOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/mic_off.png"); + } + + s|Button.disagreeStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/icon-7-thumb-down.png"); } - s|Image.speakLouderIconStyle, s|Button.speakLouderStatusButtonStyle + s|Button.speakLouderStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/ic_volume_up.png"); } - s|Image.speakSofterIconStyle, s|Button.speakSofterStatusButtonStyle + s|Button.speakSofterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/ic_volume_down.png"); } - s|Image.speakFasterIconStyle, s|Button.speakFasterStatusButtonStyle + s|Button.speakFasterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/ic_fast_forward.png"); } - s|Image.speakSlowerIconStyle, s|Button.speakSlowerStatusButtonStyle + s|Button.speakSlowerStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/ic_fast_rewind.png"); } - s|Image.beRightBackIconStyle, s|Button.beRightBackStatusButtonStyle + s|Button.beRightBackStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/ic_access_time.png"); } - s|Image.laughterIconStyle, s|Button.laughterStatusButtonStyle + s|Button.confusedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/confused.png"); + } + + s|Button.undecidedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/undecided.png"); + } + + s|Button.happyStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/icon-6-smiling-face.png"); } - s|Image.sadIconStyle, s|Button.sadStatusButtonStyle + s|Button.sadStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-hdpi/icon-7-sad-face.png"); } - s|Image.userIconStyle, s|Button.noStatusButtonStyle + s|Button.clearStatusButtonStyle { - backgroundImage: Embed(source="assets/res/drawable-hdpi/user.png"); + backgroundImage: Embed(source="assets/res/drawable-hdpi/clear_status.png"); + } + + s|Image.publicChatIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/publicChat.png"); + } + + s|Image.participantInitialsCircleIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-hdpi/participantCircle.png"); } s|Image.arrowRightStyle @@ -1100,10 +1384,10 @@ s|Image.bigbbbLogoStyle s|Button.newMessagesButtonStyle { - width: 45; + width: 50; height: 45; - radiusX: 6; - radiusY: 6; + radiusX: 24; + radiusY: 24; fontSize:18; } @@ -1141,6 +1425,13 @@ s|Image.bigbbbLogoStyle toolBarHeight:72; itemPaddingLeft:12; itemPaddingRight:12; + itemHeight:64; + } + + s|View.settingsStyle + { + itemHeight:64; + topRectHeight:320; } s|Button.recordingStatusIconStyle @@ -1188,7 +1479,6 @@ s|Image.bigbbbLogoStyle s|RichEditableText.msgTextStyle { - paddingLeft:24; paddingRight:24; paddingBottom:24; } @@ -1256,6 +1546,16 @@ s|Image.bigbbbLogoStyle fontSize:36; } + .selectStreamTitle + { + fontSize:36; + } + + .settingsUserFirstLettersStyle + { + fontSize:46; + } + .loadingScreenTitle { fontSize:46; @@ -1284,7 +1584,12 @@ s|Image.bigbbbLogoStyle fontSize:24; } - s|ItemRenderer.participantItemStyle, s|ItemRenderer.roomItemStyle + .nameIconText + { + fontSize:16; + } + + s|ItemRenderer.chatRoomItemStyle, s|ItemRenderer.participantItemStyle, s|ItemRenderer.roomItemStyle, s|ItemRenderer.statusItemStyle { itemHeight:128; lineColor: #F2F2F2; @@ -1293,6 +1598,11 @@ s|Image.bigbbbLogoStyle itemPaddingRight:12; } + s|ItemRenderer.streamItemStyle + { + itemHeight:128; + } + s|ItemRenderer.cameraProfileItemStyle { itemHeight:96; @@ -1375,6 +1685,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xhdpi/chat.png"); } + s|Button.chatNewMessagesButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/chat_new_message.png"); + } + s|Button.MuteButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/micOffIcon_dark.png"); @@ -1440,6 +1755,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xhdpi/settings.png"); } + s|Button.presentationButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/presentation.png"); + } + s|Button.backButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/backButton.png"); @@ -1456,7 +1776,7 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xhdpi/video.png"); } - s|Image.iconStyle + s|Image.iconStyle, s|Group.participantIconStyle { width: 64; height: 64; @@ -1467,6 +1787,16 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xhdpi/video.png"); } + s|Image.selectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/selected.png"); + } + + s|Image.unselectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/unselected.png"); + } + s|Image.userDetailIconStyle { width: 144; @@ -1519,49 +1849,94 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xhdpi/icon-6-thumb-up.png"); } - s|Image.disagreeIconStyle, s|Button.disagreeStatusButtonStyle + s|Image.handIconStyle, s|Button.handStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/hand.png"); + } + + s|Button.camOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/cam.png"); + } + + s|Button.camOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/cam_off.png"); + } + + s|Button.micOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/mic.png"); + } + + s|Button.micOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/mic_off.png"); + } + + s|Button.disagreeStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/icon-7-thumb-down.png"); } - s|Image.speakLouderIconStyle, s|Button.speakLouderStatusButtonStyle + s|Button.speakLouderStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/ic_volume_up.png"); } - s|Image.speakSofterIconStyle, s|Button.speakSofterStatusButtonStyle + s|Button.speakSofterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/ic_volume_down.png"); } - s|Image.speakFasterIconStyle, s|Button.speakFasterStatusButtonStyle + s|Button.speakFasterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/ic_fast_forward.png"); } - s|Image.speakSlowerIconStyle, s|Button.speakSlowerStatusButtonStyle + s|Button.speakSlowerStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/ic_fast_rewind.png"); } - s|Image.beRightBackIconStyle, s|Button.beRightBackStatusButtonStyle + s|Button.beRightBackStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/ic_access_time.png"); } - s|Image.laughterIconStyle, s|Button.laughterStatusButtonStyle + s|Button.confusedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/confused.png"); + } + + s|Button.undecidedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/undecided.png"); + } + + s|Button.happyStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/icon-6-smiling-face.png"); } - s|Image.sadIconStyle, s|Button.sadStatusButtonStyle + s|Button.sadStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xhdpi/icon-7-sad-face.png"); } - s|Image.userIconStyle, s|Button.noStatusButtonStyle + s|Button.clearStatusButtonStyle { - backgroundImage: Embed(source="assets/res/drawable-xhdpi/user.png"); + backgroundImage: Embed(source="assets/res/drawable-xhdpi/clear_status.png"); + } + + s|Image.publicChatIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/publicChat.png"); + } + + s|Image.participantInitialsCircleIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xhdpi/participantCircle.png"); } s|Image.arrowRightStyle @@ -1612,6 +1987,13 @@ s|Image.bigbbbLogoStyle toolBarHeight:144; itemPaddingLeft:18; itemPaddingRight:18; + itemHeight:86; + } + + s|View.settingsStyle + { + itemHeight:86; + topRectHeight:430; } s|Button.recordingStatusIconStyle @@ -1727,6 +2109,17 @@ s|Image.bigbbbLogoStyle fontSize:54; } + + .selectStreamTitle + { + fontSize:54; + } + + .settingsUserFirstLettersStyle + { + fontSize:70; + } + .loadingScreenTitle { fontSize:70; @@ -1747,7 +2140,12 @@ s|Image.bigbbbLogoStyle fontSize:36; } - s|ItemRenderer.participantItemStyle, s|ItemRenderer.roomItemStyle + .nameIconText + { + fontSize:24; + } + + s|ItemRenderer.chatRoomItemStyle, s|ItemRenderer.participantItemStyle, s|ItemRenderer.roomItemStyle, s|ItemRenderer.statusItemStyle { itemHeight:192; lineColor: #F2F2F2; @@ -1756,6 +2154,11 @@ s|Image.bigbbbLogoStyle itemPaddingRight:18; } + s|ItemRenderer.streamItemStyle + { + itemHeight:192; + } + s|ItemRenderer.cameraProfileItemStyle { itemHeight:144; @@ -1869,6 +2272,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xxhdpi/chat.png"); } + s|Button.chatNewMessagesButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/chat_new_message.png"); + } + s|Button.MuteButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/micOffIcon_dark.png"); @@ -1913,6 +2321,11 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xxhdpi/settings.png"); } + s|Button.presentationButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/presentation.png"); + } + s|Button.backButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/backButton.png"); @@ -1929,7 +2342,7 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xxhdpi/video.png"); } - s|Image.iconStyle + s|Image.iconStyle, s|Group.participantIconStyle { width: 96; height: 96; @@ -1940,6 +2353,16 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xxhdpi/video.png"); } + s|Image.selectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/selected.png"); + } + + s|Image.unselectedIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/unselected.png"); + } + s|Image.userDetailIconStyle { width: 192; @@ -1992,49 +2415,94 @@ s|Image.bigbbbLogoStyle backgroundImage: Embed(source="assets/res/drawable-xxhdpi/icon-6-thumb-up.png"); } - s|Image.disagreeIconStyle, s|Button.disagreeStatusButtonStyle + s|Image.handIconStyle, s|Button.handStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/hand.png"); + } + + s|Button.camOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/cam.png"); + } + + s|Button.camOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/cam_off.png"); + } + + s|Button.micOnButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/mic.png"); + } + + s|Button.micOffButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/mic_off.png"); + } + + s|Button.disagreeStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/icon-7-thumb-down.png"); } - s|Image.speakLouderIconStyle, s|Button.speakLouderStatusButtonStyle + s|Button.speakLouderStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/ic_volume_up.png"); } - s|Image.speakSofterIconStyle, s|Button.speakSofterStatusButtonStyle + s|Button.speakSofterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/ic_volume_down.png"); } - s|Image.speakFasterIconStyle, s|Button.speakFasterStatusButtonStyle + s|Button.speakFasterStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/ic_fast_forward.png"); } - s|Image.speakSlowerIconStyle, s|Button.speakSlowerStatusButtonStyle + s|Button.speakSlowerStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/ic_fast_rewind.png"); } - s|Image.beRightBackIconStyle, s|Button.beRightBackStatusButtonStyle + s|Button.beRightBackStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/ic_access_time.png"); } - s|Image.laughterIconStyle, s|Button.laughterStatusButtonStyle + s|Button.confusedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/confused.png"); + } + + s|Button.undecidedStatusButtonStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/undecided.png"); + } + + s|Button.happyStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/icon-6-smiling-face.png"); } - s|Image.sadIconStyle, s|Button.sadStatusButtonStyle + s|Button.sadStatusButtonStyle { backgroundImage: Embed(source="assets/res/drawable-xxhdpi/icon-7-sad-face.png"); } - s|Image.userIconStyle, s|Button.noStatusButtonStyle + s|Button.clearStatusButtonStyle { - backgroundImage: Embed(source="assets/res/drawable-xxhdpi/user.png"); + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/clear_status.png"); + } + + s|Image.publicChatIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/publicChat.png"); + } + + s|Image.participantInitialsCircleIconStyle + { + backgroundImage: Embed(source="assets/res/drawable-xxhdpi/participantCircle.png"); } s|Image.arrowRightStyle @@ -2044,10 +2512,10 @@ s|Image.bigbbbLogoStyle s|Button.newMessagesButtonStyle { - width: 75; + width: 82; height: 60; - radiusX: 12; - radiusY: 12; + radiusX: 48; + radiusY: 48; fontSize:36; } diff --git a/clients/flash/air-client/src/locale/en_US/resources.properties b/clients/flash/air-client/src/locale/en_US/resources.properties index 4068ca171c..4d88c6cb31 100644 --- a/clients/flash/air-client/src/locale/en_US/resources.properties +++ b/clients/flash/air-client/src/locale/en_US/resources.properties @@ -1,6 +1,6 @@ chat.item.privateChat=New private chat -chat.item.publicChat=Public chat -chat.public.title=Public chat +chat.item.publicChat=Public Chat +chat.public.title=Public Chat chat.sendBtn.text=Send chat.title=Chat Rooms chat.textInput.text=Type message here @@ -19,11 +19,16 @@ notification.title=BigBlueButton notification.message=A meeting is running participants.guests=Guests participants.title=Participants -participants.status.presenter=Presenter +participants.conversations=Conversations +participants.online=Online +participants.status.presenter=Currently Presenting participants.status.moderator=Moderator -profile.title=User Settings +presentation.sharedWebcams=Shared webcams +presentation.sharedWebcam=Shared webcam +profile.title=Settings +profile.subtitle=Session Settings profile.participant=Participant -profile.logout=Log out +profile.logout=Leave session profile.status.title=Change status profile.status.current=Current status profile.settings=Settings @@ -35,19 +40,24 @@ profile.settings.cameraQuality.selectquality = Select camera quality: profile.settings.mic=Audio profile.settings.mic.on=Leave audio profile.settings.mic.off=Join audio -profile.settings.handRaise=Raise hand +profile.settings.handRaise=Raise profile.settings.agree=Agree profile.settings.disagree=Disagree profile.settings.speakLouder = Could you please speak louder? profile.settings.speakSofter = Could you please speak softer? profile.settings.speakFaster = Could you please speak faster? profile.settings.speakSlower = Could you please speak slower? -profile.settings.beRightBack = I'll be right back -profile.settings.laughter=:) -profile.settings.sad=:( -profile.settings.clearStatus=Clear my status +profile.settings.beRightBack = Time +profile.settings.laughter=Happy +profile.settings.sad=Sad +profile.settings.neutral=Undecided +profile.settings.confused=Confused +profile.settings.clearStatus=Clear profile.settings.handLower=Lower hand selectParticipant.title=Select a Participant +selectStream.title=Active Webcams +selectStream.viewWebcam=Start viewing webcam +selectStream.hideWebcam=Stop viewing webcams userDetail.title=Participant userDetail.name=Name userDetail.role=Role @@ -87,20 +97,24 @@ management.muteAll = Mute all users management.unmuteAll = Unmute all users management.muteAllExceptPresenter = Mute all users except presenter management.lockViewers = Lock viewers +menuButtons.camOff = Cam Off +menuButtons.camOn = Cam On +menuButtons.micOff = Mic Off +menuButtons.micOn = Mic On lockSettings.title = Lock Viewers lockSettings.cam = Webcam lockSettings.mic = Microphone -lockSettings.publicChat = Public chat -lockSettings.privateChat = Private chat +lockSettings.publicChat = Public Chat +lockSettings.privateChat = Private Chat lockSettings.layout = Web layout lockSettings.apply = Apply guest.waitMessage=You are a guest, please wait moderator approval. deskshare.noDeskshare = No desktop stream to display deskshare.title = Desktop Sharing -cameraSettings.title=Camera Settings +cameraSettings.title=Video cameraSettings.rotate=Rotate Camera cameraSettings.swap=Swap Camera -audioSettings.title=Audio Settings +audioSettings.title=Audio audioSettings.enableMic=Enable microphone audioSettings.enableAudio=Enable audio audioSettings.pushToTalk=Push to talk diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatItemRenderer.mxml index 21cc2ae23f..e9efb17ce3 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatItemRenderer.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatItemRenderer.mxml @@ -1,7 +1,8 @@ + xmlns:mx="library://ns.adobe.com/flex/mx" + xmlns:participanticon="org.bigbluebutton.air.common.views.*"> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatView.as b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatView.as index e61ca9d179..fb39905fed 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatView.as @@ -21,7 +21,7 @@ package org.bigbluebutton.air.chat.views.chat { } public function get pageName():Label { - return FlexGlobals.topLevelApplication.pageName; + return FlexGlobals.topLevelApplication.topActionBar.pageName; } override protected function childrenCreated():void { diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatViewBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatViewBase.mxml index 9f435928c9..bacc052ab7 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatViewBase.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chat/ChatViewBase.mxml @@ -21,22 +21,27 @@ - + - + - + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsItemRenderer.mxml index 33817a8fe3..53a3426138 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsItemRenderer.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsItemRenderer.mxml @@ -2,6 +2,7 @@ @@ -13,6 +14,14 @@ if (obj) { if (!obj.hasOwnProperty("button")) { title.text = obj.name; + if (obj.name == resourceManager.getString('resources', 'chat.item.publicChat')) { + publicChatIcon.visible = true; + publicChatIcon.includeInLayout = true; + } else { + participantIcon.participantName = obj.name; + participantIcon.visible = true; + participantIcon.includeInLayout = true; + } if (obj.online == false) { title.text += resourceManager.getString('resources', 'userDetail.userOffline'); } @@ -23,6 +32,7 @@ } else { newMessages.visible = false; } + } else { newMessages.visible = false; title.text = "+" + resourceManager.getString('resources', 'chat.item.privateChat'); @@ -31,21 +41,28 @@ } ]]> - + - + + + + height="100%" + styleName="contentFontSize" /> - diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsList.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsList.mxml index e878a91462..f25662bf7b 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsList.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/chat/views/chatrooms/ChatRoomsList.mxml @@ -1,9 +1,13 @@ + itemRenderer="org.bigbluebutton.air.chat.views.chatrooms.ChatRoomsItemRenderer" + verticalScrollPolicy="off"> + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/common/views/PagesENUM.as b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/PagesENUM.as index 0f5c14817f..ffdad82da5 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/common/views/PagesENUM.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/PagesENUM.as @@ -17,7 +17,6 @@ package org.bigbluebutton.air.common.views { import org.bigbluebutton.air.settings.views.audio.AudioSettingsView; import org.bigbluebutton.air.settings.views.camera.CameraSettingsView; import org.bigbluebutton.air.settings.views.lock.LockSettingsView; - import org.bigbluebutton.air.settings.views.status.StatusView; import org.bigbluebutton.air.users.views.participants.ParticipantsView; import org.bigbluebutton.air.users.views.userdetails.UserDetailsView; import org.bigbluebutton.air.video.views.videochat.VideoChatView; @@ -77,7 +76,6 @@ package org.bigbluebutton.air.common.views { dic[PRESENTATION] = PresentationView; dic[LOGIN] = LoginPageView; dic[PROFILE] = ProfileView; - dic[STATUS] = StatusView; dic[USER_DETAILS] = UserDetailsView; dic[VIDEO_CHAT] = VideoChatView; dic[CHATROOMS] = ChatRoomsView; diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/common/views/ParticipantIcon.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/ParticipantIcon.mxml new file mode 100644 index 0000000000..4916c1714e --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/ParticipantIcon.mxml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/common/views/SelectionIcon.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/SelectionIcon.mxml new file mode 100644 index 0000000000..5b4cd57b51 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/SelectionIcon.mxml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/deskshare/views/DeskshareViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/deskshare/views/DeskshareViewMediator.as index 2961be18d1..e8bf204c69 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/deskshare/views/DeskshareViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/deskshare/views/DeskshareViewMediator.as @@ -22,9 +22,9 @@ package org.bigbluebutton.air.deskshare.views { public override function initialize():void { showDeskshare(userSession.deskshareConnection.streamWidth, userSession.deskshareConnection.streamHeight); FlexGlobals.topLevelApplication.stage.addEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler); - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'deskshare.title'); - FlexGlobals.topLevelApplication.backBtn.visible = false; - FlexGlobals.topLevelApplication.profileBtn.visible = true; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'deskshare.title'); + FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = false; + FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = true; super.initialize(); } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/disconnectpage/DisconnectPageViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/disconnectpage/DisconnectPageViewMediator.as index 0623ac96c9..2ce1439577 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/disconnectpage/DisconnectPageViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/disconnectpage/DisconnectPageViewMediator.as @@ -36,7 +36,7 @@ package org.bigbluebutton.air.main.views.disconnectpage { view.reconnectButton.addEventListener(MouseEvent.CLICK, reconnect); changeConnectionStatus(userUISession.currentPageDetails as int); if (FlexGlobals.topLevelApplication.hasOwnProperty("pageName")) { - FlexGlobals.topLevelApplication.pageName.text = ""; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ""; FlexGlobals.topLevelApplication.topActionBar.visible = false; FlexGlobals.topLevelApplication.bottomMenu.visible = false; } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/exit/ExitPageViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/exit/ExitPageViewMediator.as index 6dd93219e3..c0ce5e56af 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/exit/ExitPageViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/exit/ExitPageViewMediator.as @@ -45,7 +45,7 @@ package org.bigbluebutton.air.main.views.exit { view.yesButton.addEventListener(MouseEvent.CLICK, applicationExit); view.noButton.addEventListener(MouseEvent.CLICK, backToApplication); changeConnectionStatus(userUISession.currentPageDetails as int); - FlexGlobals.topLevelApplication.pageName.text = ""; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ""; _topBar = FlexGlobals.topLevelApplication.topActionBar.visible; FlexGlobals.topLevelApplication.topActionBar.visible = false; _bottomMenu = FlexGlobals.topLevelApplication.bottomMenu.visible; diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/guest/GuestPageViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/guest/GuestPageViewMediator.as index e70d2e2a1c..06766112c9 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/guest/GuestPageViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/guest/GuestPageViewMediator.as @@ -26,7 +26,7 @@ package org.bigbluebutton.air.main.views.guest { } else { view.exitButton.addEventListener(MouseEvent.CLICK, applicationExit); } - FlexGlobals.topLevelApplication.pageName.text = ""; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ""; FlexGlobals.topLevelApplication.topActionBar.visible = false; FlexGlobals.topLevelApplication.bottomMenu.visible = false; } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/OpenRoomViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/OpenRoomViewMediator.as index 7cf5805f3c..a8c25a661c 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/OpenRoomViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/OpenRoomViewMediator.as @@ -34,8 +34,8 @@ package org.bigbluebutton.air.main.views.loginpage.openroom { public var userUISession:IUserUISession; override public function initialize():void { - FlexGlobals.topLevelApplication.profileBtn.visible = false; - FlexGlobals.topLevelApplication.backBtn.visible = false; + FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = false; + FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = false; FlexGlobals.topLevelApplication.bottomMenu.includeInLayout = false; FlexGlobals.topLevelApplication.topActionBar.visible = false; (view as View).addEventListener(KeyboardEvent.KEY_DOWN, KeyHandler); diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/recentrooms/RecentRoomsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/recentrooms/RecentRoomsViewMediator.as index fec44810f4..163cf1aecf 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/recentrooms/RecentRoomsViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/loginpage/openroom/recentrooms/RecentRoomsViewMediator.as @@ -45,13 +45,6 @@ package org.bigbluebutton.air.main.views.loginpage.openroom.recentrooms { } view.roomsList.dataProvider = dataProvider; view.roomsList.addEventListener(MouseEvent.CLICK, selectRoom); - FlexGlobals.topLevelApplication.profileBtn.visible = false; - FlexGlobals.topLevelApplication.backBtn.visible = false; - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'recentRooms.title'); - FlexGlobals.topLevelApplication.topActionBar.visible = true; - FlexGlobals.topLevelApplication.bottomMenu.includeInLayout = false; - FlexGlobals.topLevelApplication.backBtn.includeInLayout = true; - FlexGlobals.topLevelApplication.backBtn.visible = true; } protected function selectRoom(event:MouseEvent):void { diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/IMenuButtonsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/IMenuButtonsView.as index fe86467f8a..6d7baa9000 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/IMenuButtonsView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/IMenuButtonsView.as @@ -1,15 +1,11 @@ package org.bigbluebutton.air.main.views.menubuttons { import org.bigbluebutton.air.main.views.ui.navigationbutton.NavigationButton; - import spark.components.Button; public interface IMenuButtonsView { - function get menuDeskshareButton():NavigationButton - function get menuVideoChatButton():NavigationButton - function get menuPresentationButton():NavigationButton - function get menuChatButton():NavigationButton - function get menuParticipantsButton():NavigationButton - function get pushToTalkButton():Button; + function get camButton():Button + function get micButton():Button + function get statusButton():Button } } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtons.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtons.mxml index e60b97ec7a..f7b9ec5149 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtons.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtons.mxml @@ -5,57 +5,57 @@ xmlns:navigationbutton="org.bigbluebutton.air.main.views.ui.navigationbutton.*" xmlns:common="org.bigbluebutton.view.navigation.pages.common.*" width="100%" - height="100%"> + height="100%" + styleName="bottomMenuStyle"> - - - + + + + + + + + - + - + + + - - - - - + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsConfig.as index 2175d50e62..6689848109 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsConfig.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsConfig.as @@ -1,5 +1,10 @@ package org.bigbluebutton.air.main.views.menubuttons { + import org.bigbluebutton.air.video.commands.ShareCameraCommand; + import org.bigbluebutton.lib.video.commands.ShareCameraSignal; + import org.bigbluebutton.lib.voice.commands.ShareMicrophoneCommand; + import org.bigbluebutton.lib.voice.commands.ShareMicrophoneSignal; + import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap; import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap; import robotlegs.bender.framework.api.IConfig; @@ -41,6 +46,8 @@ package org.bigbluebutton.air.main.views.menubuttons { * Maps signals to commands using the signalCommandMap. */ private function signals():void { + signalCommandMap.map(ShareCameraSignal).toCommand(ShareCameraCommand); + signalCommandMap.map(ShareMicrophoneSignal).toCommand(ShareMicrophoneCommand); } } } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsView.as index b89a695d55..fc3f3c868b 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsView.as @@ -1,32 +1,19 @@ package org.bigbluebutton.air.main.views.menubuttons { import org.bigbluebutton.air.main.views.ui.navigationbutton.NavigationButton; - import spark.components.Button; public class MenuButtonsView extends MenuButtons implements IMenuButtonsView { - public function get menuDeskshareButton():NavigationButton { - return deskshareBtn0; + public function get camButton():Button { + return camBtn0; } - public function get menuVideoChatButton():NavigationButton { - return videochatBtn0; + public function get micButton():Button { + return micBtn0; } - public function get menuPresentationButton():NavigationButton { - return presentationBtn0; - } - - public function get pushToTalkButton():Button { - return pushToTalkButton0; - } - - public function get menuChatButton():NavigationButton { - return chatBtn0; - } - - public function get menuParticipantsButton():NavigationButton { - return participantsBtn0; + public function get statusButton():Button { + return statusBtn0; } } } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsViewMediator.as index 41c6092ad3..bedc47f621 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/MenuButtonsViewMediator.as @@ -5,6 +5,7 @@ package org.bigbluebutton.air.main.views.menubuttons { import flash.desktop.NativeApplication; import flash.desktop.SystemIdleMode; + import flash.display.DisplayObjectContainer; import flash.events.Event; import flash.events.InvokeEvent; import flash.events.MouseEvent; @@ -16,21 +17,29 @@ package org.bigbluebutton.air.main.views.menubuttons { import mx.core.mx_internal; import mx.events.FlexEvent; import mx.events.ResizeEvent; + import mx.managers.PopUpManager; import mx.resources.ResourceManager; import org.bigbluebutton.air.common.views.PagesENUM; import org.bigbluebutton.air.common.views.TransitionAnimationENUM; import org.bigbluebutton.air.main.models.IUserUISession; + import org.bigbluebutton.air.main.views.menubuttons.changestatus.ChangeStatusPopUp; + import org.bigbluebutton.air.main.views.menubuttons.changestatus.StatusItemRenderer; import org.bigbluebutton.air.main.views.skins.NavigationButtonSkin; + import org.bigbluebutton.air.main.views.skins.PresentationButtonSkin; import org.bigbluebutton.lib.chat.models.IChatMessagesSession; import org.bigbluebutton.lib.main.commands.DisconnectUserSignal; import org.bigbluebutton.lib.main.models.IUserSession; import org.bigbluebutton.lib.user.models.User; import org.bigbluebutton.lib.user.models.UserList; import org.bigbluebutton.lib.user.services.IUsersService; + import org.bigbluebutton.lib.video.commands.ShareCameraSignal; + import org.bigbluebutton.lib.voice.commands.ShareMicrophoneSignal; import robotlegs.bender.bundles.mvcs.Mediator; + import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap; + import spark.events.PopUpEvent; import spark.transitions.ViewTransitionBase; public class MenuButtonsViewMediator extends Mediator { @@ -53,6 +62,15 @@ package org.bigbluebutton.air.main.views.menubuttons { [Inject] public var disconnectUserSignal:DisconnectUserSignal; + [Inject] + public var shareCameraSignal:ShareCameraSignal; + + [Inject] + public var shareMicrophoneSignal:ShareMicrophoneSignal; + + [Inject] + public var mediatorMap:IMediatorMap; + private var notificationManager:NotificationManager = new NotificationManager(); private var loggingOut:Boolean = false; @@ -61,52 +79,43 @@ package org.bigbluebutton.air.main.views.menubuttons { NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, fl_Activate); NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, fl_Deactivate); NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvokeEvent); - view.pushToTalkButton.addEventListener(FlexEvent.BUTTON_DOWN, pushToTalkOn); - view.pushToTalkButton.addEventListener(MouseEvent.MOUSE_UP, pushToTalkOff); - view.pushToTalkButton.addEventListener(MouseEvent.MOUSE_OUT, pushToTalkOff); userUISession.loadingSignal.add(loadingFinished); - userUISession.pageChangedSignal.add(pageChanged); - userSession.guestList.userAddedSignal.add(guestAdded); - userSession.guestList.userRemovedSignal.add(guestRemoved); userSession.userList.userChangeSignal.add(userChanged); - chatMessagesSession.newChatMessageSignal.add(updateMessagesNotification); - userSession.presentationList.presentationChangeSignal.add(presentationChanged); - userSession.userList.userChangeSignal.add(userChangeHandler); userSession.logoutSignal.add(loggingOutHandler); - userSession.assignedDeskshareSignal.add(configDeskshare); - userSession.pushToTalkSignal.add(pushToTalkChange); - pushToTalkChange(); + view.camButton.addEventListener(MouseEvent.CLICK, camOnOff); + view.micButton.addEventListener(MouseEvent.CLICK, micOnOff); + view.statusButton.addEventListener(MouseEvent.CLICK, changeStatus); } - - private function isPushToTalkOn() { - var micEnabled:Boolean = (userSession.voiceStreamManager && userSession.voiceStreamManager.mic && userSession.voiceConnection.callActive) ? true : false; - return userSession.pushToTalk && micEnabled; - } - - private function pushToTalkChange():void { - if (userSession.voiceConnection && userSession.voiceConnection.callActive) { - userSession.voiceStreamManager.muteMicGain(userSession.pushToTalk); + private function changeStatus(e:MouseEvent):void { + var changeStatusPopUp:ChangeStatusPopUp = new ChangeStatusPopUp(); + mediatorMap.mediate(changeStatusPopUp); + changeStatusPopUp.width = view.width; + changeStatusPopUp.height = view.height; + changeStatusPopUp.open(view as DisplayObjectContainer, true); + + if (FlexGlobals.topLevelApplication.aspectRatio == "landscape") { + changeStatusPopUp.x = view.x + view.statusButton.x; + changeStatusPopUp.y = view.y - changeStatusPopUp.height * 2; + } else { + //(changeStatusPopUp.statusList.dataProvider.getItemAt(0) as StatusItemRenderer).icon; + //var popUpButtonPadding = ((changeStatusPopUp.statusList.itemRenderer as StatusItemRenderer).icon.width - (changeStatusPopUp.statusList.itemRenderer as StatusItemRenderer).clearStatusIcon.width) / 2; + //trace("++ isso " + ((changeStatusPopUp.statusList.itemRenderer as StatusItemRenderer).icon.width - (changeStatusPopUp.statusList.itemRenderer as StatusItemRenderer).clearStatusIcon.width) / 2); + changeStatusPopUp.x = -(view.width - view.statusButton.x - view.statusButton.width) / 2 - (view.statusButton.width - (view.statusButton.skin as PresentationButtonSkin).backgroundEllipse.width) / 2 + 6; + changeStatusPopUp.y = view.y - changeStatusPopUp.height * changeStatusPopUp.statusList.dataProvider.length; } - view.pushToTalkButton.visible = isPushToTalkOn(); - view.pushToTalkSpacer.includeInLayout = isPushToTalkOn(); + } - /** - * Update the view when there is a chenge in the model - */ - private function userChangeHandler(user:User, type:int):void { - if (user && user.me && type == UserList.MUTE) { - view.pushToTalkButton.enabled = !user.muted; - } + private function micOnOff(e:MouseEvent):void { + var audioOptions:Object = new Object(); + audioOptions.shareMic = !userSession.userList.me.voiceJoined; + audioOptions.listenOnly = false; + shareMicrophoneSignal.dispatch(audioOptions); } - private function pushToTalkOn(e:FlexEvent):void { - userSession.voiceStreamManager.muteMicGain(false); - } - - private function pushToTalkOff(e:MouseEvent):void { - userSession.voiceStreamManager.muteMicGain(true); + private function camOnOff(e:MouseEvent):void { + shareCameraSignal.dispatch(!userSession.userList.me.hasStream, userSession.videoConnection.cameraPosition); } private function onInvokeEvent(invocation:InvokeEvent):void { @@ -133,123 +142,32 @@ package org.bigbluebutton.air.main.views.menubuttons { loggingOut = true; } - private function presentationChanged():void { - userSession.presentationList.currentPresentation.slideChangeSignal.add(updatePresentationNotification); - } - - private function updatePresentationNotification() { - if (userUISession.currentPage != PagesENUM.PRESENTATION) { - (view.menuPresentationButton.skin as NavigationButtonSkin).notification.visible = true; - } else { - (view.menuPresentationButton.skin as NavigationButtonSkin).notification.visible = false; - } - } - - private function updateMessagesNotification(userID:String, publicChat:Boolean):void { - var notification = (view.menuChatButton.skin as NavigationButtonSkin).notification; - if (userUISession.currentPage == PagesENUM.SPLITCHAT) { - notification.visible = false; - } else { - var data = userUISession.currentPageDetails; - var currentPageIsPublicChat:Boolean = data && data.hasOwnProperty("user") && !data.user; - var currentPageIsPrivateChatOfTheSender:Boolean = (data is User && userID == data.userID) || (data && data.hasOwnProperty("user") && data.user && data.user.userID == userID); - var iAmSender = (userID == userSession.userId); - if (!iAmSender) { - if (userUISession.currentPage != PagesENUM.CHATROOMS && !(currentPageIsPrivateChatOfTheSender && !publicChat) && !(currentPageIsPublicChat && publicChat)) { - notification.visible = true; - } else { - notification.visible = false; - } - } - } - } - - private function pageChanged(pageName:String, pageRemoved:Boolean = false, animation:int = TransitionAnimationENUM.APPEAR, transition:ViewTransitionBase = null):void { - if (pageName == PagesENUM.PARTICIPANTS) { - updateGuestsNotification(); - } - if (pageName == PagesENUM.PRESENTATION) { - updatePresentationNotification(); - } - if (pageName == PagesENUM.CHATROOMS || pageName == PagesENUM.SPLITCHAT) { - (view.menuChatButton.skin as NavigationButtonSkin).notification.visible = false; - } - } - - private function updateGuestsNotification():void { - var numberOfGuests:int = userSession.guestList.users.length; - if (numberOfGuests > 0 && userSession.userList.me.role == User.MODERATOR && userUISession.currentPage != PagesENUM.PARTICIPANTS) { - (view.menuParticipantsButton.skin as NavigationButtonSkin).notification.visible = true; - } else { - (view.menuParticipantsButton.skin as NavigationButtonSkin).notification.visible = false; - } - } - - private function guestAdded(guest:Object):void { - updateGuestsNotification(); - } - - private function guestRemoved(guest:Object):void { - if (userSession.guestList.users.length == 0) { - (view.menuParticipantsButton.skin as NavigationButtonSkin).notification.visible = false; - } - } - private function userChanged(user:User, property:String = null):void { if (user && user.me) { - updateGuestsNotification(); + if (user.hasStream) { + view.camButton.label = ResourceManager.getInstance().getString('resources', 'menuButtons.camOff'); + view.camButton.styleName = "camOffButtonStyle bottomPresentationBtnStyle" + } else { + view.camButton.label = ResourceManager.getInstance().getString('resources', 'menuButtons.camOn'); + view.camButton.styleName = "camOnButtonStyle bottomPresentationBtnStyle" + } + if (userSession.userList.me.voiceJoined) { + view.micButton.label = ResourceManager.getInstance().getString('resources', 'menuButtons.micOff'); + view.micButton.styleName = "micOffButtonStyle bottomPresentationBtnStyle" + } else { + view.micButton.label = ResourceManager.getInstance().getString('resources', 'menuButtons.micOn'); + view.micButton.styleName = "micOnButtonStyle bottomPresentationBtnStyle" + } } } private function loadingFinished(loading:Boolean):void { if (!loading) { - updateGuestsNotification(); userUISession.loadingSignal.remove(loadingFinished); } } - private function configDeskshare() { - view.menuDeskshareButton.visible = view.menuDeskshareButton.includeInLayout = userSession.deskshareConnection.isStreaming; - userSession.deskshareConnection.isStreamingSignal.add(onDeskshareStreamChange); - } - - /** - * If we recieve signal that deskshare stream is on - include Deskshare button to the layout - */ - public function onDeskshareStreamChange(isDeskshareStreaming:Boolean):void { - view.menuDeskshareButton.visible = view.menuDeskshareButton.includeInLayout = isDeskshareStreaming; - } - - /*private function userChangeHandler(user:User, property:int):void - { - var users:ArrayCollection = userSession.userList.users; - var hasStream : Boolean = false; - if (property == UserList.HAS_STREAM ) - { - if(user.hasStream) - { - hasStream = true; - } - else - { - for each(var u:User in users) - { - if(u.hasStream) - { - hasStream = true; - break; - } - } - } - view.menuVideoChatButton.visible = view.menuVideoChatButton.includeInLayout = hasStream; - } - }*/ - /** - * Unsubscribe from listening for Deskshare Streaming Signal - */ public override function destroy():void { - userSession.deskshareConnection.isStreamingSignal.remove(onDeskshareStreamChange); - /*userSession.userList.userChangeSignal.remove(userChangeHandler);*/ } private function fl_Activate(event:Event = null):void { diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusConfig.as similarity index 84% rename from clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusConfig.as rename to clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusConfig.as index a27b7c65a1..c641f83d6f 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusConfig.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusConfig.as @@ -1,4 +1,4 @@ -package org.bigbluebutton.air.settings.views.status { +package org.bigbluebutton.air.main.views.menubuttons.changestatus { import org.bigbluebutton.lib.main.commands.EmojiCommand; import org.bigbluebutton.lib.main.commands.EmojiSignal; @@ -8,7 +8,7 @@ package org.bigbluebutton.air.settings.views.status { import robotlegs.bender.framework.api.IConfig; import robotlegs.bender.framework.api.IInjector; - public class StatusConfig implements IConfig { + public class ChangeStatusConfig implements IConfig { [Inject] public var injector:IInjector; @@ -37,7 +37,7 @@ package org.bigbluebutton.air.settings.views.status { * Maps view mediators to views. */ private function mediators():void { - mediatorMap.map(IStatusView).toMediator(StatusViewMediator); + mediatorMap.map(IChangeStatusPopUp).toMediator(ChangeStatusPopUpMediator); } /** diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUp.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUp.as new file mode 100644 index 0000000000..ea4cf956b7 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUp.as @@ -0,0 +1,13 @@ +package org.bigbluebutton.air.main.views.menubuttons.changestatus { + import spark.components.List; + + public class ChangeStatusPopUp extends ChangeStatusPopUpBase implements IChangeStatusPopUp { + + public function get statusList():List { + return statusList0; + } + + public function dispose():void { + } + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpBase.mxml new file mode 100644 index 0000000000..8ec799b96b --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpBase.mxml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpMediator.as new file mode 100644 index 0000000000..53de6ee791 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/ChangeStatusPopUpMediator.as @@ -0,0 +1,77 @@ +package org.bigbluebutton.air.main.views.menubuttons.changestatus { + import flash.events.MouseEvent; + + import flashx.textLayout.container.ScrollPolicy; + + import mx.collections.ArrayCollection; + import mx.core.ClassFactory; + import mx.core.FlexGlobals; + import mx.events.FlexMouseEvent; + + import org.bigbluebutton.air.main.models.IUserUISession; + import org.bigbluebutton.lib.main.commands.EmojiSignal; + import org.bigbluebutton.lib.main.models.IUserSession; + + import robotlegs.bender.bundles.mvcs.Mediator; + + import spark.components.SkinnablePopUpContainer; + import spark.layouts.HorizontalLayout; + import spark.layouts.VerticalLayout; + + public class ChangeStatusPopUpMediator extends Mediator { + + [Inject] + public var userSession:IUserSession; + + [Inject] + public var view:IChangeStatusPopUp; + + [Inject] + public var emojiSignal:EmojiSignal; + + protected var dataProvider:ArrayCollection; + + override public function initialize():void { + view.statusList.addEventListener(MouseEvent.CLICK, onSelectStatus); + + for (var i:Number = 0; i < view.statusList.dataProvider.length; i++) { + if (userSession.userList.me.status == view.statusList.dataProvider.getItemAt(i).signal) { + view.statusList.setSelectedIndex(i); + break; + } + } + updateListOrientation(); + (view as SkinnablePopUpContainer).addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, closePopUp); + } + + private function closePopUp(e:FlexMouseEvent):void { + (view as SkinnablePopUpContainer).close(false); + } + + private function updateListOrientation():void { + if (FlexGlobals.topLevelApplication.aspectRatio == "landscape") { + view.statusList.layout = new HorizontalLayout(); + view.statusList.width = FlexGlobals.topLevelApplication.width; + view.statusList.setStyle('verticalScrollPolicy', ScrollPolicy.OFF); + view.statusList.itemRenderer = new ClassFactory(HorizontalStatusItemRenderer); + } else { + + } + } + + private function onSelectStatus(event:MouseEvent):void { + var obj:Object; + obj = view.statusList.selectedItem; + emojiSignal.dispatch(view.statusList.selectedItem.signal); + (view as SkinnablePopUpContainer).close(); + } + + override public function destroy():void { + view.statusList.addEventListener(MouseEvent.CLICK, onSelectStatus); + view.dispose(); + view = null; + super.destroy(); + } + + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/HorizontalStatusItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/HorizontalStatusItemRenderer.mxml new file mode 100644 index 0000000000..5e6ad2c384 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/HorizontalStatusItemRenderer.mxml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/IChangeStatusPopUp.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/IChangeStatusPopUp.as new file mode 100644 index 0000000000..23b6684d0c --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/IChangeStatusPopUp.as @@ -0,0 +1,10 @@ +package org.bigbluebutton.air.main.views.menubuttons.changestatus { + + import org.bigbluebutton.air.common.views.IView; + + import spark.components.List; + + public interface IChangeStatusPopUp extends IView { + function get statusList():List; + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/StatusItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/StatusItemRenderer.mxml new file mode 100644 index 0000000000..ce0e2f984f --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/menubuttons/changestatus/StatusItemRenderer.mxml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/IProfileView.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/IProfileView.as index 720d94f6d6..3672471c26 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/IProfileView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/IProfileView.as @@ -1,15 +1,16 @@ package org.bigbluebutton.air.main.views.profile { import org.bigbluebutton.air.common.views.IView; - import spark.components.Button; + import spark.components.Label; public interface IProfileView extends IView { + function get firstLetters():Label; + function get userName():Label; function get shareCameraButton():Button; function get shareCameraBtnLabel():String; function get shareMicButton():Button; function get shareMicBtnLabel():String; - function get statusButton():Button; function get logoutButton():Button; function get currentState():String; function set currentState(value:String):void; diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileView.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileView.as index 422ade53c6..4f6ef0d4c7 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileView.as @@ -1,6 +1,7 @@ package org.bigbluebutton.air.main.views.profile { import spark.components.Button; + import spark.components.Label; public class ProfileView extends ProfileViewBase implements IProfileView { override protected function childrenCreated():void { @@ -10,6 +11,14 @@ package org.bigbluebutton.air.main.views.profile { public function dispose():void { } + public function get firstLetters():Label { + return firstLetters0; + } + + public function get userName():Label { + return userName0; + } + public function get shareCameraButton():Button { return shareCameraBtn0; } @@ -22,10 +31,6 @@ package org.bigbluebutton.air.main.views.profile { return shareMicBtn0; } - public function get statusButton():Button { - return statusBtn0; - } - public function get shareMicBtnLabel():String { return shareMicBtn0.label; } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewBase.mxml index 74729a52bb..380275642e 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewBase.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewBase.mxml @@ -3,54 +3,111 @@ xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:view="org.bigbluebutton.air.common.views.*" - styleName="audioSettingsStyle"> + styleName="settingsStyle"> + + + + + + - - + - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewMediator.as index 7243d57850..d9f930581a 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/profile/ProfileViewMediator.as @@ -2,11 +2,9 @@ package org.bigbluebutton.air.main.views.profile { import flash.events.Event; import flash.events.MouseEvent; - import mx.core.FlexGlobals; import mx.events.ResizeEvent; import mx.resources.ResourceManager; - import org.bigbluebutton.air.common.views.PagesENUM; import org.bigbluebutton.air.common.views.SplitViewEvent; import org.bigbluebutton.air.main.models.IUserUISession; @@ -18,7 +16,6 @@ package org.bigbluebutton.air.main.views.profile { import org.bigbluebutton.lib.main.models.IUserSession; import org.bigbluebutton.lib.user.models.User; import org.bigbluebutton.lib.user.services.IUsersService; - import robotlegs.bender.bundles.mvcs.Mediator; public class ProfileViewMediator extends Mediator { @@ -54,7 +51,6 @@ package org.bigbluebutton.air.main.views.profile { override public function initialize():void { var userMe:User = userSession.userList.me; - changeStatusIcon(userMe.status); disableCamButton(userSession.lockSettings.disableCam && !userMe.presenter && userMe.locked && userMe.role != User.MODERATOR); userSession.lockSettings.disableCamSignal.add(disableCamButton); if (userMe.role != User.MODERATOR) { @@ -68,42 +64,28 @@ package org.bigbluebutton.air.main.views.profile { } userSession.userList.userChangeSignal.add(userChanged); view.logoutButton.addEventListener(MouseEvent.CLICK, logoutClick); - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'profile.title'); - FlexGlobals.topLevelApplication.profileBtn.visible = false; - FlexGlobals.topLevelApplication.backBtn.visible = true; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'profile.title'); addNavigationListeners(); + setNameLabels(); } - private function changeStatusIcon(status:String) { - switch (status) { - case User.RAISE_HAND: - view.statusButton.styleName = "handStatusButtonStyle videoAudioSettingStyle contentFontSize"; - break; - case User.AWAY: - view.statusButton.styleName = "beRightBackStatusButtonStyle"; - break; - case User.HAPPY: - view.statusButton.styleName = "laughterStatusButtonStyle"; - break; - case User.SAD: - view.statusButton.styleName = "sadStatusButtonStyle"; - break; - case User.NO_STATUS: - view.statusButton.styleName = "noStatusButtonStyle"; - break; + private function setNameLabels():void { + view.userName.text = userSession.userList.me.name; + var names:Array = view.userName.text.split(" "); + var firstLetters:String = names[0].charAt(0); + if (names[1]) { + firstLetters += names[1].charAt(0); } - view.statusButton.styleName += " profileSettingsButtonStyle videoAudioSettingStyle contentFontSize"; + view.firstLetters.text = firstLetters.toUpperCase(); } private function addNavigationListeners():void { - view.statusButton.addEventListener(MouseEvent.CLICK, navigateToStatus); view.shareCameraButton.addEventListener(MouseEvent.CLICK, navigateToCameraSettings); view.shareMicButton.addEventListener(MouseEvent.CLICK, navigateToAudioSettings); view.lockViewersButton.addEventListener(MouseEvent.CLICK, navigateToLockSettings); } private function removeNavigationListeners():void { - view.statusButton.removeEventListener(MouseEvent.CLICK, navigateToStatus); view.shareCameraButton.removeEventListener(MouseEvent.CLICK, navigateToCameraSettings); view.shareMicButton.removeEventListener(MouseEvent.CLICK, navigateToAudioSettings); view.lockViewersButton.removeEventListener(MouseEvent.CLICK, navigateToLockSettings); @@ -191,7 +173,6 @@ package org.bigbluebutton.air.main.views.profile { private function userChanged(user:User, type:int):void { if (userSession.userList.me.userID == user.userID) { - changeStatusIcon(user.status); if (userSession.userList.me.role == User.MODERATOR) { displayManagementButtons(true); setMuteState(userSession.meetingMuted); diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/NavigationButtonSkin.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/NavigationButtonSkin.mxml index 26cfbc950e..4a3ee6aa70 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/NavigationButtonSkin.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/NavigationButtonSkin.mxml @@ -14,24 +14,20 @@ - - - - + - + + + + + + + [HostComponent("spark.components.Button")] + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/UserSettingsParticipantBtnSkin.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/UserSettingsParticipantBtnSkin.mxml index 489c8c0bd5..9756ad6aa1 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/UserSettingsParticipantBtnSkin.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/skins/UserSettingsParticipantBtnSkin.mxml @@ -20,7 +20,8 @@ width="100%"> + color.down="{hostComponent.getStyle('onClickBackgroundColor')}" + color.disabled="{hostComponent.getStyle('disabledBackgroundColor')}" /> - + xmlns:whiteboard="org.bigbluebutton.lib.whiteboard.views.*" + styleName="presentationStyle"> + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/PresentationViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/PresentationViewMediator.as index e49f3a0d63..48197aff3e 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/PresentationViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/PresentationViewMediator.as @@ -1,13 +1,25 @@ package org.bigbluebutton.air.presentation.views { + import flash.display.DisplayObjectContainer; import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.events.TouchEvent; import flash.events.TransformGestureEvent; + import flash.utils.Timer; + import mx.collections.ArrayCollection; + import mx.core.DragSource; import mx.core.FlexGlobals; import mx.events.ResizeEvent; + import mx.managers.DragManager; + import mx.managers.PopUpManager; + import mx.resources.ResourceManager; import org.bigbluebutton.air.common.views.PagesENUM; import org.bigbluebutton.air.main.models.IUserUISession; + import org.bigbluebutton.air.presentation.views.selectWebcam.SelectStreamPopUp; + import org.bigbluebutton.air.presentation.views.selectWebcam.SelectStreamPopUpBase; import org.bigbluebutton.lib.main.models.IUserSession; import org.bigbluebutton.lib.presentation.commands.LoadSlideSignal; import org.bigbluebutton.lib.presentation.models.Presentation; @@ -16,6 +28,16 @@ package org.bigbluebutton.air.presentation.views { import org.bigbluebutton.lib.presentation.services.IPresentationService; import org.bigbluebutton.lib.presentation.utils.CursorIndicator; import org.bigbluebutton.lib.presentation.views.PresentationMediator; + import org.bigbluebutton.lib.user.models.User; + import org.bigbluebutton.lib.user.models.UserList; + import org.bigbluebutton.lib.video.models.UserStreamName; + import org.bigbluebutton.lib.video.models.VideoProfile; + + import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap; + + import spark.components.SkinnablePopUpContainer; + import spark.components.VideoDisplay; + import spark.events.PopUpEvent; public class PresentationViewMediator extends PresentationMediator { @@ -25,12 +47,435 @@ package org.bigbluebutton.air.presentation.views { [Inject] public var userUISession:IUserUISession; + [Inject] + public var mediatorMap:IMediatorMap; + + private var speaker:User = null; + + protected var dataProvider:ArrayCollection; + + private var manualSelection:Boolean = false; + + private var changeStream:Boolean = true; + + private var camerasHidden:Boolean = false; + + private var videoOffsetX:Number; + + private var videoOffsetY:Number; + + private var originalVideoX:Number; + + private var originalVideoY:Number; + + private var videoMovedDistanceX:Number = 0; + + private var videoMovedDistanceY:Number = 0; + + var overlayTimer:Timer = new Timer(3.5 * 1000, 1); + override public function initialize():void { super.initialize(); view.slide.addEventListener(TransformGestureEvent.GESTURE_SWIPE, swipehandler); + userSession.userList.userChangeSignal.add(userChangeHandler); FlexGlobals.topLevelApplication.stage.addEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler); - FlexGlobals.topLevelApplication.backBtn.visible = false; - FlexGlobals.topLevelApplication.profileBtn.visible = true; + FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = false; + FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = true; + view.content.addEventListener(MouseEvent.CLICK, showOverlay); + dataProvider = new ArrayCollection(); + var users:ArrayCollection = userSession.userList.users; + for each (var u:User in users) { + if (u.streamName && u.streamName != "" && !dataProvider.contains(u)) { + addUserStreamNames(u); + } + } + var selectedUserProfile:User = userUISession.currentPageDetails as User; + var displayUserStreamName:UserStreamName = null; + if (selectedUserProfile) { + var userStreamNames:Array = getUserStreamNamesByUserID(selectedUserProfile.userID); + displayUserStreamName = userStreamNames[0]; + } + if (displayUserStreamName) { + startStream(selectedUserProfile, displayUserStreamName.streamName); + //displayVideo(true); + } else { + globalVideoStreamNameHandler(); + } + setTemporaryOverlay(); + var displayUser:User; + for each (var u:User in users) { + if (u.streamName && u.streamName != "") { + displayUser = u; + } + } + if (displayUser) { + startStream(displayUser, displayUser.streamName); + } + (view as IPresentationViewAir).videoStream.addEventListener(MouseEvent.CLICK, changeWebcamStream); + (view as IPresentationViewAir).showSharedCamsGroup.addEventListener(MouseEvent.CLICK, changeWebcamStream); + view.slide.addEventListener(ResizeEvent.RESIZE, presentationUpdated); + } + + private function presentationUpdated(e:ResizeEvent):void { + setCamPosition(); + } + + private function setTemporaryOverlay():void { + FlexGlobals.topLevelApplication.topActionBar.visible = false; + FlexGlobals.topLevelApplication.topActionBar.includeInLayout = false; + FlexGlobals.topLevelApplication.topActionBar.skin.setCurrentState("transparent"); + FlexGlobals.topLevelApplication.bottomMenu.visible = false; + FlexGlobals.topLevelApplication.bottomMenu.includeInLayout = false; + updatePresentationDimensions(); + } + + + private function stageOrientationChangingHandler(e:Event):void { + updatePresentationDimensions(); + FlexGlobals.topLevelApplication.bottomMenu.width = FlexGlobals.topLevelApplication.width; + FlexGlobals.topLevelApplication.bottomMenu.y = FlexGlobals.topLevelApplication.height - FlexGlobals.topLevelApplication.bottomMenu.height; + FlexGlobals.topLevelApplication.topActionBar.width = FlexGlobals.topLevelApplication.width; + setCamPosition(); + } + + private function isVideoOutsideOfTheScreen():Boolean { + return ((view as IPresentationViewAir).slide.height + (view as IPresentationViewAir).video.height > FlexGlobals.topLevelApplication.height) + } + + private function setCamPosition():void { + + (view as IPresentationViewAir).videoStream.x = 0; + (view as IPresentationViewAir).videoStream.y = 0; + + if ((view as IPresentationViewAir).video && isVideoOutsideOfTheScreen()) { + (view as IPresentationViewAir).videoStream.addEventListener(MouseEvent.MOUSE_DOWN, moveCamBegin); + (view as IPresentationViewAir).videoStream.addEventListener(MouseEvent.MOUSE_UP, moveCamEnd); + (view as IPresentationViewAir).videoGroup.includeInLayout = false; + (view as IPresentationViewAir).videoGroup.y = FlexGlobals.topLevelApplication.height - (view as IPresentationViewAir).videoGroup.height * 1.1; + if (FlexGlobals.topLevelApplication.aspectRatio == "landscape") { + (view as IPresentationViewAir).videoGroup.x = FlexGlobals.topLevelApplication.width - (view as IPresentationViewAir).video.width / 1.7; + } else { + (view as IPresentationViewAir).videoGroup.x = (FlexGlobals.topLevelApplication.width - (view as IPresentationViewAir).videoGroup.width) / 2; + } + } else { + (view as IPresentationViewAir).videoStream.removeEventListener(MouseEvent.MOUSE_DOWN, moveCamBegin); + (view as IPresentationViewAir).videoStream.removeEventListener(MouseEvent.MOUSE_UP, moveCamEnd); + if ((view as IPresentationViewAir).videoGroup.visible) { + (view as IPresentationViewAir).videoGroup.includeInLayout = true; + } + + } + } + + private function moveCamBegin(e:MouseEvent):void { + e.target.alpha = 0.5; + videoOffsetX = e.stageX - e.target.x; + videoOffsetY = e.stageY - e.target.y; + + originalVideoX = (view as IPresentationViewAir).videoStream.x; + originalVideoY = (view as IPresentationViewAir).videoStream.y; + + (view as IPresentationViewAir).content.addEventListener(MouseEvent.MOUSE_MOVE, dragCam); + } + + private function dragCam(e:MouseEvent):void { + + var oldXPos:Number = (view as IPresentationViewAir).videoStream.x; + var oldYPos:Number = (view as IPresentationViewAir).videoStream.y; + + (view as IPresentationViewAir).videoStream.x = e.stageX - videoOffsetX; + (view as IPresentationViewAir).videoStream.y = e.stageY - videoOffsetY; + + videoMovedDistanceX += Math.abs((view as IPresentationViewAir).videoStream.x - oldXPos); + videoMovedDistanceY += Math.abs((view as IPresentationViewAir).videoStream.y - oldYPos); + + e.updateAfterEvent(); + } + + private function moveCamEnd(e:MouseEvent):void { + e.target.alpha = 1; + if (videoMovedDistanceX < 10 || videoMovedDistanceY < 10) { + (view as IPresentationViewAir).videoStream.x = originalVideoX; + (view as IPresentationViewAir).videoStream.y = originalVideoY; + changeStream = true; + } else { + changeStream = false; + } + videoMovedDistanceX = 0; + videoMovedDistanceY = 0; + (view as IPresentationViewAir).content.removeEventListener(MouseEvent.MOUSE_MOVE, dragCam); + } + + private function updatePresentationDimensions():void { + var newWidth:Number = FlexGlobals.topLevelApplication.width; + var newHeight:Number = FlexGlobals.topLevelApplication.height; + _slideModel.parentChange(newWidth, newHeight); + resizePresentation(); + } + + private function getDisplayedUser():User { + for each (var userStreamName:UserStreamName in dataProvider) { + if (userStreamName.streamName == userUISession.currentStreamName) { + return userStreamName.user; + } + } + return null; + } + + private function userChangeHandler(user:User, property:int):void { + if (property == UserList.HAS_STREAM) { + var displayedUser:User = getDisplayedUser(); + if (displayedUser) { + if (user.userID == displayedUser.userID && !user.hasStream) { + stopStream(user.userID); + } + } + var userStreamNames:Array = getUserStreamNamesByUserID(user.userID); + for each (var userStreamName:UserStreamName in userStreamNames) { + if (!(userStreamName.user.streamName.indexOf(userStreamName.streamName) >= 0)) { + dataProvider.removeItemAt(dataProvider.getItemIndex(userStreamName)); + if (userUISession.currentStreamName == userStreamName.streamName) { + userUISession.currentStreamName = ""; + if (!speaker) { + checkVideo(); + } + } + } + } + if (user.streamName.split("|").length > userStreamNames.length && user.streamName.length > 0) { + var camNumber:int = dataProvider.length; + addUserStreamNames(user); + if (userUISession.currentStreamName == userSession.userList.me.streamName && camNumber == 1) { + if (!speaker) { + checkVideo(); + } + } + } + if (userUISession.currentStreamName == "") { + if (!speaker) { + checkVideo(); + } + } + if (dataProvider.length == 0) { + displayVideo(false); + } else { + displayVideo(true && !camerasHidden); + } + } else if (property == UserList.PRESENTER) { + if (!speaker) { + checkVideo(); + } + } + dataProvider.refresh(); + } + + private function checkVideo(changedUser:User = null):void { + if (!manualSelection || userUISession.currentStreamName == "" && userSession.videoConnection.connection) { + // get id of the user that is currently displayed + var currentUser:User = getDisplayedUser(); + // get presenter user + var presenter:User = userSession.userList.getPresenter(); + // get any user that has video stream + var userWithCamera:User = getUserWithCamera(); + var newUser:User; + if (changedUser) { + var userStreamNames:Array = getUserStreamNamesByUserID(changedUser.userID); + // Priority state machine + if (changedUser.presenter && changedUser.hasStream) { + if ((view as IPresentationViewAir)) + (view as IPresentationViewAir).stopStream(); + startStream(changedUser, userStreamNames[0].streamName); + } else if (currentUser && changedUser.userID == currentUser.userID) { + if (view) + (view as IPresentationViewAir).stopStream(); + startStream(changedUser, userStreamNames[0].streamName); + } else if (userWithCamera) { + if (userWithCamera.userID == changedUser.userID) { + if (view) + (view as IPresentationViewAir).stopStream(); + startStream(changedUser, userStreamNames[0].streamName); + } else if (!changedUser.hasStream && userWithCamera.me) { + var userStreamNames:Array = getUserStreamNamesByUserID(userWithCamera.userID); + if (view) + (view as IPresentationViewAir).stopStream(); + startStream(userWithCamera, userStreamNames[0].streamName); + } + } + } else { + // Priority state machine + if (speaker) { + newUser = speaker; + } else if (presenter != null && presenter.hasStream && !presenter.me) { // if presenter is transmitting a video - put them in first priority + newUser = presenter; + } // current user is the second priority + else if (currentUser != null && currentUser.hasStream && !currentUser.me) { + newUser = currentUser; + } // any user with camera is the last priority + else if (userWithCamera != null && userWithCamera.hasStream) { + newUser = userWithCamera; + } // otherwise, nobody transmitts video at this moment + else { + return; + } + if (newUser) { + var userStreamNames:Array = getUserStreamNamesByUserID(newUser.userID); + var displayUserStreamName:UserStreamName = userStreamNames[0]; + for each (var userStreamName:UserStreamName in userStreamNames) { + if (userStreamName.user.hasStream && userUISession.currentStreamName == userStreamName.streamName) { + displayUserStreamName = userStreamName; + break; + } + } + if (view) { + (view as IPresentationViewAir).stopStream(); + startStream(newUser, displayUserStreamName.streamName); + displayVideo(true && !camerasHidden); + } + } + } + } + } + + protected function getUserWithCamera():User { + var users:ArrayCollection = userSession.userList.users; + var userMe:User = null; + for each (var u:User in users) { + if (u.hasStream) { + if (u.me) { + userMe = u; + } else { + return u; + } + } + } + return userMe; + } + + private function displayVideo(value:Boolean):void { + if ((view as IPresentationViewAir).videoGroup) { + (view as IPresentationViewAir).videoGroup.visible = value; + (view as IPresentationViewAir).videoGroup.includeInLayout = value; + } + if (!value) { + userUISession.currentStreamName = ""; + } else { + setCamPosition(); + } + enableShowCamsButton((dataProvider.length > 0) && !value); + } + + private function enableShowCamsButton(enable:Boolean):void { + (view as IPresentationViewAir).showSharedCamsGroup.visible = enable; + (view as IPresentationViewAir).showSharedCamsGroup.includeInLayout = enable; + (view as IPresentationViewAir).showSharedCams.text = dataProvider.length.toString(); + if (dataProvider.length > 1) { + (view as IPresentationViewAir).showSharedCams.text += " " + ResourceManager.getInstance().getString('resources', 'presentation.sharedWebcams'); + } else { + (view as IPresentationViewAir).showSharedCams.text += " " + ResourceManager.getInstance().getString('resources', 'presentation.sharedWebcam'); + } + } + + private function globalVideoStreamNameHandler():void { + if (userSession.globalVideoStreamName != "") { + speaker = new User(); + speaker.name = ResourceManager.getInstance().getString('resources', 'videoChat.speaker'); + speaker.userID = "sipVideoUser"; + speaker.streamName = userSession.globalVideoStreamName; + speaker.hasStream = true; + var userStreamName:UserStreamName = new UserStreamName(speaker.streamName, speaker); + removeUserFromDataProvider(speaker.userID); + dataProvider.addItem(userStreamName); + } else { + if (speaker) { + removeUserFromDataProvider(speaker.userID); + speaker = null; + } + } + if (dataProvider.length == 0) { + //displayVideo(false); + } else { + //displayVideo(true); + //checkVideo(); + } + } + + private function removeUserFromDataProvider(userID:String) { + for (var item:int; item < dataProvider.length; item++) { + if ((dataProvider.getItemAt(item).user as User).userID == userID) { + // -- in the end. see: http://stackoverflow.com/questions/4255226/how-to-remove-an-item-while-iterating-over-collection + dataProvider.removeItemAt(item--); + } + } + } + + private function addUserStreamNames(u:User):void { + var existingStreamNames:Array = getUserStreamNamesByUserID(u.userID); + var streamNames:Array = u.streamName.split("|"); + for each (var streamName:String in streamNames) { + var addNew:Boolean = true; + for each (var existingUserStreamName:UserStreamName in existingStreamNames) { + if (streamName == existingUserStreamName.streamName) { + addNew = false; + } + } + if (addNew) { + var userStreamName:UserStreamName = new UserStreamName(streamName, u); + dataProvider.addItem(userStreamName); + } + } + dataProvider.refresh(); + } + + private function getUserStreamNamesByUserID(userID:String):Array { + var userStreamNames:Array = new Array(); + for each (var userStreamName:UserStreamName in dataProvider) { + if (userStreamName.user.userID == userID) { + userStreamNames.push(userStreamName); + } + } + return userStreamNames; + } + + private function changeWebcamStream(e:MouseEvent) { + e.stopPropagation(); + if (changeStream) { + var popUp:SelectStreamPopUp = new SelectStreamPopUp(); + popUp.addEventListener(PopUpEvent.CLOSE, onPopUpClose, false, 0, true); + popUp.width = view.content.width * 0.9; + popUp.open(view as DisplayObjectContainer, true); + mediatorMap.mediate(popUp); + PopUpManager.centerPopUp(popUp); + } + } + + private function onPopUpClose(event:PopUpEvent):void { + if (event.commit) { + if (event.data == null) { + camerasHidden = true; + displayVideo(false); + } else { + camerasHidden = false; + displayVideo(true); + startStream(event.data.user, event.data.streamName); + } + } + } + + private function showOverlay(e:MouseEvent) { + FlexGlobals.topLevelApplication.topActionBar.visible = true; + FlexGlobals.topLevelApplication.bottomMenu.visible = true; + overlayTimer.addEventListener(TimerEvent.TIMER_COMPLETE, hideOverlay); + if (overlayTimer.running) { + hideOverlay(null); + } else { + overlayTimer.start(); + } + } + + private function hideOverlay(e:Event) { + overlayTimer.stop(); + FlexGlobals.topLevelApplication.topActionBar.visible = false; + FlexGlobals.topLevelApplication.bottomMenu.visible = false; } private function swipehandler(e:TransformGestureEvent):void { @@ -46,16 +491,44 @@ package org.bigbluebutton.air.presentation.views { } } - private function stageOrientationChangingHandler(e:Event):void { - if (userUISession.currentPage == PagesENUM.PRESENTATION) { //apply rotation only if user didnĀ“t change view at the same time - var newWidth:Number = FlexGlobals.topLevelApplication.width; - var newHeight:Number = FlexGlobals.topLevelApplication.height - FlexGlobals.topLevelApplication.topActionBar.height - FlexGlobals.topLevelApplication.bottomMenu.height; - _slideModel.parentChange(newWidth, newHeight); - resizePresentation(); + private function startStream(user:User, streamName:String):void { + if (view) { + var videoProfile:VideoProfile = (user == speaker) ? userSession.globalVideoProfile : userSession.videoProfileManager.getVideoProfileByStreamName(streamName); + var screenWidth:Number = (view as IPresentationViewAir).content.width / 3; + var screenHeight:Number = (view as IPresentationViewAir).content.height / 3; + if (FlexGlobals.topLevelApplication.aspectRatio == "landscape") { + var temp:Number = screenWidth; + screenWidth = screenHeight; + screenHeight = temp; + } + (view as IPresentationViewAir).startStream(userSession.videoConnection.connection, user.name, streamName, user.userID, videoProfile.width, videoProfile.height, screenWidth, screenHeight); + userUISession.currentStreamName = streamName; + //currentUser = user; + (view as IPresentationViewAir).videoGroup.height = (view as IPresentationViewAir).video.height; } } + private function stopStream(userID:String):void { + if (view) { + (view as IPresentationViewAir).stopStream(); + userUISession.currentStreamName = ""; + } + } + + /** + * + */ override public function destroy():void { + view.slide.removeEventListener(ResizeEvent.RESIZE, presentationUpdated); + userSession.userList.userChangeSignal.remove(userChangeHandler); + (view as IPresentationViewAir).videoStream.removeEventListener(MouseEvent.CLICK, changeWebcamStream); + (view as IPresentationViewAir).showSharedCamsGroup.removeEventListener(MouseEvent.CLICK, changeWebcamStream); + FlexGlobals.topLevelApplication.topActionBar.skin.setCurrentState("normal"); + FlexGlobals.topLevelApplication.topActionBar.includeInLayout = true; + FlexGlobals.topLevelApplication.topActionBar.visible = true; + FlexGlobals.topLevelApplication.bottomMenu.visible = false; + view.content.removeEventListener(MouseEvent.CLICK, showOverlay); + overlayTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, hideOverlay); FlexGlobals.topLevelApplication.stage.removeEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler); (view as IPresentationViewAir).dispose(); super.destroy(); diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/ISelectStreamPopUp.as b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/ISelectStreamPopUp.as new file mode 100644 index 0000000000..3323349921 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/ISelectStreamPopUp.as @@ -0,0 +1,13 @@ +package org.bigbluebutton.air.presentation.views.selectWebcam { + + import org.bigbluebutton.air.common.views.IView; + + import spark.components.Button; + import spark.components.Group; + import spark.components.List; + + public interface ISelectStreamPopUp extends IView { + function get streamList():List; + function get actionButton():Button; + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamConfig.as new file mode 100644 index 0000000000..4806e43bd4 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamConfig.as @@ -0,0 +1,46 @@ +package org.bigbluebutton.air.presentation.views.selectWebcam { + + import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap; + import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap; + import robotlegs.bender.framework.api.IConfig; + import robotlegs.bender.framework.api.IInjector; + + public class SelectStreamConfig implements IConfig { + + [Inject] + public var injector:IInjector; + + [Inject] + public var mediatorMap:IMediatorMap; + + [Inject] + public var signalCommandMap:ISignalCommandMap; + + public function configure():void { + dependencies(); + mediators(); + signals(); + } + + /** + * Specifies all the dependencies for the feature + * that will be injected onto objects used by the + * application. + */ + private function dependencies():void { + } + + /** + * Maps view mediators to views. + */ + private function mediators():void { + mediatorMap.map(ISelectStreamPopUp).toMediator(SelectStreamPopUpMediator); + } + + /** + * Maps signals to commands using the signalCommandMap. + */ + private function signals():void { + } + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUp.as b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUp.as new file mode 100644 index 0000000000..c665e9fc47 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUp.as @@ -0,0 +1,20 @@ +package org.bigbluebutton.air.presentation.views.selectWebcam { + import spark.components.Button; + import spark.components.Group; + import spark.components.List; + import spark.components.supportClasses.SkinnableComponent; + + public class SelectStreamPopUp extends SelectStreamPopUpBase implements ISelectStreamPopUp { + + public function get streamList():List { + return streamList0; + } + + public function get actionButton():Button { + return actionButton0; + } + + public function dispose():void { + } + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpBase.mxml new file mode 100644 index 0000000000..b7f573120f --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpBase.mxml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpMediator.as new file mode 100644 index 0000000000..45f59d8ce4 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/SelectStreamPopUpMediator.as @@ -0,0 +1,221 @@ +package org.bigbluebutton.air.presentation.views.selectWebcam { + + import flash.display.Screen; + import flash.events.Event; + import flash.events.MouseEvent; + + import mx.collections.ArrayCollection; + import mx.core.FlexGlobals; + import mx.events.FlexMouseEvent; + import mx.events.ResizeEvent; + import mx.resources.ResourceManager; + import mx.utils.ObjectUtil; + + import org.bigbluebutton.air.common.views.PagesENUM; + import org.bigbluebutton.air.main.models.IUserUISession; + import org.bigbluebutton.lib.main.models.IUserSession; + import org.bigbluebutton.lib.user.models.User; + import org.bigbluebutton.lib.user.models.UserList; + import org.bigbluebutton.lib.video.models.UserStreamName; + import org.bigbluebutton.lib.video.models.VideoProfile; + + import robotlegs.bender.bundles.mvcs.Mediator; + + import spark.components.SkinnablePopUpContainer; + import spark.events.IndexChangeEvent; + + public class SelectStreamPopUpMediator extends Mediator { + + [Inject] + public var view:ISelectStreamPopUp; + + [Inject] + public var userSession:IUserSession; + + [Inject] + public var userUISession:IUserUISession; + + protected var dataProvider:ArrayCollection; + + private var manualSelection:Boolean = false; + + private var speaker:User = null; + + private var currentUser:User = null; + + private var selectedIndex:int = -1; + + private var indexChange:Boolean = false; + + private var displayWebcam:Boolean; + + override public function initialize():void { + userSession.userList.userRemovedSignal.add(userRemovedHandler); + userSession.userList.userAddedSignal.add(userAddedHandler); + userSession.userList.userChangeSignal.add(userChangeHandler); + userSession.globalVideoSignal.add(globalVideoStreamNameHandler); + view.streamList.addEventListener(MouseEvent.CLICK, onSelectStream); + view.actionButton.addEventListener(MouseEvent.CLICK, clickedActionButton); + dataProvider = new ArrayCollection(); + view.streamList.dataProvider = dataProvider; + var users:ArrayCollection = userSession.userList.users; + for each (var u:User in users) { + if (u.streamName && u.streamName != "" && !dataProvider.contains(u)) { + addUserStreamNames(u); + } + } + updateSelectedIndex(); + (view as SkinnablePopUpContainer).addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, closePopUp); + } + + private function closePopUp(e:FlexMouseEvent):void { + (view as SkinnablePopUpContainer).close(false); + } + + /** + * + */ + private function updateSelectedIndex() { + view.streamList.selectedIndex = selectedIndex; + if (selectedIndex == -1) { + view.actionButton.enabled = false; + view.actionButton.skin.setCurrentState("disabled"); + view.actionButton.label = ResourceManager.getInstance().getString('resources', 'selectStream.viewWebcam'); + } else { + view.actionButton.enabled = true + view.actionButton.skin.setCurrentState("up"); + if (userUISession.currentStreamName == "" || indexChange) { + displayWebcam = true; + view.actionButton.label = ResourceManager.getInstance().getString('resources', 'selectStream.viewWebcam'); + } else { + displayWebcam = false; + view.actionButton.label = ResourceManager.getInstance().getString('resources', 'selectStream.hideWebcam'); + } + } + } + + private function clickedActionButton(e:MouseEvent) { + var selectedStream:Object = null; + if (displayWebcam) { + selectedStream = dataProvider.getItemAt(view.streamList.selectedIndex); + } + (view as SkinnablePopUpContainer).close(true, selectedStream); + } + + private function globalVideoStreamNameHandler():void { + if (userSession.globalVideoStreamName != "") { + speaker = new User(); + speaker.name = ResourceManager.getInstance().getString('resources', 'videoChat.speaker'); + speaker.userID = "sipVideoUser"; + speaker.streamName = userSession.globalVideoStreamName; + speaker.hasStream = true; + var userStreamName:UserStreamName = new UserStreamName(speaker.streamName, speaker); + removeUserFromDataProvider(speaker.userID); + dataProvider.addItem(userStreamName); + } else { + if (speaker) { + removeUserFromDataProvider(speaker.userID); + speaker = null; + } + } + } + + private function addUserStreamNames(u:User):void { + var existingStreamNames:Array = getUserStreamNamesByUserID(u.userID); + var streamNames:Array = u.streamName.split("|"); + for each (var streamName:String in streamNames) { + var addNew:Boolean = true; + for each (var existingUserStreamName:UserStreamName in existingStreamNames) { + if (streamName == existingUserStreamName.streamName) { + addNew = false; + } + } + if (addNew) { + var userStreamName:UserStreamName = new UserStreamName(streamName, u); + dataProvider.addItem(userStreamName); + if (streamName == userUISession.currentStreamName) { + selectedIndex = dataProvider.getItemIndex(userStreamName); + } + } + } + dataProvider.refresh(); + } + + private function onSelectStream(event:MouseEvent):void { + if (view.streamList.selectedIndex != selectedIndex) { + indexChange = true; + } + selectedIndex = view.streamList.selectedIndex; + updateSelectedIndex(); + } + + override public function destroy():void { + userSession.userList.userRemovedSignal.remove(userRemovedHandler); + userSession.userList.userAddedSignal.remove(userAddedHandler); + userSession.userList.userChangeSignal.remove(userChangeHandler); + userSession.globalVideoSignal.remove(globalVideoStreamNameHandler); + view.dispose(); + view = null; + super.destroy(); + } + + private function userAddedHandler(user:User):void { + if (user.streamName && user.streamName != "") { + var streamNames:Array = user.streamName.split("|"); + for each (var streamName:String in streamNames) { + var userStreamName:UserStreamName = new UserStreamName(streamName, user); + dataProvider.addItem(userStreamName); + } + } + } + + private function removeUserFromDataProvider(userID:String) { + for (var item:int; item < dataProvider.length; item++) { + if ((dataProvider.getItemAt(item).user as User).userID == userID) { + // -- in the end. see: http://stackoverflow.com/questions/4255226/how-to-remove-an-item-while-iterating-over-collection + dataProvider.removeItemAt(item--); + } + } + } + + private function userRemovedHandler(userID:String):void { + var displayedUser:User = getDisplayedUser(); + removeUserFromDataProvider(userID); + } + + private function getUserStreamNamesByUserID(userID:String):Array { + var userStreamNames:Array = new Array(); + for each (var userStreamName:UserStreamName in dataProvider) { + if (userStreamName.user.userID == userID) { + userStreamNames.push(userStreamName); + } + } + return userStreamNames; + } + + private function userChangeHandler(user:User, property:int):void { + if (property == UserList.HAS_STREAM) { + var userStreamNames:Array = getUserStreamNamesByUserID(user.userID); + for each (var userStreamName:UserStreamName in userStreamNames) { + if (!(userStreamName.user.streamName.indexOf(userStreamName.streamName) >= 0)) { + dataProvider.removeItemAt(dataProvider.getItemIndex(userStreamName)); + } + } + if (user.streamName.split("|").length > userStreamNames.length && user.streamName.length > 0) { + var camNumber:int = dataProvider.length; + addUserStreamNames(user); + } + dataProvider.refresh(); + } + } + + private function getDisplayedUser():User { + for each (var userStreamName:UserStreamName in dataProvider) { + if (userStreamName.streamName == userUISession.currentStreamName) { + return userStreamName.user; + } + } + return null; + } + } +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/StreamItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/StreamItemRenderer.mxml new file mode 100644 index 0000000000..fbf004c759 --- /dev/null +++ b/clients/flash/air-client/src/org/bigbluebutton/air/presentation/views/selectWebcam/StreamItemRenderer.mxml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/audio/AudioSettingsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/audio/AudioSettingsViewMediator.as index 847f4ea3a2..c6429dd474 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/audio/AudioSettingsViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/audio/AudioSettingsViewMediator.as @@ -42,7 +42,7 @@ package org.bigbluebutton.air.settings.views.audio { override public function initialize():void { userSession.userList.userChangeSignal.add(userChangeHandler); - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'audioSettings.title'); + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'audioSettings.title'); var userMe:User = userSession.userList.me; view.continueBtn.addEventListener(MouseEvent.CLICK, onContinueClick); view.enableAudio.addEventListener(Event.CHANGE, onEnableAudioClick); @@ -54,8 +54,8 @@ package org.bigbluebutton.air.settings.views.audio { view.enableAudio.selected = (userMe.voiceJoined || userMe.listenOnly); view.enablePushToTalk.enabled = view.enableMic.selected = userMe.voiceJoined; view.enablePushToTalk.selected = (userSession.pushToTalk || userSession.phoneOptions.autoJoin); - FlexGlobals.topLevelApplication.backBtn.visible = true; - FlexGlobals.topLevelApplication.profileBtn.visible = false; + FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = true; + FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = false; loadMicGain(); micActivityTimer = new Timer(100); micActivityTimer.addEventListener(TimerEvent.TIMER, micActivity); diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/lock/LockSettingsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/lock/LockSettingsViewMediator.as index 6724cf1376..e641a822b4 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/lock/LockSettingsViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/lock/LockSettingsViewMediator.as @@ -7,10 +7,9 @@ package org.bigbluebutton.air.settings.views.lock { import org.bigbluebutton.air.main.models.IUserUISession; import org.bigbluebutton.lib.main.models.IUserSession; - import org.bigbluebutton.lib.main.models.UserSession; import org.bigbluebutton.lib.user.services.IUsersService; - import robotlegs.bender.bundles.mvcs.Mediator; + import robotlegs.bender.bundles.mvcs.Mediator; public class LockSettingsViewMediator extends Mediator { @@ -39,11 +38,6 @@ package org.bigbluebutton.air.settings.views.lock { override public function initialize():void { loadLockSettings(); view.applyButton.addEventListener(MouseEvent.CLICK, onApply); - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'lockSettings.title'); - FlexGlobals.topLevelApplication.backBtn.visible = true; - FlexGlobals.topLevelApplication.profileBtn.visible = false; - } - FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'lockSettings.title'); FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = true; FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = false; @@ -63,8 +57,8 @@ package org.bigbluebutton.air.settings.views.lock { userUISession.popPage(); } - private function loadLockSettings() { - view.cameraSwitch.selected = !UserSession.lockSettings.disableCam; + private function loadLockSettings():void { + view.cameraSwitch.selected = !userSession.lockSettings.disableCam; view.micSwitch.selected = !userSession.lockSettings.disableMic; view.publicChatSwitch.selected = !userSession.lockSettings.disablePublicChat; view.privateChatSwitch.selected = !userSession.lockSettings.disablePrivateChat; diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/IStatusView.as b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/IStatusView.as deleted file mode 100644 index a58b71c49c..0000000000 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/IStatusView.as +++ /dev/null @@ -1,14 +0,0 @@ -package org.bigbluebutton.air.settings.views.status { - - import org.bigbluebutton.air.common.views.IView; - - import spark.components.Button; - import spark.components.Group; - import spark.components.Label; - import spark.components.List; - import spark.components.RadioButtonGroup; - - public interface IStatusView extends IView { - function get statusList():List; - } -} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusItemRenderer.mxml deleted file mode 100644 index d222f612ef..0000000000 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusItemRenderer.mxml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusView.as b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusView.as deleted file mode 100644 index 013c2b0afe..0000000000 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusView.as +++ /dev/null @@ -1,25 +0,0 @@ -package org.bigbluebutton.air.settings.views.status { - - import flash.events.MouseEvent; - - import org.bigbluebutton.air.settings.views.status.StatusViewBase; - - import spark.components.Button; - import spark.components.Group; - import spark.components.Label; - import spark.components.List; - import spark.components.RadioButtonGroup; - - public class StatusView extends StatusViewBase implements IStatusView { - override protected function childrenCreated():void { - super.childrenCreated(); - } - - public function dispose():void { - } - - public function get statusList():List { - return statusList0; - } - } -} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewBase.mxml deleted file mode 100644 index 6b7eb6e3bb..0000000000 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewBase.mxml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewMediator.as deleted file mode 100644 index b43eff1d8f..0000000000 --- a/clients/flash/air-client/src/org/bigbluebutton/air/settings/views/status/StatusViewMediator.as +++ /dev/null @@ -1,91 +0,0 @@ -package org.bigbluebutton.air.settings.views.status { - - import flash.events.Event; - import flash.events.MouseEvent; - import flash.events.StageOrientationEvent; - - import mx.core.FlexGlobals; - import mx.events.ItemClickEvent; - import mx.events.ResizeEvent; - import mx.resources.ResourceManager; - - import org.bigbluebutton.air.common.views.PagesENUM; - import org.bigbluebutton.air.main.models.IUserUISession; - import org.bigbluebutton.air.settings.views.status.IStatusView; - import org.bigbluebutton.lib.main.commands.EmojiSignal; - import org.bigbluebutton.lib.main.models.IUserSession; - import org.bigbluebutton.lib.user.models.User; - - import robotlegs.bender.bundles.mvcs.Mediator; - - import spark.events.IndexChangeEvent; - - public class StatusViewMediator extends Mediator { - - [Inject] - public var view:IStatusView; - - [Inject] - public var userSession:IUserSession; - - [Inject] - public var userUISession:IUserUISession; - - [Inject] - public var emojiSignal:EmojiSignal; - - override public function initialize():void { - var userMe:User = userSession.userList.me; - view.statusList.addEventListener(IndexChangeEvent.CHANGE, onEmojiChange); - userSession.userList.userChangeSignal.add(userChanged); - FlexGlobals.topLevelApplication.stage.addEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler); - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'profile.status'); - FlexGlobals.topLevelApplication.profileBtn.visible = false; - FlexGlobals.topLevelApplication.backBtn.visible = true; - selectEmoji(userMe.status); - } - - private function stageOrientationChangingHandler(e:Event):void { - var tabletLandscape = FlexGlobals.topLevelApplication.isTabletLandscape(); - if (tabletLandscape) { - userUISession.popPage(); - userUISession.popPage(); - userUISession.pushPage(PagesENUM.SPLITSETTINGS, PagesENUM.STATUS); - } - } - - private function userChanged(user:User, type:int):void { - if (user == userSession.userList.me) { - selectEmoji(user.status); - } - } - - private function selectEmoji(status:String):void { - for (var i:Number = 0; i < view.statusList.dataProvider.length; i++) { - if (status == view.statusList.dataProvider.getItemAt(i).signal) { - view.statusList.setSelectedIndex(i); - break; - } - } - } - - protected function onEmojiChange(event:IndexChangeEvent):void { - var obj:Object; - obj = view.statusList.selectedItem; - emojiSignal.dispatch(view.statusList.selectedItem.signal); - if (!FlexGlobals.topLevelApplication.isTabletLandscape()) { - userUISession.popPage(); - userUISession.popPage(); - } - } - - override public function destroy():void { - super.destroy(); - view.statusList.removeEventListener(IndexChangeEvent.CHANGE, onEmojiChange); - FlexGlobals.topLevelApplication.stage.removeEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler); - userSession.userList.userChangeSignal.remove(userChanged); - view.dispose(); - view = null; - } - } -} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/IParticipantsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/IParticipantsView.as index cf6c27e90e..b03c03a7b1 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/IParticipantsView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/IParticipantsView.as @@ -12,5 +12,6 @@ package org.bigbluebutton.air.users.views.participants { function get allGuests():SkinnableComponent; function get allowAllButton():Button; function get denyAllButton():Button; + function get conversationsList():List; } } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantItemRenderer.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantItemRenderer.mxml index 9c89de3385..ce20ca6583 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantItemRenderer.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantItemRenderer.mxml @@ -2,20 +2,17 @@ - - - - - - - - - - - - - + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsList.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsList.mxml index 927a7bc599..d85e03ab33 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsList.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsList.mxml @@ -1,7 +1,8 @@ + itemRenderer="org.bigbluebutton.air.users.views.participants.ParticipantItemRenderer" + verticalScrollPolicy="off"> diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsView.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsView.as index bdeafbf6b8..5e56efd243 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsView.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsView.as @@ -34,6 +34,10 @@ package org.bigbluebutton.air.users.views.participants { return denyAllButton0; } + public function get conversationsList():List { + return conversationslist; + } + /* public function onClick(e:MouseEvent):void { diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewBase.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewBase.mxml index ffc4452d03..6c8d5555d6 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewBase.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewBase.mxml @@ -5,54 +5,96 @@ xmlns:participants="org.bigbluebutton.air.users.views.participants.*" xmlns:guests="org.bigbluebutton.air.users.views.participants.guests.*" xmlns:common="org.bigbluebutton.air.common.views.*" + xmlns:chatrooms="org.bigbluebutton.air.chat.views.chatrooms.*" styleName="participantsViewStyle"> - - - - - - - - - - - - - - + + + + + + + + + + + + + - + text="{resourceManager.getString('resources', 'participants.conversations')}" /> + + - - - - - + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewMediator.as index 67eb211908..aab2aa6a76 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/participants/ParticipantsViewMediator.as @@ -14,6 +14,8 @@ package org.bigbluebutton.air.users.views.participants { import org.bigbluebutton.air.common.views.TransitionAnimationENUM; import org.bigbluebutton.air.main.models.IUserUISession; import org.bigbluebutton.air.users.views.participants.guests.GuestResponseEvent; + import org.bigbluebutton.lib.chat.models.IChatMessagesSession; + import org.bigbluebutton.lib.chat.models.PrivateChatMessage; import org.bigbluebutton.lib.main.models.IUserSession; import org.bigbluebutton.lib.user.models.User; import org.bigbluebutton.lib.user.services.IUsersService; @@ -37,6 +39,11 @@ package org.bigbluebutton.air.users.views.participants { [Inject] public var usersService:IUsersService; + [Inject] + public var chatMessagesSession:IChatMessagesSession; + + protected var dataProviderConversations:ArrayCollection; + protected var dataProvider:ArrayCollection; protected var dataProviderGuests:ArrayCollection; @@ -49,6 +56,8 @@ package org.bigbluebutton.air.users.views.participants { private var _userMe:User; + private var _usersAdded:Array = new Array(); + override public function initialize():void { dataProvider = new ArrayCollection(); view.list.dataProvider = dataProvider; @@ -65,11 +74,10 @@ package org.bigbluebutton.air.users.views.participants { userSession.userList.userAddedSignal.add(addUser); userSession.userList.userRemovedSignal.add(userRemoved); setPageTitle(); - FlexGlobals.topLevelApplication.profileBtn.visible = true; - FlexGlobals.topLevelApplication.backBtn.visible = false; dataProviderGuests = new ArrayCollection(); view.guestsList.dataProvider = dataProviderGuests; view.guestsList.addEventListener(GuestResponseEvent.GUEST_RESPONSE, onSelectGuest); + view.conversationsList.addEventListener(IndexChangeEvent.CHANGE, onSelectChat); view.allowAllButton.addEventListener(MouseEvent.CLICK, allowAllGuests); view.denyAllButton.addEventListener(MouseEvent.CLICK, denyAllGuests); dicUserIdtoGuest = new Dictionary(); @@ -84,11 +92,89 @@ package org.bigbluebutton.air.users.views.participants { view.guestsList.includeInLayout = true; view.allGuests.visible = true; view.allGuests.includeInLayout = true; + } + userUISession.pushPage(PagesENUM.PARTICIPANTS); + initializeDataProviderConversations(); + } + + protected function onSelectChat(event:IndexChangeEvent):void { + var item:Object = dataProviderConversations.getItemAt(event.newIndex); + if (item) { + if (item.hasOwnProperty("button")) { + userUISession.pushPage(PagesENUM.SELECT_PARTICIPANT, item, TransitionAnimationENUM.SLIDE_LEFT) + } else { + userUISession.pushPage(PagesENUM.CHAT, item, TransitionAnimationENUM.SLIDE_LEFT) + } } else { throw new Error("item null on ChatRoomsViewMediator"); } } + private function initializeDataProviderConversations() { + dataProviderConversations = new ArrayCollection(); + dataProviderConversations.addItem({name: ResourceManager.getInstance().getString('resources', 'chat.item.publicChat'), publicChat: true, user: null, chatMessages: chatMessagesSession.publicChat}); + for each (var chatObject:PrivateChatMessage in chatMessagesSession.privateChats) { + chatObject.userOnline = userSession.userList.hasUser(chatObject.userID); + chatObject.privateChat.chatMessageChangeSignal.add(populateList); + if (chatObject.privateChat.messages.length > 0) { + addChat({name: chatObject.userName, publicChat: false, user: userSession.userList.getUser(chatObject.userID), chatMessages: chatObject.privateChat, userID: chatObject.userID, online: chatObject.userOnline}); + } + } + view.conversationsList.dataProvider = dataProviderConversations; + } + + public function populateList(UserID:String = null):void { + var newUser:User = userSession.userList.getUserByUserId(UserID); + if ((newUser != null) && (!isExist(newUser, dataProviderConversations)) && (!newUser.me)) { + var pcm:PrivateChatMessage = chatMessagesSession.getPrivateMessages(newUser.userID, newUser.name); + addChat({name: pcm.userName, publicChat: false, user: newUser, chatMessages: pcm.privateChat, userID: pcm.userID, online: true}, dataProvider.length - 1); + } + dataProviderConversations.refresh(); + } + + /** + * If user wasn't already added, adding to the data provider + **/ + private function addChat(chat:Object, pos:Number = NaN):void { + if (!userAlreadyAdded(chat.userID)) { + _usersAdded.push(chat.userID); + if (isNaN(pos)) { + dataProviderConversations.addItem(chat); + } else { + dataProviderConversations.addItemAt(chat, pos); + } + } + //dataProvider.setItemAt(button, dataProvider.length-1); + dataProviderConversations.refresh(); + setPageTitle(); + //dicUsertoChat[chat.user] = chat; + } + + /** + * Check if User was already added to the data provider + **/ + private function userAlreadyAdded(userID:String):Boolean { + for each (var str:String in _usersAdded) { + if (userID == str) { + return true; + } + } + return false; + } + + /** + * Check if User is already added to the dataProvider + * + * @param User + */ + private function isExist(user:User, dp:ArrayCollection):Boolean { + for (var i:int = 0; i < dp.length; i++) { + if (dp.getItemAt(i).userID == user.userID) { + return true; + } + } + return false; + } private function addUser(user:User):void { dataProvider.addItem(user); @@ -171,7 +257,7 @@ package org.bigbluebutton.air.users.views.participants { **/ private function setPageTitle():void { if (dataProvider != null) { - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'participants.title') + " (" + dataProvider.length + ")"; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'participants.title'); } } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/skins/UserSettingsParticipantBtnSkin.mxml b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/skins/UserSettingsParticipantBtnSkin.mxml index e92da2517b..a6b67f0682 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/users/views/skins/UserSettingsParticipantBtnSkin.mxml +++ b/clients/flash/air-client/src/org/bigbluebutton/air/users/views/skins/UserSettingsParticipantBtnSkin.mxml @@ -23,7 +23,8 @@ + color.down="{hostComponent.getStyle('onClickBackgroundColor')}" + color.disabled="{hostComponent.getStyle('disabledBackgroundColor')}" /> + color.disabled="{hostComponent.getStyle('disabledTextColor')}" + verticalCenter="0" + alpha.disabled="0.5" /> diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/video/views/videochat/VideoChatViewMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/video/views/videochat/VideoChatViewMediator.as index ecc5cdf01e..8a9d5d6dc3 100644 --- a/clients/flash/air-client/src/org/bigbluebutton/air/video/views/videochat/VideoChatViewMediator.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/video/views/videochat/VideoChatViewMediator.as @@ -49,9 +49,9 @@ package org.bigbluebutton.air.video.views.videochat { userSession.globalVideoSignal.add(globalVideoStreamNameHandler); view.streamlist.addEventListener(MouseEvent.CLICK, onSelectStream); FlexGlobals.topLevelApplication.stage.addEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler); - FlexGlobals.topLevelApplication.pageName.text = ResourceManager.getInstance().getString('resources', 'video.title'); - FlexGlobals.topLevelApplication.backBtn.visible = false; - FlexGlobals.topLevelApplication.profileBtn.visible = true; + FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'video.title'); + FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = false; + FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = true; dataProvider = new ArrayCollection(); view.streamlist.dataProvider = dataProvider; var users:ArrayCollection = userSession.userList.users;