Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement new UI styles #44

Merged
merged 10 commits into from Sep 15, 2014
1,019 changes: 641 additions & 378 deletions src/Default.css

Large diffs are not rendered by default.

66 changes: 21 additions & 45 deletions src/Main.mxml
Expand Up @@ -36,6 +36,8 @@
import org.bigbluebutton.view.navigation.PagesNavigatorConfig;
import org.bigbluebutton.view.navigation.pages.PagesENUM;
import org.bigbluebutton.view.navigation.pages.TransitionAnimationENUM;
import org.bigbluebutton.view.navigation.pages.audiosettings.AudioSettingsConfig;
import org.bigbluebutton.view.navigation.pages.camerasettings.CameraSettingsConfig;
import org.bigbluebutton.view.navigation.pages.chat.ChatConfig;
import org.bigbluebutton.view.navigation.pages.chatrooms.ChatRoomsConfig;
import org.bigbluebutton.view.navigation.pages.common.MenuButtonsConfig;
Expand Down Expand Up @@ -124,8 +126,9 @@
.configure(SwapCameraConfig)
.configure(DisconnectPageConfig)
.configure(DeskshareConfig)
.configure(MenuButtonsConfig)
.configure(RecordingStatusConfig)
.configure(CameraSettingsConfig)
.configure(AudioSettingsConfig)

.configure(new ContextView(this));

Expand Down Expand Up @@ -186,22 +189,6 @@
private function accelerometerCallback():void {
currentOrientation = _orientationCalc.currentOrientation;
(pagesNavigatorView.activeView as NoTabView).rotationHandler(_orientationCalc.currentOrientation);
}

protected function button_clickHandler(event:MouseEvent):void
{
backBtn.visible=false;
backBtn.includeInLayout=false;
profileBtn.visible=true;
profileBtn.includeInLayout=true;
}

protected function profileBtn_clickHandler(event:MouseEvent):void
{
backBtn.visible=true;
backBtn.includeInLayout=true;
profileBtn.visible=false;
profileBtn.includeInLayout=false;
}

]]>
Expand All @@ -211,38 +198,27 @@
[ResourceBundle("resources")]
</fx:Metadata>

<loading:LoadingScreen width="100%" height="100%" />
<loading:LoadingScreen width="100%" height="100%"/>

<s:Group width="100%" height="100%" id="mainshell" visible="false">
<s:layout>
<s:VerticalLayout />
<s:VerticalLayout gap="0"/>
</s:layout>
<s:Group width="100%" id="topActionBar" >
<s:Rect height="100%" width="100%">
<s:fill>
<s:SolidColor color="{getStyle('topActionBarColor')}" />
</s:fill>
</s:Rect>
<s:HGroup width="100%" height="100%" verticalAlign="middle">
<ui:NavigationButton id="profileBtn" click="profileBtn_clickHandler(event)"
styleName="profileButtonStyle topButtonStyle "
navigateTo="{[PagesENUM.PROFILE]}"
transitionAnimation="{TransitionAnimationENUM.SLIDE_LEFT}"
height="100%" />
<ui:NavigationButton id="backBtn" visible="false" includeInLayout="false" click="button_clickHandler(event)"
styleName="backButtonStyle topButtonStyle"
navigateTo="{[PagesENUM.LAST]}"
transitionAnimation="{TransitionAnimationENUM.SLIDE_RIGHT}"
height="100%"/>
<ui:RecordingStatus id="recordingStatus" source="{getStyle('recordingStatusImage')}" visible="false"
scaleMode="letterbox" scaleX="{getStyle('imageScaleX')}" scaleY="{getStyle('imageScaleY')}" height="100%"/>
<s:Label id="pageName" styleName="pageNameStyle" width="100%" />
<ui:SwapCameraButton id="swapCameraBtn" visible="false" styleName="swapCameraButtonStyle topButtonStyle" height="100%" />
<ui:MicButton id="microphoneBtn" styleName="micButtonStyle topButtonStyle" height="100%" />
<s:SkinnableContainer id="topActionBar" width="100%" height="{getStyle('toolBarHeight')}" styleName="topToolBarStyle" verticalCenter="0">
<s:HGroup width="100%" height="100%">
<s:Group>
<ui:NavigationButton id="profileBtn" styleName="profileButtonStyle topButtonStyle"
navigateTo="{[PagesENUM.PROFILE]}" transitionAnimation="{TransitionAnimationENUM.SLIDE_LEFT}"/>
<ui:NavigationButton id="backBtn" styleName="backButtonStyle topButtonStyle"
navigateTo="{[PagesENUM.LAST]}" transitionAnimation="{TransitionAnimationENUM.SLIDE_RIGHT}"/>
</s:Group>
<s:Label id="pageName" styleName="pageNameStyle" width="100%" height="100%"/>
<ui:RecordingStatus id="recordingStatus" styleName="recordingStatusIconStyle topButtonStyle"/>
<ui:MicButton id="microphoneBtn" styleName="micButtonStyle topButtonStyle"/>
</s:HGroup>
</s:Group>
</s:SkinnableContainer>

