From 5c1a656f6d6f4ff96a19bc8098dd3d85470bf019 Mon Sep 17 00:00:00 2001 From: Chad Pilkey <capilkey@gmail.com> Date: Tue, 5 Dec 2017 11:47:37 -0800 Subject: [PATCH] add a microphone warning for chrome on http --- .../locale/en_US/bbbResources.properties | 1 + .../main/views/AudioSelectionWindow.mxml | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-client/locale/en_US/bbbResources.properties b/bigbluebutton-client/locale/en_US/bbbResources.properties index db6da33f43..4b2c016458 100755 --- a/bigbluebutton-client/locale/en_US/bbbResources.properties +++ b/bigbluebutton-client/locale/en_US/bbbResources.properties @@ -66,6 +66,7 @@ bbb.micSettings.webrtc.waitingforice = Connecting bbb.micSettings.webrtc.transferring = Transferring bbb.micSettings.webrtc.endingecho = Joining audio bbb.micSettings.webrtc.endedecho = Echo test ended. +bbb.micPermissions.message.browserhttp = This server is not configured with SSL. As a result, {0} disables sharing of your microphone. bbb.micPermissions.firefox.title = Firefox Microphone Permissions bbb.micPermissions.firefox.message = Click Allow to give Firefox permission to use your microphone. bbb.micPermissions.chrome.title = Chrome Microphone Permissions diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml index 9634252304..ff59f04db3 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml @@ -35,6 +35,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <![CDATA[ import com.asfusion.mate.events.Dispatcher; + import mx.controls.Alert; + import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.core.Options; @@ -78,11 +80,18 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. vboxListen.percentWidth = 100; } } + + private function browserForcesHTTPS() : Boolean { + var result : Boolean = !BrowserCheck.isHttps() && ((BrowserCheck.isChrome() && BrowserCheck.browserMajorVersion >= "60") || (BrowserCheck.isOpera() && BrowserCheck.browserMajorVersion >= "47")); + return result; + } private function onMicClick():void { LOGGER.debug("AudioSelectionWindow - Share Microphone Clicked"); var dispatcher:Dispatcher = new Dispatcher(); - if (BrowserCheck.isPuffin46AndAbove() || (!BrowserCheck.isHttps() && ((BrowserCheck.isChrome() && BrowserCheck.browserMajorVersion >= "60") || (BrowserCheck.isOpera() && BrowserCheck.browserMajorVersion >= "47")))) { + if (browserForcesHTTPS()) { + Alert.show(ResourceUtil.getInstance().getString("bbb.micPermissions.message.browserhttp", [BrowserCheck.browserName])); + } else if (BrowserCheck.isPuffin46AndAbove()) { dispatcher.dispatchEvent(new UseFlashModeCommand()); } else { var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand(); -- GitLab