Merge pull request #3518 from riadvice/mobile-client

Implemented mobile views
This commit is contained in:
Chad Pilkey 2017-05-02 14:43:19 -04:00 committed by GitHub
commit 47e50c0814
105 changed files with 2915 additions and 1413 deletions

View File

@ -2,6 +2,13 @@
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace libChat "org.bigbluebutton.lib.chat.views.*";
@namespace main "org.bigbluebutton.air.main.views.*";
@namespace participants "org.bigbluebutton.lib.participants.views.*";
@namespace users "org.bigbluebutton.lib.user.views.*";
@namespace settings "org.bigbluebutton.lib.settings.views.*";
@namespace audio "org.bigbluebutton.lib.settings.views.audio.*";
@namespace chat "org.bigbluebutton.lib.settings.views.chat.*";
@namespace lock "org.bigbluebutton.lib.settings.views.lock.*";
@namespace camera "org.bigbluebutton.lib.settings.views.camera.*";
@font-face {
src : url("../../shared/assets/fonts/SourceSansPro/SourceSansPro-Regular.ttf");
@ -43,180 +50,178 @@
embedAsCFF : false;
}
@font-face {
src : url("../../shared/assets/fonts/BBBIcons/bbb-icons.ttf");
fontFamily : BBBIcons;
fontStyle : normal;
fontWeight : normal;
embedAsCFF : true;
}
@font-face {
src : url("../../shared/assets/fonts/BBBIcons/bbb-icons.ttf");
fontFamily : BBBIcons;
fontStyle : normal;
fontWeight : bold;
embedAsCFF : true;
}
/* Shared styles */
global
{
global {
font-family : SourceSansPro;
}
/* Classes */
s|Application
{
s|Application {
backgroundColor : PropertyReference("bbbBlack");
}
/* Loading screen */
main|LoadingScreen {
color : PropertyReference("bbbWhite");
color : PropertyReference("white");
backgroundColor : PropertyReference("bbbBlack");
textAlign : center;
}
/* Main view */
main|MainView
{
main|MainView {
backgroundColor : PropertyReference("bbbBlack");
}
libChat|NewMessagesIndicator
{
main|TopToolbarAIR {
backgroundColor : PropertyReference("bbbBlack");
}
participants|ParticipantsViewBase, users|UsersViewBase {
backgroundColor : PropertyReference("grey100");
color : PropertyReference("blue900");
}
settings|SettingsViewBase, audio|AudioSettingsViewBase, chat|ChatSettingsViewBase, lock|LockSettingsViewBase, camera|CameraSettingsViewBase {
color : PropertyReference("grey700");
headerBackground : PropertyReference("blue500");
separatorColor : PropertyReference("grey200");
}
participants|ParticipantsViewBase s|List{
contentBackgroundColor : PropertyReference("white");
}
libChat|ChatViewBase {
inputBackgroundColor : PropertyReference("grey100");
inputBorderColor : PropertyReference("grey300");
}
s|ToggleSwitch {
accentColor : PropertyReference("green500");
color : PropertyReference("white");
skinClass : ClassReference("org.bigbluebutton.air.common.views.skins.MobileToggleSwitchSkin");
}
s|HSlider {
skinClass : ClassReference("spark.skins.ios7.HSliderSkin");
}
s|CheckBox {
skinClass : ClassReference("org.bigbluebutton.air.common.views.skins.MobileCheckBoxSkin");
chromeColor : PropertyReference("white");
}
.sectionTitle {
backgroundColor : PropertyReference("grey100");
color : PropertyReference("grey700");
}
.participantTitle {
color : PropertyReference("blue900");
}
.participantStatus {
color : PropertyReference("grey700");
}
libChat|NewMessagesIndicator {
backgroundColor : PropertyReference("bbbRed");
backgroundAlpha : 1;
borderColor : PropertyReference("bbbRed");
borderAlpha : 0;
color : PropertyReference("bbbWhite");
cornerRadius : 6;
color : PropertyReference("white");
skinClass : ClassReference("org.bigbluebutton.lib.chat.views.skins.NewMessagesIndicatorSkin");
}
.subViewContent
{
backgroundColor : PropertyReference("bbbWhite");
libChat|ChatItemRenderer {
color : PropertyReference("grey700");
nameColor : PropertyReference("blue900");
}
.titleLabel
{
color : PropertyReference("bbbWhite");
users|UserItemRenderer {
color : PropertyReference("grey700");
}
.topButton
{
iconColor : PropertyReference("bbbWhite");
iconFont : BBBIcons;
skinClass : ClassReference("org.bigbluebutton.lib.main.views.skins.TopButtonSkin");
settings|SettingsItemRenderer {
color : PropertyReference("blue900");
iconColor : PropertyReference("grey700");
}
.participantsButton
{
icon : "\ue906";
.subViewContent {
backgroundColor : PropertyReference("white");
}
.settingsButton
{
icon : "\ue902";
.titleLabel {
color : PropertyReference("white");
}
.presentationButton
{
icon : "\ue90c";
.topButton, .chatIcon, .settingsIcon {
iconColor : PropertyReference("white");
fontFamily : BBBIcons;
skinClass : ClassReference("org.bigbluebutton.lib.main.views.skins.TopButtonSkin");
}
.backButton
{
icon : "\ue90e";
.actionButton {
color : PropertyReference("white");
cornerRadius : 5;
backgroundColor : PropertyReference("blue500");
borderColor : PropertyReference("white");
selectedBackgroundColor : PropertyReference("blue900");
skinClass : ClassReference("org.bigbluebutton.lib.main.views.skins.ActionButtonSkin");
}
.menuButton
{
.saveButton {
color : PropertyReference("white");
fontWeight : normal;
skinClass : ClassReference("org.bigbluebutton.lib.main.views.skins.SaveButtonSkin");
}
.settingsIcon {
iconColor : PropertyReference("grey700");
}
.chatIcon {
color : PropertyReference("grey700");
}
.menuButton {
backgroundColor : PropertyReference("bbbBlue");
selectedBackgroundColor : PropertyReference("bbbGrey");
color : PropertyReference("bbbWhite");
iconColor : PropertyReference("bbbWhite");
color : PropertyReference("white");
iconFont : BBBIcons;
iconColor : PropertyReference("white");
skinClass : ClassReference("org.bigbluebutton.lib.main.views.skins.MenuButtonSkin");
}
.micOnButton
{
icon : "\ue91b";
.participantIcon {
color : PropertyReference("grey700");
circleColor : PropertyReference("grey700");
}
.micOffButton
{
icon : "\ue91c";
.participantIconSettings {
color : PropertyReference("white");
circleColor : PropertyReference("white");
}
.camOnButton
{
icon : "\ue921";
}
.camOffButton
{
icon : "\ue905";
}
.handStatusButton
{
icon : "\ue910";
}
.participantIcon
{
circleColor : PropertyReference("bbbBlack");
}
.sendButton
{
color : PropertyReference("bbbGrey");
.sendButton {
color : PropertyReference("blue500");
fontFamily : BBBIcons;
borderColor : PropertyReference("bbbGrey");
borderColor : PropertyReference("blue500");
skinClass : ClassReference("org.bigbluebutton.lib.chat.views.skins.SendButtonSkin");
}
.messageInput
{
.messageInput {
fontFamily : SourceSansProMX;
contentBackgroundAlpha : 0;
skinClass : ClassReference("org.bigbluebutton.air.chat.views.skins.MessageInputSkin");
}
.content
{
.content {
color : PropertyReference("bbbBlack");
}
/*
.panel
{
backgroundColor: PropertyReference("bbbWhite");
backgroundAlpha: 1;
padding: 6;
skinClass: ClassReference("org.bigbluebutton.web.common.skins.PanelSkin");
}
.panelTitle
{
fontSize: 18;
fontWeight: bold;
color: PropertyReference("bbbWhite");
paddingBottom: 10;
}
*/
.icon
{
fontFamily : BBBIcons;
color : PropertyReference("bbbGrey");
.leaveLabel {
color : PropertyReference("blue500");
}

View File

@ -6,6 +6,7 @@
styleName="mainshell"
xmlns:main="org.bigbluebutton.air.main.views.*">
<fx:Style source="../../shared/assets/css/common.css" />
<fx:Style source="../../shared/assets/css/bbb-icons.css" />
<fx:Style source="Default.css" />
<fx:Style source="css/ldpi.css" />
<fx:Style source="css/mdpi.css" />
@ -20,16 +21,10 @@
<fx:Script>
<![CDATA[
include "../../shared/ColorPalette.as"
import com.adobe.utils.LocaleUtil;
import mx.events.FlexEvent;
import mx.resources.ResourceManager;
import org.bigbluebutton.air.AppConfig;
import org.bigbluebutton.air.chat.ChatConfig;
import org.bigbluebutton.air.deskshare.DeskshareConfig;
import org.bigbluebutton.air.main.MainConfig;
import org.bigbluebutton.air.main.utils.OrientationCalculator;
import org.bigbluebutton.air.participants.ParticipantsConfig;
@ -46,6 +41,8 @@
import robotlegs.bender.framework.api.IContext;
import robotlegs.bender.framework.api.LogLevel;
import robotlegs.bender.framework.impl.Context;
include "../../shared/ColorPalette.as"
protected var context:IContext;
@ -63,11 +60,17 @@
* Sets up the Robotlegs context.
*/
private function setupContext():void {
context = new Context().install(MVCSBundle, SignalCommandMapExtension).configure(AppConfig).
configure(MainConfig).configure(PresentationConfig).configure(WhiteboardConfig).configure(VideoConfig).configure(VoiceConfig).configure(ParticipantsConfig).configure(UsersConfig).configure(ChatConfig)
//.configure(DeskshareConfig).configure(SettingsConfig)
context = new Context().install(MVCSBundle, SignalCommandMapExtension)
.configure(AppConfig)
.configure(MainConfig)
.configure(SettingsConfig)
.configure(PresentationConfig)
.configure(WhiteboardConfig)
.configure(VideoConfig)
.configure(VoiceConfig)
.configure(ParticipantsConfig)
.configure(UsersConfig)
.configure(ChatConfig)
.configure(new ContextView(this));
// If you wish to change the log level then uncomment the line below and set
// the logLevel to the value you desire. The default logLevel is DEBUG, which

View File

@ -2,6 +2,14 @@
@namespace main "org.bigbluebutton.air.main.views.*";
@namespace mainviews "org.bigbluebutton.lib.main.views.*";
@namespace skins "org.bigbluebutton.lib.main.views.skins.*";
@namespace views "org.bigbluebutton.air.common.views.*";
@namespace libChat "org.bigbluebutton.lib.chat.views.*";
@namespace users "org.bigbluebutton.lib.user.views.*";
@namespace settings "org.bigbluebutton.lib.settings.views.*";
@namespace audio "org.bigbluebutton.lib.settings.views.audio.*";
@namespace chat "org.bigbluebutton.lib.settings.views.chat.*";
@namespace lock "org.bigbluebutton.lib.settings.views.lock.*";
@namespace camera "org.bigbluebutton.lib.settings.views.camera.*";
@media (application-dpi: 320) {
main|LoadingScreen {
@ -12,11 +20,14 @@
height : 80;
}
main|MainView {
menuHeight : 160;
views|NoTabView {
toolbarHeight : 80;
}
main|MainView {
menuHeight : 160;
}
mainviews|MenuButtonsBase {
bottom : 35;
top : 14;
@ -29,18 +40,65 @@
labelPadding : 12;
}
.titleLabel
{
libChat|NewMessagesIndicator {
cornerRadius : 26;
labelPadding : 30;
}
libChat|ChatItemRenderer {
padding : 30;
fontSize : 34;
nameFontSize : 34;
timeFontSize : 24;
}
settings|SettingsViewBase, camera|CameraSettingsViewBase {
groupsPadding : 40;
}
audio|AudioSettingsViewBase, chat|ChatSettingsViewBase, lock|LockSettingsViewBase {
padding: 30;
}
settings|SettingsItemRenderer {
fontSize : 34;
iconSize : 44;
padding : 32;
}
libChat|ChatViewBase {
inputPadding : 26;
}
users|UserItemRenderer {
iconSize : 44;
}
s|ToggleSwitch {
fontSize : 24;
}
.icon {
fontSize : 20;
}
.sendButton {
borderWeight : 2;
diameter : 40;
}
.titleLabel {
fontSize : 34;
left : 90;
right : 90;
top : 25;
}
.topButton
{
iconSize : 30;
top : 25;
.topButton {
fontSize : 44;
}
.saveButton {
fontSize : 24;
}
.topLeftButton {
@ -51,33 +109,50 @@
right : 30;
}
.participantIcon
{
width : 32;
height : 32;
fontSize : 12;
.actionButton {
fontSize : 21;
}
.chatMessage
{
nameFontSize : 16;
timeFontSize : 16;
.participantItem {
fontSize : 34;
padding : 30;
}
.sendButton
{
.participantIcon {
diameter : 44;
fontSize : 18;
circleStroke : 2;
}
.participantIconSettings {
diameter : 124;
fontSize : 52;
circleStroke : 2;
}
.sectionTitle {
paddingTop : 16;
paddingBottom : 16;
paddingLeft : 30;
fontSize : 28;
}
.participantStatus {
fontSize : 30;
}
.chatIcon, .settingsIcon {
fontSize : 44;
}
.chatRoomItem {
fontSize : 34;
padding : 30;
}
.sendButton {
fontSize : 20;
borderWeight : 2;
cornerRadius : 4;
}
.content
{
fontSize : 14;
}
.icon
{
fontSize : 20;
}
}

View File

@ -5,7 +5,6 @@ package org.bigbluebutton.air {
import org.bigbluebutton.air.main.commands.DisconnectUserCommandAIR;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.air.main.models.UISession;
import org.bigbluebutton.air.video.commands.ShareCameraCommand;
import org.bigbluebutton.lib.chat.models.ChatMessagesSession;
import org.bigbluebutton.lib.chat.models.IChatMessagesSession;
import org.bigbluebutton.lib.chat.services.ChatMessageService;
@ -33,19 +32,12 @@ package org.bigbluebutton.air {
import org.bigbluebutton.lib.main.services.IBigBlueButtonConnection;
import org.bigbluebutton.lib.main.services.ILoginService;
import org.bigbluebutton.lib.main.services.LoginService;
import org.bigbluebutton.lib.presentation.commands.LoadSlideCommand;
import org.bigbluebutton.lib.presentation.commands.LoadSlideSignal;
import org.bigbluebutton.lib.presentation.services.IPresentationService;
import org.bigbluebutton.lib.presentation.services.PresentationService;
import org.bigbluebutton.lib.user.services.IUsersService;
import org.bigbluebutton.lib.user.services.UsersService;
import org.bigbluebutton.lib.video.commands.CameraQualityCommand;
import org.bigbluebutton.lib.video.commands.CameraQualitySignal;
import org.bigbluebutton.lib.video.commands.ShareCameraSignal;
import org.bigbluebutton.lib.video.services.IVideoConnection;
import org.bigbluebutton.lib.video.services.VideoConnection;
import org.bigbluebutton.lib.voice.commands.ShareMicrophoneCommand;
import org.bigbluebutton.lib.voice.commands.ShareMicrophoneSignal;
import org.bigbluebutton.lib.voice.services.IVoiceConnection;
import org.bigbluebutton.lib.voice.services.VoiceConnection;
import org.bigbluebutton.lib.whiteboard.services.IWhiteboardService;

View File

@ -2,16 +2,12 @@ package org.bigbluebutton.air.chat {
import org.bigbluebutton.air.chat.views.ChatRoomsMediatorAIR;
import org.bigbluebutton.air.chat.views.ChatViewMediatorAIR;
import org.bigbluebutton.air.chat.views.TopToolbarChat;
import org.bigbluebutton.air.chat.views.TopToolbarMediatorChat;
import org.bigbluebutton.lib.chat.views.ChatRoomsViewBase;
import org.bigbluebutton.lib.chat.views.ChatViewBase;
import org.bigbluebutton.lib.main.views.TopToolbarBase;
import robotlegs.bender.extensions.matching.TypeMatcher;
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.IConfig;
public class ChatConfig implements IConfig {
@ -30,7 +26,6 @@ package org.bigbluebutton.air.chat {
*/
private function mediators():void {
mediatorMap.map(ChatRoomsViewBase).toMediator(ChatRoomsMediatorAIR);
mediatorMap.mapMatcher(new TypeMatcher().allOf(TopToolbarBase, TopToolbarChat)).toMediator(TopToolbarMediatorChat);
mediatorMap.map(ChatViewBase).toMediator(ChatViewMediatorAIR);
}
}

View File

@ -1,10 +1,11 @@
package org.bigbluebutton.air.chat.views {
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.lib.chat.views.ChatViewBase;
import spark.components.SkinnableContainer;
import spark.layouts.VerticalLayout;
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.lib.chat.views.ChatViewBase;
public class ChatRoomView extends NoTabView {
public function ChatRoomView() {
super();
@ -15,11 +16,6 @@ package org.bigbluebutton.air.chat.views {
l.horizontalAlign = "center";
layout = l;
var topToolbar:TopToolbarChat = new TopToolbarChat();
topToolbar.percentWidth = 100;
topToolbar.height = 60;
addElement(topToolbar);
var skinnableWrapper:SkinnableContainer = new SkinnableContainer();
skinnableWrapper.styleName = "subViewContent";
skinnableWrapper.percentWidth = 100;
@ -32,5 +28,9 @@ package org.bigbluebutton.air.chat.views {
addElement(skinnableWrapper);
}
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarChat();
}
}
}

View File

@ -1,13 +1,12 @@
package org.bigbluebutton.air.chat.views
{
package org.bigbluebutton.air.chat.views {
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.chat.views.ChatRoomsMediatorBase;
import spark.events.IndexChangeEvent;
public class ChatRoomsMediatorAIR extends ChatRoomsMediatorBase
{
public class ChatRoomsMediatorAIR extends ChatRoomsMediatorBase {
[Inject]
public var uiSession:IUISession;
@ -17,4 +16,4 @@ package org.bigbluebutton.air.chat.views
//uiSession.chatInfo = new ChatRoomVO(item.userId, item.isPublic);
}
}
}
}

View File

@ -1,12 +1,12 @@
package org.bigbluebutton.air.chat.views {
import org.bigbluebutton.lib.main.views.TopToolbarBase;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
public class TopToolbarChat extends TopToolbarBase {
public class TopToolbarChat extends TopToolbarAIR {
public function TopToolbarChat() {
super();
leftButton.styleName = "backButton topButton";
rightButton.styleName = "presentationButton topButton";
leftButton.styleName = "icon-left-arrow topButton topLeftButton";
rightButton.styleName = "icon-presentation topButton topRightButton";
}
}
}

View File

@ -1,34 +0,0 @@
package org.bigbluebutton.air.chat.views {
import flash.events.MouseEvent;
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.main.views.TopToolbarMediatorBase;
import org.bigbluebutton.lib.user.models.User;
public class TopToolbarMediatorChat extends TopToolbarMediatorBase {
[Inject]
public var uiSession:IUISession;
override protected function setTitle():void {
var data:Object = uiSession.currentPageDetails;
if (data != null) {
if (data.publicChat) {
view.titleLabel.text = "Public Chat";
} else {
var user:User = userSession.userList.getUserByUserId(data.userId);
view.titleLabel.text = user.name;
}
}
}
override protected function leftButtonClickHandler(e:MouseEvent):void {
uiSession.popPage();
}
override protected function rightButtonClickHandler(e:MouseEvent):void {
uiSession.pushPage(PageEnum.MAIN);
}
}
}

View File

@ -4,7 +4,12 @@ package org.bigbluebutton.air.common {
import org.bigbluebutton.air.chat.views.ChatRoomView;
import org.bigbluebutton.air.main.views.MainView;
import org.bigbluebutton.air.participants.views.ParticipantsView;
import org.bigbluebutton.air.participants.views.ParticipantsView;
import org.bigbluebutton.air.settings.views.SettingsView;
import org.bigbluebutton.air.settings.views.audio.AudioSettingsView;
import org.bigbluebutton.air.settings.views.camera.CameraSettingsView;
import org.bigbluebutton.air.settings.views.chat.ChatSettingsView;
import org.bigbluebutton.air.settings.views.lock.LockSettingsView;
public class PageEnum {
public static const MAIN:String = "main";
@ -25,15 +30,15 @@ package org.bigbluebutton.air.common {
public static const AUDIOSETTINGS:String = "AudioSettings";
public static const EXIT:String = "Exit";
public static const CHATSETTINGS:String = "ChatSettings";
public static const LOCKSETTINGS:String = "LockSettings";
public static const SPLITSETTINGS:String = "SplitSettings";
public static const EXIT:String = "Exit";
public static const SPLITPARTICIPANTS:String = "SplitParticipants";
public static const SETTINGS:String = "Settings";
public static const SPLITCHAT:String = "SplitChat";
public static const APPLICATION_SETTINGS:String = "ApplicationSettings";
/**
* Especials
@ -45,18 +50,20 @@ package org.bigbluebutton.air.common {
dic[MAIN] = MainView;
dic[PARTICIPANTS] = ParticipantsView;
dic[CHAT] = ChatRoomView;
// dic[PROFILE] = ProfileView;
// dic[USER_DETAILS] = UserDetailsView;
// dic[VIDEO_CHAT] = VideoChatView;
// dic[CHATROOMS] = ChatRoomsView;
// dic[PARTICIPANTS] = ParticipantsView;
// dic[SELECT_PARTICIPANT] = SelectParticipantView;
// dic[DISCONNECT] = DisconnectPageView;
// dic[DESKSHARE] = DeskshareView;
// dic[CAMERASETTINGS] = CameraSettingsView;
// dic[AUDIOSETTINGS] = AudioSettingsView;
// dic[EXIT] = ExitPageView;
// dic[LOCKSETTINGS] = LockSettingsView;
dic[SETTINGS] = SettingsView;
dic[AUDIOSETTINGS] = AudioSettingsView;
dic[CAMERASETTINGS] = CameraSettingsView;
dic[CHATSETTINGS] = ChatSettingsView;
dic[LOCKSETTINGS] = LockSettingsView;
// dic[PROFILE] = ProfileView;
// dic[USER_DETAILS] = UserDetailsView;
// dic[VIDEO_CHAT] = VideoChatView;
// dic[CHATROOMS] = ChatRoomsView;
// dic[PARTICIPANTS] = ParticipantsView;
// dic[SELECT_PARTICIPANT] = SelectParticipantView;
// dic[DISCONNECT] = DisconnectPageView;
// dic[DESKSHARE] = DeskshareView;
// dic[EXIT] = ExitPageView;
dicInitiated = true;
}
}

View File

@ -2,10 +2,20 @@ package org.bigbluebutton.air.common.views {
import spark.components.View;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
[Style(name = "toolbarHeight", inherit = "yes", type = "Number")]
public class NoTabView extends View {
protected var _topToolbar:TopToolbarAIR;
public function NoTabView() {
super();
actionBarVisible = false;
createToolbar();
_topToolbar = createToolbar();
_topToolbar.percentWidth = 100;
addElement(_topToolbar);
}
/**
@ -13,5 +23,15 @@ package org.bigbluebutton.air.common.views {
*/
public function rotationHandler(rotation:String):void {
}
protected function createToolbar():TopToolbarAIR {
return new TopToolbarAIR();
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
_topToolbar.height = getStyle("toolbarHeight");
}
}
}

View File

@ -1,25 +0,0 @@
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
styleName="participantIcon">
<s:Label id="firstLetters"
styleName="nameIconText"
verticalCenter="0"
horizontalCenter="0" />
<s:Ellipse id="circle"
height="25"
width="25"
verticalCenter="0"
horizontalCenter="0">
<s:stroke>
<s:SolidColorStroke id="circleColor"
color="{getStyle('circleColor')}"
weight="1" />
</s:stroke>
</s:Ellipse>
</s:Group>

View File

@ -6,6 +6,18 @@
[HostComponent("spark.components.Image")]
</fx:Metadata>
<fx:Script>
<![CDATA[
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
imageDisplay.height = getStyle("height");
imageDisplay.width = getStyle("width");
imageDisplay.source = getStyle("backgroundImage");
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
]]>
</fx:Script>
<!-- states -->
<s:states>
<s:State name="disabled" />
@ -20,9 +32,6 @@
name=imageDisplay, type=spark.primitives.BitmapImage, required=true
-->
<s:BitmapImage id="imageDisplay"
height="{getStyle('height')}"
width="{getStyle('width')}"
source="{getStyle('backgroundImage')}"
horizontalCenter="0"
verticalCenter="0" />
</s:Skin>

View File

@ -0,0 +1,23 @@
package org.bigbluebutton.air.common.views.skins {
import spark.skins.ios7.CheckBoxSkin;
import org.bigbluebutton.air.common.views.skins.assets.CheckBoxUp;
import org.bigbluebutton.air.common.views.skins.assets.CheckBoxUpSelected;
import org.bigbluebutton.air.common.views.skins.assets.CheckBoxUpSymbolSelected;
public class MobileCheckBoxSkin extends CheckBoxSkin {
public function MobileCheckBoxSkin() {
super();
upIconClass = CheckBoxUp;
upSymbolIconClass = null;
upSelectedIconClass = CheckBoxUpSelected;
upSymbolIconSelectedClass = CheckBoxUpSymbolSelected;
downIconClass = CheckBoxUp;
downSymbolIconClass = null
downSelectedIconClass = CheckBoxUp;
downSymbolIconSelectedClass = null;
}
}
}

View File

@ -0,0 +1,401 @@
////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package org.bigbluebutton.air.common.views.skins {
import flash.events.Event;
import mx.core.DPIClassification;
import mx.core.IVisualElement;
import mx.core.UIComponent;
import spark.components.ToggleSwitch;
import spark.core.SpriteVisualElement;
import spark.skins.mobile.supportClasses.MobileSkin;
import org.bigbluebutton.air.common.views.skins.assets.ToggleSwitchThumb;
import org.bigbluebutton.air.common.views.skins.assets.ToggleSwitchTrack;
/**
* ActionScript-based skin for the ToggleSwitch control.
* The colors of the component can
* be customized using styles. This class is responsible for most of the
* graphics drawing, with some additional fxg assets.
*
* @langversion 3.0
* @playerversion AIR 3
* @productversion Flex 4.6
*
* @see spark.components.ToggleSwitch
*/
public class MobileToggleSwitchSkin extends MobileSkin {
//----------------------------------------------------------------------------------------------
//
// Skin parts
//
//----------------------------------------------------------------------------------------------
/**
* The thumb skin part.
*
* @langversion 3.0
* @playerversion AIR 3
* @productversion Flex 4.6
*/
public var thumb:IVisualElement;
/**
* The track skin part.
*
* @langversion 3.0
* @playerversion AIR 3
* @productversion Flex 4.6
*/
public var track:IVisualElement;
//----------------------------------
// hostComponent
//----------------------------------
private var _hostComponent:ToggleSwitch;
public var selectedLabelDisplay:LabelDisplayComponent;
/**
* @copy spark.skins.spark.ApplicationSkin#hostComponent
*/
public function get hostComponent():ToggleSwitch {
return _hostComponent;
}
public function set hostComponent(value:ToggleSwitch):void {
if (_hostComponent)
_hostComponent.removeEventListener("thumbPositionChanged", thumbPositionChanged_handler);
_hostComponent = value;
if (_hostComponent)
_hostComponent.addEventListener("thumbPositionChanged", thumbPositionChanged_handler);
}
//----------------------------------
// selectedLabel
//----------------------------------
private var _selectedLabel:String;
/**
* The text of the label showing when the component is selected.
* Subclasses can set or override this property to customize the selected label.
*
* @langversion 3.0
* @playerversion AIR 3
* @productversion Flex 4.6
*/
protected function get selectedLabel():String {
return _selectedLabel;
}
protected function set selectedLabel(value:String):void {
_selectedLabel = value;
}
//----------------------------------
// unselectedLabel
//----------------------------------
private var _unselectedLabel:String;
/**
* The text of the label showing when the component is not selected.
* Subclasses can set or override this property to customize the unselected label.
*
* @langversion 3.0
* @playerversion AIR 3
* @productversion Flex 4.6
*/
protected function get unselectedLabel():String {
return _unselectedLabel;
}
protected function set unselectedLabel(value:String):void {
_unselectedLabel = value;
}
/**
* The contents inside the skin, not including the outline
* stroke
*/
private var contents:UIComponent;
private var switchTrackSkin:Class;
private var switchThumbSkin:Class;
protected var trackWidth:Number;
protected var trackHeight:Number;
protected var layoutThumbWidth:Number;
protected var layoutThumbHeight:Number;
public function MobileToggleSwitchSkin() {
super();
switchTrackSkin = ToggleSwitchTrack;
switchThumbSkin = ToggleSwitchThumb;
switch (applicationDPI) {
case DPIClassification.DPI_640: {
layoutThumbWidth = 116;
layoutThumbHeight = 116;
trackWidth = 244;
trackHeight = 108;
break;
}
case DPIClassification.DPI_480: {
layoutThumbWidth = 87;
layoutThumbHeight = 87;
trackWidth = 183;
trackHeight = 81;
break;
}
case DPIClassification.DPI_320: {
layoutThumbWidth = 58;
layoutThumbHeight = 58;
trackWidth = 122;
trackHeight = 54;
break;
}
case DPIClassification.DPI_240: {
layoutThumbWidth = 38;
layoutThumbHeight = 38;
trackWidth = 81;
trackHeight = 46;
break;
}
case DPIClassification.DPI_120: {
layoutThumbWidth = 29;
layoutThumbHeight = 29;
trackWidth = 61;
trackHeight = 27;
break;
}
default: {
layoutThumbWidth = 21;
layoutThumbHeight = 21;
trackWidth = 41;
trackHeight = 19;
break;
}
}
selectedLabel = resourceManager.getString("components", "toggleSwitchSelectedLabel");
unselectedLabel = resourceManager.getString("components", "toggleSwitchUnselectedLabel");
}
override protected function createChildren():void {
super.createChildren();
contents = new UIComponent();
addChild(contents);
drawTrack();
drawThumb();
drawLabel();
}
override protected function measure():void {
// The skin must be at least as large as the thumb
measuredMinWidth = trackWidth;
measuredMinHeight = trackHeight;
var labelWidth:Number = getElementPreferredWidth(selectedLabelDisplay);
measuredWidth = trackWidth + labelWidth;
measuredHeight = trackHeight;
}
override protected function commitCurrentState():void {
toggleSelectionState();
layoutThumbs();
layoutLabel()
}
//The label is called selectedLabelDisplay because the hostComponent expects it
protected function drawLabel():void {
selectedLabelDisplay = new LabelDisplayComponent();
selectedLabelDisplay.id = "selectedLabelDisplay";
selectedLabelDisplay.text = selectedLabel;
setElementSize(selectedLabelDisplay, thumb.width, thumb.height);
contents.addChild(selectedLabelDisplay);
}
protected function drawTrack():void {
track = new switchTrackSkin();
track.width = trackWidth;
track.height = trackHeight;
contents.addChildAt(SpriteVisualElement(track), 0);
}
//Thumb ON the right side; Thumb OFF is on the left side
protected function layoutThumbs():void {
if (currentState.indexOf("AndSelected") != -1) {
setElementPosition(thumb, trackWidth / 2, (trackHeight - thumb.height) / 2);
} else {
setElementPosition(thumb, 0, trackHeight / 2 - thumb.height / 2);
}
}
//Label display sould be at the same location as the thumb
protected function layoutLabel():void {
if (selectedLabelDisplay != null) {
if (currentState.indexOf("AndSelected") != -1) {
setElementPosition(selectedLabelDisplay, 0, 0);
} else {
setElementPosition(selectedLabelDisplay, trackWidth / 2, 0);
}
}
}
//Depending on current state, update skinpart thumb accordingly
protected function toggleSelectionState():void {
if (currentState.indexOf("AndSelected") != -1) {
selectedLabelDisplay.text = selectedLabel;
track.alpha = 1;
} else {
track.alpha = 0.4;
selectedLabelDisplay.text = unselectedLabel;
}
}
protected function drawThumb():void {
thumb = new switchThumbSkin();
thumb.width = layoutThumbWidth;
thumb.height = layoutThumbHeight;
contents.addChildAt(SpriteVisualElement(thumb), 1);
}
//Hostcomponent dispatches this event whenever the thumb position changes
protected function thumbPositionChanged_handler(event:Event):void {
moveSlidingContent();
}
//Move the current thumb and label along with the animating content
protected function moveSlidingContent():void {
if (!hostComponent)
return;
var x:Number = (track.getLayoutBoundsWidth() - thumb.getLayoutBoundsWidth()) * hostComponent.thumbPosition + track.getLayoutBoundsX();
var y:Number = thumb.getLayoutBoundsY();
setElementPosition(thumb, x, y);
setElementPosition(selectedLabelDisplay, x, y);
}
}
}
import mx.core.UIComponent;
import spark.components.supportClasses.StyleableTextField;
import spark.core.IDisplayText;
/**
* @private
* Component combining two labels to create the effect of text and its drop
* shadow. The component can be used with advanced style selectors and the
* styles "color", "textShadowColor", and "textShadowAlpha". Based off of
* ActionBar.TitleDisplayComponent. These two should eventually be factored.
*/
class LabelDisplayComponent extends UIComponent implements IDisplayText {
public var shadowYOffset:Number = 0;
private var labelChanged:Boolean = false;
private var labelDisplay:StyleableTextField;
private var labelDisplayShadow:StyleableTextField;
private var _text:String;
public function LabelDisplayComponent() {
super();
_text = "";
}
override public function get baselinePosition():Number {
return labelDisplay.baselinePosition;
}
override protected function createChildren():void {
super.createChildren();
labelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
labelDisplay.styleName = this;
labelDisplay.editable = false;
labelDisplay.selectable = false;
labelDisplay.multiline = false;
labelDisplay.wordWrap = false;
addChild(labelDisplay);
}
override protected function commitProperties():void {
super.commitProperties();
if (labelChanged) {
labelDisplay.text = text;
invalidateSize();
invalidateDisplayList();
labelChanged = false;
}
}
override protected function measure():void {
if (labelDisplay.isTruncated)
labelDisplay.text = text;
labelDisplay.commitStyles();
measuredWidth = labelDisplay.getPreferredBoundsWidth();
measuredHeight = labelDisplay.getPreferredBoundsHeight();
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
if (labelDisplay.isTruncated)
labelDisplay.text = text;
labelDisplay.commitStyles();
var labelHeight:Number = labelDisplay.getPreferredBoundsHeight();
var labelY:Number = (unscaledHeight - labelHeight) / 2;
var labelWidth:Number = Math.min(unscaledWidth, labelDisplay.getPreferredBoundsWidth());
var labelX:Number = (unscaledWidth - labelWidth) / 2;
labelDisplay.setLayoutBoundsSize(labelWidth, labelHeight);
labelDisplay.setLayoutBoundsPosition(labelX, labelY);
labelDisplay.truncateToFit();
}
public function get text():String {
return _text;
}
public function set text(value:String):void {
_text = value;
labelChanged = true;
invalidateProperties();
}
public function get isTruncated():Boolean {
return labelDisplay.isTruncated;
}
}

View File

@ -0,0 +1,7 @@
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="32" viewWidth="32">
<Ellipse width="22" height="22" x="2" y="2">
<stroke>
<SolidColorStroke color="#8A9AA7" alpha="1" weight="1"/>
</stroke>
</Ellipse>
</Graphic>

View File

@ -0,0 +1,7 @@
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="32" viewWidth="32">
<Ellipse width="22" height="22" x="2" y="2">
<stroke>
<SolidColorStroke color="#36CC84" alpha="1" weight="1"/>
</stroke>
</Ellipse>
</Graphic>

View File

@ -0,0 +1,14 @@
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="32" viewWidth="32">
<Group>
<Path x="10" y="14"
data="
M7.16,16c-0.22,0-0.44-0.08-0.62-0.24l-6.21-5.6C-0.07,9.8-0.11,9.18,0.23,8.78
c0.34-0.41,0.94-0.45,1.33-0.1l5.5,4.96L18.34,0.33c0.35-0.41,0.94-0.45,1.34-0.09c0.39,0.36,0.43,0.98,0.09,1.38L7.87,15.67
C7.68,15.89,7.42,16,7.16,16z"
winding="nonZero">
<fill>
<SolidColor color="#36CC84" alpha="1"/>
</fill>
</Path>
</Group>
</Graphic>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="58" viewWidth="58">
<Group scaleGridLeft="14" scaleGridRight="14" scaleGridTop="14" scaleGridBottom="14">
<Ellipse x="5" y="5" height="48" width="48">
<fill>
<SolidColor color="#FFFFFF"/>
</fill>
<filters>
<DropShadowFilter distance="0" alpha=".6" strength=".3" angle="0" blurX="5" blurY="5"/>
</filters>
</Ellipse>
</Group>
</Graphic>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="54" viewWidth="122">
<Group scaleGridLeft="25.5" scaleGridRight="96.5" scaleGridTop="10" scaleGridBottom="44">
<Path winding="nonZero" data=" M 114.1 7.9 Q 106.2 0 95.05 0 L 26.9 0 Q 15.75 0 7.9 7.9 0 15.8 0 27 0 38.2 7.9 46.1 15.75 54 26.9 54 L 95.05 54 Q 106.2 54 114.1 46.1 122 38.15 122 27 122 15.8 114.1 7.9 Z">
<fill>
<SolidColor color="#36CC84"/>
</fill>
</Path>
</Group>
</Graphic>

View File

@ -50,7 +50,6 @@ package org.bigbluebutton.air.main {
mediatorMap.map(IChangeStatusPopUp).toMediator(ChangeStatusPopUpMediator);
mediatorMap.map(IExitPageView).toMediator(ExitPageViewMediator);
*/
mediatorMap.map(LoadingScreen).toMediator(LoadingScreenMediator);
mediatorMap.map(PagesNavigatorView).toMediator(PagesNavigatorViewMediator);
mediatorMap.mapMatcher(new TypeMatcher().allOf(TopToolbarBase, TopToolbarAIR)).toMediator(TopToolbarMediatorAIR);

View File

@ -23,6 +23,7 @@ package org.bigbluebutton.air.main.commands {
uiSession.popPage();
uiSession.setLoading(false, "Loading Finished");
// fixme: this view is already loaded in onLoadingChange of LoadScreenMadiator class
uiSession.pushPage(PageEnum.MAIN);
// displayAudioSettings();
// if (userSession.videoAutoStart && !userSession.skipCamSettingsCheck) {

View File

@ -90,12 +90,13 @@ package org.bigbluebutton.air.main.services {
*/
var xml:XML = new XML(data);
var code:String = xml.returncode.toString();
var sessionToken:String;
switch (code) {
case XML_RETURN_CODE_FAILED:
onFailure(xml.messageKey);
break;
case XML_RETURN_CODE_SUCCESS:
var sessionToken:String = xml.auth_token.toString();
sessionToken = xml.auth_token.toString();
successSignal.dispatch(urlRequest, responseUrl, sessionToken);
break;
default:
@ -114,7 +115,7 @@ package org.bigbluebutton.air.main.services {
}
infoIndex = responseUrl.indexOf(TOKEN_QUERY_PARAM);
if (infoIndex != -1) {
var sessionToken:String = responseUrl.substring(infoIndex + TOKEN_QUERY_PARAM.length);
sessionToken = responseUrl.substring(infoIndex + TOKEN_QUERY_PARAM.length);
successSignal.dispatch(urlRequest, responseUrl, sessionToken);
return;
}

View File

@ -7,10 +7,7 @@ package org.bigbluebutton.air.main.views {
import org.osmf.layout.HorizontalAlign;
[Style(name = "menuHeight", inherit = "no", type = "Number")]
[Style(name = "toolbarHeight", inherit = "no", type = "Number")]
public class MainView extends NoTabView {
private var _topToolbar:TopToolbarAIR;
private var _presentationView:PresentationViewBase;
private var _menuButtons:MenuButtonsBase;
@ -23,10 +20,6 @@ package org.bigbluebutton.air.main.views {
vLayout.horizontalAlign = HorizontalAlign.CENTER;
layout = vLayout;
_topToolbar = new TopToolbarAIR();
_topToolbar.percentWidth = 100;
addElement(_topToolbar);
_presentationView = new PresentationViewBase();
_presentationView.percentWidth = 100;
_presentationView.percentHeight = 100;
@ -39,11 +32,10 @@ package org.bigbluebutton.air.main.views {
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
_menuButtons.height = getStyle("menuHeight");
_presentationView.width = w;
_presentationView.height = h - _topToolbar.height - _menuButtons.height;
_menuButtons.height = getStyle("menuHeight");
_topToolbar.height = getStyle("toolbarHeight");
}
}
}

View File

@ -40,6 +40,7 @@ package org.bigbluebutton.air.main.views {
}
protected function changePage(pageName:String, pageRemoved:Boolean = false, animation:int = TransitionAnimationEnum.APPEAR, transition:ViewTransitionBase = null):void {
//@fixme pageName is sometimes null, it should never happen
trace("PagesNavigatorViewMediator request change page to: " + pageName);
switch (animation) {
case TransitionAnimationEnum.APPEAR: {

View File

@ -1,10 +1,28 @@
package org.bigbluebutton.air.main.views {
import mx.graphics.SolidColor;
import spark.primitives.Rect;
import org.bigbluebutton.lib.main.views.TopToolbarBase;
public class TopToolbarAIR extends TopToolbarBase {
private var _background:Rect;
public function TopToolbarAIR() {
// don't actually need to do anything, but have to subclass so that there isn't mediator confusion,
// see http://knowledge.robotlegs.org/discussions/robotlegs-2/11567-inherited-mediators-mapping
super();
_background = new Rect();
_background.percentHeight = 100;
_background.percentWidth = 100;
_background.fill = new SolidColor();
addElementAt(_background, 0);
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
SolidColor(_background.fill).color = getStyle("backgroundColor");
}
}
}

View File

@ -4,18 +4,50 @@ package org.bigbluebutton.air.main.views {
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.main.views.TopToolbarMediatorBase;
import org.bigbluebutton.lib.user.models.User;
public class TopToolbarMediatorAIR extends TopToolbarMediatorBase {
[Inject]
public var uiSession:IUISession;
override protected function setTitle():void {
if (uiSession.currentPage == PageEnum.CHAT) {
var data:Object = uiSession.currentPageDetails;
if (data != null) {
if (data.publicChat) {
view.titleLabel.text = "Public Chat";
} else {
var user:User = userSession.userList.getUserByUserId(data.userId);
view.titleLabel.text = user.name;
}
}
} else if (uiSession.currentPage == PageEnum.PARTICIPANTS) {
view.titleLabel.text = "Participants";
} else if (uiSession && uiSession.currentPage.indexOf("Settings") > 0) {
view.titleLabel.text = uiSession.currentPage.replace(/([A-Z])/g, ' $1');
} else {
view.titleLabel.text = conferenceParameters.meetingName;
}
}
override protected function leftButtonClickHandler(e:MouseEvent):void {
uiSession.pushPage(PageEnum.PARTICIPANTS);
if (uiSession.currentPage == PageEnum.MAIN) {
uiSession.pushPage(PageEnum.PARTICIPANTS);
} else {
uiSession.popPage();
}
}
override protected function rightButtonClickHandler(e:MouseEvent):void {
if (uiSession.currentPage == PageEnum.MAIN) {
uiSession.pushPage(PageEnum.SETTINGS);
} else if (uiSession && uiSession.currentPage.indexOf("Settings") > 0) {
uiSession.popPage();
} else {
uiSession.pushPage(PageEnum.MAIN);
}
}
}
}

View File

@ -1,9 +1,4 @@
package org.bigbluebutton.air.participants {
import org.bigbluebutton.air.participants.views.TopToolbarMediatorParticipants;
import org.bigbluebutton.air.participants.views.TopToolbarParticipants;
import org.bigbluebutton.lib.main.views.TopToolbarBase;
import robotlegs.bender.extensions.matching.TypeMatcher;
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
import robotlegs.bender.framework.api.IConfig;
@ -20,7 +15,6 @@ package org.bigbluebutton.air.participants {
* Maps view mediators to views.
*/
private function mediators():void {
mediatorMap.mapMatcher(new TypeMatcher().allOf(TopToolbarBase, TopToolbarParticipants)).toMediator(TopToolbarMediatorParticipants);
}
}
}

View File

@ -1,24 +1,20 @@
package org.bigbluebutton.air.participants.views {
import spark.components.SkinnableContainer;
import spark.layouts.HorizontalAlign;
import spark.layouts.VerticalLayout;
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.lib.participants.views.ParticipantsViewBase;
public class ParticipantsView extends NoTabView {
public function ParticipantsView() {
super();
styleName = "mainView";
var l:VerticalLayout = new VerticalLayout();
l.gap = 0;
l.horizontalAlign = "center";
layout = l;
var topToolbar:TopToolbarParticipants = new TopToolbarParticipants();
topToolbar.percentWidth = 100;
topToolbar.height = 80;
addElement(topToolbar);
var vLayout:VerticalLayout = new VerticalLayout();
vLayout.gap = 0;
vLayout.horizontalAlign = HorizontalAlign.CENTER;
layout = vLayout;
var skinnableWrapper:SkinnableContainer = new SkinnableContainer();
skinnableWrapper.styleName = "subViewContent";
@ -32,5 +28,9 @@ package org.bigbluebutton.air.participants.views {
addElement(skinnableWrapper);
}
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarParticipants();
}
}
}

View File

@ -1,24 +0,0 @@
package org.bigbluebutton.air.participants.views {
import flash.events.MouseEvent;
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.main.views.TopToolbarMediatorBase;
public class TopToolbarMediatorParticipants extends TopToolbarMediatorBase {
[Inject]
public var uiSession:IUISession;
override protected function setTitle():void {
view.titleLabel.text = "Participants";
}
override protected function leftButtonClickHandler(e:MouseEvent):void {
// do nothing
}
override protected function rightButtonClickHandler(e:MouseEvent):void {
uiSession.pushPage(PageEnum.MAIN);
}
}
}

View File

@ -1,12 +1,12 @@
package org.bigbluebutton.air.participants.views {
import org.bigbluebutton.lib.main.views.TopToolbarBase;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
public class TopToolbarParticipants extends TopToolbarBase {
public class TopToolbarParticipants extends TopToolbarAIR {
public function TopToolbarParticipants() {
super();
leftButton.styleName = "topButton";
rightButton.styleName = "presentationButton topButton";
leftButton.setVisible(false);
rightButton.styleName = "icon-presentation topButton topRightButton";
}
}
}

View File

@ -1,12 +1,25 @@
package org.bigbluebutton.air.settings {
import org.bigbluebutton.air.settings.views.audio.AudioSettingsViewMediator;
import org.bigbluebutton.air.settings.views.audio.IAudioSettingsView;
import org.bigbluebutton.air.settings.views.camera.CameraSettingsViewMediator;
import org.bigbluebutton.air.settings.views.camera.ICameraSettingsView;
import org.bigbluebutton.air.settings.views.lock.ILockSettingsView;
import org.bigbluebutton.air.settings.views.lock.LockSettingsViewMediator;
import org.bigbluebutton.air.settings.views.SettingsViewMediatorAIR;
import org.bigbluebutton.air.settings.views.audio.AudioSettingsViewBaseAIR;
import org.bigbluebutton.air.settings.views.audio.AudioSettingsViewMediatorAIR;
import org.bigbluebutton.air.settings.views.camera.CameraSettingsViewBaseAIR;
import org.bigbluebutton.air.settings.views.camera.CameraSettingsViewMediatorAIR;
import org.bigbluebutton.air.settings.views.chat.ChatSettingsViewBaseAIR;
import org.bigbluebutton.air.settings.views.lock.LockSettingsViewBaseAIR;
import org.bigbluebutton.air.settings.views.lock.LockSettingsViewMediatorAIR;
import org.bigbluebutton.lib.main.commands.SaveLockSettingsCommand;
import org.bigbluebutton.lib.main.commands.SaveLockSettingsSignal;
import org.bigbluebutton.lib.settings.views.SettingsViewBase;
import org.bigbluebutton.lib.settings.views.audio.AudioSettingsViewBase;
import org.bigbluebutton.lib.settings.views.camera.CameraSettingsViewBase;
import org.bigbluebutton.lib.settings.views.chat.ChatSettingsViewBase;
import org.bigbluebutton.lib.settings.views.chat.ChatSettingsViewMediatorBase;
import org.bigbluebutton.lib.settings.views.lock.LockSettingsViewBase;
import org.bigbluebutton.lib.video.commands.CameraQualityCommand;
import org.bigbluebutton.lib.video.commands.CameraQualitySignal;
import robotlegs.bender.extensions.matching.TypeMatcher;
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap;
import robotlegs.bender.framework.api.IConfig;
@ -21,17 +34,26 @@ package org.bigbluebutton.air.settings {
public function configure():void {
mediators();
signals();
}
/**
* Maps view mediators to views.
*/
private function mediators():void {
mediatorMap.map(IAudioSettingsView).toMediator(AudioSettingsViewMediator);
mediatorMap.map(ICameraSettingsView).toMediator(CameraSettingsViewMediator);
mediatorMap.map(ILockSettingsView).toMediator(LockSettingsViewMediator);
mediatorMap.map(SettingsViewBase).toMediator(SettingsViewMediatorAIR);
mediatorMap.mapMatcher(new TypeMatcher().allOf(AudioSettingsViewBase, AudioSettingsViewBaseAIR)).toMediator(AudioSettingsViewMediatorAIR);
mediatorMap.mapMatcher(new TypeMatcher().allOf(CameraSettingsViewBase, CameraSettingsViewBaseAIR)).toMediator(CameraSettingsViewMediatorAIR);
mediatorMap.mapMatcher(new TypeMatcher().allOf(ChatSettingsViewBase, ChatSettingsViewBaseAIR)).toMediator(ChatSettingsViewMediatorBase);
mediatorMap.mapMatcher(new TypeMatcher().allOf(LockSettingsViewBase, LockSettingsViewBaseAIR)).toMediator(LockSettingsViewMediatorAIR);
}
/**
* Maps signals to commands using the signalCommandMap.
*/
private function signals():void {
signalCommandMap.map(SaveLockSettingsSignal).toCommand(SaveLockSettingsCommand);
signalCommandMap.map(CameraQualitySignal).toCommand(CameraQualityCommand);
}
}
}

View File

@ -0,0 +1,36 @@
package org.bigbluebutton.air.settings.views {
import spark.components.Scroller;
import spark.layouts.HorizontalAlign;
import spark.layouts.VerticalLayout;
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.lib.settings.views.SettingsViewBase;
public class SettingsView extends NoTabView {
private var _settingsView:SettingsViewBase;
public function SettingsView() {
super();
var vLayout:VerticalLayout = new VerticalLayout();
vLayout.gap = 0;
vLayout.horizontalAlign = HorizontalAlign.CENTER;
layout = vLayout;
_settingsView = new SettingsViewBase();
_settingsView.percentWidth = 100;
var scroller:Scroller = new Scroller();
scroller.percentWidth = 100;
scroller.percentHeight = 100;
scroller.viewport = _settingsView;
addElement(scroller);
}
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarSettings();
}
}
}

View File

@ -0,0 +1,18 @@
package org.bigbluebutton.air.settings.views {
import spark.events.IndexChangeEvent;
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.settings.views.SettingsViewMediatorBase;
public class SettingsViewMediatorAIR extends SettingsViewMediatorBase {
[Inject]
public var uiSession:IUISession;
override protected function onListIndexChangeEvent(e:IndexChangeEvent):void {
var item:Object = dataProvider.getItemAt(e.newIndex);
uiSession.pushPage(PageEnum[String(item.page).toUpperCase() + "SETTINGS"]);
}
}
}

View File

@ -0,0 +1,11 @@
package org.bigbluebutton.air.settings.views {
import org.bigbluebutton.air.main.views.TopToolbarAIR;
public class TopToolbarSettings extends TopToolbarAIR {
public function TopToolbarSettings() {
titleLabel.text = "Settings";
leftButton.styleName = "icon-presentation topButton topLeftButton";
rightButton.setVisible(false);
}
}
}

View File

@ -0,0 +1,18 @@
package org.bigbluebutton.air.settings.views {
import org.bigbluebutton.air.main.views.TopToolbarAIR;
public class TopToolbarSubSettings extends TopToolbarAIR {
public function TopToolbarSubSettings() {
super();
leftButton.styleName = "icon-left-arrow topButton topLeftButton";
rightButton.styleName = "saveButton topRightButton";
rightButton.label = "SAVE";
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
}
}
}

View File

@ -1,41 +1,30 @@
package org.bigbluebutton.air.settings.views.audio {
import spark.layouts.VerticalLayout;
import spark.components.Button;
import spark.components.HSlider;
import spark.components.ToggleSwitch;
import spark.primitives.Rect;
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.air.settings.views.TopToolbarSubSettings;
import org.bigbluebutton.lib.settings.views.audio.AudioSettingsViewBase;
public class AudioSettingsView extends AudioSettingsViewBase implements IAudioSettingsView {
public class AudioSettingsView extends NoTabView {
public function dispose():void {
private var _settingsView:AudioSettingsViewBase;
public function AudioSettingsView() {
super();
var vLayout:VerticalLayout = new VerticalLayout();
vLayout.gap = 0;
layout = vLayout;
_settingsView = new AudioSettingsViewBaseAIR();
_settingsView.percentHeight = 100;
_settingsView.percentWidth = 100;
addElement(_settingsView);
}
public function get enableMic():ToggleSwitch {
return enableMic0;
}
public function get enableAudio():ToggleSwitch {
return enableAudio0;
}
public function get enablePushToTalk():ToggleSwitch {
return enablePushToTalk0;
}
public function get continueBtn():Button {
return continueToMeeting;
}
public function get gainSlider():HSlider {
return gainSlider0;
}
public function get micActivity():Rect {
return micActivity0;
}
public function get micActivityMask():Rect {
return micActivityMask0;
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarSubSettings();
}
}
}

View File

@ -1,125 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<views:NoTabView xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:views="org.bigbluebutton.air.common.views.*"
styleName="audioSettings">
<s:Scroller width="100%"
height="100%">
<s:VGroup width="100%"
height="100%"
horizontalAlign="center">
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'audioSettings.enableAudio')}" />
<s:ToggleSwitch id="enableAudio0" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'audioSettings.enableMic')}" />
<s:ToggleSwitch id="enableMic0" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'audioSettings.pushToTalk')}" />
<s:ToggleSwitch id="enablePushToTalk0" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'audioSettings.micGain')}" />
<s:Rect id="micActivity0"
height="{gainSlider0.height/2}"
width="{gainSlider0.width}"
includeInLayout="false"
x="{gainSlider0.x}"
y="{gainSlider0.y + micActivity0.height/2}">
<s:fill>
<s:LinearGradient>
<s:GradientEntry color="{getStyle('greenColor')}"
ratio="0.00" />
<s:GradientEntry color="{getStyle('yellowColor')}"
ratio="0.8" />
<s:GradientEntry color="{getStyle('redColor')}"
ratio="1" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<s:Rect id="micActivityMask0"
height="{micActivity0.height}"
width="{micActivity0.width}"
includeInLayout="false"
x="{micActivity0.x}"
y="{micActivity0.y}">
<s:fill>
<s:SolidColor color="#FFFFFF" />
</s:fill>
</s:Rect>
<s:HSlider id="gainSlider0"
width="90%"
value="5"
skinClass="spark.skins.android4.HSliderSkin" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:Spacer height="10%" />
<s:Button id="continueToMeeting"
width="90%"
label="{resourceManager.getString('resources', 'audioSettings.continue')}"
styleName="userSettingsButton logoutButton contentFontSize" />
</s:VGroup>
</s:Scroller>
</views:NoTabView>

View File

@ -0,0 +1,11 @@
package org.bigbluebutton.air.settings.views.audio {
import spark.components.ToggleSwitch;
import org.bigbluebutton.lib.settings.views.audio.AudioSettingsViewBase;
public class AudioSettingsViewBaseAIR extends AudioSettingsViewBase {
override protected function get toggleButtonClass():Class {
return ToggleSwitch;
}
}
}

View File

@ -1,156 +0,0 @@
package org.bigbluebutton.air.settings.views.audio {
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.utils.Timer;
import mx.core.FlexGlobals;
import mx.resources.ResourceManager;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.common.models.ISaveData;
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.voice.commands.ShareMicrophoneSignal;
import robotlegs.bender.bundles.mvcs.Mediator;
public class AudioSettingsViewMediator extends Mediator {
[Inject]
public var view:IAudioSettingsView;
[Inject]
public var userSession:IUserSession;
[Inject]
public var userUISession:IUISession;
[Inject]
public var saveData:ISaveData;
[Inject]
public var shareMicrophoneSignal:ShareMicrophoneSignal;
private var micActivityTimer:Timer = null;
override public function initialize():void {
userSession.userList.userChangeSignal.add(userChangeHandler);
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);
view.enableMic.addEventListener(Event.CHANGE, onEnableMicClick);
view.enablePushToTalk.addEventListener(Event.CHANGE, onEnablePushToTalkClick);
view.gainSlider.addEventListener(Event.CHANGE, gainChange);
userSession.lockSettings.disableMicSignal.add(disableMic);
disableMic(userSession.lockSettings.disableMic && userMe.role != User.MODERATOR && !userMe.presenter && userMe.locked);
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.topActionBar.backBtn.visible = true;
FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = false;
loadMicGain();
micActivityTimer = new Timer(100);
micActivityTimer.addEventListener(TimerEvent.TIMER, micActivity);
micActivityTimer.start();
view.continueBtn.visible = userSession.phoneOptions.autoJoin;
}
private function loadMicGain():void {
var gain:Number = saveData.read("micGain") as Number;
if (!isNaN(gain)) {
view.gainSlider.value = gain / 10;
}
}
private function setMicGain(gain:Number):void {
if (userSession.voiceStreamManager) {
userSession.voiceStreamManager.setDefaultMicGain(gain);
if (!userSession.pushToTalk && userSession.voiceStreamManager.mic) {
userSession.voiceStreamManager.mic.gain = gain;
}
}
}
private function gainChange(e:Event):void {
var gain:Number = e.target.value * 10
saveData.save("micGain", gain);
setMicGain(gain);
}
private function micActivity(e:TimerEvent):void {
if (userSession.voiceStreamManager && userSession.voiceStreamManager.mic) {
view.micActivityMask.width = view.gainSlider.width - (view.gainSlider.width * userSession.voiceStreamManager.mic.activityLevel / 100);
view.micActivityMask.x = view.micActivity.x + view.micActivity.width - view.micActivityMask.width;
}
}
private function disableMic(disable:Boolean):void {
if (disable) {
view.enableMic.enabled = false;
view.enableMic.selected = false;
} else {
view.enableMic.enabled = true;
}
}
private function onContinueClick(event:Event):void {
userUISession.popPage();
}
private function onEnableAudioClick(event:Event):void {
if (!view.enableAudio.selected) {
view.enableMic.selected = false;
view.enablePushToTalk.enabled = false;
userSession.pushToTalk = false;
}
var audioOptions:Object = new Object();
audioOptions.shareMic = userSession.userList.me.voiceJoined = view.enableMic.selected && view.enableAudio.selected;
audioOptions.listenOnly = userSession.userList.me.listenOnly = !view.enableMic.selected && view.enableAudio.selected;
shareMicrophoneSignal.dispatch(audioOptions);
}
private function onEnableMicClick(event:Event):void {
view.enablePushToTalk.enabled = view.enableMic.selected;
if (view.enableMic.selected) {
view.enableAudio.selected = true;
}
userSession.pushToTalk = (view.enablePushToTalk.selected && view.enablePushToTalk.enabled);
var audioOptions:Object = new Object();
audioOptions.shareMic = userSession.userList.me.voiceJoined = view.enableMic.selected && view.enableAudio.selected;
audioOptions.listenOnly = userSession.userList.me.listenOnly = !view.enableMic.selected && view.enableAudio.selected;
shareMicrophoneSignal.dispatch(audioOptions);
}
private function onEnablePushToTalkClick(event:Event):void {
userSession.pushToTalk = view.enablePushToTalk.selected;
}
private function userChangeHandler(user:User, type:int):void {
if (user.me) {
if (type == UserList.LISTEN_ONLY) {
view.enableAudio.selected = user.voiceJoined || user.listenOnly;
view.enableMic.selected = user.voiceJoined;
}
}
}
override public function destroy():void {
super.destroy();
userSession.lockSettings.disableMicSignal.remove(disableMic);
view.continueBtn.removeEventListener(MouseEvent.CLICK, onContinueClick);
view.enableAudio.removeEventListener(Event.CHANGE, onEnableAudioClick);
view.enableMic.removeEventListener(Event.CHANGE, onEnableMicClick);
if (micActivityTimer) {
micActivityTimer.removeEventListener(TimerEvent.TIMER, micActivity);
}
view.enablePushToTalk.removeEventListener(Event.CHANGE, onEnablePushToTalkClick);
view.gainSlider.removeEventListener(Event.CHANGE, gainChange);
userSession.userList.userChangeSignal.remove(userChangeHandler);
userSession.phoneOptions.autoJoin = false;
}
}
}

View File

@ -0,0 +1,68 @@
package org.bigbluebutton.air.settings.views.audio {
import flash.events.Event;
import flash.events.TimerEvent;
import flash.utils.Timer;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.settings.views.audio.AudioSettingsViewMediatorBase;
import org.bigbluebutton.lib.user.models.User;
public class AudioSettingsViewMediatorAIR extends AudioSettingsViewMediatorBase {
[Inject]
public var userUISession:IUISession;
private var micActivityTimer:Timer = null;
override public function initialize():void {
super.initialize();
var userMe:User = userSession.userList.me;
// view.continueBtn.addEventListener(MouseEvent.CLICK, onContinueClick);
// view.enablePushToTalk.addEventListener(Event.CHANGE, onEnablePushToTalkClick);
disableMic(userSession.lockSettings.disableMic && userMe.role != User.MODERATOR && !userMe.presenter && userMe.locked);
// view.enablePushToTalk.enabled = view.microphoneToggle.selected = userMe.voiceJoined;
// view.enablePushToTalk.selected = (userSession.pushToTalk || userSession.phoneOptions.autoJoin);
loadMicGain();
micActivityTimer = new Timer(100);
micActivityTimer.addEventListener(TimerEvent.TIMER, micActivity);
micActivityTimer.start();
// view.continueBtn.visible = userSession.phoneOptions.autoJoin;
}
private function loadMicGain():void {
var gain:Number = saveData.read("micGain") as Number;
if (!isNaN(gain)) {
view.gainSlider.value = gain / 10;
}
}
private function micActivity(e:TimerEvent):void {
// if (userSession.voiceStreamManager && userSession.voiceStreamManager.mic) {
// view.micActivityMask.width = view.gainSlider.width - (view.gainSlider.width * userSession.voiceStreamManager.mic.activityLevel / 100);
// view.micActivityMask.x = view.micActivity.x + view.micActivity.width - view.micActivityMask.width;
// }
}
private function onContinueClick(event:Event):void {
userUISession.popPage();
}
// private function onEnablePushToTalkClick(event:Event):void {
// userSession.pushToTalk = view.enablePushToTalk.selected;
// }
override public function destroy():void {
super.destroy();
// view.continueBtn.removeEventListener(MouseEvent.CLICK, onContinueClick);
if (micActivityTimer) {
micActivityTimer.removeEventListener(TimerEvent.TIMER, micActivity);
}
// view.enablePushToTalk.removeEventListener(Event.CHANGE, onEnablePushToTalkClick);
userSession.phoneOptions.autoJoin = false;
}
}
}

View File

@ -1,19 +0,0 @@
package org.bigbluebutton.air.settings.views.audio {
import org.bigbluebutton.air.common.views.IView;
import spark.components.Button;
import spark.components.HSlider;
import spark.components.ToggleSwitch;
import spark.primitives.Rect;
public interface IAudioSettingsView extends IView {
function get enableMic():ToggleSwitch;
function get enableAudio():ToggleSwitch;
function get enablePushToTalk():ToggleSwitch;
function get continueBtn():Button;
function get gainSlider():HSlider;
function get micActivityMask():Rect;
function get micActivity():Rect;
}
}

View File

@ -1,51 +1,31 @@
package org.bigbluebutton.air.settings.views.camera {
import spark.components.Button;
import spark.components.Group;
import spark.components.Label;
import spark.components.List;
import spark.components.Scroller;
import spark.components.VideoDisplay;
import spark.layouts.VerticalLayout;
public class CameraSettingsView extends CameraSettingsViewBase implements ICameraSettingsView {
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.air.settings.views.TopToolbarSubSettings;
import org.bigbluebutton.lib.settings.views.camera.CameraSettingsViewBase;
public class CameraSettingsView extends NoTabView {
public function dispose():void {
private var _settingsView:CameraSettingsViewBase;
public function CameraSettingsView() {
super();
var vLayout:VerticalLayout = new VerticalLayout();
vLayout.gap = 0;
layout = vLayout;
_settingsView = new CameraSettingsViewBaseAIR();
_settingsView.percentHeight = 100;
_settingsView.percentWidth = 100;
addElement(_settingsView);
}
public function get startCameraButton():Button {
return startCameraButton0;
}
public function get swapCameraButton():Button {
return swapCameraBtn0;
}
public function get cameraProfilesList():List {
return cameraprofileslist;
}
public function get previewVideo():VideoDisplay {
return previewvideo;
}
public function get videoGroup():Group {
return videoGroup0;
}
public function get settingsGroup():Group {
return settingsGroup0;
}
public function get noVideoMessage():Label {
return noVideoMessage0;
}
public function get cameraSettingsScroller():Scroller {
return cameraSettingsScroller0;
}
public function get rotateCameraButton():Button {
return rotateCameraBtn0;
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarSubSettings();
}
}
}

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<view:NoTabView xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:view="org.bigbluebutton.air.common.views.*"
styleName="cameraSettingsView">
<s:VGroup width="100%"
height="100%"
horizontalAlign="center">
<s:Scroller id="cameraSettingsScroller0"
width="100%"
height="100%">
<s:Group>
<s:Group id="videoGroup0"
width="100%"
height="100%">
<s:VideoDisplay id="previewvideo"
height="100%" />
<s:Label id="noVideoMessage0"
visible="false"
styleName="noVideoMsg contentFontSize"
textAlign="center"
width="100%"
height="100%"
text="{resourceManager.getString('resources', 'video.noVideo')}" />
</s:Group>
<s:Group width="100%"
height="100%"
id="settingsGroup0">
<s:layout>
<s:VerticalLayout horizontalAlign="center"
gap="1" />
</s:layout>
<s:List id="cameraprofileslist"
width="100%"
styleName="cameraProfilesList"
labelField="name"
itemRenderer="spark.components.LabelItemRenderer">
<s:layout>
<s:VerticalLayout horizontalAlign="contentJustify"
gap="0"
verticalAlign="middle"
variableRowHeight="false" />
</s:layout>
</s:List>
<s:HGroup width="100%">
<s:Button visible="false"
includeInLayout="false"
width="100%"
id="rotateCameraBtn0"
styleName="cameraSettingsRotateButton videoAudioSetting contentFontSize"
label="{resourceManager.getString('resources', 'cameraSettings.rotate')}" />
</s:HGroup>
<s:Button id="swapCameraBtn0"
styleName="cameraSettingsSwapButton videoAudioSetting contentFontSize"
width="100%"
label="{resourceManager.getString('resources', 'cameraSettings.swap')}" />
<s:Button id="startCameraButton0"
styleName="cameraSettingsStartButton videoAudioSetting contentFontSize"
width="100%"
label="{resourceManager.getString('resources', 'userDetail.cameraBtn.text')}" />
</s:Group>
</s:Group>
</s:Scroller>
</s:VGroup>
</view:NoTabView>

View File

@ -0,0 +1,11 @@
package org.bigbluebutton.air.settings.views.camera {
import spark.components.ToggleSwitch;
import org.bigbluebutton.lib.settings.views.camera.CameraSettingsViewBase;
public class CameraSettingsViewBaseAIR extends CameraSettingsViewBase {
override protected function get toggleButtonClass():Class {
return ToggleSwitch;
}
}
}

View File

@ -8,34 +8,15 @@ package org.bigbluebutton.air.settings.views.camera {
import flash.media.CameraPosition;
import flash.media.Video;
import mx.collections.ArrayCollection;
import mx.core.FlexGlobals;
import mx.events.ItemClickEvent;
import mx.events.ResizeEvent;
import mx.resources.ResourceManager;
import spark.events.IndexChangeEvent;
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.common.models.ISaveData;
import org.bigbluebutton.lib.main.models.IConferenceParameters;
import org.bigbluebutton.lib.main.models.IUserSession;
import org.bigbluebutton.lib.settings.views.camera.CameraSettingsViewMediatorBase;
import org.bigbluebutton.lib.user.models.User;
import org.bigbluebutton.lib.user.models.UserList;
import org.bigbluebutton.lib.video.commands.CameraQualitySignal;
import org.bigbluebutton.lib.video.commands.ShareCameraSignal;
import org.bigbluebutton.lib.video.models.VideoProfile;
import robotlegs.bender.bundles.mvcs.Mediator;
public class CameraSettingsViewMediator extends Mediator {
[Inject]
public var view:ICameraSettingsView;
[Inject]
public var userSession:IUserSession;
public class CameraSettingsViewMediatorAIR extends CameraSettingsViewMediatorBase {
[Inject]
public var userUISession:IUISession;
@ -43,29 +24,15 @@ package org.bigbluebutton.air.settings.views.camera {
[Inject]
public var shareCameraSignal:ShareCameraSignal;
[Inject]
public var changeQualitySignal:CameraQualitySignal;
[Inject]
public var saveData:ISaveData;
[Inject]
public var conferenceParameters:IConferenceParameters;
protected var dataProvider:ArrayCollection;
override public function initialize():void {
dataProvider = new ArrayCollection();
view.cameraProfilesList.dataProvider = dataProvider;
displayCameraProfiles();
userSession.userList.userChangeSignal.add(userChangeHandler);
super.initialize();
var userMe:User = userSession.userList.me;
if (Camera.getCamera() == null) {
view.startCameraButton.label = ResourceManager.getInstance().getString('resources', 'profile.settings.camera.unavailable');
view.startCameraButton.enabled = false;
// view.startCameraButton.label = ResourceManager.getInstance().getString('resources', 'profile.settings.camera.unavailable');
// view.startCameraButton.enabled = false;
} else {
view.startCameraButton.label = ResourceManager.getInstance().getString('resources', userMe.hasStream ? 'profile.settings.camera.on' : 'profile.settings.camera.off');
view.startCameraButton.enabled = true;
// view.startCameraButton.label = ResourceManager.getInstance().getString('resources', userMe.hasStream ? 'profile.settings.camera.on' : 'profile.settings.camera.off');
// view.startCameraButton.enabled = true;
}
if (Camera.names.length <= 1) {
setSwapCameraButtonEnable(false);
@ -73,14 +40,12 @@ package org.bigbluebutton.air.settings.views.camera {
setSwapCameraButtonEnable(!userMe.hasStream);
view.swapCameraButton.addEventListener(MouseEvent.CLICK, mouseClickHandler);
}
userSession.lockSettings.disableCamSignal.add(disableCam);
setQualityListEnable(!userSession.userList.me.hasStream);
setRotateCameraButtonEnable(!userMe.hasStream);
FlexGlobals.topLevelApplication.stage.addEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler);
view.startCameraButton.addEventListener(MouseEvent.CLICK, onShareCameraClick);
// FlexGlobals.topLevelApplication.stage.addEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler);
// view.startCameraButton.addEventListener(MouseEvent.CLICK, onShareCameraClick);
view.rotateCameraButton.addEventListener(MouseEvent.CLICK, onRotateCameraClick);
view.cameraProfilesList.addEventListener(IndexChangeEvent.CHANGE, onCameraQualitySelected);
FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'cameraSettings.title');
// FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'cameraSettings.title');
displayPreviewCamera();
}
@ -89,27 +54,11 @@ package org.bigbluebutton.air.settings.views.camera {
userUISession.pushPage(PageEnum.CAMERASETTINGS);
}
private function disableCam(disable:Boolean):void {
if (disable) {
view.startCameraButton.enabled = false;
} else {
view.startCameraButton.enabled = true;
}
}
private function displayCameraProfiles():void {
var videoProfiles:Array = userSession.videoProfileManager.profiles;
for each (var profile:VideoProfile in videoProfiles) {
dataProvider.addItem(profile);
}
dataProvider.refresh();
view.cameraProfilesList.selectedIndex = dataProvider.getItemIndex(userSession.videoConnection.selectedCameraQuality);
}
private function userChangeHandler(user:User, type:int):void {
override protected function userChangeHandler(user:User, type:int):void {
if (user.me) {
if (type == UserList.HAS_STREAM) {
view.startCameraButton.label = ResourceManager.getInstance().getString('resources', user.hasStream ? 'profile.settings.camera.on' : 'profile.settings.camera.off');
// view.startCameraButton.label = ResourceManager.getInstance().getString('resources', user.hasStream ? 'profile.settings.camera.on' : 'profile.settings.camera.off');
view.rotateCameraButton.enabled = !user.hasStream;
if (Camera.names.length > 1) {
setSwapCameraButtonEnable(true)
@ -147,39 +96,22 @@ package org.bigbluebutton.air.settings.views.camera {
view.rotateCameraButton.enabled = enabled;
}
protected function setQualityListEnable(enabled:Boolean):void {
view.cameraProfilesList.enabled = enabled;
}
protected function onCameraQualitySelected(event:IndexChangeEvent):void {
if (event.newIndex >= 0) {
var profile:VideoProfile = dataProvider.getItemAt(event.newIndex) as VideoProfile;
if (userSession.userList.me.hasStream) {
changeQualitySignal.dispatch(profile);
} else {
userSession.videoConnection.selectedCameraQuality = profile;
}
saveData.save("cameraQuality", userSession.videoConnection.selectedCameraQuality.id);
displayPreviewCamera();
}
}
private function isCamRotatedSideways():Boolean {
return (userSession.videoConnection.selectedCameraRotation == 90 || userSession.videoConnection.selectedCameraRotation == 270);
}
private function displayPreviewCamera():void {
override protected function displayPreviewCamera():void {
var profile:VideoProfile = userSession.videoConnection.selectedCameraQuality
var camera:Camera = getCamera(userSession.videoConnection.cameraPosition);
if (camera) {
var myCam:Video = new Video();
var screenAspectRatio:Number = (view.cameraSettingsScroller.width / profile.width) / (view.cameraSettingsScroller.height / profile.height);
var screenAspectRatio:Number = (view.cameraHolder.width / profile.width) / (view.cameraHolder.height / profile.height);
if (screenAspectRatio > 1) { //landscape
myCam.height = view.cameraSettingsScroller.height;
myCam.width = profile.width * view.cameraSettingsScroller.height / profile.height;
myCam.height = view.cameraHolder.height;
myCam.width = profile.width * view.cameraHolder.height / profile.height;
} else { //portrait
myCam.width = view.cameraSettingsScroller.width;
myCam.height = profile.height * view.cameraSettingsScroller.width / profile.width;
myCam.width = view.cameraHolder.width;
myCam.height = profile.height * view.cameraHolder.width / profile.width;
}
if (isCamRotatedSideways()) {
camera.setMode(profile.height, profile.width, profile.modeFps);
@ -190,23 +122,24 @@ package org.bigbluebutton.air.settings.views.camera {
camera.setMode(profile.width, profile.height, profile.modeFps);
}
rotateObjectAroundInternalPoint(myCam, myCam.x + myCam.width / 2, myCam.y + myCam.height / 2, userSession.videoConnection.selectedCameraRotation);
myCam.x = (view.cameraSettingsScroller.width - myCam.width) / 2;
myCam.x = (view.cameraHolder.width - myCam.width) / 2;
if (userSession.videoConnection.selectedCameraRotation == 90) {
myCam.y = 0;
myCam.x = (view.cameraSettingsScroller.width + myCam.width) / 2;
//myCam.x = (view.cameraHolder.width + myCam.width) / 2;
} else if (userSession.videoConnection.selectedCameraRotation == 270) {
myCam.y = myCam.height;
} else if (userSession.videoConnection.selectedCameraRotation == 180) {
myCam.x = (view.cameraSettingsScroller.width + myCam.width) / 2;
myCam.x = (view.cameraHolder.width + myCam.width) / 2;
myCam.y = myCam.height;
}
myCam.attachCamera(camera);
view.previewVideo.removeChildren();
view.previewVideo.addChild(myCam);
view.settingsGroup.y = myCam.height;
// view.settingsGroup.y = myCam.height;
} else {
view.noVideoMessage.visible = true;
}
view.positionActionButtons();
}
public static function rotateObjectAroundInternalPoint(ob:Object, x:Number, y:Number, angleDegrees:Number):void {
@ -232,7 +165,7 @@ package org.bigbluebutton.air.settings.views.camera {
/**
* Raised on button click, will send signal to swap camera source
**/
*/
//close old stream on swap
private function mouseClickHandler(e:MouseEvent):void {
if (!userSession.userList.me.hasStream) {
@ -256,16 +189,13 @@ package org.bigbluebutton.air.settings.views.camera {
override public function destroy():void {
super.destroy();
userSession.lockSettings.disableCamSignal.remove(disableCam);
userSession.userList.userChangeSignal.remove(userChangeHandler);
if (Camera.names.length > 1) {
view.swapCameraButton.removeEventListener(MouseEvent.CLICK, mouseClickHandler);
}
view.cameraProfilesList.removeEventListener(ItemClickEvent.ITEM_CLICK, onCameraQualitySelected);
FlexGlobals.topLevelApplication.stage.removeEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler);
view.startCameraButton.removeEventListener(MouseEvent.CLICK, onShareCameraClick);
// FlexGlobals.topLevelApplication.stage.removeEventListener(ResizeEvent.RESIZE, stageOrientationChangingHandler);
// view.startCameraButton.removeEventListener(MouseEvent.CLICK, onShareCameraClick);
view.rotateCameraButton.removeEventListener(MouseEvent.CLICK, onRotateCameraClick);
view.dispose();
// view.dispose();
view = null;
userSession.videoAutoStart = false;
}

View File

@ -1,25 +0,0 @@
package org.bigbluebutton.air.settings.views.camera {
import spark.components.Button;
import spark.components.Group;
import spark.components.Label;
import spark.components.List;
import spark.components.Scroller;
import spark.components.VideoDisplay;
import org.bigbluebutton.air.common.views.IView;
public interface ICameraSettingsView extends IView {
function get cameraProfilesList():List;
function get startCameraButton():Button;
function get swapCameraButton():Button;
function get rotateCameraButton():Button;
function get previewVideo():VideoDisplay;
function get noVideoMessage():Label;
function get videoGroup():Group;
function get settingsGroup():Group;
function get cameraSettingsScroller():Scroller;
function get currentState():String
function set currentState(value:String):void
}
}

View File

@ -0,0 +1,30 @@
package org.bigbluebutton.air.settings.views.chat {
import spark.layouts.VerticalLayout;
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.air.settings.views.TopToolbarSubSettings;
import org.bigbluebutton.lib.settings.views.chat.ChatSettingsViewBase;
public class ChatSettingsView extends NoTabView {
private var _settingsView:ChatSettingsViewBase;
public function ChatSettingsView() {
super();
var vLayout:VerticalLayout = new VerticalLayout();
vLayout.gap = 0;
layout = vLayout;
_settingsView = new ChatSettingsViewBaseAIR();
_settingsView.percentHeight = 100;
_settingsView.percentWidth = 100;
addElement(_settingsView);
}
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarSubSettings();
}
}
}

View File

@ -0,0 +1,11 @@
package org.bigbluebutton.air.settings.views.chat {
import spark.components.ToggleSwitch;
import org.bigbluebutton.lib.settings.views.chat.ChatSettingsViewBase;
public class ChatSettingsViewBaseAIR extends ChatSettingsViewBase {
override protected function get toggleButtonClass():Class {
return ToggleSwitch;
}
}
}

View File

@ -0,0 +1,6 @@
package org.bigbluebutton.air.settings.views.chat {
import org.bigbluebutton.lib.settings.views.chat.ChatSettingsViewMediatorBase;
public class ChatSettingsViewMediatorAIR extends ChatSettingsViewMediatorBase {
}
}

View File

@ -1,17 +0,0 @@
package org.bigbluebutton.air.settings.views.lock {
import org.bigbluebutton.air.common.views.IView;
import spark.components.Button;
import spark.components.Label;
import spark.components.ToggleSwitch;
public interface ILockSettingsView extends IView {
function get cameraSwitch():ToggleSwitch;
function get micSwitch():ToggleSwitch;
function get publicChatSwitch():ToggleSwitch;
function get privateChatSwitch():ToggleSwitch;
function get applyButton():Button;
function get layoutSwitch():ToggleSwitch;
}
}

View File

@ -1,35 +1,36 @@
package org.bigbluebutton.air.settings.views.lock {
import spark.components.Button;
import spark.components.ToggleSwitch;
import spark.components.Scroller;
import spark.layouts.VerticalLayout;
public class LockSettingsView extends LockSettingsViewBase implements ILockSettingsView {
import org.bigbluebutton.air.common.views.NoTabView;
import org.bigbluebutton.air.main.views.TopToolbarAIR;
import org.bigbluebutton.air.settings.views.TopToolbarSubSettings;
import org.bigbluebutton.lib.settings.views.lock.LockSettingsViewBase;
public class LockSettingsView extends NoTabView {
private var _lockSettingsView:LockSettingsViewBase;
public function get cameraSwitch():ToggleSwitch {
return cam;
public function LockSettingsView() {
super();
var vLayout:VerticalLayout = new VerticalLayout();
vLayout.gap = 0;
layout = vLayout;
_lockSettingsView = new LockSettingsViewBaseAIR();
_lockSettingsView.percentWidth = 100;
var scroller:Scroller = new Scroller();
scroller.viewport = _lockSettingsView;
scroller.percentWidth = 100;
scroller.percentHeight = 100;
addElement(scroller);
}
public function get micSwitch():ToggleSwitch {
return mic;
}
public function get publicChatSwitch():ToggleSwitch {
return publicChat;
}
public function get privateChatSwitch():ToggleSwitch {
return privateChat;
}
public function get layoutSwitch():ToggleSwitch {
return layout0;
}
public function get applyButton():Button {
return apply;
}
public function dispose():void {
override protected function createToolbar():TopToolbarAIR {
return new TopToolbarSubSettings();
}
}
}

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<view:NoTabView xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:view="org.bigbluebutton.air.common.views.*"
styleName="lockSettings">
<s:Scroller width="100%"
height="100%">
<s:VGroup width="100%"
height="100%"
horizontalAlign="center">
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'lockSettings.cam')}" />
<s:ToggleSwitch id="cam" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'lockSettings.mic')}" />
<s:ToggleSwitch id="mic" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'lockSettings.publicChat')}" />
<s:ToggleSwitch id="publicChat" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'lockSettings.privateChat')}" />
<s:ToggleSwitch id="privateChat" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:HGroup width="90%"
height="7%"
verticalAlign="middle"
horizontalAlign="right">
<s:Label width="100%"
text="{resourceManager.getString('resources', 'lockSettings.layout')}" />
<s:ToggleSwitch id="layout0" />
</s:HGroup>
<s:Line width="90%">
<s:stroke>
<s:SolidColorStroke color="{getStyle('lineColor')}"
weight="{getStyle('lineWeight')}" />
</s:stroke>
</s:Line>
<s:Spacer height="10%" />
<s:Button id="apply"
width="90%"
label="{resourceManager.getString('resources', 'lockSettings.apply')}"
styleName="userSettingsButton logoutButton contentFontSize" />
</s:VGroup>
</s:Scroller>
</view:NoTabView>

View File

@ -0,0 +1,12 @@
package org.bigbluebutton.air.settings.views.lock {
import spark.components.ToggleSwitch;
import org.bigbluebutton.lib.settings.views.lock.LockSettingsViewBase;
public class LockSettingsViewBaseAIR extends LockSettingsViewBase {
override protected function get toggleButtonClass():Class {
return ToggleSwitch;
}
}
}

View File

@ -1,62 +0,0 @@
package org.bigbluebutton.air.settings.views.lock {
import flash.events.MouseEvent;
import mx.core.FlexGlobals;
import mx.resources.ResourceManager;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.main.commands.SaveLockSettingsSignal;
import org.bigbluebutton.lib.main.models.IUserSession;
import robotlegs.bender.bundles.mvcs.Mediator;
public class LockSettingsViewMediator extends Mediator {
[Inject]
public var view:ILockSettingsView;
[Inject]
public var userSession:IUserSession;
[Inject]
public var saveLockSettingsSignal:SaveLockSettingsSignal;
[Inject]
public var userUISession:IUISession;
override public function initialize():void {
loadLockSettings();
view.applyButton.addEventListener(MouseEvent.CLICK, onApply);
FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'lockSettings.title');
FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = true;
FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = false;
}
private function onApply(event:MouseEvent):void {
var newLockSettings:Object = new Object();
newLockSettings.disableCam = !view.cameraSwitch.selected;
newLockSettings.disableMic = !view.micSwitch.selected;
newLockSettings.disablePrivateChat = !view.privateChatSwitch.selected;
newLockSettings.disablePublicChat = !view.publicChatSwitch.selected;
newLockSettings.lockedLayout = !view.layoutSwitch.selected;
newLockSettings.lockOnJoin = userSession.lockSettings.lockOnJoin;
newLockSettings.lockOnJoinConfigurable = userSession.lockSettings.lockOnJoinConfigurable;
saveLockSettingsSignal.dispatch(newLockSettings);
userUISession.popPage();
}
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;
view.layoutSwitch.selected = !userSession.lockSettings.lockedLayout;
}
override public function destroy():void {
super.destroy();
view.applyButton.removeEventListener(MouseEvent.CLICK, onApply);
}
}
}

View File

@ -0,0 +1,43 @@
package org.bigbluebutton.air.settings.views.lock {
import flash.events.MouseEvent;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.lib.main.commands.SaveLockSettingsSignal;
import org.bigbluebutton.lib.settings.views.lock.LockSettingsViewMediatorBase;
public class LockSettingsViewMediatorAIR extends LockSettingsViewMediatorBase {
[Inject]
public var saveLockSettingsSignal:SaveLockSettingsSignal;
[Inject]
public var userUISession:IUISession;
override public function initialize():void {
super.initialize();
// view.applyButton.addEventListener(MouseEvent.CLICK, onApply);
// FlexGlobals.topLevelApplication.topActionBar.pageName.text = ResourceManager.getInstance().getString('resources', 'lockSettings.title');
// FlexGlobals.topLevelApplication.topActionBar.backBtn.visible = true;
// FlexGlobals.topLevelApplication.topActionBar.profileBtn.visible = false;
}
private function onApply(event:MouseEvent):void {
var newLockSettings:Object = new Object();
newLockSettings.disableCam = !view.webcamCheckbox.selected;
newLockSettings.disableMic = !view.microphoneCheckbox.selected;
newLockSettings.disablePrivateChat = !view.privateChatCheckbox.selected;
newLockSettings.disablePublicChat = !view.publicChatCheckbox.selected;
newLockSettings.lockedLayout = !view.layoutCheckbox.selected;
newLockSettings.lockOnJoin = userSession.lockSettings.lockOnJoin;
newLockSettings.lockOnJoinConfigurable = userSession.lockSettings.lockOnJoinConfigurable;
saveLockSettingsSignal.dispatch(newLockSettings);
userUISession.popPage();
}
override public function destroy():void {
super.destroy();
// view.applyButton.removeEventListener(MouseEvent.CLICK, onApply);
}
}
}

View File

@ -5,7 +5,7 @@ package org.bigbluebutton.air.video {
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.IConfig;
public class VideoConfig implements IConfig {
@ -28,7 +28,7 @@ package org.bigbluebutton.air.video {
//mediatorMap.map(IVideoChatView).toMediator(VideoChatViewMediator);
//mediatorMap.map(ISwapCameraButton).toMediator(SwapCameraMediator);
}
private function signals():void {
signalCommandMap.map(ShareCameraSignal).toCommand(ShareCameraCommand);
//signalCommandMap.map(CameraQualitySignal).toCommand(CameraQualityCommand);

View File

@ -1,15 +1,11 @@
package org.bigbluebutton.air.voice {
import org.bigbluebutton.air.voice.views.IMicButton;
import org.bigbluebutton.air.voice.views.MicButtonMediator;
import org.bigbluebutton.lib.voice.commands.MicrophoneMuteCommand;
import org.bigbluebutton.lib.voice.commands.MicrophoneMuteSignal;
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;
import robotlegs.bender.framework.api.IConfig;
public class VoiceConfig implements IConfig {

View File

@ -2,9 +2,6 @@ package org.bigbluebutton.lib.chat.models {
import mx.collections.ArrayCollection;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
public class ChatMessagesSession implements IChatMessagesSession {
private var _chats:ArrayCollection;

View File

@ -3,14 +3,26 @@
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:views="org.bigbluebutton.lib.common.views.*"
width="100%"
styleName="chatMessage">
width="100%">
<fx:Script>
<![CDATA[
import flashx.textLayout.conversion.TextConverter;
import org.bigbluebutton.lib.chat.models.ChatMessage;
import org.bigbluebutton.lib.user.utils.UserUtils;
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
wrapperGroup.padding = getStyle("padding");
titleGroup.gap = getStyle("padding");
username.setStyle("color", getStyle("nameColor"));
username.setStyle("fontSize", getStyle("nameFontSize"));
time.setStyle("fontSize", getStyle("timeFontSize"));
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
override public function set data(obj:Object):void {
super.data = obj;
@ -25,19 +37,19 @@
var sameUser:Boolean = (m.lastSenderId == m.senderId);
var sameTime:Boolean = (m.lastTime == m.time);
if (sameUser && sameTime) {
nameTimeGroup.includeInLayout = false;
nameTimeGroup.visible = false;
username.includeInLayout = time.includeInLayout = false;
username.visible = time.visible = false;
participantIcon.visible = false;
} else {
nameTimeGroup.includeInLayout = true;
nameTimeGroup.visible = true;
username.includeInLayout = time.includeInLayout = true;
username.visible = time.visible = true;
if (m.name == " ") {
participantIcon.visible = false;
username.visible = false;
username.includeInLayout = false;
} else {
username.text = m.name;
participantIcon.setFirstLetters(m.name);
participantIcon.displayInitials = UserUtils.getInitials(m.name);
participantIcon.visible = true;
username.visible = true;
username.includeInLayout = true;
@ -59,36 +71,21 @@
}
]]>
</fx:Script>
<s:states>
<s:State name="others_state" />
<s:State name="me_state" />
</s:states>
<s:VGroup width="100%">
<s:HGroup width="100%">
<views:ParticipantIcon id="participantIcon"
height="100%" />
<s:VGroup width="100%">
<s:Spacer height="10%" />
<s:Group id="nameTimeGroup"
width="100%"
height="100%">
<s:layout>
<s:HorizontalLayout verticalAlign="bottom" />
</s:layout>
<s:Label id="username"
visible="true"
fontSize="{getStyle('nameFontSize')}" />
<s:Label id="time"
fontSize="{getStyle('timeFontSize')}" />
</s:Group>
<s:HGroup width="100%">
<s:RichEditableText editable="false"
selectable="false"
id="message"
width="100%"
styleName="content" />
</s:HGroup>
</s:VGroup>
<s:VGroup id="wrapperGroup"
width="100%">
<s:HGroup id="titleGroup"
width="100%"
verticalAlign="middle">
<views:ParticipantIcon id="participantIcon" />
<s:Label id="username"
visible="true" />
<s:Label id="time" />
</s:HGroup>
<s:RichEditableText id="message"
paddingLeft="{participantIcon.width + getStyle('padding')}"
editable="false"
selectable="false"
width="100%" />
</s:VGroup>
</s:ItemRenderer>

View File

@ -9,6 +9,18 @@
<fx:Script>
<![CDATA[
import org.bigbluebutton.lib.user.utils.UserUtils;
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
publicChatIcon.text = publicChatIcon.getStyle("icon");
containerGroup.padding = getStyle("padding");
title.setStyle("paddingLeft", getStyle("padding"));
title.setStyle("paddingRight", getStyle("padding"));
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
override public function set data(obj:Object):void {
super.data = obj;
if (obj) {
@ -17,31 +29,24 @@
publicChatIcon.visible = publicChatIcon.includeInLayout = true;
participantIcon.visible = participantIcon.includeInLayout = false;
} else {
participantIcon.setFirstLetters(obj.userName);
participantIcon.displayInitials = UserUtils.getInitials(obj.userName);
participantIcon.visible = participantIcon.includeInLayout = true;
publicChatIcon.visible = publicChatIcon.includeInLayout = false;
}
/*
if (obj.online == false) {
//title.text += resourceManager.getString('resources', 'userDetail.userOffline');
}
*/
newMessages.label = String(obj.newMessages);
newMessages.visible = obj.newMessages > 0;
}
}
]]>
</fx:Script>
<s:Group width="100%"
height="{getStyle('itemHeight')}">
<s:layout>
<s:HorizontalLayout verticalAlign="middle"
horizontalAlign="center" />
</s:layout>
<s:Image id="publicChatIcon"
<s:HGroup id="containerGroup"
width="100%"
verticalAlign="middle"
horizontalAlign="center">
<s:Label id="publicChatIcon"
visible="false"
includeInLayout="false"
styleName="icon publicChatIcon" />
styleName="icon-group-chat chatIcon" />
<common:ParticipantIcon id="participantIcon"
visible="false"
includeInLayout="false" />
@ -50,5 +55,5 @@
styleName="contentFontSize" />
<views:NewMessagesIndicator id="newMessages"
styleName="newMessagesIndicator" />
</s:Group>
</s:HGroup>
</s:ItemRenderer>

View File

@ -4,7 +4,6 @@ package org.bigbluebutton.lib.chat.views {
import spark.components.Label;
import spark.components.List;
import spark.components.VGroup;
import spark.components.supportClasses.ItemRenderer;
import spark.layouts.VerticalLayout;
public class ChatRoomsViewBase extends VGroup {
@ -25,17 +24,17 @@ package org.bigbluebutton.lib.chat.views {
_chatLabel = new Label();
_chatLabel.percentWidth = 100;
_chatLabel.styleName = "content";
_chatLabel.text = "Messages";
_chatLabel.styleName = "sectionTitle";
_chatLabel.text = "Conversations";
addElement(_chatLabel);
_chatRoomList = new List();
_chatRoomList.percentWidth = 100;
var itemRendererClass:ClassFactory = new ClassFactory(getItemRendererClass());
_chatRoomList.itemRenderer = itemRendererClass;
_chatRoomList.itemRenderer = new ClassFactory(getItemRendererClass());
var listLayout:VerticalLayout = new VerticalLayout();
listLayout.requestedRowCount = -1;
listLayout.gap = 1;
_chatRoomList.layout = listLayout;
addElement(_chatRoomList);
@ -45,4 +44,4 @@ package org.bigbluebutton.lib.chat.views {
return ChatRoomsItemRenderer;
}
}
}
}

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.lib.chat.views {
import mx.core.ClassFactory;
import mx.core.ScrollPolicy;
import mx.graphics.SolidColor;
import spark.components.Button;
import spark.components.Group;
@ -9,6 +9,8 @@ package org.bigbluebutton.lib.chat.views {
import spark.components.Scroller;
import spark.components.TextInput;
import spark.components.VGroup;
import spark.layouts.VerticalAlign;
import spark.primitives.Rect;
public class ChatViewBase extends VGroup {
private var _chatList:List;
@ -19,6 +21,8 @@ package org.bigbluebutton.lib.chat.views {
private var _inputGroup:HGroup;
private var _inputBackground:Rect;
private var _sendButton:Button;
public function get sendButton():Button {
@ -39,7 +43,7 @@ package org.bigbluebutton.lib.chat.views {
scroller.percentHeight = 100;
scroller.setStyle("horizontalScrollPolicy", "off");
var sGroup:VGroup = new VGroup();
var sGroup:Group = new Group();
sGroup.percentWidth = 100;
sGroup.percentHeight = 100;
sGroup.setStyle("horizontalScrollPolicy", "off");
@ -55,11 +59,25 @@ package org.bigbluebutton.lib.chat.views {
addElement(scroller);
var group:Group = new Group();
group.percentWidth = 100;
_inputBackground = new Rect();
_inputBackground.percentHeight = 100;
_inputBackground.percentWidth = 100;
_inputBackground.fill = new SolidColor();
group.addElement(_inputBackground);
_inputGroup = new HGroup();
_inputGroup.verticalAlign = VerticalAlign.MIDDLE;
_inputGroup.percentWidth = 100;
_inputGroup.verticalAlign = "middle";
_inputGroup.horizontalAlign = "center";
_inputGroup.gap = 0;
group.addElement(_inputGroup);
_sendButton = new Button();
_sendButton.styleName = "sendButton icon icon-plus";
//enabled="{inputMessage0.text!=''}"
_inputGroup.addElement(_sendButton);
_textInput = new TextInput();
_textInput.percentWidth = 100;
@ -68,20 +86,14 @@ package org.bigbluebutton.lib.chat.views {
_textInput.styleName = "messageInput";
_inputGroup.addElement(_textInput);
_sendButton = new Button();
_sendButton.percentHeight = 100;
_sendButton.label = "\ue90b";
//enabled="{inputMessage0.text!=''}"
_sendButton.styleName = "sendButton";
_inputGroup.addElement(_sendButton);
addElement(_inputGroup);
addElement(group);
}
override protected function updateDisplayList(w:Number, h:Number):void {
_inputGroup.height = getStyle('chatInputTextHeight');
_sendButton.width = getStyle('btnWidth');
SolidColor(_inputBackground.fill).color = getStyle("inputBackgroundColor");
SolidColor(_inputBackground.fill).color = getStyle("inputBorderColor");
_inputGroup.gap = getStyle("inputPadding");
_inputGroup.padding = getStyle("inputPadding");
super.updateDisplayList(w, h);
}
}

View File

@ -43,10 +43,10 @@ package org.bigbluebutton.lib.chat.views {
}
protected function openChat(conv:Conversation):void {
conv.newMessages = 0;//resetNewMessages();
conv.newMessages = 0; //resetNewMessages();
view.chatList.dataProvider = conv.messages;
}
private function onSendSuccess(result:String):void {
view.textInput.enabled = true;
view.textInput.text = "";

View File

@ -9,7 +9,6 @@
<fx:Script>
<![CDATA[
private var cornerRadius:Number = 2;
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
@ -18,17 +17,15 @@
if (cornerRadius != cr) {
cornerRadius = cr;
background.radiusX = cornerRadius;
border.radiusX = cornerRadius;
}
backgroundFill.color = getStyle("backgroundColor");
backgroundFill.alpha = getStyle("backgroundAlpha");
borderStroke.color = getStyle("backgroundColor");
borderStroke.alpha = getStyle("backgroundAlpha");
labelDisplay.setStyle("color", getStyle("color"));
labelDisplay.setStyle("fontSize", getStyle("fontSize"));
labelDisplay.setStyle("left", getStyle("labelPadding"));
labelDisplay.setStyle("right", getStyle("labelPadding"));
labelDisplay.setStyle("top", getStyle("labelPadding") / 4);
labelDisplay.setStyle("bottom", getStyle("labelPadding") / 4);
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
@ -37,25 +34,17 @@
<!-- layer 2: fill -->
<!--- @private -->
<s:Rect id="background" left="1" right="1" top="1" bottom="1" radiusX="2">
<s:Rect id="background"
left="1"
right="1"
top="1"
bottom="1"
radiusX="2">
<s:fill>
<s:SolidColor id="backgroundFill"
color="0xFF0000"
alpha="1" />
<s:SolidColor id="backgroundFill" />
</s:fill>
</s:Rect>
<!-- layer 7: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
<!--- @private -->
<s:Rect id="border" left="0" right="0" top="0" bottom="0" radiusX="2">
<s:stroke>
<s:SolidColorStroke id="borderStroke"
color="0x000000"
weight="1"
alpha="1" />
</s:stroke>
</s:Rect>
<!-- SkinParts
name=labelDisplay, type=spark.core.IDisplayText, required=true
-->
@ -64,9 +53,5 @@
maxDisplayedLines="1"
horizontalCenter="0"
verticalCenter="1"
verticalAlign="middle"
left="10"
right="10"
top="2"
bottom="2" />
verticalAlign="middle" />
</s:Skin>

View File

@ -13,25 +13,15 @@
<fx:Script>
<![CDATA[
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
var cr:Number = getStyle("cornerRadius");
if (cornerRadius != cr) {
cornerRadius = cr;
border.bottomRightRadiusX = cornerRadius;
border.topRightRadiusX = cornerRadius;
}
border.width = border.height = getStyle("diameter");
borderStroke.color = getStyle("borderColor");
borderStroke.weight = getStyle("borderWeight");
labelDisplay.setStyle("color", getStyle("color"));
labelDisplay.setStyle("fontFamily", getStyle("fontFamily"));
labelDisplay.setStyle("fontSize", getStyle("fontSize"));
labelDisplay.text = getStyle("icon");
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
private var cornerRadius:Number = 2;
]]>
</fx:Script>
@ -45,15 +35,11 @@
<!-- layer 7: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
<!--- @private -->
<s:Rect id="border"
left="0"
right="0"
top="0"
bottom="0">
<s:Ellipse id="border">
<s:stroke>
<s:SolidColorStroke id="borderStroke" />
</s:stroke>
</s:Rect>
</s:Ellipse>
<!-- layer 8: text -->
<!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->

View File

@ -5,36 +5,33 @@
<fx:Script>
<![CDATA[
public function setFirstLetters(name:String):void {
if (name == null) name = "";
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
var names:Array = name.split(" ");
var firstLettersText:String = names[0].charAt(0);
if (names[1]) {
firstLettersText += names[1].charAt(0);
}
firstLetters.text = firstLettersText.toUpperCase();
circle.width = circle.height = getStyle("diameter");
circleColor.color = getStyle("circleColor");
circleColor.weight = getStyle("circleStroke");
}
public function set displayInitials(initials:String):void {
firstLetters.text = initials;
}
]]>
</fx:Script>
<s:Label id="firstLetters"
fontSize="{getStyle('fontSize')}"
paddingTop="0"
paddingLeft="0"
paddingBottom="0"
paddingRight="0"
verticalCenter="0"
horizontalCenter="0" />
<s:Ellipse id="circle"
height="25"
width="25"
verticalCenter="0"
horizontalCenter="0">
<s:stroke>
<s:SolidColorStroke id="circleColor"
color="{getStyle('circleColor')}"
weight="1" />
<s:SolidColorStroke id="circleColor" />
</s:stroke>
</s:Ellipse>
</s:Group>

View File

@ -7,63 +7,65 @@ package org.bigbluebutton.lib.main.services {
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;
import org.bigbluebutton.lib.common.utils.QueryStringParameters;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
public class ConfigService {
protected var _successSignal:Signal = new Signal();
protected var _failureSignal:Signal = new Signal();
private var urlLoader:URLLoader;
private var reqVars:URLVariables = new URLVariables();
public function get successSignal():ISignal {
return _successSignal;
}
public function get failureSignal():ISignal {
return _failureSignal;
}
public function getConfig(serverUrl:String, urlRequest:URLRequest, sessionToken:String):void {
/*
var p:QueryStringParameters = new QueryStringParameters();
p.collectParameters();
var sessionToken:String = p.getParameter("sessionToken");
*/
trace("sessionToken=" + sessionToken);
reqVars.sessionToken = sessionToken;
protected var _successSignal:Signal = new Signal();
urlLoader = new URLLoader();
var configUrl:String = serverUrl + "/bigbluebutton/api/configXML";
var request:URLRequest = new URLRequest(configUrl);
request.method = URLRequestMethod.GET;
request.data = reqVars;
urlLoader.addEventListener(Event.COMPLETE, handleComplete);
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
urlLoader.load(request);
protected var _failureSignal:Signal = new Signal();
private var urlLoader:URLLoader;
private var reqVars:URLVariables = new URLVariables();
public function get successSignal():ISignal {
return _successSignal;
}
private function httpStatusHandler(event:HTTPStatusEvent):void {
trace("httpStatusHandler: {0}", [event]);
}
private function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: {0}", [event]);
failureSignal.dispatch(event.text);
}
private function handleComplete(e:Event):void {
successSignal.dispatch(new XML(e.target.data));
}
public function get failureSignal():ISignal {
return _failureSignal;
}
public function getConfig(serverUrl:String, urlRequest:URLRequest, sessionToken:String):void {
/*
var p:QueryStringParameters = new QueryStringParameters();
p.collectParameters();
var sessionToken:String = p.getParameter("sessionToken");
*/
trace("sessionToken=" + sessionToken);
reqVars.sessionToken = sessionToken;
urlLoader = new URLLoader();
var configUrl:String = serverUrl + "/bigbluebutton/api/configXML";
var request:URLRequest = new URLRequest(configUrl);
request.method = URLRequestMethod.GET;
request.data = reqVars;
urlLoader.addEventListener(Event.COMPLETE, handleComplete);
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
urlLoader.load(request);
}
private function httpStatusHandler(event:HTTPStatusEvent):void {
trace("httpStatusHandler: {0}", [event]);
}
private function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: {0}", [event]);
failureSignal.dispatch(event.text);
}
private function handleComplete(e:Event):void {
successSignal.dispatch(new XML(e.target.data));
}
}
}

View File

@ -33,21 +33,21 @@ package org.bigbluebutton.lib.main.views {
_micButton.percentWidth = 100;
_micButton.percentHeight = 100;
_micButton.label = "Mic on";
_micButton.styleName = "micOnButton menuButton";
_micButton.styleName = "icon-unmute menuButton";
addElement(_micButton);
_camButton = new Button();
_camButton.percentWidth = 100;
_camButton.percentHeight = 100;
_camButton.label = "Cam on";
_camButton.styleName = "camOnButton menuButton";
_camButton.styleName = "icon-video menuButton";
addElement(_camButton);
_statusButton = new Button();
_statusButton.percentWidth = 100;
_statusButton.percentHeight = 100;
_statusButton.label = "Status";
_statusButton.styleName = "handStatusButton menuButton";
_statusButton.styleName = "icon-hand menuButton";
addElement(_statusButton);
}

View File

@ -62,17 +62,17 @@ package org.bigbluebutton.lib.main.views {
if (user && user.me) {
if (user.hasStream) {
view.camButton.label = "Cam off";// ResourceManager.getInstance().getString('resources', 'menuButtons.camOff');
view.camButton.styleName = "camOffButton menuButton"
view.camButton.styleName = "icon-video-off menuButton"
} else {
view.camButton.label = "Cam on";// ResourceManager.getInstance().getString('resources', 'menuButtons.camOn');
view.camButton.styleName = "camOnButton menuButton"
view.camButton.styleName = "icon-video menuButton"
}
if (userSession.userList.me.voiceJoined) {
view.micButton.label = "Mic off";// ResourceManager.getInstance().getString('resources', 'menuButtons.micOff');
view.micButton.styleName = "micOffButton menuButton"
view.micButton.styleName = "icon-mute menuButton"
} else {
view.micButton.label = "Mic on";// ResourceManager.getInstance().getString('resources', 'menuButtons.micOn');
view.micButton.styleName = "micOnButton menuButton"
view.micButton.styleName = "icon-unmute menuButton"
}
}
}

View File

@ -1,43 +1,44 @@
package org.bigbluebutton.lib.main.views {
import spark.components.Button;
import spark.components.Group;
import spark.components.Label;
public class TopToolbarBase extends Group {
private var _leftButton:Button;
public function get leftButton():Button {
return _leftButton;
}
private var _titleLabel:Label;
public function get titleLabel():Label {
return _titleLabel;
}
private var _rightButton:Button;
public function get rightButton():Button {
return _rightButton;
}
public function TopToolbarBase() {
super();
verticalCenter = 0;
_leftButton = new Button();
_leftButton.styleName = "participantsButton topButton topLeftButton";
_leftButton.styleName = "icon-user topButton topLeftButton";
_leftButton.verticalCenter = 0;
addElement(_leftButton);
_titleLabel = new Label();
_titleLabel.styleName = "titleLabel";
_titleLabel.verticalCenter = 0;
addElement(_titleLabel);
_rightButton = new Button();
_rightButton.styleName = "settingsButton topButton topRightButton";
_rightButton.styleName = "icon-more topButton topRightButton";
_rightButton.verticalCenter = 0;
addElement(_rightButton);
}
}

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
minWidth="21"
minHeight="21"
alpha.disabled="0.5">
<fx:Metadata>
<![CDATA[
[HostComponent("spark.components.Button")]
]]>
</fx:Metadata>
<fx:Script fb:purpose="styling">
<![CDATA[
import spark.components.Button;
/**
* @private
*/
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
var cr:Number = getStyle("cornerRadius");
if (cornerRadius != cr) {
cornerRadius = cr;
fill.radiusX = cornerRadius;
border.radiusX = cornerRadius;
}
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
private var cornerRadius:Number = 2;
]]>
</fx:Script>
<!-- states -->
<s:states>
<s:State name="up" />
<s:State name="over" />
<s:State name="down" />
<s:State name="disabled" />
</s:states>
<!-- fill -->
<!--- @private -->
<s:Rect id="fill"
left="1"
right="1"
top="1"
bottom="1"
radiusX="2">
<s:fill>
<s:SolidColor color="{hostComponent.getStyle('backgroundColor')}"
color.down="{hostComponent.getStyle('selectedBackgroundColor')}" />
</s:fill>
</s:Rect>
<!-- border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
<!--- @private -->
<s:Rect id="border"
left="0"
right="0"
top="0"
bottom="0"
width="69"
height="20"
radiusX="2">
<s:stroke>
<s:SolidColorStroke weight="2"
color="{hostComponent.getStyle('borderColor')}" />
</s:stroke>
</s:Rect>
<!-- layer : text -->
<s:Label id="labelDisplay"
textAlign="center"
maxDisplayedLines="1"
horizontalCenter="0"
verticalCenter="1"
verticalAlign="middle"
left="40"
right="40"
top="20"
bottom="20">
</s:Label>
</s:Skin>

View File

@ -10,10 +10,15 @@
<fx:Script>
<![CDATA[
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
//label.setStyle("color", getStyle("color"));
//label.setStyle("fontSize", getStyle("fontSize"));
//label.setStyle("fontFamily", getStyle("fontFamily"));
backgroundEllipse.width = backgroundEllipse.height = getStyle("iconSize") * 2;
icon.text = getStyle("icon");
icon.setStyle("fontSize", getStyle("iconSize"));
icon.setStyle("fontFamily", getStyle("iconFont"));
icon.setStyle("color", getStyle("iconColor"));
iconLabel.text = hostComponent.label;
iconLabel.y = backgroundEllipse.y + backgroundEllipse.height + getStyle('labelPadding');
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
@ -29,26 +34,18 @@
</s:states>
<s:Ellipse id="backgroundEllipse"
height="{getStyle('iconSize') * 2}"
width="{backgroundEllipse.height}"
x="{(this.width - backgroundEllipse.width)/2}"
y="{(this.height - backgroundEllipse.height)/2}">
verticalCenter="0"
horizontalCenter="0">
<s:fill>
<s:SolidColor color="{hostComponent.getStyle('backgroundColor')}"
<s:SolidColor id="backgroundEllipseColor"
color="{hostComponent.getStyle('backgroundColor')}"
color.down="{hostComponent.getStyle('selectedBackgroundColor')}" />
</s:fill>
</s:Ellipse>
<s:Label id="icon"
fontSize="{getStyle('iconSize')}"
fontFamily="{getStyle('iconFont')}"
color="{getStyle('iconColor')}"
horizontalCenter="0"
verticalCenter="0" />
<s:Label id="iconLabel"
text="{hostComponent.label}"
x="{(this.width - iconLabel.width)/2}"
y="{backgroundEllipse.y + backgroundEllipse.height + getStyle('labelPadding')}"
fontSize="{getStyle('fontSize')}" />
horizontalCenter="0" />
</s:Skin>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<!-- host component -->
<fx:Metadata>
[HostComponent("spark.components.Button")]
</fx:Metadata>
<!-- states -->
<s:states>
<s:State name="disabled" />
<s:State name="down" />
<s:State name="over" />
<s:State name="up" />
</s:states>
<s:Label id="labelDisplay"
horizontalCenter="0"
verticalCenter="0" />
</s:Skin>

View File

@ -5,20 +5,18 @@
<fx:Metadata>
[HostComponent("spark.components.Button")]
</fx:Metadata>
<fx:Script>
<![CDATA[
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
//label.setStyle("color", getStyle("color"));
//label.setStyle("fontSize", getStyle("fontSize"));
//label.setStyle("fontFamily", getStyle("fontFamily"));
icon.text = getStyle("icon");
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
super.updateDisplayList(unscaledWidth, unscaledHeight);
icon.setStyle("color", getStyle("iconColor"));
icon.text = getStyle("icon");
}
]]>
</fx:Script>
<!-- states -->
<s:states>
<s:State name="disabled" />
@ -26,10 +24,7 @@
<s:State name="over" />
<s:State name="up" />
</s:states>
<s:Label id="icon"
fontSize="{getStyle('iconSize')}"
fontFamily="{getStyle('iconFont')}"
color="{getStyle('iconColor')}"
horizontalCenter="0"
verticalCenter="0" />
<s:Label id="icon"
horizontalCenter="0"
verticalCenter="0" />
</s:Skin>

View File

@ -1,15 +1,27 @@
package org.bigbluebutton.lib.participants.views {
import org.bigbluebutton.lib.chat.views.ChatRoomsViewBase;
import org.bigbluebutton.lib.user.views.UsersViewBase;
import mx.graphics.SolidColor;
import spark.components.Group;
import spark.components.Scroller;
import spark.components.VGroup;
import spark.primitives.Rect;
import org.bigbluebutton.lib.chat.views.ChatRoomsViewBase;
import org.bigbluebutton.lib.user.views.UsersViewBase;
public class ParticipantsViewBase extends Group {
private var _background:Rect;
public function ParticipantsViewBase() {
super();
_background = new Rect();
_background.percentHeight = 100;
_background.percentWidth = 100;
_background.fill = new SolidColor();
addElementAt(_background, 0);
var scroller:Scroller = new Scroller;
scroller.percentHeight = 100;
scroller.percentWidth = 100;
@ -25,6 +37,7 @@ package org.bigbluebutton.lib.participants.views {
var usersView:UsersViewBase = createUsersView();
usersView.percentWidth = 100;
usersView.percentHeight = 100;
group.addElement(usersView);
addElement(scroller);
@ -37,5 +50,11 @@ package org.bigbluebutton.lib.participants.views {
protected function createUsersView():UsersViewBase {
return new UsersViewBase;
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
SolidColor(_background.fill).color = getStyle("backgroundColor");
}
}
}
}

View File

@ -50,6 +50,7 @@ package org.bigbluebutton.lib.presentation.views {
if (_currentPresentation != null && _currentSlideNum >= 0) {
_currentSlide = _currentPresentation.getSlideAt(_currentSlideNum);
if (_currentSlide != null) {
// @fixme: needs to be improved as the view is sometimes null
if (_currentSlide.loaded && view != null) {
view.setSlide(_currentSlide);
} else {

View File

@ -1,5 +1,4 @@
package org.bigbluebutton.lib.presentation.views
{
package org.bigbluebutton.lib.presentation.views {
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
@ -10,8 +9,7 @@ package org.bigbluebutton.lib.presentation.views
import spark.components.Group;
public class PresentationViewBase extends Group
{
public class PresentationViewBase extends Group {
private var _viewport:Group;
public function get viewport():Group {
@ -30,8 +28,7 @@ package org.bigbluebutton.lib.presentation.views
return _wbCanvas;
}
public function PresentationViewBase()
{
public function PresentationViewBase() {
super();
_viewport = new Group();
@ -61,4 +58,4 @@ package org.bigbluebutton.lib.presentation.views
}
}
}
}
}

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%">
<fx:Script>
<![CDATA[
override public function set data(obj:Object):void {
super.data = obj;
settingName.text = data.label;
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
icon.styleName = "icon " + data.icon;
icon.text = icon.getStyle("icon");
container.padding = getStyle('padding');
settingName.setStyle("paddingLeft", getStyle('padding'));
icon.setStyle("color", getStyle("iconColor"));
icon.setStyle("fontSize", getStyle("iconSize"));
arrowIcon.setStyle("color", getStyle("iconColor"));
arrowIcon.setStyle("fontSize", getStyle("iconSize"));
arrowIcon.text = arrowIcon.getStyle("icon");
if (data.page == "exit") {
container.styleName = "leaveLabel";
icon.setStyle("color", container.getStyle("color"));
arrowIcon.setVisible(false);
}
}
]]>
</fx:Script>
<s:HGroup width="100%"
verticalAlign="middle"
id="container">
<s:Label id="icon" />
<s:Label id="settingName"
width="100%" />
<s:Label id="arrowIcon"
styleName="icon icon-right-arrow" />
</s:HGroup>
</s:ItemRenderer>

View File

@ -0,0 +1,103 @@
package org.bigbluebutton.lib.settings.views {
import mx.core.ClassFactory;
import mx.core.ScrollPolicy;
import mx.graphics.SolidColor;
import spark.components.Group;
import spark.components.Label;
import spark.components.List;
import spark.components.VGroup;
import spark.layouts.VerticalLayout;
import spark.primitives.Rect;
import org.bigbluebutton.lib.common.views.ParticipantIcon;
public class SettingsViewBase extends VGroup {
private var _settingsList:List;
private var _participantBackground:Rect;
private var _participantIcon:ParticipantIcon;
private var _participantLabel:Label;
private var _title:Label;
private var _leaveLabel:Label;
public function get settingsList():List {
return _settingsList;
}
public function get participantLabel():Label {
return _participantLabel;
}
public function get participantIcon():ParticipantIcon {
return _participantIcon;
}
public function SettingsViewBase() {
super();
gap = 0;
var participantHolder:Group = new Group();
participantHolder.percentWidth = 100;
addElement(participantHolder);
_participantBackground = new Rect();
_participantBackground.percentHeight = 100;
_participantBackground.percentWidth = 100;
_participantBackground.fill = new SolidColor();
participantHolder.addElement(_participantBackground);
_participantIcon = new ParticipantIcon();
_participantIcon.horizontalCenter = 0;
_participantIcon.styleName = "participantIconSettings";
participantHolder.addElement(_participantIcon);
_participantLabel = new Label();
_participantLabel.horizontalCenter = 0;
participantHolder.addElement(_participantLabel);
_title = new Label();
_title.text = "Session Settings";
_title.styleName = "sectionTitle";
_title.percentWidth = 100;
addElement(_title);
_settingsList = new List();
_settingsList.percentWidth = 100;
// @fixme height must be dynamic depending on the resolùution
_settingsList.height = 560;
_settingsList.itemRenderer = new ClassFactory(getItemRendererClass());
var listLayout:VerticalLayout = new VerticalLayout();
listLayout.requestedRowCount = -1;
listLayout.gap = 0;
_settingsList.layout = listLayout;
addElement(_settingsList);
}
protected function getItemRendererClass():Class {
return SettingsItemRenderer;
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
setParticipantStyle();
_settingsList.scroller.setStyle('verticalScrollPolicy', ScrollPolicy.OFF);
}
private function setParticipantStyle():void {
SolidColor(_participantBackground.fill).color = getStyle("headerBackground");
_participantIcon.top = getStyle("groupsPadding") * 1.75;
_participantLabel.setStyle("color", _participantIcon.getStyle("color"));
_participantLabel.setStyle("fontSize", _participantIcon.getStyle("fontSize") * 0.65);
_participantLabel.setStyle("paddingBottom", getStyle("groupsPadding"));
_participantLabel.y = _participantIcon.y + _participantIcon.height + getStyle("groupsPadding");
}
}
}

View File

@ -0,0 +1,40 @@
package org.bigbluebutton.lib.settings.views {
import mx.collections.ArrayCollection;
import spark.events.IndexChangeEvent;
import org.bigbluebutton.lib.main.models.IUserSession;
import org.bigbluebutton.lib.user.utils.UserUtils;
import robotlegs.bender.bundles.mvcs.Mediator;
public class SettingsViewMediatorBase extends Mediator {
[Inject]
public var view:SettingsViewBase;
[Inject]
public var userSession:IUserSession;
protected var dataProvider:ArrayCollection;
override public function initialize():void {
view.participantIcon.displayInitials = UserUtils.getInitials(userSession.userList.me.name);
view.participantLabel.text = userSession.userList.me.name;
view.settingsList.dataProvider = dataProvider = new ArrayCollection([{label: "Audio", icon: "icon-unmute", page: "audio"}, {label: "Video", icon: "icon-video", page: "camera"}, {label: "Application", icon: "icon-application", page: "chat"}, {label: "Participants", icon: "icon-user", page: "lock"}, {label: "Leave Session", icon: "icon-logout", page: "exit"}]);
view.settingsList.addEventListener(IndexChangeEvent.CHANGE, onListIndexChangeEvent);
}
protected function onListIndexChangeEvent(e:IndexChangeEvent):void {
// leave the implementation to the specific client
}
override public function destroy():void {
view.settingsList.removeEventListener(IndexChangeEvent.CHANGE, onListIndexChangeEvent);
super.destroy();
view = null;
}
}
}

View File

@ -0,0 +1,137 @@
package org.bigbluebutton.lib.settings.views.audio {
import mx.graphics.SolidColorStroke;
import spark.components.Button;
import spark.components.HGroup;
import spark.components.HSlider;
import spark.components.Label;
import spark.components.VGroup;
import spark.components.supportClasses.ToggleButtonBase;
import spark.layouts.HorizontalAlign;
import spark.layouts.VerticalAlign;
import spark.primitives.Line;
public class AudioSettingsViewBase extends VGroup {
private var _audioToggle:ToggleButtonBase;
private var _microphoneToggle:ToggleButtonBase;
private var _gainSlider:HSlider;
private var _audioSeparator:Line;
private var _microphoneSeparator:Line;
public function get audioToggle():ToggleButtonBase {
return _audioToggle;
}
public function get microphoneToggle():ToggleButtonBase {
return _microphoneToggle;
}
public function get gainSlider():HSlider {
return _gainSlider;
}
protected function get toggleButtonClass():Class {
return ToggleButtonBase;
}
public function AudioSettingsViewBase() {
super();
// Audio group
var audioGroup:HGroup = new HGroup();
audioGroup.percentWidth = 100;
audioGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(audioGroup);
var audioLabel:Label = new Label();
audioLabel.text = "Enable audio";
audioLabel.percentWidth = 100;
audioGroup.addElement(audioLabel);
_audioToggle = new toggleButtonClass();
audioGroup.addElement(_audioToggle);
_audioSeparator = new Line();
_audioSeparator.percentWidth = 100;
addElement(_audioSeparator);
// Mirohpone group
var microphoneGroup:HGroup = new HGroup();
microphoneGroup.percentWidth = 100;
microphoneGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(microphoneGroup);
var microphoneLabel:Label = new Label();
microphoneLabel.text = "Enable mirohpone";
microphoneLabel.percentWidth = 100;
microphoneGroup.addElement(microphoneLabel);
_microphoneToggle = new toggleButtonClass();
microphoneGroup.addElement(_microphoneToggle);
_microphoneSeparator = new Line();
_microphoneSeparator.percentWidth = 100;
addElement(_microphoneSeparator);
// Gain group
var gainGroup:VGroup = new VGroup();
gainGroup.percentWidth = 100;
gainGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(gainGroup);
var gainLabel:Label = new Label();
gainLabel.text = "Mirohpone level";
gainGroup.addElement(gainLabel);
// Gain sub-group
var gainSliderGroup:HGroup = new HGroup();
gainSliderGroup.percentWidth = 100;
gainGroup.addElement(gainSliderGroup);
var emptyMicGroup:VGroup = new VGroup();
emptyMicGroup.horizontalAlign = HorizontalAlign.CENTER;
gainSliderGroup.addElement(emptyMicGroup);
var micEmptyLabel:Button = new Button();
micEmptyLabel.styleName = "icon-unmute settingsIcon";
emptyMicGroup.addElement(micEmptyLabel);
var emptyMicLabel:Label = new Label();
emptyMicLabel.text = "Low";
emptyMicGroup.addElement(emptyMicLabel);
_gainSlider = new HSlider();
_gainSlider.percentWidth = 100;
gainSliderGroup.addElement(_gainSlider);
var fullMicGroup:VGroup = new VGroup();
fullMicGroup.horizontalAlign = HorizontalAlign.CENTER;
gainSliderGroup.addElement(fullMicGroup);
var micFullLabel:Button = new Button();
micFullLabel.styleName = "icon-unmute settingsIcon";
fullMicGroup.addElement(micFullLabel);
var fullMicLabel:Label = new Label();
fullMicLabel.text = "High";
fullMicGroup.addElement(fullMicLabel);
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
_audioToggle.parent["padding"] = getStyle("padding");
_microphoneToggle.parent["padding"] = getStyle("padding");
_gainSlider.parent["padding"] = getStyle("padding") * 0.5;
_gainSlider.parent.parent["padding"] = getStyle("padding");
_audioSeparator.stroke = new SolidColorStroke(getStyle("separatorColor"));
_microphoneSeparator.stroke = new SolidColorStroke(getStyle("separatorColor"));
}
}
}

View File

@ -0,0 +1,110 @@
package org.bigbluebutton.lib.settings.views.audio {
import flash.events.Event;
import org.bigbluebutton.lib.common.models.ISaveData;
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.voice.commands.ShareMicrophoneSignal;
import robotlegs.bender.bundles.mvcs.Mediator;
public class AudioSettingsViewMediatorBase extends Mediator {
[Inject]
public var userSession:IUserSession;
[Inject]
public var saveData:ISaveData;
[Inject]
public var shareMicrophoneSignal:ShareMicrophoneSignal;
[Inject]
public var view:AudioSettingsViewBase;
override public function initialize():void {
super.initialize();
var userMe:User = userSession.userList.me;
userSession.userList.userChangeSignal.add(userChangeHandler);
userSession.lockSettings.disableMicSignal.add(disableMic);
view.audioToggle.addEventListener(Event.CHANGE, onEnableAudioClick);
view.microphoneToggle.addEventListener(Event.CHANGE, onMicrophoneToggleClick);
view.gainSlider.addEventListener(Event.CHANGE, gainChange);
view.audioToggle.selected = (userMe.voiceJoined || userMe.listenOnly);
}
private function userChangeHandler(user:User, type:int):void {
if (user.me) {
if (type == UserList.LISTEN_ONLY) {
view.audioToggle.selected = user.voiceJoined || user.listenOnly;
view.microphoneToggle.selected = user.voiceJoined;
}
}
}
protected function disableMic(disable:Boolean):void {
if (disable) {
view.microphoneToggle.enabled = false;
view.microphoneToggle.selected = false;
} else {
view.microphoneToggle.enabled = true;
}
}
private function onEnableAudioClick(event:Event):void {
if (!view.audioToggle.selected) {
view.microphoneToggle.selected = false;
// view.enablePushToTalk.enabled = false;
userSession.pushToTalk = false;
}
var audioOptions:Object = new Object();
audioOptions.shareMic = userSession.userList.me.voiceJoined = view.microphoneToggle.selected && view.audioToggle.selected;
audioOptions.listenOnly = userSession.userList.me.listenOnly = !view.microphoneToggle.selected && view.audioToggle.selected;
shareMicrophoneSignal.dispatch(audioOptions);
}
private function onMicrophoneToggleClick(event:Event):void {
// view.enablePushToTalk.enabled = view.microphoneToggle.selected;
if (view.microphoneToggle.selected) {
view.audioToggle.selected = true;
}
// userSession.pushToTalk = (view.enablePushToTalk.selected && view.enablePushToTalk.enabled);
var audioOptions:Object = new Object();
audioOptions.shareMic = userSession.userList.me.voiceJoined = view.microphoneToggle.selected && view.audioToggle.selected;
audioOptions.listenOnly = userSession.userList.me.listenOnly = !view.microphoneToggle.selected && view.audioToggle.selected;
shareMicrophoneSignal.dispatch(audioOptions);
}
private function gainChange(e:Event):void {
var gain:Number = e.target.value * 10
saveData.save("micGain", gain);
setMicGain(gain);
}
private function setMicGain(gain:Number):void {
if (userSession.voiceStreamManager) {
userSession.voiceStreamManager.setDefaultMicGain(gain);
if (!userSession.pushToTalk && userSession.voiceStreamManager.mic) {
userSession.voiceStreamManager.mic.gain = gain;
}
}
}
override public function destroy():void {
super.destroy();
view.audioToggle.removeEventListener(Event.CHANGE, onEnableAudioClick);
view.microphoneToggle.removeEventListener(Event.CHANGE, onMicrophoneToggleClick);
view.gainSlider.removeEventListener(Event.CHANGE, gainChange);
userSession.lockSettings.disableMicSignal.remove(disableMic);
userSession.userList.userChangeSignal.remove(userChangeHandler);
}
}
}

View File

@ -0,0 +1,131 @@
package org.bigbluebutton.lib.settings.views.camera {
import mx.graphics.SolidColor;
import spark.components.Button;
import spark.components.Group;
import spark.components.HGroup;
import spark.components.Label;
import spark.components.List;
import spark.components.VGroup;
import spark.components.VideoDisplay;
import spark.components.supportClasses.ToggleButtonBase;
import spark.layouts.HorizontalAlign;
import spark.layouts.VerticalLayout;
import spark.primitives.Rect;
public class CameraSettingsViewBase extends VGroup {
private var _cameraBackground:Rect;
private var _cameraHolder:Group;
private var _previewVideo:VideoDisplay;
private var _noVideoMessage:Label;
private var _actionsGroup:HGroup;
private var _cameraProfilesList:List;
private var _swapCameraButton:Button;
private var _rotateCameraButton:Button;
protected function get toggleButtonClass():Class {
return ToggleButtonBase;
}
public function get cameraHolder():Group {
return _cameraHolder;
}
public function get previewVideo():VideoDisplay {
return _previewVideo;
}
public function get noVideoMessage():Label {
return _noVideoMessage;
}
public function get cameraProfilesList():List {
return _cameraProfilesList;
}
public function get swapCameraButton():Button {
return _swapCameraButton;
}
public function get rotateCameraButton():Button {
return _rotateCameraButton;
}
public function CameraSettingsViewBase() {
super();
gap = 0;
_cameraHolder = new Group();
_cameraHolder.percentWidth = 100;
addElement(_cameraHolder);
_cameraBackground = new Rect();
_cameraBackground.percentHeight = 100;
_cameraBackground.percentWidth = 100;
_cameraBackground.fill = new SolidColor();
_cameraHolder.addElement(_cameraBackground);
_previewVideo = new VideoDisplay();
//_previewVideo.horizontalCenter = 0;
_previewVideo.height = 320;
_cameraHolder.addElement(_previewVideo);
_noVideoMessage = new Label();
_cameraHolder.addElement(_noVideoMessage);
_actionsGroup = new HGroup();
_actionsGroup.percentHeight = 100;
_actionsGroup.percentWidth = 100;
_actionsGroup.horizontalAlign = HorizontalAlign.CENTER;
_cameraHolder.addElement(_actionsGroup);
_swapCameraButton = new Button();
_swapCameraButton.label = "SWAP CAMERA";
_swapCameraButton.styleName = "actionButton";
_actionsGroup.addElement(_swapCameraButton);
_rotateCameraButton = new Button();
_rotateCameraButton.label = "ROTATE CAMERA";
_rotateCameraButton.styleName = "actionButton";
_actionsGroup.addElement(_rotateCameraButton);
var qualityTitle:Label = new Label();
qualityTitle.text = "Video Quality";
qualityTitle.percentWidth = 100;
qualityTitle.styleName = "sectionTitle";
addElement(qualityTitle);
_cameraProfilesList = new List();
_cameraProfilesList.percentWidth = 100;
cameraProfilesList.labelField = "name";
var listLayout:VerticalLayout = new VerticalLayout();
listLayout.requestedRowCount = -1;
listLayout.gap = 0;
_cameraProfilesList.layout = listLayout;
addElement(_cameraProfilesList);
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
SolidColor(_cameraBackground.fill).color = getStyle("headerBackground");
// @todo: use _previewVideo or _noVideoMessage depending on the state
_previewVideo.top = getStyle("groupsPadding");
positionActionButtons();
}
public function positionActionButtons():void {
_actionsGroup.paddingBottom = getStyle("groupsPadding");
_actionsGroup.y = _previewVideo.y + _previewVideo.height + getStyle("groupsPadding");
}
}
}

View File

@ -0,0 +1,94 @@
package org.bigbluebutton.lib.settings.views.camera {
import mx.collections.ArrayCollection;
import mx.events.ItemClickEvent;
import spark.events.IndexChangeEvent;
import org.bigbluebutton.lib.common.models.ISaveData;
import org.bigbluebutton.lib.main.models.IUserSession;
import org.bigbluebutton.lib.user.models.User;
import org.bigbluebutton.lib.video.commands.CameraQualitySignal;
import org.bigbluebutton.lib.video.models.VideoProfile;
import robotlegs.bender.bundles.mvcs.Mediator;
public class CameraSettingsViewMediatorBase extends Mediator {
[Inject]
public var userSession:IUserSession;
[Inject]
public var view:CameraSettingsViewBase;
[Inject]
public var changeQualitySignal:CameraQualitySignal;
[Inject]
public var saveData:ISaveData;
protected var dataProvider:ArrayCollection;
override public function initialize():void {
super.initialize();
dataProvider = new ArrayCollection();
view.cameraProfilesList.dataProvider = dataProvider;
displayCameraProfiles();
userSession.userList.userChangeSignal.add(userChangeHandler);
view.cameraProfilesList.addEventListener(IndexChangeEvent.CHANGE, onCameraQualitySelected);
}
private function displayCameraProfiles():void {
var videoProfiles:Array = userSession.videoProfileManager.profiles;
for each (var profile:VideoProfile in videoProfiles) {
dataProvider.addItem(profile);
}
dataProvider.refresh();
view.cameraProfilesList.selectedIndex = dataProvider.getItemIndex(userSession.videoConnection.selectedCameraQuality);
userSession.lockSettings.disableCamSignal.add(disableCam);
setQualityListEnable(!userSession.userList.me.hasStream);
}
protected function onCameraQualitySelected(event:IndexChangeEvent):void {
if (event.newIndex >= 0) {
var profile:VideoProfile = dataProvider.getItemAt(event.newIndex) as VideoProfile;
if (userSession.userList.me.hasStream) {
changeQualitySignal.dispatch(profile);
} else {
userSession.videoConnection.selectedCameraQuality = profile;
}
saveData.save("cameraQuality", userSession.videoConnection.selectedCameraQuality.id);
displayPreviewCamera();
}
}
protected function displayPreviewCamera():void {
}
protected function userChangeHandler(user:User, type:int):void {
}
private function disableCam(disable:Boolean):void {
if (disable) {
// view.startCameraButton.enabled = false;
} else {
// view.startCameraButton.enabled = true;
}
}
protected function setQualityListEnable(enabled:Boolean):void {
view.cameraProfilesList.enabled = enabled;
}
override public function destroy():void {
super.destroy();
userSession.lockSettings.disableCamSignal.remove(disableCam);
userSession.userList.userChangeSignal.remove(userChangeHandler);
view.cameraProfilesList.removeEventListener(ItemClickEvent.ITEM_CLICK, onCameraQualitySelected);
}
}
}

View File

@ -0,0 +1,137 @@
package org.bigbluebutton.lib.settings.views.chat {
import mx.graphics.SolidColorStroke;
import spark.components.Button;
import spark.components.HGroup;
import spark.components.Label;
import spark.components.VGroup;
import spark.components.supportClasses.ToggleButtonBase;
import spark.layouts.VerticalAlign;
import spark.primitives.Line;
public class ChatSettingsViewBase extends VGroup {
private var _title:Label;
private var _audioToggle:ToggleButtonBase;
private var _pushToggle:ToggleButtonBase;
private var _fontSizeLabel:Label;
private var _increaseFontSizeButton:Button;
private var _decreaseFontSizeButton:Button;
private var _microphoneSeparator:Line;
private var _audioSeparator:Line;
private var _containers:Array;
public function get audioToggle():ToggleButtonBase {
return _audioToggle;
}
public function get pushToggle():ToggleButtonBase {
return _pushToggle;
}
protected function get toggleButtonClass():Class {
return ToggleButtonBase;
}
public function ChatSettingsViewBase() {
super();
gap = 0;
_containers = [];
_title = new Label();
_title.text = "Session Settings";
_title.percentWidth = 100;
_title.styleName = "sectionTitle";
addElement(_title);
// Mirohpone group
var audioGroup:HGroup = new HGroup();
audioGroup.percentWidth = 100;
audioGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(audioGroup);
_containers.push(audioGroup);
var microphoneLabel:Label = new Label();
microphoneLabel.text = "Audio notifications for chat";
microphoneLabel.percentWidth = 100;
audioGroup.addElement(microphoneLabel);
_pushToggle = new toggleButtonClass();
audioGroup.addElement(_pushToggle);
_microphoneSeparator = new Line();
_microphoneSeparator.percentWidth = 100;
addElement(_microphoneSeparator);
// Audio group
var notificationGroup:HGroup = new HGroup();
notificationGroup.percentWidth = 100;
notificationGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(notificationGroup);
_containers.push(notificationGroup);
var audioLabel:Label = new Label();
audioLabel.text = "Push notifications for chat";
audioLabel.percentWidth = 100;
notificationGroup.addElement(audioLabel);
_audioToggle = new toggleButtonClass();
notificationGroup.addElement(_audioToggle);
_audioSeparator = new Line();
_audioSeparator.percentWidth = 100;
addElement(_audioSeparator);
// Settings title
var _settingsTitle:Label = new Label();
_settingsTitle.text = "Styles";
_settingsTitle.percentWidth = 100;
_settingsTitle.styleName = "sectionTitle";
addElement(_settingsTitle);
// Font size group
var fontSizeGroup:HGroup = new HGroup();
fontSizeGroup.percentWidth = 100;
addElement(fontSizeGroup);
var fontLabel:Label = new Label();
fontLabel.text = "Font size";
fontSizeGroup.addElement(fontLabel);
_fontSizeLabel = new Label();
_fontSizeLabel.text = "34pt";
_fontSizeLabel.setStyle("textAlign", "center");
_fontSizeLabel.percentWidth = 100;
fontSizeGroup.addElement(_fontSizeLabel);
_increaseFontSizeButton = new Button();
_increaseFontSizeButton.styleName = "icon-circle-add settingsIcon";
fontSizeGroup.addElement(_increaseFontSizeButton);
_containers.push(fontSizeGroup);
_decreaseFontSizeButton = new Button();
_decreaseFontSizeButton.styleName = "icon-circle-minus settingsIcon";
fontSizeGroup.addElement(_decreaseFontSizeButton);
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
for (var i:int = 0; i < _containers.length; i++) {
_containers[i]["padding"] = getStyle("padding");
}
_microphoneSeparator.stroke = new SolidColorStroke(getStyle("separatorColor"));
_audioSeparator.stroke = new SolidColorStroke(getStyle("separatorColor"));
}
}
}

View File

@ -0,0 +1,9 @@
package org.bigbluebutton.lib.settings.views.chat {
import robotlegs.bender.bundles.mvcs.Mediator;
public class ChatSettingsViewMediatorBase extends Mediator {
[Inject]
public var view:ChatSettingsViewBase;
}
}

View File

@ -0,0 +1,184 @@
package org.bigbluebutton.lib.settings.views.lock {
import spark.components.CheckBox;
import spark.components.HGroup;
import spark.components.Label;
import spark.components.VGroup;
import spark.components.supportClasses.ToggleButtonBase;
import spark.layouts.VerticalAlign;
public class LockSettingsViewBase extends VGroup {
private var _muteToggle:ToggleButtonBase;
private var _lockToggle:ToggleButtonBase;
private var _webcamCheckbox:CheckBox;
private var _microphoneCheckbox:CheckBox;
private var _publicChatCheckbox:CheckBox;
private var _privateChatCheckbox:CheckBox;
private var _layoutCheckbox:CheckBox;
private var _containers:Array;
public function get webcamCheckbox():CheckBox {
return _webcamCheckbox;
}
public function get microphoneCheckbox():CheckBox {
return _microphoneCheckbox;
}
public function get publicChatCheckbox():CheckBox {
return _publicChatCheckbox;
}
public function get privateChatCheckbox():CheckBox {
return _privateChatCheckbox;
}
public function get layoutCheckbox():CheckBox {
return _layoutCheckbox;
}
protected function get toggleButtonClass():Class {
return ToggleButtonBase;
}
public function LockSettingsViewBase() {
super();
_containers = [];
// Audio title
var _audioTitle:Label = new Label();
_audioTitle.text = "Audio Control";
_audioTitle.percentWidth = 100;
_audioTitle.styleName = "sectionTitle";
addElement(_audioTitle);
// Mute group
var muteGroup:HGroup = new HGroup();
muteGroup.percentWidth = 100;
muteGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(muteGroup);
_containers.push(muteGroup);
var muteLabel:Label = new Label();
muteLabel.text = "Mute all expect the presenter";
muteLabel.percentWidth = 100;
muteGroup.addElement(muteLabel);
_muteToggle = new toggleButtonClass();
muteGroup.addElement(_muteToggle);
// Control title
var _lockTitle:Label = new Label();
_lockTitle.text = "Participation Control";
_lockTitle.percentWidth = 100;
_lockTitle.styleName = "sectionTitle";
addElement(_lockTitle);
// Lock group
var lockGroup:HGroup = new HGroup();
lockGroup.percentWidth = 100;
lockGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(lockGroup);
_containers.push(lockGroup);
var lockLabel:Label = new Label();
lockLabel.text = "Lock all participants";
lockLabel.percentWidth = 100;
lockGroup.addElement(lockLabel);
_lockToggle = new toggleButtonClass();
lockGroup.addElement(_lockToggle);
// Webcam group
var webcamGroup:HGroup = new HGroup();
webcamGroup.percentWidth = 100;
webcamGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(webcamGroup);
_containers.push(webcamGroup);
var webcamLabel:Label = new Label();
webcamLabel.text = "Webcam";
webcamLabel.percentWidth = 100;
webcamGroup.addElement(webcamLabel);
_webcamCheckbox = new CheckBox();
webcamGroup.addElement(_webcamCheckbox);
// Microphone group
var microphoneGroup:HGroup = new HGroup();
microphoneGroup.percentWidth = 100;
microphoneGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(microphoneGroup);
_containers.push(microphoneGroup);
var microphoneLabel:Label = new Label();
microphoneLabel.text = "Microphone";
microphoneLabel.percentWidth = 100;
microphoneGroup.addElement(microphoneLabel);
_microphoneCheckbox = new CheckBox();
microphoneGroup.addElement(_microphoneCheckbox);
// Public chat group
var publicChatGroup:HGroup = new HGroup();
publicChatGroup.percentWidth = 100;
publicChatGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(publicChatGroup);
_containers.push(publicChatGroup);
var publicChatLabel:Label = new Label();
publicChatLabel.text = "Public chat";
publicChatLabel.percentWidth = 100;
publicChatGroup.addElement(publicChatLabel);
_publicChatCheckbox = new CheckBox();
publicChatGroup.addElement(_publicChatCheckbox);
// Private chat group
var privateChatGroup:HGroup = new HGroup();
privateChatGroup.percentWidth = 100;
privateChatGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(privateChatGroup);
_containers.push(privateChatGroup);
var privateChatLabel:Label = new Label();
privateChatLabel.text = "Private chat";
privateChatLabel.percentWidth = 100;
privateChatGroup.addElement(privateChatLabel);
_privateChatCheckbox = new CheckBox();
privateChatGroup.addElement(_privateChatCheckbox);
// Layout group
var layoutGroup:HGroup = new HGroup();
layoutGroup.percentWidth = 100;
layoutGroup.verticalAlign = VerticalAlign.MIDDLE;
addElement(layoutGroup);
_containers.push(layoutGroup);
var layoutLabel:Label = new Label();
layoutLabel.text = "Layout";
layoutLabel.percentWidth = 100;
layoutGroup.addElement(layoutLabel);
_layoutCheckbox = new CheckBox();
layoutGroup.addElement(_layoutCheckbox);
}
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
for (var i:int = 0; i < _containers.length; i++) {
_containers[i]["padding"] = getStyle("padding");
}
}
}
}

View File

@ -0,0 +1,27 @@
package org.bigbluebutton.lib.settings.views.lock {
import org.bigbluebutton.lib.main.models.IUserSession;
import robotlegs.bender.bundles.mvcs.Mediator;
public class LockSettingsViewMediatorBase extends Mediator {
[Inject]
public var view:LockSettingsViewBase;
[Inject]
public var userSession:IUserSession;
override public function initialize():void {
loadLockSettings();
}
private function loadLockSettings():void {
view.webcamCheckbox.selected = !userSession.lockSettings.disableCam;
view.microphoneCheckbox.selected = !userSession.lockSettings.disableMic;
view.privateChatCheckbox.selected = !userSession.lockSettings.disablePrivateChat;
view.publicChatCheckbox.selected = !userSession.lockSettings.disablePublicChat;
view.layoutCheckbox.selected = !userSession.lockSettings.lockedLayout;
}
}
}

View File

@ -0,0 +1,13 @@
package org.bigbluebutton.lib.user.utils {
public final class UserUtils {
/**
* Returns the first uppercased letters from a user full name whatever
* words number is used
*/
public static function getInitials(name:String):String {
var matches:Array = name.match(/\b\w/g) || [];
return ((matches.shift() || '') + (matches.pop() || '')).toUpperCase();
}
}
}

View File

@ -12,10 +12,15 @@
<s:State name="selected" />
</s:states>
<fx:Metadata>
[Style(name="iconSize", inherit="no", type="Number")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import org.bigbluebutton.lib.user.events.UserItemSelectedEvent;
import org.bigbluebutton.lib.user.models.User;
import org.bigbluebutton.lib.user.utils.UserUtils;
private function onClick():void {
sendSelectedEvent();
@ -31,6 +36,25 @@
}
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
wrapperGroup.padding = getStyle("padding");
wrapperGroup.gap = getStyle("padding") / 4;
labelDisplay.setStyle("paddingLeft", getStyle("padding"));
labelDisplay.setStyle("paddingRight", getStyle("padding"));
cameraIcon.text = cameraIcon.getStyle("icon");
cameraIcon.setStyle("fontSize", getStyle("iconSize"));
audioIcon.text = audioIcon.getStyle("icon");
audioIcon.setStyle("fontSize", getStyle("iconSize"));
lockIcon.text = lockIcon.getStyle("icon");
lockIcon.setStyle("fontSize", getStyle("iconSize"));
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
override public function set data(obj:Object):void {
super.data = obj;
if (obj) {
@ -38,16 +62,16 @@
if (obj.voiceJoined) {
if (obj.muted) {
audioIcon.text = "\ue91c";
audioIcon.styleName = "icon icon-audio-off";
} else if (obj.talking) {
audioIcon.text = "\ue901";
audioIcon.styleName = "icon icon-audio-close";
} else {
audioIcon.text = "\ue91b";
audioIcon.styleName = "icon icon-audio-on";
}
} else if (obj.listenOnly) {
audioIcon.text = "\ue90d";
audioIcon.styleName = "icon icon-listen";
} else {
audioIcon.text = " ";
audioIcon.styleName = "";
}
lockIcon.visible = obj.locked;
@ -58,7 +82,7 @@
labelDisplay.text = obj.name;
}
participantIcon.setFirstLetters(obj.name);
participantIcon.displayInitials = UserUtils.getInitials(obj.name);
if (obj.presenter) {
subLabelDisplay.visible = subLabelDisplay.includeInLayout = true;
@ -70,30 +94,26 @@
}
]]>
</fx:Script>
<s:Group width="100%"
height="{getStyle('itemHeight')}">
<s:layout>
<s:HorizontalLayout verticalAlign="middle" />
</s:layout>
<s:VGroup id="wrapperGroup"
width="100%">
<s:HGroup width="100%"
verticalAlign="middle">
<common:ParticipantIcon id="participantIcon" />
<common:ParticipantIcon id="participantIcon" />
<s:Group width="100%">
<s:layout>
<s:VerticalLayout gap="0" />
</s:layout>
<s:Label id="labelDisplay"
styleName="participantName" />
<s:Label id="subLabelDisplay"
styleName="participantStatus" />
</s:Group>
<s:Label id="cameraIcon"
text="&#xe921;"
styleName="icon" />
<s:Label id="audioIcon"
styleName="icon" />
<s:Label id="lockIcon"
text="&#xe927;"
styleName="icon" />
</s:Group>
width="100%"
styleName="participantTitle" />
<s:Label id="cameraIcon"
styleName="icon icon-video" />
<s:Label id="audioIcon"
styleName="icon icon-audio-on" />
<s:Label id="lockIcon"
styleName="icon icon-lock" />
</s:HGroup>
<s:Label id="subLabelDisplay"
styleName="participantStatus"
paddingLeft="{labelDisplay.x + getStyle('padding')}" />
</s:VGroup>
</s:ItemRenderer>

View File

@ -1,14 +1,13 @@
package org.bigbluebutton.lib.user.views
{
package org.bigbluebutton.lib.user.views {
import mx.core.ClassFactory;
import spark.components.Label;
import spark.components.List;
import spark.components.VGroup;
import spark.components.supportClasses.ItemRenderer;
import spark.layouts.VerticalLayout;
public class UsersViewBase extends VGroup {
private var _userLabel:Label;
public function get userLabel():Label {
@ -26,17 +25,18 @@ package org.bigbluebutton.lib.user.views
_userLabel = new Label();
_userLabel.percentWidth = 100;
_userLabel.styleName = "content";
_userLabel.text = "Users";
_userLabel.styleName = "sectionTitle";
_userLabel.text = "Online";
addElement(_userLabel);
_userList = new List();
_userList.percentWidth = 100;
var itemRendererClass:ClassFactory = new ClassFactory(getItemRendererClass());
_userList.itemRenderer = itemRendererClass;
_userList.percentHeight = 100;
_userList.itemRenderer = new ClassFactory(getItemRendererClass());
var listLayout:VerticalLayout = new VerticalLayout();
listLayout.requestedRowCount = -1;
listLayout.gap = 1;
_userList.layout = listLayout;
addElement(_userList);
@ -46,4 +46,4 @@ package org.bigbluebutton.lib.user.views
return UserItemRenderer;
}
}
}
}

View File

@ -1,3 +1,5 @@
// Base colours
private const bbbBlack:uint = 0x2A2D33;
private const bbbBlue:uint = 0x299AD5;
@ -11,3 +13,22 @@ private const bbbDarkGrey:uint = 0x353B42;
private const bbbGrey:uint = 0x8B9AA8;
private const bbbWhite:uint = 0xF3F6F9;
// Additional colours
private const grey100:uint = 0xF1F3F7;
private const grey200:uint = 0xF2F2F2;
private const grey300:uint = 0xE4E8EC;
private const grey700:uint = 0x8A9AA7;
private const blue500:uint = 0x4998D0;
private const blue900:uint = 0x353A42;
private const white:uint = 0xFFFFFF;
private const green500:uint = 0x36CC84;

View File

@ -0,0 +1,177 @@
/* BigBlueButton Font */
@namespace s "library://ns.adobe.com/flex/spark";
@font-face {
src: url("../../shared/assets/fonts/BBBIcons/bbb-icons.ttf");
fontFamily: BBBIcons;
fontStyle: normal;
fontWeight: normal;
embedAsCFF: true;
}
@font-face {
src: url("../../shared/assets/fonts/BBBIcons/bbb-icons.ttf");
fontFamily: BBBIcons;
fontStyle: normal;
fontWeight: bold;
embedAsCFF: true;
}
.icon {
fontFamily: BBBIcons;
}
.icon-logout {
icon: "\ue900";
}
.icon-application {
icon: "\ue901";
}
.icon-more {
icon: "\ue902";
}
.icon-promote {
icon: "\ue903";
}
.icon-video-off {
icon: "\ue904";
}
.icon-user {
icon: "\ue905";
}
.icon-up-arrow {
icon: "\ue906";
}
.icon-undecided {
icon: "\ue907";
}
.icon-time {
icon: "\ue908";
}
.icon-sad {
icon: "\ue909";
}
.icon-right-arrow {
icon: "\ue90a";
}
.icon-presentation {
icon: "\ue90b";
}
.icon-listen {
icon: "\ue90c";
}
.icon-left-arrow {
icon: "\ue90d";
}
.icon-happy {
icon: "\ue90e";
}
.icon-hand {
icon: "\ue90f";
}
.icon-group-chat {
icon: "\ue910";
}
.icon-confused {
icon: "\ue911";
}
.icon-close {
icon: "\ue912";
}
.icon-clear-status {
icon: "\ue913";
}
.icon-circle {
icon: "\ue914";
}
.icon-substract {
icon: "\ue915";
}
.icon-circle-close {
icon: "\ue916";
}
.icon-add {
icon: "\ue917";
}
.icon-check {
icon: "\ue918";
}
.icon-chat {
icon: "\ue919";
}
.icon-audio-on {
icon: "\ue91a";
}
.icon-audio-off {
icon: "\ue91b";
}
.icon-line-tool {
icon: "\ue91c";
}
.icon-circle-tool {
icon: "\ue91d";
}
.icon-triangle-tool {
icon: "\ue91e";
}
.icon-rectangle-tool {
icon: "\ue91f";
}
.icon-text-tool {
icon: "\ue920";
}
.icon-plus {
icon: "\ue921";
}
.icon-fit-to-width {
icon: "\ue922";
}
.icon-applause {
icon: "\ue923";
}
.icon-undo {
icon: "\ue924";
}
.icon-pen-tool {
icon: "\ue925";
}
.icon-lock {
icon: "\ue926";
}
.icon-polling {
icon: "\ue927";
}
.icon-desktop {
icon: "\ue928";
}
.icon-fit-to-screen {
icon: "\ue929";
}
.icon-fullscreen {
icon: "\ue92a";
}
.icon-settings {
icon: "\ue92b";
}
.icon-thumbs-down {
icon: "\ue92c";
}
.icon-thumbs-up {
icon: "\ue92d";
}
.icon-file {
icon: "\ue92e";
}
.icon-upload {
icon: "\ue92f";
}
.icon-video {
icon: "\ue930";
}
.icon-unmute {
icon: "\ue931";
}
.icon-mute {
icon: "\ue932";
}

View File

@ -1,7 +1,8 @@
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace views "org.bigbluebutton.lib.main.views.*";
@namespace users "org.bigbluebutton.lib.user.views.*";
views|TopToolbarBase {
textAlign: center;
textAlign : center;
}

Some files were not shown because too many files have changed in this diff Show More