<navigation:PagesNavigatorView id="pagesNavigatorView" width="100%" height="100%"/>
<common:MenuButtonsView id="bottomMenu" width="100%" click="button_clickHandler(event)"/>
<navigation:PagesNavigatorView id="pagesNavigatorView" width="100%" height="100%"/>
<common:MenuButtonsView id="bottomMenu" width="100%" height="{getStyle('bottomToolBarHeight')}"/>
</s:Group>
</s:Application>
</s:Application>
Binary file modified src/assets/res/drawable-hdpi/SwapCamera_up.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/arrowRight.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/backButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/chat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/res/drawable-hdpi/listenOnly.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/micBtn_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/micBtn_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/res/drawable-hdpi/micOffIcon.png
Binary file not shown.
Binary file added src/assets/res/drawable-hdpi/micOffIcon_dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/microphone.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/participants.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/presentation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/profile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/res/drawable-hdpi/sendMsgIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/sound.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/res/drawable-hdpi/user_detail.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-hdpi/video.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-mdpi/SwapCamera_up.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-mdpi/arrowRight.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-mdpi/backButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-mdpi/chat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/res/drawable-mdpi/listenOnly.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-mdpi/micBtn_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/res/drawable-mdpi/micBtn_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/res/drawable-mdpi/micOffIcon.png
Binary file not shown.
Binary file added src/assets/res/drawable-mdpi/micOffIcon_dark.png
Binary file modified src/assets/res/drawable-mdpi/microphone.png
Binary file modified src/assets/res/drawable-mdpi/participants.png
Binary file modified src/assets/res/drawable-mdpi/presentation.png
Binary file modified src/assets/res/drawable-mdpi/profile.png
Binary file added src/assets/res/drawable-mdpi/sendMsgIcon.png
Binary file modified src/assets/res/drawable-mdpi/sound.png
Binary file added src/assets/res/drawable-mdpi/user_detail.png
Binary file modified src/assets/res/drawable-mdpi/video.png
Binary file modified src/assets/res/drawable-xhdpi/SwapCamera_up.png
Binary file modified src/assets/res/drawable-xhdpi/arrowRight.png
Binary file modified src/assets/res/drawable-xhdpi/backButton.png
Binary file modified src/assets/res/drawable-xhdpi/chat.png
Binary file added src/assets/res/drawable-xhdpi/listenOnly.png
Binary file modified src/assets/res/drawable-xhdpi/micBtn_off.png
Binary file modified src/assets/res/drawable-xhdpi/micBtn_on.png
Binary file removed src/assets/res/drawable-xhdpi/micOffIcon.png
Diff not rendered.
Binary file added src/assets/res/drawable-xhdpi/micOffIcon_dark.png
Binary file modified src/assets/res/drawable-xhdpi/microphone.png
Binary file modified src/assets/res/drawable-xhdpi/participants.png
Binary file modified src/assets/res/drawable-xhdpi/presentation.png
Binary file modified src/assets/res/drawable-xhdpi/profile.png
Binary file added src/assets/res/drawable-xhdpi/sendMsgIcon.png
Binary file modified src/assets/res/drawable-xhdpi/sound.png
Binary file added src/assets/res/drawable-xhdpi/user_detail.png
Binary file modified src/assets/res/drawable-xhdpi/video.png
Binary file modified src/assets/res/drawable-xxhdpi/SwapCamera_up.png
Binary file modified src/assets/res/drawable-xxhdpi/arrowRight.png
Binary file modified src/assets/res/drawable-xxhdpi/backButton.png
Binary file modified src/assets/res/drawable-xxhdpi/chat.png
Binary file added src/assets/res/drawable-xxhdpi/listenOnly.png
Binary file modified src/assets/res/drawable-xxhdpi/micBtn_off.png
Binary file modified src/assets/res/drawable-xxhdpi/micBtn_on.png
Binary file removed src/assets/res/drawable-xxhdpi/micOffIcon.png
Diff not rendered.
Binary file added src/assets/res/drawable-xxhdpi/micOffIcon_dark.png
Binary file modified src/assets/res/drawable-xxhdpi/microphone.png
Binary file modified src/assets/res/drawable-xxhdpi/participants.png
Binary file modified src/assets/res/drawable-xxhdpi/presentation.png
Binary file modified src/assets/res/drawable-xxhdpi/profile.png
Binary file added src/assets/res/drawable-xxhdpi/sendMsgIcon.png
Binary file modified src/assets/res/drawable-xxhdpi/sound.png
Binary file added src/assets/res/drawable-xxhdpi/user_detail.png
Binary file modified src/assets/res/drawable-xxhdpi/video.png
Binary file removed src/assets/res/drawable-xxxhdpi/SwapCamera_up.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/arrowRight.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/backButton.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/chat.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/deskshare.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/hand.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/ic_launcher.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/loader.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/media_record.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/micBtn_off.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/micBtn_on.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/micOffIcon.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/microphone.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/participants.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/presentation.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/profile.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/sound.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/userProfile.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/video.png
Diff not rendered.
Binary file removed src/assets/res/drawable-xxxhdpi/videoLoading.png
Diff not rendered.
21 changes: 18 additions & 3 deletions src/locale/en_US/resources.properties
Expand Up @@ -2,25 +2,30 @@ chat.item.privateChat=New private chat
chat.item.publicChat=Public chat
chat.public.title=Public chat
chat.sendBtn.text=Send
chat.title=Chat
chat.title=Chat Rooms
chat.textInput.text=Type message here
login.error.checksumError=Unauthorized access.\nPlease try again.
login.error.genericError=It was not possible to join this meeting, please try again later.
login.error.invalidMeetingIdentifier=Meeting not found.\nPlease make sure that the meeting is running.
login.error.invalidPassword=Unauthorized access.\nThe provided password for this meeting is invalid.
login.error.noRedirect=Please use the web browser to access a meeting.
login.error.invalidURL=Invalid join URL.\nPlease contact your administrator.
participants.title=Participants
profile.title=Profile
participants.status.presenter=Status:Presenter
participants.status.moderator=Status:Moderator
profile.title=User Settings
profile.participant=Participant
profile.logout=Log out
profile.settings=Settings
profile.settings.camera=Camera
profile.settings.camera.on=Stop camera
profile.settings.camera.unavailable = Start camera [Unavailable]
profile.settings.camera.off=Start camera
profile.settings.cameraQuality.selectquality = Select camera quality:
profile.settings.cameraQuality.low = Low
profile.settings.cameraQuality.medium = Medium
profile.settings.cameraQuality.high = High
profile.settings.mic=Audio
profile.settings.mic.on=Leave audio
profile.settings.mic.off=Join audio
profile.settings.handRaise=Raise hand
Expand All @@ -34,6 +39,7 @@ userDetail.cameraBtn.text=Show camera
userDetail.privateChatBtn.text=Private chat
userDetail.userOffline = [Offline]
userDetail.you=(you)
userDetail.media.noMedia=No Media Available
video.title=Video
video.noVideo=No video to display
disconnect.reason.connectionDropped=Meeting connection was dropped!
Expand All @@ -42,4 +48,13 @@ disconnect.reason.userLoggedOut=You have logged out of the meeting
disconnect.reason.userKickedOut=You have been kicked out of the meeting
disconnect.reason.userExit=Exit
deskshare.noDeskshare = No desktop stream to display
deskshare.title = Desktop Sharing
deskshare.title = Desktop Sharing
cameraSettings.title=Camera Settings
cameraSettings.swap=Swap Camera
audioSettings.title=Audio Settings
audioSettings.listenOnly=Listen Only
audioSettings.listenOnly.on=Enable Listen Only
audioSettings.listenOnly.off=Disable Listen Only
audioSettings.shareMicrophone.on=Share Microphone
audioSettings.shareMicrophone.off=Stop Microphone
audioSettings.label.text=How do you want to join the audio?
3 changes: 2 additions & 1 deletion src/locale/pt_BR/resources.properties
Expand Up @@ -9,13 +9,14 @@ login.error.invalidMeetingIdentifier=Sala não encontrada.\nCertifique-se de que
login.error.invalidPassword=Acesso não autorizado.\nA senha utilizada para acesso à sala é inválida.
login.error.noRedirect=Utilize o navegador web para acessar uma conferência.
participants.title=Participantes
profile.title=Perfil
profile.title=Configurações do usuário
profile.participant=Participante
profile.logout=Sair
profile.settings=Configurações
profile.settings.camera=Câmera
profile.settings.camera.on=ON
profile.settings.camera.off=OFF
profile.settings.mic=Áudio
selectParticipant.title=Selecione um participante
userDetail.title=Participante
userDetail.name=Nome
Expand Down
49 changes: 33 additions & 16 deletions src/org/bigbluebutton/command/ShareMicrophoneCommand.as
Expand Up @@ -6,16 +6,15 @@ package org.bigbluebutton.command

