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

Deskshare module #28

Merged
Merged
Changes from 3 commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+1,703 −262
Diff settings

Always

Just for now

@@ -9,7 +9,6 @@
preinitialize="preinitializeHandler(event)"
creationComplete="creationCompleteHandler(event)"
applicationComplete="applicationCompleteHandler(event)"
applicationDPI="160"
>
<fx:Style source="Default.css"/>

@@ -31,6 +30,8 @@
import org.bigbluebutton.view.navigation.PagesNavigatorConfig;
import org.bigbluebutton.view.navigation.pages.chat.ChatConfig;
import org.bigbluebutton.view.navigation.pages.chatrooms.ChatRoomsConfig;
import org.bigbluebutton.view.navigation.pages.common.MenuButtonsConfig;
import org.bigbluebutton.view.navigation.pages.deskshare.DeskshareConfig;
import org.bigbluebutton.view.navigation.pages.disconnect.DisconnectPageConfig;
import org.bigbluebutton.view.navigation.pages.login.LoginPageConfig;
import org.bigbluebutton.view.navigation.pages.participants.ParticipantsConfig;
@@ -73,21 +74,21 @@
/*
public function onInvokeEvent(invocation:InvokeEvent):void
{
var traceString:String = "";
var arguments:Array = invocation.arguments;
var currentDir:File = invocation.currentDirectory;
var reason:String = invocation.reason;
traceString += "-----InvokeEvent.INVOKE----\n";
traceString += "arguments: "+arguments.toString()+"\n\n";
traceString += "currentDir: "+currentDir+"\n\n";
traceString += "reason: "+reason+"\n\n";
var url:String = arguments.toString().replace('bigbluebutton://', 'http://');
traceString += "url: "+url+"\n\n";
traceText.text += traceString;
var traceString:String = "";
var arguments:Array = invocation.arguments;
var currentDir:File = invocation.currentDirectory;
var reason:String = invocation.reason;
traceString += "-----InvokeEvent.INVOKE----\n";
traceString += "arguments: "+arguments.toString()+"\n\n";
traceString += "currentDir: "+currentDir+"\n\n";
traceString += "reason: "+reason+"\n\n";
var url:String = arguments.toString().replace('bigbluebutton://', 'http://');
traceString += "url: "+url+"\n\n";
traceText.text += traceString;
}
*/
/**
@@ -97,25 +98,26 @@
{
context = new Context()
.install(MVCSBundle, SignalCommandMapExtension)
.configure(AppConfig)
.configure(LoadingScreenConfig)
.configure(PagesNavigatorConfig)
.configure(PresentationConfig)
.configure(LoginPageConfig)
.configure(ChatConfig)
.configure(ChatRoomsConfig)
.configure(VideoChatConfig)
.configure(ProfileConfig)
.configure(UserDetaisConfig)
.configure(ParticipantsConfig)
.configure(SelectParticipantConfig)
.configure(MicButtonConfig)
.configure(LoginButtonConfig)
.configure(NavigationButtonConfig)
.configure(SwapCameraConfig)
.configure(DisconnectPageConfig)
.configure(AppConfig)
.configure(LoadingScreenConfig)
.configure(PagesNavigatorConfig)
.configure(PresentationConfig)
.configure(LoginPageConfig)
.configure(ChatConfig)
.configure(ChatRoomsConfig)
.configure(VideoChatConfig)
.configure(ProfileConfig)
.configure(UserDetaisConfig)
.configure(ParticipantsConfig)
.configure(SelectParticipantConfig)
.configure(MicButtonConfig)
.configure(LoginButtonConfig)
.configure(NavigationButtonConfig)
.configure(SwapCameraConfig)
.configure(DisconnectPageConfig)
.configure(DeskshareConfig)
.configure(MenuButtonsConfig)
.configure(new ContextView(this));
@@ -154,6 +156,7 @@
stage.addEventListener(Event.DEACTIVATE, fl_Deactivate);
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, stageOrientationChangingHandler);
stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;

This comment has been minimized.

Copy link
@capilkey

capilkey Jun 9, 2014

Member

I don't think you need this

// setup a custom orientation calculator based on the accelerometer because the default one doesn't work
_orientationCalc = new OrientationCalculator(pagesNavigatorView, accelerometerCallback);
@@ -179,11 +182,11 @@
}
]]>
</fx:Script>

<fx:Metadata>
[ResourceBundle("resources")]
</fx:Metadata>

<navigation:PagesNavigatorView id="pagesNavigatorView" width="100%" height="100%"/>
<loading:LoadingScreen width="100%" height="100%" />
<!--<s:TextArea id="traceText" x="10" y="10" height="488"/>-->
Binary file not shown.
@@ -39,3 +39,5 @@ disconnect.reason.connectionDropped=Meeting connection was dropped!
disconnect.reason.meetingEnded=Current meeting has been ended
disconnect.reason.userLoggedOut=You have logged out of the meeting
disconnect.reason.userKickedOut=You have been kicked out of the meeting
deskshare.noDeskshare = No desktop stream to display
deskshare.title = Desktop Sharing
@@ -2,6 +2,8 @@ package org.bigbluebutton
{
import org.bigbluebutton.command.CameraQualityCommand;
import org.bigbluebutton.command.CameraQualitySignal;
import org.bigbluebutton.command.CheckDeskshareStreamCommand;
import org.bigbluebutton.command.CheckDeskshareStreamSignal;
import org.bigbluebutton.command.ConnectCommand;
import org.bigbluebutton.command.ConnectSignal;
import org.bigbluebutton.command.DisconnectUserCommand;
@@ -19,20 +21,26 @@ package org.bigbluebutton
import org.bigbluebutton.core.ChatMessageReceiver;
import org.bigbluebutton.core.ChatMessageSender;
import org.bigbluebutton.core.ChatMessageService;
import org.bigbluebutton.core.DeskshareConnection;
import org.bigbluebutton.core.DeskshareService;
import org.bigbluebutton.core.DeskshareServiceSO;
import org.bigbluebutton.core.IBaseConnection;
import org.bigbluebutton.core.IBigBlueButtonConnection;
import org.bigbluebutton.core.IChatMessageReceiver;
import org.bigbluebutton.core.IChatMessageSender;
import org.bigbluebutton.core.IChatMessageService;
import org.bigbluebutton.core.IDeskshareConnection;
import org.bigbluebutton.core.IDeskshareService;
import org.bigbluebutton.core.IDeskshareServiceSO;
import org.bigbluebutton.core.IListenersServiceSO;
import org.bigbluebutton.core.ILoginService;
import org.bigbluebutton.core.IPresentMessageReceiver;
import org.bigbluebutton.core.IPresentServiceSO;
import org.bigbluebutton.core.IPresentationService;
import org.bigbluebutton.core.IUsersService;
import org.bigbluebutton.core.IUsersServiceSO;
import org.bigbluebutton.core.IVoiceConnection;
import org.bigbluebutton.core.IVideoConnection;
import org.bigbluebutton.core.IVoiceConnection;
import org.bigbluebutton.core.ListenersServiceSO;
import org.bigbluebutton.core.LoginService;
import org.bigbluebutton.core.PresentMessageReceiver;
@@ -65,32 +73,40 @@ package org.bigbluebutton

public function configure(): void
{
// Singleton mapping
injector.map(IUserUISession).toSingleton(UserUISession);
injector.map(IUserSession).toSingleton(UserSession);
injector.map(IConferenceParameters).toSingleton(ConferenceParameters);
injector.map(ILoginService).toType(LoginService);
injector.map(IUsersServiceSO).toType(UsersServiceSO);
injector.map(IListenersServiceSO).toType(ListenersServiceSO);
injector.map(IUsersService).toSingleton(UsersService);
injector.map(IBigBlueButtonConnection).toType(BigBlueButtonConnection);
injector.map(IVideoConnection).toType(VideoConnection);
injector.map(IChatMessageService).toSingleton(ChatMessageService);
injector.map(IChatMessageReceiver).toSingleton(ChatMessageReceiver);
injector.map(IChatMessageSender).toSingleton(ChatMessageSender);
injector.map(IPresentServiceSO).toType(PresentServiceSO);
injector.map(IPresentationService).toSingleton(PresentationService);
injector.map(IPresentMessageReceiver).toSingleton(PresentMessageReceiver);
injector.map(IChatMessagesSession).toSingleton(ChatMessagesSession);
injector.map(IDeskshareConnection).toSingleton(DeskshareConnection);
injector.map(IDeskshareService).toSingleton(DeskshareService);

// Type mapping
injector.map(IBaseConnection).toType(BaseConnection);
injector.map(IVoiceConnection).toType(VoiceConnection);
injector.map(ILoginService).toType(LoginService);
injector.map(IUsersServiceSO).toType(UsersServiceSO);
injector.map(IListenersServiceSO).toType(ListenersServiceSO);
injector.map(IPresentServiceSO).toType(PresentServiceSO);
injector.map(IDeskshareServiceSO).toType(DeskshareServiceSO);
injector.map(IBigBlueButtonConnection).toType(BigBlueButtonConnection);
injector.map(IVideoConnection).toType(VideoConnection);

// Signal to Command mapping
signalCommandMap.map(ConnectSignal).toCommand(ConnectCommand);
signalCommandMap.map(ShareMicrophoneSignal).toCommand(ShareMicrophoneCommand);
signalCommandMap.map(ShareCameraSignal).toCommand(ShareCameraCommand);
signalCommandMap.map(LoadPresentationSignal).toCommand(LoadPresentationCommand);
signalCommandMap.map(LoadSlideSignal).toCommand(LoadSlideCommand);
signalCommandMap.map(CameraQualitySignal).toCommand(CameraQualityCommand);
signalCommandMap.map(DisconnectUserSignal).toCommand(DisconnectUserCommand);
signalCommandMap.map(DisconnectUserSignal).toCommand(DisconnectUserCommand);
signalCommandMap.map(CheckDeskshareStreamSignal).toCommand(CheckDeskshareStreamCommand);
}
}
}
@@ -0,0 +1,22 @@
package org.bigbluebutton.command
{
import org.bigbluebutton.core.IDeskshareService;
import org.bigbluebutton.model.IConferenceParameters;

import robotlegs.bender.bundles.mvcs.Command;

public class CheckDeskshareStreamCommand extends Command
{
[Inject]
public var deskshareService: IDeskshareService;

[Inject]
public var conferenceParameters:IConferenceParameters;

public override function execute():void
{
trace("Checking if Desk Share stream is streaming.");
deskshareService.checkIfStreamIsPublishing(conferenceParameters.room);

This comment has been minimized.

Copy link
@capilkey

capilkey Jun 9, 2014

Member

Is it really necessary to have a signal for one line?

}
}
}
@@ -0,0 +1,12 @@
package org.bigbluebutton.command
{
import org.osflash.signals.Signal;

public class CheckDeskshareStreamSignal extends Signal
{
public function CheckDeskshareStreamSignal()
{
super();
}
}
}
@@ -2,21 +2,24 @@ package org.bigbluebutton.command
{
import flash.media.Camera;

import mx.messaging.management.Attribute;
import mx.utils.ObjectUtil;

import org.bigbluebutton.core.IBigBlueButtonConnection;
import org.bigbluebutton.core.IChatMessageService;
import org.bigbluebutton.core.IDeskshareConnection;
import org.bigbluebutton.core.IDeskshareService;
import org.bigbluebutton.core.IPresentationService;
import org.bigbluebutton.core.IUsersService;
import org.bigbluebutton.core.IVideoConnection;
import org.bigbluebutton.core.IVoiceConnection;
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 ConnectCommand extends Command
{
@@ -38,6 +41,9 @@ package org.bigbluebutton.command
[Inject]
public var voiceConnection: IVoiceConnection;

[Inject]
public var deskshareConnection : IDeskshareConnection;

[Inject]
public var uri: String;

@@ -50,6 +56,9 @@ package org.bigbluebutton.command
[Inject]
public var presentationService: IPresentationService;

[Inject]
public var deskshareService: IDeskshareService;

override public function execute():void {
connection.uri = uri;

@@ -79,9 +88,15 @@ package org.bigbluebutton.command

voiceConnection.uri = userSession.config.getConfigFor("PhoneModule").@uri;
userSession.voiceConnection = voiceConnection;

usersService.connectListeners(uri);

deskshareConnection.applicationURI = userSession.config.getConfigFor("DeskShareModule").@uri;
deskshareConnection.connect();

userSession.deskshareConnection = deskshareConnection;
deskshareService.connectDeskshareSO();

chatService.sendWelcomeMessage();
chatService.getPublicChatMessages();

@@ -18,6 +18,9 @@ package org.bigbluebutton.core

public class BaseServiceSO
{
[Inject]
public var conferenceParameters:IConferenceParameters;

private var _successConnected:ISignal = new Signal();
private var _unsuccessConnected:ISignal = new Signal();
private var _syncReceived:ISignal = new Signal();
@@ -33,7 +36,17 @@ package org.bigbluebutton.core

public function connect(connection:NetConnection, uri:String, params:IConferenceParameters):void {
_disconnectRequested = false;
_sharedObject = SharedObject.getRemote(_sharedObjectName, uri + "/" + params.room, false);

// In DeskshareServiceSO room name is attached to SO name - not uri
if (this is DeskshareServiceSO)
{
_sharedObject = SharedObject.getRemote(conferenceParameters.room + _sharedObjectName, uri, false);
}
else
{
_sharedObject = SharedObject.getRemote(_sharedObjectName, uri + "/" + params.room, false);
}

_sharedObject.addEventListener(NetStatusEvent.NET_STATUS, onNetStatusEvent);
_sharedObject.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncErrorEvent);
_sharedObject.addEventListener(SyncEvent.SYNC, onSyncEvent);
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.