diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as
index 5b954f807c..ab65370835 100644
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as
@@ -213,6 +213,19 @@
}
public function initialize():void {
+ JSLog.debug(LOG + "Initializing FlashCallManager, current state: " + state);
+ trace(LOG + "Initializing FlashCallManager, current state: " + state);
+ switch (state) {
+ case STOP_ECHO_THEN_JOIN_CONF:
+ // if we initialize usingFlash here, we won't be able to hang up from
+ // the flash connection
+ JSLog.debug(LOG + "Invalid state for initialize, aborting...");
+ trace(LOG + "Invalid state for initialize, aborting...");
+ return;
+ default:
+ break;
+ }
+
printMics();
options = new PhoneOptions();
if (options.useWebRTCIfAvailable && isWebRTCSupported()) {
@@ -380,7 +393,6 @@
return;
}
hangup();
- initialize();
}
public function handleBecomeViewer():void {
@@ -422,6 +434,8 @@
}
public function handleUseFlashModeCommand():void {
+ JSLog.debug(LOG + "Using flash mode");
+ trace(LOG + "Using flash mode");
usingFlash = true;
startCall(true);
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/FlashCallEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/FlashCallEventMap.mxml
index ec5d98ef56..3106fb7b35 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/FlashCallEventMap.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/FlashCallEventMap.mxml
@@ -100,6 +100,7 @@ with BigBlueButton; if not, see .
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml
index 84ef9b9186..82d14de5e2 100644
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml
@@ -32,6 +32,7 @@ with BigBlueButton; if not, see .
+
@@ -49,6 +50,7 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.main.views.MainToolbar;
import org.bigbluebutton.modules.phone.PhoneOptions;
import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent;
+ import org.bigbluebutton.modules.phone.events.FlashEchoTestStoppedEvent;
import org.bigbluebutton.modules.phone.events.FlashJoinedListenOnlyVoiceConferenceEvent;
import org.bigbluebutton.modules.phone.events.FlashJoinedVoiceConferenceEvent;
import org.bigbluebutton.modules.phone.events.FlashLeftVoiceConferenceEvent;
@@ -79,7 +81,7 @@ with BigBlueButton; if not, see .
trace(LOG + "startPhone 2 enabled=[" + enabled + "] selected=[" + selected + "]");
JSLog.debug(LOG + "startPhone 2 enabled=[" + enabled + "] selected=[" + selected + "]");
if (this.selected) {
- if (defaultListenOnlyMode()) {
+ if (defaultListenOnlyMode) {
dispatcher.dispatchEvent(new LeaveVoiceConferenceCommand());
trace(LOG + "Sending Join Conference command");
@@ -99,7 +101,7 @@ with BigBlueButton; if not, see .
}
}
- private function defaultListenOnlyMode():Boolean {
+ private function get defaultListenOnlyMode():Boolean {
return (phoneOptions.listenOnlyMode && phoneOptions.forceListenOnly);
}
@@ -126,7 +128,7 @@ with BigBlueButton; if not, see .
private function onCreationComplete():void {
// when the button is added to the stage display the audio selection window if auto join is true
if (phoneOptions.autoJoin) {
- if (defaultListenOnlyMode()) {
+ if (defaultListenOnlyMode) {
var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
command.mic = true;
dispatcher.dispatchEvent(command);
@@ -135,7 +137,7 @@ with BigBlueButton; if not, see .
JSLog.debug(LOG + "Sending Show Audio Selection command");
dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION));
}
- } else if (defaultListenOnlyMode()) {
+ } else {
joinDefaultListenOnlyMode();
}
}
@@ -154,15 +156,10 @@ with BigBlueButton; if not, see .
}
private function onUserJoinedListenOnlyConference():void {
- this.selected = false;
- this.enabled = true;
-
+ JSLog.debug(LOG + "onUserJoinedListenOnlyConference enabled=[" + enabled + "] selected=[" + selected + "]");
trace(LOG + "onUserJoinedListenOnlyConference enabled=[" + enabled + "] selected=[" + selected + "]");
- JSLog.debug(LOG + "onUserJoinedListenOnlyConference enabled=[" + enabled + "] selected=[" + selected + "]");
- _currentState = DEFAULT_STATE;
- this.styleName = "voiceConfDefaultButtonStyle";
- this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.phone.toolTip.start');
- JSLog.debug(LOG + "onUserJoinedListenOnlyConference enabled=[" + enabled + "] selected=[" + selected + "]");
+
+ resetButtonState();
}
private function onUserLeftConference():void {
@@ -176,10 +173,12 @@ with BigBlueButton; if not, see .
JSLog.debug(LOG + "onUserLeftConference enabled=[" + enabled + "] selected=[" + selected + "]");
}
- private function joinDefaultListenOnlyMode():void {
- var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
- command.mic = false;
- dispatcher.dispatchEvent(command);
+ private function joinDefaultListenOnlyMode(micLeft:Boolean = true):void {
+ if (defaultListenOnlyMode && micLeft) {
+ var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
+ command.mic = false;
+ dispatcher.dispatchEvent(command);
+ }
}
private function handleFlashJoinedVoiceConferenceEvent(event:FlashJoinedVoiceConferenceEvent):void {
@@ -191,7 +190,7 @@ with BigBlueButton; if not, see .
private function handleFlashJoinedListenOnlyConferenceEvent(event:FlashJoinedListenOnlyVoiceConferenceEvent):void {
trace(LOG + "User has joined the listen only conference using flash");
JSLog.debug(LOG + "User has joined the listen only conference using flash");
- if (defaultListenOnlyMode()) {
+ if (defaultListenOnlyMode) {
onUserJoinedListenOnlyConference();
} else {
onUserJoinedConference();
@@ -203,9 +202,7 @@ with BigBlueButton; if not, see .
JSLog.debug(LOG + "User has left the conference using flash");
var micLeft:Boolean = (_currentState == ACTIVE_STATE);
onUserLeftConference();
- if (defaultListenOnlyMode() && micLeft) {
- joinDefaultListenOnlyMode();
- }
+ joinDefaultListenOnlyMode(micLeft);
}
private function handleWebRTCCallStartedEvent(event: WebRTCCallEvent):void {
@@ -218,10 +215,21 @@ with BigBlueButton; if not, see .
JSLog.debug(LOG + "User has left the conference using webrtc");
trace(LOG + "User has left the conference using webrtc");
onUserLeftConference();
- if (defaultListenOnlyMode()) {
- joinDefaultListenOnlyMode();
- }
+ joinDefaultListenOnlyMode();
}
+
+ private function handleStopEchoTestEvent(event:Event):void {
+ resetButtonState();
+ joinDefaultListenOnlyMode();
+ }
+
+ private function resetButtonState():void {
+ this.selected = false;
+ this.enabled = true;
+ _currentState = DEFAULT_STATE;
+ this.styleName = "voiceConfDefaultButtonStyle";
+ this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.phone.toolTip.start');
+ }
private function handleClosedAudioSelectionWindowEvent(event:AudioSelectionWindowEvent):void {
this.selected = false;
@@ -231,9 +239,7 @@ with BigBlueButton; if not, see .
_currentState = DEFAULT_STATE;
this.styleName = "voiceConfDefaultButtonStyle";
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.phone.toolTip.start');
- if (defaultListenOnlyMode()) {
- joinDefaultListenOnlyMode();
- }
+ joinDefaultListenOnlyMode();
}
//For whatever reason the tooltip does not update when localization is changed dynamically. Overrideing it here