import org.bigbluebutton.core.IBigBlueButtonConnection;
import org.bigbluebutton.core.IUsersService;
import org.bigbluebutton.core.IVoiceConnection;
import org.bigbluebutton.core.VoiceConnection;
import org.bigbluebutton.core.VoiceStreamManager;
import org.bigbluebutton.model.IConferenceParameters;
import org.bigbluebutton.model.IUserSession;
import org.bigbluebutton.model.IUserUISession;
import org.bigbluebutton.view.navigation.pages.PagesENUM;
import org.osmf.logging.Log;

import robotlegs.bender.bundles.mvcs.Command;
import org.bigbluebutton.core.IVoiceConnection;

public class ShareMicrophoneCommand extends Command
{
Expand All @@ -26,39 +25,55 @@ package org.bigbluebutton.command
public var conferenceParameters: IConferenceParameters;

[Inject]
public var enabled: Boolean;
public var audioOptions: Object;

private var _shareMic:Boolean;
private var _listenOnly:Boolean;

private var voiceConnection:IVoiceConnection;

override public function execute():void
{
if (enabled) {
enableMic();
} else {
disableMic();
getAudioOption(audioOptions);
if (_shareMic || _listenOnly)
{
enableAudio();
}
else
{
disableAudio();
}
}

private function enableMic():void {
private function getAudioOption(option:Object):void
{
if(option != null && option.hasOwnProperty("shareMic") && option.hasOwnProperty("listenOnly"))
{
_shareMic = option.shareMic;
_listenOnly = option.listenOnly;
}
}

private function enableAudio():void {
voiceConnection = userSession.voiceConnection;

if (!voiceConnection.connection.connected) {
voiceConnection.connect(conferenceParameters);
voiceConnection.successConnected.add(mediaSuccessConnected);
voiceConnection.unsuccessConnected.add(mediaUnsuccessConnected);
}
}
else if (!voiceConnection.callActive) {
voiceConnection.call();
voiceConnection.call(_listenOnly);
voiceConnection.successConnected.add(mediaSuccessConnected);
voiceConnection.unsuccessConnected.add(mediaUnsuccessConnected);
}
}

private function disableMic():void {
private function disableAudio():void {
var manager:VoiceStreamManager = userSession.voiceStreamManager;

voiceConnection = userSession.voiceConnection;
if (manager != null) {
manager.close();
voiceConnection.hangUp();
}
}

Expand All @@ -67,9 +82,11 @@ package org.bigbluebutton.command

var manager:VoiceStreamManager = new VoiceStreamManager();
manager.play(voiceConnection.connection, playName);
manager.publish(voiceConnection.connection, publishName, codec);
userSession.voiceStreamManager = manager;

if(publishName != null && publishName.length != 0)
{
manager.publish(voiceConnection.connection, publishName, codec);
}
userSession.voiceStreamManager = manager;
voiceConnection.successConnected.remove(mediaSuccessConnected);
voiceConnection.unsuccessConnected.remove(mediaUnsuccessConnected);
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/bigbluebutton/command/ShareMicrophoneSignal.as
Expand Up @@ -6,7 +6,7 @@ package org.bigbluebutton.command
{
public function ShareMicrophoneSignal()
{
super(Boolean);
super(Object);
}
}
}
2 changes: 1 addition & 1 deletion src/org/bigbluebutton/core/DefaultConnectionCallback.as
Expand Up @@ -38,7 +38,7 @@ package org.bigbluebutton.core
trace("RECEIVED MESSAGE: [" + messageName + "]");

notifyListeners(messageName, result);
}
}

