put uri for Viewers module in modules.xml instead of reading it from the html wrapper.

git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@668 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Richard Alam 2008-11-05 16:28:50 +00:00
parent f3f26c0ca4
commit aa60de6feb
8 changed files with 21 additions and 31 deletions

View File

@ -12,8 +12,7 @@
private var _moduleId:String = "ViewersModule";
private var _moduleName:String = "Viewers Module";
private var _uri:String = "rtmp://localhost/conference/85115";
private var _username:String = "ralam";
private var _attributes:Object;
private function onCreationComplete():void {
trace("ViewersModule Initialized");
@ -35,23 +34,17 @@
return _moduleName;
}
public function set uri(uri:String):void {
_uri = uri;
}
public function get uri():String {
return _uri;
}
public function set username(name:String):void {
_username = name;
return _attributes.uri + "/";
}
public function get username():String {
return _username;
return _attributes.username;
}
public function start(attributes:Object):void {
_attributes = attributes;
ViewersFacade.getInstance().startup(this);
}

View File

@ -1,6 +1,6 @@
<modules>
<module name="ChatModule" url="ChatModule.swf" uri="rtmp://localhost/chatServer" />
<module name="ViewersModule" url="ViewersModule.swf" />
<module name="ViewersModule" url="ViewersModule.swf" uri="rtmp://localhost/conference" />
<module name="PresentationModule" url="PresentationModule.swf"
uri="rtmp://localhost/presentation" host="http://localhost" />
</modules>

View File

@ -32,11 +32,11 @@ package org.bigbluebutton.common
{
public static const RELATIVE_FILE_UPLOAD:String = "/bigbluebutton/file";
public static var red5Host:String;
public static var presentationHost:String;
public static var relativeFileUpload:String = RELATIVE_FILE_UPLOAD;
// public static var red5Host:String;
// public static var presentationHost:String;
// public static var relativeFileUpload:String = RELATIVE_FILE_UPLOAD;
public static const TEST_URL:String = testURL();
// public static const TEST_URL:String = testURL();
public static const VERSION:String = "0.35a";
@ -46,6 +46,7 @@ package org.bigbluebutton.common
* This is basicaly meant to ease development. Call this method when the application starts up.
*
*/
/*
public static function setHost():void{
if (testURL() != null){
red5Host = testURL();
@ -78,6 +79,6 @@ package org.bigbluebutton.common
return url;
}
*/
}
}

View File

@ -45,10 +45,7 @@ package org.bigbluebutton.main.view
public function MainApplicationShellMediator( viewComponent:MainApplicationShell )
{
super( NAME, viewComponent );
trace("red5:" + Constants.red5Host);
trace("present:" + Constants.presentationHost);
trace("url:" + Constants.TEST_URL);
super( NAME, viewComponent );
viewComponent.toolbar.addEventListener(MainApplicationConstants.LOGOUT_EVENT, onLogoutEventHandler);
}

View File

@ -20,7 +20,6 @@
protected function initializeShell():void
{
Constants.setHost();
trace("before startup in initShell");
facade.startup(this);
trace("After startup in initShell");

View File

@ -41,7 +41,7 @@ package org.bigbluebutton.modules.viewers.controller
facade.registerMediator(new ViewersModuleMediator(m));
facade.registerMediator(new ViewersEndpointMediator(m));
facade.registerMediator(new JoinWindowMediator());
facade.registerMediator(new JoinWindowMediator(m));
facade.registerMediator(new ViewersWindowMediator());
facade.registerProxy(new ViewersProxy(m.uri));
trace('Sending MODULE_STARTED for ViewersModule');

View File

@ -65,8 +65,7 @@ package org.bigbluebutton.modules.viewers.model.services
_netConnection.addEventListener( SecurityErrorEvent.SECURITY_ERROR, netSecurityError );
_netConnection.addEventListener( IOErrorEvent.IO_ERROR, netIOError );
try {
trace( "Connecting to " + _uri + " " + room + " " + username + " " + password);
try {
_netConnection.connect(_uri, room, username, password );
} catch( e : ArgumentError ) {

View File

@ -21,9 +21,9 @@ package org.bigbluebutton.modules.viewers.view
{
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.system.Capabilities;
import org.bigbluebutton.common.Constants;
import org.bigbluebutton.common.IBigBlueButtonModule;
import org.bigbluebutton.modules.viewers.ViewersFacade;
import org.bigbluebutton.modules.viewers.ViewersModuleConstants;
import org.bigbluebutton.modules.viewers.model.ViewersProxy;
@ -41,6 +41,7 @@ package org.bigbluebutton.modules.viewers.view
{
public static const NAME:String = "JoinWindowMediator";
private var _module:IBigBlueButtonModule;
private var _joinWindow:JoinWindow = new JoinWindow();
public static const LOGIN:String = "Attempt Login";
@ -49,9 +50,10 @@ package org.bigbluebutton.modules.viewers.view
* @param view
*
*/
public function JoinWindowMediator()
public function JoinWindowMediator(module:IBigBlueButtonModule)
{
super(NAME);
super(NAME, module);
_module = module;
_joinWindow.addEventListener(LOGIN, login);
_joinWindow.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
}
@ -142,8 +144,7 @@ package org.bigbluebutton.modules.viewers.view
}
_joinWindow.lblNote.text = "Attempting to Login";
var completeHost:String = "rtmp://" + Constants.red5Host + "/conference/" + room;
trace("loggin in: " + completeHost + " " + name + " " + password + " " + room);
var completeHost:String = _module.uri + room;
proxy.connect(completeHost, room, name, password);
}