- start setting up screenshare connection

This commit is contained in:
Richard Alam 2018-02-26 14:28:21 -08:00
parent ec63728bc1
commit feb6df5ff1
5 changed files with 134 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package org.bigbluebutton.air.screenshare
{
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap;
import robotlegs.bender.framework.api.IConfig;
public class ScreenshareConfig implements IConfig
{
[Inject]
public var mediatorMap:IMediatorMap;
[Inject]
public var signalCommandMap:ISignalCommandMap;
public function configure():void {
mediators();
signals();
}
/**
* Maps view mediators to views.
*/
private function mediators():void {
//mediatorMap.map(IVideoButton).toMediator(VideoButtonMediator);
//mediatorMap.map(IVideoChatView).toMediator(VideoChatViewMediator);
//mediatorMap.map(ISwapCameraButton).toMediator(SwapCameraMediator);
}
private function signals():void {
}
}
}

View File

@ -0,0 +1,17 @@
package org.bigbluebutton.lib.screenshare.services
{
import flash.net.NetConnection;
import org.osflash.signals.ISignal;
public interface IScreenshareConnection
{
function get connectionFailureSignal():ISignal;
function get connectionSuccessSignal():ISignal;
//function set uri(uri:String):void;
//function get uri():String;
function get connection():NetConnection;
function connect():void;
function disconnect(onUserCommand:Boolean):void;
}
}

View File

@ -0,0 +1,66 @@
package org.bigbluebutton.lib.screenshare.services
{
import flash.net.NetConnection;
import org.bigbluebutton.lib.common.services.DefaultConnectionCallback;
import org.bigbluebutton.lib.common.services.IBaseConnection;
import org.bigbluebutton.lib.main.models.IConferenceParameters;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
public class ScreenshareConnection extends DefaultConnectionCallback implements IScreenshareConnection
{
private const LOG:String = "ScreenshareConnection::";
[Inject]
public var baseConnection:IBaseConnection;
[Inject]
public var conferenceParameters:IConferenceParameters;
protected var _connectionSuccessSignal:ISignal = new Signal();
protected var _connectionFailureSignal:ISignal = new Signal();
public function ScreenshareConnection()
{
}
[PostConstruct]
public function init():void {
baseConnection.init(this);
baseConnection.connectionSuccessSignal.add(onConnectionSuccess);
baseConnection.connectionFailureSignal.add(onConnectionFailure);
}
private function onConnectionFailure(reason:String):void {
connectionFailureSignal.dispatch(reason);
}
private function onConnectionSuccess():void {
connectionSuccessSignal.dispatch();
}
public function get connectionFailureSignal():ISignal {
return _connectionFailureSignal;
}
public function get connectionSuccessSignal():ISignal {
return _connectionSuccessSignal;
}
public function get connection():NetConnection {
return baseConnection.connection;
}
public function connect():void {
trace("Screenshare connect");
// baseConnection.connect(uri, conferenceParameters.meetingID);
}
public function disconnect(onUserCommand:Boolean):void {
baseConnection.disconnect(onUserCommand);
}
}
}

View File

@ -0,0 +1,9 @@
package org.bigbluebutton.lib.screenshare.services
{
public class ScreenshareMessageReceiver
{
public function ScreenshareMessageReceiver()
{
}
}
}

View File

@ -0,0 +1,9 @@
package org.bigbluebutton.lib.screenshare.services
{
public class ScreenshareMessageSender
{
public function ScreenshareMessageSender()
{
}
}
}