Merge branch 'auto-reconnect' into mconf-live0.6.4-auto-reconnect

This commit is contained in:
Pedro Beschorner Marin 2015-08-28 16:34:21 +00:00
commit 2b1a0274eb
8 changed files with 58 additions and 11 deletions

View File

@ -410,6 +410,13 @@ bbb.logout.confirm.title = Confirm Logout
bbb.logout.confirm.message = Are you sure you want to log out?
bbb.logout.confirm.yes = Yes
bbb.logout.confirm.no = No
bbb.connection.failure=Network failure
bbb.connection.reconnecting=Reconnecting
bbb.connection.reestablished=Connection reestablished
bbb.connection.bigbluebutton=BigBlueButton
bbb.connection.sip=SIP
bbb.connection.video=Video
bbb.connection.deskshare=Deskshare
bbb.notes.title = Notes
bbb.notes.cmpColorPicker.toolTip = Text Color
bbb.notes.saveBtn = Save

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -31,12 +31,14 @@ package org.bigbluebutton.core.managers
import mx.events.CloseEvent;
import mx.managers.PopUpManager;
import mx.utils.ObjectUtil;
import mx.collections.ArrayCollection;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.ClientStatusEvent;
import org.bigbluebutton.main.model.users.AutoReconnect;
import org.bigbluebutton.main.views.ReconnectionPopup;
import org.bigbluebutton.util.i18n.ResourceUtil;
public class ReconnectionManager
{
@ -48,6 +50,7 @@ package org.bigbluebutton.core.managers
public static const DESKSHARE_CONNECTION:String = "DESKSHARE_CONNECTION";
private var _connections:Dictionary = new Dictionary();
private var _reestablished:ArrayCollection = new ArrayCollection();
private var _reconnectTimer:Timer = new Timer(10000, 1);
private var _reconnectTimeout:Timer = new Timer(5000, 1);
private var _dispatcher:Dispatcher = new Dispatcher();
@ -141,10 +144,13 @@ package org.bigbluebutton.core.managers
reconnect();
}
_reestablished.addItem(type);
if (connectionDictEmpty) {
var msg:String = connectionReestablishedMessage();
_dispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.SUCCESS_MESSAGE_EVENT,
"Connection reestablished",
"Connection has been reestablished successfully"));
ResourceUtil.getInstance().getString('bbb.connection.reestablished'),
msg));
_reconnectTimeout.reset();
removePopUp();
@ -165,5 +171,30 @@ package org.bigbluebutton.core.managers
_popup = null;
}
}
private function connectionReestablishedMessage():String {
var msg:String = "";
for each (var conn:String in _reestablished) {
switch (conn) {
case BIGBLUEBUTTON_CONNECTION:
msg += ResourceUtil.getInstance().getString('bbb.connection.bigbluebutton');
break;
case SIP_CONNECTION:
msg += ResourceUtil.getInstance().getString('bbb.connection.sip');
break;
case VIDEO_CONNECTION:
msg += ResourceUtil.getInstance().getString('bbb.connection.video');
break;
case DESKSHARE_CONNECTION:
msg += ResourceUtil.getInstance().getString('bbb.connection.deskshare');
break;
default:
break;
}
msg += " ";
}
_reestablished.removeAll();
return msg;
}
}
}

View File

@ -74,6 +74,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function allModulesLoaded(e:ModuleLoadEvent):void{
if (parent != null)
parent.removeChild(this);
}

View File

@ -23,7 +23,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
title="{ResourceUtil.getInstance().getString('bbb.logout.title')}" showCloseButton="false" creationComplete="init()"
verticalScrollPolicy="off" horizontalScrollPolicy="off"
x="168" y="86" layout="vertical" width="400" height="100" horizontalAlign="center">
x="168" y="86" layout="vertical" width="400" height="110" horizontalAlign="center">
<mx:Script>
<![CDATA[
import mx.core.FlexGlobals;

View File

@ -26,7 +26,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
horizontalScrollPolicy="off"
horizontalAlign="center"
width="250"
title="Network failure">
title="{ResourceUtil.getInstance().getString('bbb.connection.failure')}">
<mx:Script>
<![CDATA[
@ -42,13 +42,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
>
<mx:Image id="typeImg" source="{typeImg.getStyle('refreshImage')}" width="34" height="34" styleName="statusImageStyle" />
</mx:Box>
<!-- <mx:Text
selectable="false"
text="{ResourceUtil.getInstance().getString('reconnecting')}"
width="100%"/> -->
<mx:Text
selectable="false"
text="Reconnecting"
text="{ResourceUtil.getInstance().getString('bbb.connection.reconnecting')}"
width="100%"/>
</mx:HBox>
</mx:Panel>

View File

@ -430,5 +430,12 @@
usingFlash = true;
startCall(true);
}
public function handleFlashLeftVoiceConference():void {
if (isConnected()) {
streamManager.stopStreams();
connectionManager.disconnect(true);
}
}
}
}

View File

@ -33,6 +33,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.phone.events.FlashCallDisconnectedEvent;
import org.bigbluebutton.modules.phone.events.FlashEchoTestHasAudioEvent;
import org.bigbluebutton.modules.phone.events.FlashEchoTestNoAudioEvent;
import org.bigbluebutton.modules.phone.events.FlashLeftVoiceConferenceEvent;
import org.bigbluebutton.modules.phone.events.FlashStartEchoTestCommand;
import org.bigbluebutton.modules.phone.events.FlashStopEchoTestCommand;
import org.bigbluebutton.modules.phone.events.FlashVoiceConnectionStatusEvent;
@ -108,6 +109,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<MethodInvoker generator="{FlashCallManager}" method="handleLeaveVoiceConferenceCommand" arguments="{event}"/>
</EventHandlers>
<EventHandlers type="{FlashLeftVoiceConferenceEvent.LEFT_VOICE_CONFERENCE}">
<MethodInvoker generator="{FlashCallManager}" method="handleFlashLeftVoiceConference"/>
</EventHandlers>
<EventHandlers type="{UseFlashModeCommand.USE_FLASH_MODE}">
<MethodInvoker generator="{FlashCallManager}" method="handleUseFlashModeCommand"/>
</EventHandlers>