diff --git a/bigbluebutton-client/resources/config.xml.template b/bigbluebutton-client/resources/config.xml.template index b40ec59dca..02adf713c4 100755 --- a/bigbluebutton-client/resources/config.xml.template +++ b/bigbluebutton-client/resources/config.xml.template @@ -42,6 +42,7 @@ autoJoin="false" skipCheck="false" showButton="true" + enabledEchoCancel="true" dependsOn="ViewersModule" /> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/PhoneOptions.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/PhoneOptions.as index eb0097b36d..a1a78b9839 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/PhoneOptions.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/PhoneOptions.as @@ -9,5 +9,8 @@ package org.bigbluebutton.modules.phone [Bindable] public var skipCheck:Boolean = false; + + [Bindable] + public var enabledEchoCancel:Boolean = false; } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/StreamManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/StreamManager.as index 2f3b47e95e..0f7eec03f2 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/StreamManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/StreamManager.as @@ -18,22 +18,22 @@ */ package org.bigbluebutton.modules.phone.managers { - import com.asfusion.mate.events.Dispatcher; - import flash.events.ActivityEvent; - import flash.events.AsyncErrorEvent; - import flash.events.IEventDispatcher; - import flash.events.NetStatusEvent; - import flash.events.StatusEvent; - import flash.media.Microphone; - import flash.media.MicrophoneEnhancedMode; - import flash.media.MicrophoneEnhancedOptions; - import flash.media.SoundCodec; - import flash.net.NetConnection; - import flash.net.NetStream; + import com.asfusion.mate.events.Dispatcher; + import flash.events.ActivityEvent; + import flash.events.AsyncErrorEvent; + import flash.events.IEventDispatcher; + import flash.events.NetStatusEvent; + import flash.events.StatusEvent; + import flash.media.Microphone; + import flash.media.MicrophoneEnhancedMode; + import flash.media.MicrophoneEnhancedOptions; + import flash.media.SoundCodec; + import flash.net.NetConnection; + import flash.net.NetStream; import org.bigbluebutton.common.LogUtil; import org.bigbluebutton.core.BBB; import org.bigbluebutton.main.events.BBBEvent; - import org.bigbluebutton.modules.phone.events.MicMutedEvent; + import org.bigbluebutton.modules.phone.PhoneOptions; import org.bigbluebutton.modules.phone.events.MicrophoneUnavailEvent; import org.bigbluebutton.modules.phone.events.PlayStreamStatusEvent; @@ -67,7 +67,13 @@ package org.bigbluebutton.modules.phone.managers { } private function setupMicrophone():void { - if (BBB.getFlashPlayerVersion() >= 10.3){ + var vxml:XML = BBB.getConfigForModule("PhoneModule"); + var phoneOptions:PhoneOptions = new PhoneOptions(); + if (vxml != null) { + phoneOptions.enabledEchoCancel = (vxml.@enabledEchoCancel.toString().toUpperCase() == "TRUE") ? true : false; + } + + if ((BBB.getFlashPlayerVersion() >= 10.3) && (phoneOptions.enabledEchoCancel)) { LogUtil.debug("Using acoustic echo cancellation."); mic = Microphone(Microphone["getEnhancedMicrophone"]()); var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions(); @@ -229,4 +235,4 @@ package org.bigbluebutton.modules.phone.managers { LogUtil.debug("Recieve ON METADATA from SIP"); } } -} \ No newline at end of file +}