diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as index 1aed3781cda0f8e8cdb70ba5723a27199bef52f7..48f89f46c795de5ed4a4ff4498432b3b824364df 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as @@ -37,6 +37,7 @@ package org.bigbluebutton.main.api import org.bigbluebutton.main.model.users.events.KickUserEvent; import org.bigbluebutton.main.model.users.events.RaiseHandEvent; import org.bigbluebutton.main.model.users.events.RoleChangeEvent; + import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent; import org.bigbluebutton.modules.phone.events.FlashCallConnectedEvent; import org.bigbluebutton.modules.phone.events.FlashCallDisconnectedEvent; import org.bigbluebutton.modules.phone.events.WebRTCCallEvent; @@ -381,8 +382,7 @@ package org.bigbluebutton.main.api private function handleJoinVoiceRequest():void { trace("handleJoinVoiceRequest"); - var showMicEvent:BBBEvent = new BBBEvent("SHOW_MIC_SETTINGS"); - _dispatcher.dispatchEvent(showMicEvent); + _dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION)); } private function handleLeaveVoiceRequest():void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/WebRTCCallManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/WebRTCCallManager.as index 1f77b353e474cc531474c558256034f234d5a62d..bb5e7a3a1f41b3e4690640ca1e4fdaada4cb0bae 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/WebRTCCallManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/WebRTCCallManager.as @@ -52,6 +52,8 @@ package org.bigbluebutton.modules.phone.managers } private function isWebRTCSupported():Boolean { + trace(LOG + "- isWebRTCSupported - ExternalInterface.available=[" + ExternalInterface.available + + "], isWebRTCAvailable=[" + ExternalInterface.call("isWebRTCAvailable") + "]"); return (ExternalInterface.available && ExternalInterface.call("isWebRTCAvailable")); } @@ -60,10 +62,20 @@ package org.bigbluebutton.modules.phone.managers } public function initialize():void { + + } + + + private function checkIfToUseWebRTC():Boolean { options = new PhoneOptions(); - if (options.useWebRTCIfAvailable && isWebRTCSupported()) { - usingWebRTC = true; - } + var webRTCSupported:Boolean = isWebRTCSupported(); + + trace(LOG + "- checkIfToUseWebRTC - useWebRTCIfAvailable=[" + options.useWebRTCIfAvailable + + "], isWebRTCSupported=[" + webRTCSupported + "]"); + if (options.useWebRTCIfAvailable && webRTCSupported) { + return true; + } + return false; } private function startWebRTCEchoTest():void { @@ -125,6 +137,8 @@ package org.bigbluebutton.modules.phone.managers public function handleJoinVoiceConferenceCommand(event:JoinVoiceConferenceCommand):void { trace(LOG + "handleJoinVoiceConferenceCommand - usingWebRTC: " + usingWebRTC + ", event.mic: " + event.mic); + usingWebRTC = checkIfToUseWebRTC(); + if (!usingWebRTC || !event.mic) return; if (options.skipCheck || echoTestDone) {