Included stub methods for multiple NetConnection support in VideoProxy

This commit is contained in:
Mateus Dalepiane 2014-04-23 14:58:33 -03:00
parent cb99102472
commit d913173685
2 changed files with 27 additions and 4 deletions

View File

@ -46,7 +46,9 @@ package org.bigbluebutton.modules.videoconf.business
{
public var videoOptions:VideoConfOptions;
// NetConnection used for stream publishing
private var nc:NetConnection;
// NetStream used for stream publishing
private var ns:NetStream;
private var _url:String;
@ -98,9 +100,29 @@ package org.bigbluebutton.modules.videoconf.business
private function onSecurityError(event:NetStatusEvent):void{
}
public function get connection():NetConnection{
public function get publishConnection():NetConnection{
return this.nc;
}
public function getPlayConnectionFor(userID:String):NetConnection{
//TODO
// If connection does not exist
// Ask LB for path
// Open NetConnection
// Store stream name prefix
// Return connection
return new NetConnection();
}
public function getStreamNamePrefixFor(userID:String):String{
//TODO
// If does not exist
// Report
// Return empty
// Else
// Return prefix
return "";
}
public function startPublishing(e:StartBroadcastEvent):void{
ns.addEventListener( NetStatusEvent.NET_STATUS, onNetStatus );

View File

@ -299,7 +299,8 @@ package org.bigbluebutton.modules.videoconf.maps
closeWindow(userID);
var bbbUser:BBBUser = UsersUtil.getUser(userID);
window.startVideo(proxy.connection, bbbUser.streamName);
//TODO: change publishConnection to getPlayConnectionFor(userID)
window.startVideo(proxy.publishConnection, bbbUser.streamName);
webcamWindows.addWindow(window);
openWindow(window);
@ -325,7 +326,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function startPublishing(e:StartBroadcastEvent):void{
LogUtil.debug("VideoEventMapDelegate:: [" + me + "] startPublishing:: Publishing stream to: " + proxy.connection.uri + "/" + e.stream);
LogUtil.debug("VideoEventMapDelegate:: [" + me + "] startPublishing:: Publishing stream to: " + proxy.publishConnection.uri + "/" + e.stream);
streamName = e.stream;
proxy.startPublishing(e);
@ -487,4 +488,4 @@ package org.bigbluebutton.modules.videoconf.maps
}
}
}
}
}