- pass sessionToken to get configXML from bbb-web

This commit is contained in:
Richard Alam 2015-10-06 21:08:01 +00:00
parent 91fbc8c10c
commit 7968273501
7 changed files with 22 additions and 23 deletions

View File

@ -78,8 +78,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function queryForSessionToken():void {
trace("***** queryForSessionToken ****");
_timer = new Timer(5000, 6);
/** We attempt to query several times to try to get the sessionToken from the browser url.
* (ralam oct 6, 2015)
*/
_timer = new Timer(500, 6);
_timer.addEventListener(TimerEvent.TIMER, timerHandler);
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, completeHandler);
_timer.start();
@ -92,7 +94,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function timerHandler(e:TimerEvent):void{
trace("***** timerHandler ****");
if (getSessionToken() != "") {
_timer.stop();
BBB.getConfigManager().loadConfig();
@ -104,13 +105,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
trace("Failed to get session token.");
}
private function configLoadedEventHandler(e:Event):void {
LogUtil.initLogging();
trace("***** Config Loaded ****");
mainShell.initOptions(null);
ShortcutOptions.initialize();
}
private var api:ExternalApiCallbacks;
private function setupAPI():void {

View File

@ -56,7 +56,7 @@ package org.bigbluebutton.core.managers
urlLoader.addEventListener(Event.COMPLETE, handleComplete);
var date:Date = new Date();
var localeReqURL:String = buildRequestURL() + "?a=" + date.time;
var localeReqURL:String = buildRequestURL();
trace("::loadConfig [{0}]", [localeReqURL]);
trace(localeReqURL + " session=[" + sessionToken + "]");

View File

@ -25,12 +25,13 @@ package org.bigbluebutton.core.model
public class Config
{
private var config:XML = null;
private var _modules:Dictionary = new Dictionary();
private var _modules:Dictionary;
private var _numModules:int;
public function Config(config:XML)
{
this.config = config;
buildModuleDescriptors();
}
public function get help():Object {
@ -136,11 +137,18 @@ package org.bigbluebutton.core.model
}
public function getModules():Dictionary{
trace("Getting modules");
var list:XMLList = config.modules.module;
return _modules;
}
public function getModulesXML():XMLList{
return config.modules.module;
}
private function buildModuleDescriptors():Dictionary{
_modules = new Dictionary();
var list:XMLList = getModulesXML();
var item:XML;
for each(item in list){
trace("module=" + item.toXMLString());
var mod:ModuleDescriptor = new ModuleDescriptor(item);
_modules[item.@name] = mod;
_numModules++;

View File

@ -63,7 +63,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<EventHandlers type="{ConfigLoadedEvent.CONFIG_LOADED_EVENT}" >
<MethodInvoker generator="{ModulesProxy}" method="handleConfigLoaded" />
<MethodInvoker generator="{SkinningService}" method="loadSkins" arguments="{event.config.skinning}" />
<MethodInvoker generator="{SkinningService}" method="loadSkins"/>
</EventHandlers>
<EventHandlers type="{ModuleLoadEvent.START_ALL_MODULES}">

View File

@ -64,7 +64,7 @@ package org.bigbluebutton.main.model.modules
var resolver:DependancyResolver = new DependancyResolver();
sorted = resolver.buildDependencyTree(modules);
modulesDispatcher.sendConfigLoadedEvent();
modulesDispatcher.sendPortTestEvent();
}
public function loadConfig():void {

View File

@ -51,10 +51,6 @@ package org.bigbluebutton.main.model.modules
}
public function sendConfigLoadedEvent():void {
dispatcher.dispatchEvent(new ConfigLoadedEvent());
}
public function sendLoadProgressEvent(moduleName:String, loadProgress:Number):void{
var loadEvent:ModuleLoadEvent = new ModuleLoadEvent(ModuleLoadEvent.MODULE_LOAD_PROGRESS);
loadEvent.moduleName = moduleName;

View File

@ -172,6 +172,7 @@ class ApiController {
* JOIN API
*********************************************/
def join = {
println("#JOIN API")
String API_CALL = 'join'
log.debug CONTROLLER_NAME + "#${API_CALL}"
ApiErrors errors = new ApiErrors()