- pass sessionToken to get configXML from bbb-web
This commit is contained in:
parent
91fbc8c10c
commit
7968273501
@ -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();
|
||||
@ -103,14 +104,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private function completeHandler(e:TimerEvent):void {
|
||||
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 {
|
||||
|
@ -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 + "]");
|
||||
|
@ -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 {
|
||||
@ -134,13 +135,20 @@ package org.bigbluebutton.core.model
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getModules():Dictionary{
|
||||
return _modules;
|
||||
}
|
||||
|
||||
public function getModules():Dictionary{
|
||||
trace("Getting modules");
|
||||
var list:XMLList = config.modules.module;
|
||||
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++;
|
||||
|
@ -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}">
|
||||
|
@ -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 {
|
||||
|
@ -50,10 +50,6 @@ package org.bigbluebutton.main.model.modules
|
||||
dispatcher = new Dispatcher();
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user