Merge pull request #711 from riadvice/lifecycle-update

Updated application lifecycle: load the configuration before display
This commit is contained in:
Richard Alam 2015-07-29 11:41:56 -04:00
commit b5c2a0a7e9
4 changed files with 62 additions and 15 deletions

View File

@ -19,12 +19,10 @@ You should have received a copy of the GNU Lesser General Public License along
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:views="*"
<core:BBBApplication xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:core="org.bigbluebutton.core.*"
pageTitle="BigBlueButton"
layout="absolute"
preloader="org.bigbluebutton.main.model.BigBlueButtonPreloader">
<views:BigBlueButtonMainContainer id="bbbShell"/>
</mx:Application>
</core:BBBApplication>

View File

@ -71,18 +71,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
protected function init():void {
setupTooltips();
setupAPI();
EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler);
BBB.initConfigManager();
BBB.initVideoProfileManager();
globalModifier = ExternalInterface.call("determineGlobalModifier");
}
private function configLoadedEventHandler(e:Event):void {
LogUtil.debug("***** Config Loaded ****");
mainShell.initOptions(null);
ShortcutOptions.initialize();
}
private var api:ExternalApiCallbacks;
private function setupAPI():void {

View File

@ -0,0 +1,58 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2015 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.core
{
import flash.events.Event;
import mx.core.Application;
import mx.events.FlexEvent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.main.model.ShortcutOptions;
public class BBBApplication extends Application
{
public var bbbShell:BigBlueButtonMainContainer;
public function BBBApplication()
{
super();
addEventListener(FlexEvent.PREINITIALIZE, preinitializeEventHandler);
}
private function preinitializeEventHandler(event:FlexEvent):void
{
EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler);
BBB.initConfigManager();
}
private function configLoadedEventHandler(e:Event):void
{
LogUtil.debug("***** Config Loaded ****");
bbbShell=new BigBlueButtonMainContainer();
this.addChild(bbbShell);
bbbShell.mainShell.initOptions(null);
ShortcutOptions.initialize();
}
}
}

View File

@ -42,7 +42,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{ConnectionFailedEvent.CONNECTION_CLOSED}" method="attemptReconnect" />
<mate:Listener type="{ConnectionFailedEvent.UNKNOWN_REASON}" method="attemptReconnect" />
<mate:Listener type="{ConnectionFailedEvent.CONNECTION_REJECTED}" method="attemptReconnect" />
<mate:Listener type="configLoadedEvent" method="initOptions" />
<mate:Listener type="{FlashMicSettingsEvent.FLASH_MIC_SETTINGS}" method="handleFlashMicSettingsEvent" />
<mate:Listener type="{WebRTCEchoTestEvent.WEBRTC_ECHO_TEST_CONNECTING}" method="handleWebRTCEchoTestConnectingEvent" />
<mate:Listener type="{WebRTCMediaEvent.WEBRTC_MEDIA_REQUEST}" method="handleWebRTCMediaRequestEvent" />