New module loading progress indicator
This commit is contained in:
parent
6210838da6
commit
2afa932c0f
@ -56,6 +56,7 @@ bbb.viewers.viewersGrid.statusItemRenderer.presIcon.toolTip = Presenter
|
||||
bbb.viewers.presentBtn.toolTip = Select web participant to be presenter.
|
||||
bbb.viewers.raiseHandBtn.toolTip = Click to raise hand.
|
||||
bbb.viewers.presentBtn.label = Switch Presenter
|
||||
bbb.viewers.kickUserBtn.toolTip = Kick User
|
||||
|
||||
# Presentation
|
||||
## PresentationWindow.mxml
|
||||
|
@ -10,14 +10,14 @@
|
||||
<module name="ChatModule" url="ChatModule.swf?v=VERSION"
|
||||
uri="rtmp://HOST/bigbluebutton"
|
||||
dependsOn="ViewersModule"
|
||||
translationOn="false"
|
||||
translationOn="true"
|
||||
translationEnabled="true"
|
||||
/>
|
||||
|
||||
<module name="ViewersModule" url="ViewersModule.swf?v=VERSION"
|
||||
uri="rtmp://HOST/bigbluebutton"
|
||||
host="http://HOST/bigbluebutton/api/enter"
|
||||
allowKickUser="true"
|
||||
allowKickUser="false"
|
||||
/>
|
||||
|
||||
<module name="ListenersModule" url="ListenersModule.swf?v=VERSION"
|
||||
|
@ -7,9 +7,11 @@ package org.bigbluebutton.main.events
|
||||
public static const MODULE_LOAD_PROGRESS:String = "MODULE_LOAD_PROGRESS";
|
||||
public static const MODULE_LOAD_READY:String = "MODULE_LOAD_READY";
|
||||
public static const ALL_MODULES_LOADED:String = "ALL_MODULES_LOADED";
|
||||
public static const MODULE_LOADING_STARTED:String = "MODULE_LOADING_START";
|
||||
|
||||
public var moduleName:String;
|
||||
public var progress:Number;
|
||||
public var numModules:int;
|
||||
|
||||
public function ModuleLoadEvent(type:String)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ package org.bigbluebutton.main.model
|
||||
public var helpURL:String;
|
||||
public var application:String;
|
||||
public var host:String;
|
||||
public var numModules:int;
|
||||
|
||||
private var loadedListener:Function;
|
||||
|
||||
@ -29,6 +30,8 @@ package org.bigbluebutton.main.model
|
||||
|
||||
public function ConfigParameters(loadedListener:Function, file:String = FILE_PATH)
|
||||
{
|
||||
|
||||
this.numModules = 0;
|
||||
this.loadedListener = loadedListener;
|
||||
_urlLoader = new URLLoader();
|
||||
_urlLoader.addEventListener(Event.COMPLETE, handleComplete);
|
||||
@ -65,6 +68,7 @@ package org.bigbluebutton.main.model
|
||||
for each(item in list){
|
||||
var mod:ModuleDescriptor = new ModuleDescriptor(item);
|
||||
_modules[item.@name] = mod;
|
||||
numModules++;
|
||||
}
|
||||
return _modules;
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ package org.bigbluebutton.main.model.modules
|
||||
}
|
||||
|
||||
public function startUserServices():void {
|
||||
modulesDispatcher.sendModuleLoadingStartedEvent(configParameters.numModules);
|
||||
modulesDispatcher.sendStartUserServicesEvent(configParameters.application, configParameters.host);
|
||||
}
|
||||
|
||||
|
@ -65,5 +65,11 @@ package org.bigbluebutton.main.model.modules
|
||||
portFailEvent.app = app;
|
||||
dispatcher.dispatchEvent(portFailEvent);
|
||||
}
|
||||
|
||||
public function sendModuleLoadingStartedEvent(numModules:int):void{
|
||||
var event:ModuleLoadEvent = new ModuleLoadEvent(ModuleLoadEvent.MODULE_LOADING_STARTED);
|
||||
event.numModules = numModules;
|
||||
dispatcher.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:ProgressBar xmlns:mate="http://mate.asfusion.com/" xmlns:mx="http://www.adobe.com/2006/mxml" labelPlacement="bottom" minimum="0" maximum="100" mode="manual" >
|
||||
|
||||
<mate:Listener type="{ModuleLoadEvent.ALL_MODULES_LOADED}" method="removeLoadingInfo" />
|
||||
<mate:Listener type="{ModuleLoadEvent.MODULE_LOAD_PROGRESS}" method="moduleLoadProgress" />
|
||||
<mate:Listener type="{ModuleLoadEvent.MODULE_LOAD_READY}" method="moduleLoadReady" />
|
||||
<mate:Listener type="{ModuleLoadEvent.MODULE_LOADING_STARTED}" method="moduleLoadingStarted" />
|
||||
<mate:Listener type="{PortTestEvent.TEST_RTMP}" method="testRTMP" />
|
||||
<mate:Listener type="{PortTestEvent.TEST_RTMPT}" method="testRTMPT" />
|
||||
<mate:Listener type="{PortTestEvent.PORT_TEST_SUCCESS}" method="portTestSuccess" />
|
||||
<mate:Listener type="{PortTestEvent.TUNNELING_FAILED}" method="tunnelingFailed" />
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.main.events.ModuleLoadEvent;
|
||||
import org.bigbluebutton.main.events.PortTestEvent;
|
||||
|
||||
private var numModules:int;
|
||||
private var counter:int = 0;
|
||||
private var progress:Number = 0;
|
||||
|
||||
private function removeLoadingInfo(e:ModuleLoadEvent):void{
|
||||
this.visible = false;
|
||||
}
|
||||
|
||||
private function moduleLoadProgress(e:ModuleLoadEvent):void{
|
||||
var incremental:Number = e.progress;
|
||||
var currentProgress:Number = counter/numModules + incremental/numModules;
|
||||
this.setProgress(currentProgress, 100);
|
||||
}
|
||||
|
||||
private function moduleLoadReady(e:ModuleLoadEvent):void{
|
||||
counter ++;
|
||||
this.setProgress(counter/numModules, 100)
|
||||
}
|
||||
|
||||
private function moduleLoadingStarted(e:ModuleLoadEvent):void{
|
||||
this.numModules = e.numModules;
|
||||
this.label = "Loading " + this.numModules + " modules";
|
||||
}
|
||||
|
||||
private function testRTMP(e:PortTestEvent):void{
|
||||
this.label = "Testing RTMP Connection";
|
||||
}
|
||||
|
||||
private function testRTMPT(e:PortTestEvent):void{
|
||||
this.label = "RTMP Failed. Attempting tunneling through port 80";
|
||||
}
|
||||
|
||||
private function portTestSuccess(e:PortTestEvent):void{
|
||||
this.label = "Port Test Success";
|
||||
}
|
||||
|
||||
private function tunnelingFailed(e:PortTestEvent):void{
|
||||
this.label = "Tunneling Failed. Please contact the server administrator";
|
||||
this.setStyle("barColor", "red");
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
</mx:ProgressBar>
|
@ -34,13 +34,8 @@
|
||||
<mate:Listener type="{CloseWindowEvent.CLOSE_WINDOW_EVENT}" method="handleCloseWindowEvent"/>
|
||||
<mate:Listener type="{AddUIComponentToMainCanvas.ADD_COMPONENT}" method="addComponentToCanvas" />
|
||||
|
||||
<mate:Listener type="{ModuleLoadEvent.ALL_MODULES_LOADED}" method="removeLoadingInfo" />
|
||||
<mate:Listener type="{ConnectionFailedEvent.CONNECTION_LOST}" method="handleLogout" />
|
||||
<mate:Listener type="{LogoutEvent.USER_LOGGED_OUT}" method="handleLogout" />
|
||||
<mate:Listener type="{PortTestEvent.TEST_RTMP}" method="rtmpTest" />
|
||||
<mate:Listener type="{PortTestEvent.PORT_TEST_FAILED}" method="rtmptTest" />
|
||||
<mate:Listener type="{PortTestEvent.TUNNELING_FAILED}" method="rtmptFailed" />
|
||||
<mate:Listener type="{ModuleLoadEvent.MODULE_LOAD_PROGRESS}" method="updateModuleLoadProgress" />
|
||||
|
||||
<api:APIEventMap />
|
||||
|
||||
@ -192,12 +187,6 @@
|
||||
localeWindow.y = point1.y + 25;
|
||||
}
|
||||
|
||||
private function removeLoadingInfo(e:ModuleLoadEvent):void{
|
||||
statusInfo.text = "";
|
||||
statusProgress.text = "";
|
||||
statusInfo2.text = "";
|
||||
}
|
||||
|
||||
private function handleLogout(e:Event):void{
|
||||
if (logoutWindow != null) return;
|
||||
logoutWindow = LoggedOutWindow(PopUpManager.createPopUp( mdiCanvas, LoggedOutWindow, false));
|
||||
@ -215,33 +204,12 @@
|
||||
mdiCanvas.removeAllWindows();
|
||||
}
|
||||
|
||||
private function updateModuleLoadProgress(e:ModuleLoadEvent):void{
|
||||
statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.loaded',[e.moduleName, e.progress]);
|
||||
}
|
||||
|
||||
private function rtmpTest(e:PortTestEvent):void{
|
||||
//statusInfo.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo.testRTMPConnection');
|
||||
//statusInfo.text = "Please wait while we test your connection to the server."
|
||||
//statusInfo2.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo2.testRTMPConnection');
|
||||
//statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.testRTMPConnection', [e.hostname, e.app]);
|
||||
}
|
||||
|
||||
private function rtmptTest(e:PortTestEvent):void{
|
||||
statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.testRTMPTConnection', [e.hostname, e.app]);
|
||||
}
|
||||
|
||||
private function rtmptFailed(e:PortTestEvent):void{
|
||||
statusProgress.text = ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.cannotConnectServer');
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
<main:MainToolbar id="toolbar" dock="true" width="100%" height="30" visible="false" verticalAlign="middle"/>
|
||||
<main:MainCanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"
|
||||
effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}" width="100%" height="100%">
|
||||
<mx:Label x="200" y="400" id="statusInfo" text="{ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo',[numberOfModules])}"/>
|
||||
<mx:Label x="200" y="420" id="statusInfo2" text="{ResourceUtil.getInstance().getString('bbb.mainshell.statusInfo2')}" />
|
||||
<mx:Label x="200" y="440" id="statusProgress" text="{ResourceUtil.getInstance().getString('bbb.mainshell.statusProgress.loading')}"/>
|
||||
<main:MainCanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}" width="100%" height="100%">
|
||||
<main:LoadingBar id="progressBar" x="{this.width/2 - progressBar.width/2}" y="{this.height/2 - progressBar.height/2}" width="{this.width/2}" />
|
||||
</main:MainCanvas>
|
||||
<mx:ControlBar width="100%" height="20" paddingTop="0">
|
||||
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.mainshell.copyrightLabel2',[appVersion])}" id="copyrightLabel2"/>
|
||||
|
@ -162,7 +162,7 @@
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button id="kickUserBtn" icon="{kickIcon}"
|
||||
width="20" height="20"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.raiseHandBtn.toolTip')}"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.kickUserBtn.toolTip')}"
|
||||
click="kickUser()"/>
|
||||
<mx:Button id="raiseHandImage" icon="{handIcon}" toggle="true"
|
||||
width="20" height="20"
|
||||
|
Loading…
Reference in New Issue
Block a user