diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml index 24fa1a6deb71ee10a868c903c9ed4a08d90683fc..fa56f0b7343258e6c51f0c9b3da003ba0317a084 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml @@ -133,8 +133,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. break; case "Microphone.Unmuted": trace(LOG + "Access to the microphone has been allowed."); - mic.setLoopBack(true); - mic.setUseEchoSuppression(true); + // Comment these next 2-lines. We don't want the user hearing audio + // while testing mic levels. (richard mar 26, 2014) + // mic.setLoopBack(true); + // mic.setUseEchoSuppression(true); //http://stackoverflow.com/questions/2936925/no-mic-activity-with-setloopback-set-to-false-as3 //http://groups.yahoo.com/neo/groups/flexcoders/conversations/topics/144047 mic.gain = micRecordVolume.value; @@ -205,9 +207,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private function handleFlashEchoTestStoppedEvent(event:FlashEchoTestStoppedEvent):void { doingEchoTest = false; comboMicList.enabled = true; + echoTestButton.enabled = true; } private function handleFlashEchoTestStartedEvent(event:FlashEchoTestStartedEvent):void { + echoTestButton.enabled = false; showEchoTestAudioPrompt(); } @@ -216,13 +220,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. } private function echoTestButtonClickHandler():void { - if (echoTestButton.selected) { - comboMicList.enabled = false; - doingEchoTest = true; - dispatchEvent(new FlashStartEchoTestCommand(mic.index, mic.name)); - } else { - stopEchoTest(); - } + echoTestButton.enabled = false; + comboMicList.enabled = false; + doingEchoTest = true; + dispatchEvent(new FlashStartEchoTestCommand(mic.index, mic.name)); } private function onCancelClicked():void { @@ -269,10 +270,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private function noButtonClicked():void { trace(LOG + "Echo test failed."); - stopEchoTest(); + dispatchEvent(new FlashEchoTestNoAudioEvent()); setupForMicLoopbackTest(); } - + private function flashMicSettingsCreated():void { trace(LOG + "Available microphones: " + microphoneList); testMicrophoneLoopback(); @@ -358,7 +359,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <mx:Spacer height="10"/> <mx:HBox width="100%" horizontalAlign="right" horizontalGap="18"> <mx:Button id="echoTestButton" label="Echo Test" - click="echoTestButtonClickHandler()" toggle="true" styleName="micSettingsWindowPlaySoundButtonStyle" + click="echoTestButtonClickHandler()" styleName="micSettingsWindowPlaySoundButtonStyle" toolTip="{ResourceUtil.getInstance().getString('bbb.micSettings.playSound.toolTip')}"/> <mx:Button id="playButton" label="{ResourceUtil.getInstance().getString('bbb.micSettings.playSound')}" click="playButtonClickHandler()" toggle="true" styleName="micSettingsWindowPlaySoundButtonStyle" 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 858eed0881cddebbbe21b5b8b9c071db52e3e9d2..d41abf612ef137aa2a367acef66b6289c8afb120 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as @@ -29,13 +29,13 @@ private static const LOG:String = "Phone::FlashCallManager - "; private static const INITED:String = "initialized state"; - private static const CONNECTED:String = "connected state"; private static const DO_ECHO_TEST:String = "do echo test state"; private static const CALLING_INTO_ECHO_TEST:String = "calling into echo test state"; private static const IN_ECHO_TEST:String = "in echo test state"; private static const JOIN_VOICE_CONFERENCE:String = "join voice conference state"; private static const CALLING_INTO_CONFERENCE:String = "calling into conference state"; private static const IN_CONFERENCE:String = "in conference state"; + private static const STOP_ECHO_THEN_JOIN_CONF:String = "stop echo then join conf state"; private var state:String = INITED; @@ -117,7 +117,7 @@ connect(); } } - + private function callIntoEchoTest():void { if (isConnected()) { var destination:String = options.echoTestApp; @@ -163,6 +163,11 @@ connectionManager.doHangUp(); } + private function hangupEchoThenJoinVoiceConference():void { + state = STOP_ECHO_THEN_JOIN_CONF; + hangup(); + } + public function handleFlashStartEchoTestCommand(event:FlashStartEchoTestCommand):void { trace(LOG + "handling FlashStartEchoTestCommand. mic index=[" + event.micIndex + "] name=[" + event.micName + "]"); useMicIndex = event.micIndex; @@ -175,17 +180,18 @@ public function handleFlashStopEchoTestCommand(event:FlashStopEchoTestCommand):void { trace(LOG + "handling FlashStopEchoTestCommand."); if (state == IN_ECHO_TEST) { - hangup(); + hangup(); } } public function handleFlashEchoTestHasAudioEvent(event:FlashEchoTestHasAudioEvent):void { trace(LOG + "handling handleFlashEchoTestHasAudioEvent."); if (state == IN_ECHO_TEST) { - hangup(); + hangupEchoThenJoinVoiceConference(); + } else { + callIntoVoiceConference(); } - echoTestDone = true; - callIntoVoiceConference(); + echoTestDone = true; } public function handleFlashEchoTestNoAudioEvent(event:FlashEchoTestNoAudioEvent):void { @@ -228,6 +234,11 @@ trace(LOG + "Flash echo test stopped."); dispatcher.dispatchEvent(new FlashEchoTestStoppedEvent()); break; + case STOP_ECHO_THEN_JOIN_CONF: + trace(LOG + "Flash echo test stopped."); + dispatcher.dispatchEvent(new FlashEchoTestStoppedEvent()); + callIntoVoiceConference(); + break; } } 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 ee3a51b52fdee52a2eb9fdca81eae1b844d1d62f..cec15b51266abe6969eb58cf11c3e80778ea4b70 100755 --- 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,8 +32,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <mate:Listener type="{WebRtcCallConnectedEvent.WEBRTC_CALL_CONNECTED}" method="handleWebRtcCallConnectedEvent" /> <mate:Listener type="{WebRtcCallDisconnectedEvent.WEBRTC_CALL_DISCONNECTED}" method="handleWebRtcCallDisconnectedEvent" /> - - <mx:Script> <![CDATA[ import com.asfusion.mate.events.Dispatcher;