public function addMessageListener(listener:IMessageListener):void {
_messageListeners.push(listener);
Expand Down
5 changes: 3 additions & 2 deletions src/org/bigbluebutton/core/IVoiceConnection.as
@@ -1,8 +1,9 @@
package org.bigbluebutton.core
{
import flash.net.NetConnection;
import org.osflash.signals.ISignal;

import org.bigbluebutton.model.IConferenceParameters;
import org.osflash.signals.ISignal;

public interface IVoiceConnection
{
Expand All @@ -17,7 +18,7 @@ package org.bigbluebutton.core
function failedToJoinVoiceConferenceCallback(msg:String):*
function disconnectedFromJoinVoiceConferenceCallback(msg:String):*
function successfullyJoinedVoiceConferenceCallback(publishName:String, playName:String, codec:String):*
function call():void
function call(listenOnly:Boolean=false):void
function hangUp():void
}
}
8 changes: 5 additions & 3 deletions src/org/bigbluebutton/core/UsersMessageReceiver.as
Expand Up @@ -113,7 +113,7 @@ package org.bigbluebutton.core
user.voiceUserId = newUser.voiceUser.userId;
user.isLeavingFlag = false;
user.listenOnly = newUser.listenOnly;

user.muted = newUser.voiceUser.muted;
userSession.userList.addUser(user);

// The following properties are 'special', in that they have view changes associated with them.
Expand Down Expand Up @@ -159,8 +159,10 @@ package org.bigbluebutton.core

private function handleUserListeningOnly(m:Object):void {
var msg:Object = JSON.parse(m.msg);
trace("UsersMessageReceiver::handleUserListeningOnly -- user [" + msg.userId + "] has listen only set to [" + msg.listenOnly + "]");
userSession.userList.listenOnlyChange(msg.userId, msg.listenOnly);
//It seems that listenOnly keeps to be true
//Temp solution to set listenOnly to false when user drop listen only mode.
trace("UsersMessageReceiver::handleUserListeningOnly -- user [" + msg.userId + "] has listen only set to [" + !userSession.userList.me.listenOnly + "]");
userSession.userList.listenOnlyChange(msg.userId, !userSession.userList.me.listenOnly);
}

private function handleVoiceUserMuted(m:Object):void {
Expand Down
22 changes: 14 additions & 8 deletions src/org/bigbluebutton/core/VoiceConnection.as
Expand Up @@ -7,6 +7,7 @@ package org.bigbluebutton.core

import org.bigbluebutton.model.ConferenceParameters;
import org.bigbluebutton.model.IConferenceParameters;
import org.bigbluebutton.model.IUserSession;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
import org.osmf.logging.Log;
Expand All @@ -16,6 +17,9 @@ package org.bigbluebutton.core
[Inject]
public var baseConnection:IBaseConnection;

[Inject]
public var userSession:IUserSession;

public static const NAME:String = "VoiceConnection";

public var _callActive:Boolean = false;
Expand Down Expand Up @@ -46,7 +50,7 @@ package org.bigbluebutton.core

private function onConnectionSuccess():void
{
call();
call(userSession.userList.me.listenOnly);
}

public function get unsuccessConnected():ISignal
Expand Down Expand Up @@ -102,8 +106,8 @@ package org.bigbluebutton.core
public function disconnectedFromJoinVoiceConferenceCallback(msg:String):* {
trace(NAME + "::disconnectedFromJoinVoiceConferenceCallback(): " + msg);
unsuccessConnected.dispatch("Failed on disconnectedFromJoinVoiceConferenceCallback()");
hangUp();
}
//hangUp();
}

public function successfullyJoinedVoiceConferenceCallback(publishName:String, playName:String, codec:String):* {
trace(NAME + "::successfullyJoinedVoiceConferenceCallback()");
Expand All @@ -117,19 +121,21 @@ package org.bigbluebutton.core
// //
//**********************************************//

public function call():void
public function call(listenOnly:Boolean=false):void
{
if (!callActive) {
trace(NAME + "::call(): starting voice call");
trace(NAME + "::call(listenOnly:Boolean): starting voice call");
baseConnection.connection.call(
"voiceconf.call",
new Responder(callOnSucess, callUnsucess),
"default",
_username,
_conferenceParameters.webvoiceconf
_conferenceParameters.webvoiceconf,
listenOnly.toString()
);
} else {
trace(NAME + "::call(): voice call already active");
}
else {
trace(NAME + "::call(listenOnly:Boolean=false): voice call already active");
}
}

Expand Down