From 51abc59bd8fe2f585036121be280d2b8bee0bedb Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Thu, 12 Oct 2017 17:07:52 -0300 Subject: [PATCH 1/4] Refactor BrowserCheck class to store browser data and call the "determineBrowser" external interface method only once. --- .../src/org/bigbluebutton/main/api/JSAPI.as | 6 -- .../main/views/AudioSelectionWindow.mxml | 8 +- .../main/views/MainApplicationShell.mxml | 18 ++-- .../phone/managers/WebRTCCallManager.as | 8 -- .../managers/ScreenshareManager.as | 2 +- .../modules/screenshare/utils/BrowserCheck.as | 51 ----------- .../utils/WebRTCScreenshareUtility.as | 1 + .../components/ScreensharePublishWindow.mxml | 2 - .../videoconf/model/VideoConfOptions.as | 6 +- .../util/browser/BrowserCheck.as | 91 +++++++++++++++++++ 10 files changed, 106 insertions(+), 87 deletions(-) delete mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/BrowserCheck.as create mode 100755 bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/JSAPI.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/JSAPI.as index dd6afc395f..cb0afcc914 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/JSAPI.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/JSAPI.as @@ -44,12 +44,6 @@ package org.bigbluebutton.main.api return false; } - public function getBrowserInfo():Array { - if (ExternalInterface.available) { - return ExternalInterface.call("determineBrowser"); - } - return ["unknown", 0, 0]; - } } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml index eee6319ad3..11871eb4fc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml @@ -44,18 +44,16 @@ with BigBlueButton; if not, see . import org.bigbluebutton.modules.phone.events.JoinVoiceConferenceCommand; import org.bigbluebutton.modules.phone.events.UseFlashModeCommand; import org.bigbluebutton.modules.phone.models.PhoneOptions; + import org.bigbluebutton.util.browser.BrowserCheck; import org.bigbluebutton.util.i18n.ResourceUtil; private static const LOGGER:ILogger = getClassLogger(AudioSelectionWindow); private var phoneOptions:PhoneOptions; - private var browserInfo:Array; private function init():void { phoneOptions = Options.getOptions(PhoneOptions) as PhoneOptions; - browserInfo = JSAPI.getInstance().getBrowserInfo(); - if (!phoneOptions.listenOnlyMode) btnListenOnly.enabled = false; @@ -75,7 +73,7 @@ with BigBlueButton; if not, see . } // If Puffin browser is deteted and version is less than 4.6 - if (browserInfo[0] == "Puffin" && String(browserInfo[2]).substr(0, 3) < "4.6") { + if (BrowserCheck.isPuffinBelow46()) { vboxListen.percentWidth = 100; } } @@ -83,7 +81,7 @@ with BigBlueButton; if not, see . private function onMicClick():void { LOGGER.debug("AudioSelectionWindow - Share Microphone Clicked"); var dispatcher:Dispatcher = new Dispatcher(); - if (browserInfo[0] == "Puffin" && String(browserInfo[2]).substr(0, 3) >= "4.6") { + if (BrowserCheck.isPuffin46AndAbove()) { dispatcher.dispatchEvent(new UseFlashModeCommand()); } else { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml index f618e7a54d..f868abcf1a 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml @@ -150,6 +150,7 @@ with BigBlueButton; if not, see . import org.bigbluebutton.modules.phone.events.WebRTCEchoTestEvent; import org.bigbluebutton.modules.phone.events.WebRTCMediaEvent; import org.bigbluebutton.modules.phone.models.PhoneOptions; + import org.bigbluebutton.util.browser.BrowserCheck; import org.bigbluebutton.modules.users.model.UsersOptions; import org.bigbluebutton.modules.users.views.BreakoutRoomSettings; import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent; @@ -492,21 +493,19 @@ with BigBlueButton; if not, see . private function versionCheck():void { var browserOptions : BrowserVersionsOptions = Options.getOptions(BrowserVersionsOptions) as BrowserVersionsOptions; if (!StringUtils.isEmpty(browserOptions.chrome) && !StringUtils.isEmpty(browserOptions.firefox) && !StringUtils.isEmpty(browserOptions.flash)) { - //find browser version - var browserVersion:Array = ExternalInterface.call("determineBrowser"); //check browser version - if ((browserVersion[0].toString().toLowerCase() == "chrome" && browserVersion[1] < browserOptions.chrome) || browserVersion[0].toString().toLowerCase() == "firefox" && browserVersion[1] < browserOptions.firefox) { + if ((BrowserCheck.isChrome() && BrowserCheck.browserMajorVersion < browserOptions.chrome) || BrowserCheck.isFirefox() && BrowserCheck.browserMajorVersion < browserOptions.firefox) { globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT, ResourceUtil.getInstance().getString("bbb.clientstatus.browser.title"), - ResourceUtil.getInstance().getString("bbb.clientstatus.browser.message", [browserVersion[0]+" "+browserVersion[1]]), + ResourceUtil.getInstance().getString("bbb.clientstatus.browser.message", [BrowserCheck.browserName+" "+BrowserCheck.browserMajorVersion]), 'bbb.clientstatus.browser.message')); } //find flash version var flashVersion:Object = getFlashVersion(); //check flash version - if ((flashVersion.os == 'LNX' && browserVersion[0].toString().toLowerCase() != "chrome" && flashVersion.major < 11) || - ((flashVersion.os != 'LNX' || browserVersion[0].toString().toLowerCase() == "chrome") && flashVersion.major < browserOptions.flash)) { + if ((flashVersion.os == 'LNX' && !BrowserCheck.isChrome() && flashVersion.major < 11) || + ((flashVersion.os != 'LNX' || BrowserCheck.isChrome()) && flashVersion.major < browserOptions.flash)) { globalDispatcher.dispatchEvent(new ClientStatusEvent(ClientStatusEvent.WARNING_MESSAGE_EVENT, ResourceUtil.getInstance().getString("bbb.clientstatus.flash.title"), ResourceUtil.getInstance().getString("bbb.clientstatus.flash.message", [flashVersion.major+"."+flashVersion.minor+"."+flashVersion.build]), @@ -629,9 +628,8 @@ with BigBlueButton; if not, see . private function handleWebRTCMediaRequestEvent(event:WebRTCMediaEvent):void { var options:PhoneOptions = new PhoneOptions(); if (!options.showMicrophoneHint) return; - var browser:String = ExternalInterface.call("determineBrowser")[0]; var browserPermissionHelper:BrowserPermissionHelper = PopUpUtil.createModalPopUp(mdiCanvas, BrowserPermissionHelper, false) as BrowserPermissionHelper; - if (browser == "Firefox") { + if (BrowserCheck.isFirefox()) { if (browserPermissionHelper) { if (Capabilities.os.indexOf("Mac") >= 0){ browserPermissionHelper.currentState = "firefoxMicMacOSX"; @@ -642,7 +640,7 @@ with BigBlueButton; if not, see . browserPermissionHelper.x = 50; browserPermissionHelper.y = 200; } - } else if (browser == "Chrome") { + } else if (BrowserCheck.isChrome()) { if (browserPermissionHelper) { browserPermissionHelper.currentState = "chromeMic"; browserPermissionHelper.x = 50; @@ -666,7 +664,7 @@ with BigBlueButton; if not, see . } private function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void { - if (ExternalInterface.call("determineBrowser")[0] == "Chrome") { + if (BrowserCheck.isChrome()) { // Show browserPermissionHelper component after showing the webcam window due event listeners registration order setTimeout(showbrowserPermissionHelper, 100); } 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 e21ee048af..732d640602 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/WebRTCCallManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/WebRTCCallManager.as @@ -14,7 +14,6 @@ package org.bigbluebutton.modules.phone.managers import org.as3commons.logging.util.jsonXify; import org.bigbluebutton.core.Options; import org.bigbluebutton.core.UsersUtil; - import org.bigbluebutton.main.api.JSAPI; import org.bigbluebutton.main.events.ClientStatusEvent; import org.bigbluebutton.main.model.users.AutoReconnect; import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent; @@ -36,8 +35,6 @@ package org.bigbluebutton.modules.phone.managers private static const LOGGER:ILogger = getClassLogger(WebRTCCallManager); private const MAX_RETRIES:Number = 3; - private var browserType:String = "unknown"; - private var browserVersion:int = 0; private var dispatcher:Dispatcher = new Dispatcher(); private var echoTestDone:Boolean = false; @@ -50,11 +47,6 @@ package org.bigbluebutton.modules.phone.managers private var reconnecting:Boolean = false; public function WebRTCCallManager() { - var browserInfo:Array = JSAPI.getInstance().getBrowserInfo(); - if (browserInfo != null) { - browserType = browserInfo[0]; - browserVersion = browserInfo[1]; - } options = Options.getOptions(PhoneOptions) as PhoneOptions; // only show the warning if the admin has enabled WebRTC diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/ScreenshareManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/ScreenshareManager.as index 3f6ce65b49..031bbe8f8f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/ScreenshareManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/ScreenshareManager.as @@ -36,7 +36,7 @@ package org.bigbluebutton.modules.screenshare.managers { import org.bigbluebutton.modules.screenshare.model.ScreenshareModel; import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions; import org.bigbluebutton.modules.screenshare.services.ScreenshareService; - import org.bigbluebutton.modules.screenshare.utils.BrowserCheck; + import org.bigbluebutton.util.browser.BrowserCheck; public class ScreenshareManager { private static const LOGGER:ILogger = getClassLogger(ScreenshareManager); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/BrowserCheck.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/BrowserCheck.as deleted file mode 100755 index fb83f9057f..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/BrowserCheck.as +++ /dev/null @@ -1,51 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2016 BigBlueButton Inc. and by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 3.0 of the License, or (at your option) any later -* version. -* -* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with BigBlueButton; if not, see . -* -*/ - -package org.bigbluebutton.modules.screenshare.utils -{ - import flash.external.ExternalInterface; - - import org.as3commons.logging.api.ILogger; - import org.as3commons.logging.api.getClassLogger; - - public class BrowserCheck { - private static const LOGGER:ILogger = getClassLogger(BrowserCheck); - - public static function isWebRTCSupported():Boolean { - /*LOGGER.debug("isWebRTCSupported - ExternalInterface.available=[{0}], isWebRTCAvailable=[{1}]", [ExternalInterface.available, ExternalInterface.call("isWebRTCAvailable")]);*/ - return (ExternalInterface.available && ExternalInterface.call("isWebRTCAvailable")); - } - - public static function isChrome():Boolean { - var browser:Array = ExternalInterface.call("determineBrowser"); - return browser[0] == "Chrome"; - } - - public static function isFirefox():Boolean { - var browser:Array = ExternalInterface.call("determineBrowser"); - return browser[0] == "Firefox"; - } - - public static function isHttps():Boolean { - var url:String = ExternalInterface.call("window.location.href.toString"); - var httpsPattern:RegExp = /^https/; - return httpsPattern.test(url); - } - } -} diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/WebRTCScreenshareUtility.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/WebRTCScreenshareUtility.as index 49c52d33ba..3cafe37827 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/WebRTCScreenshareUtility.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/utils/WebRTCScreenshareUtility.as @@ -26,6 +26,7 @@ package org.bigbluebutton.modules.screenshare.utils import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.core.Options; import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions; + import org.bigbluebutton.util.browser.BrowserCheck; public class WebRTCScreenshareUtility { private static const LOGGER:ILogger = getClassLogger(WebRTCScreenshareUtility); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/view/components/ScreensharePublishWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/view/components/ScreensharePublishWindow.mxml index 52461fc6ae..839f808a5a 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/view/components/ScreensharePublishWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/view/components/ScreensharePublishWindow.mxml @@ -128,8 +128,6 @@ with BigBlueButton; if not, see . os = ""; } - browser = ExternalInterface.call("determineBrowser")[0]; - windowControls.maximizeRestoreBtn.enabled = false; titleBarOverlay.tabIndex = dsOptions.baseTabIndex; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as index 2df9f2f817..9fd1390157 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as @@ -18,7 +18,7 @@ */ package org.bigbluebutton.modules.videoconf.model { import org.bigbluebutton.core.Options; - import org.bigbluebutton.main.api.JSAPI; + import org.bigbluebutton.util.browser.BrowserCheck; public class VideoConfOptions extends Options { public var uri:String = "rtmp://localhost/video"; @@ -58,10 +58,8 @@ package org.bigbluebutton.modules.videoconf.model { } override protected function handleExtraData():void { - var browserInfo:Array = JSAPI.getInstance().getBrowserInfo(); - // If we are using Puffin browser - if (browserInfo[0] == "Puffin" && String(browserInfo[2]).substr(0, 3) < "4.6") { + if (BrowserCheck.isPuffinBelow46()) { showButton = false; } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as b/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as new file mode 100755 index 0000000000..dfcc645096 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as @@ -0,0 +1,91 @@ +/** + * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ + * + * Copyright (c) 2016 BigBlueButton Inc. and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BigBlueButton; if not, see . + * + */ + +package org.bigbluebutton.util.browser { + import flash.external.ExternalInterface; + + import org.as3commons.lang.StringUtils; + import org.as3commons.logging.api.ILogger; + import org.as3commons.logging.api.getClassLogger; + + public class BrowserCheck { + private static const LOGGER:ILogger = getClassLogger(BrowserCheck); + + private static var _browserName:String; + + private static var _majorVersion:String; + + private static var _fullVersion:String; + + // The function below is called in $cinit, while the class is used for the first time. + getBrowserInfo(); + + public static function isWebRTCSupported():Boolean { + /*LOGGER.debug("isWebRTCSupported - ExternalInterface.available=[{0}], isWebRTCAvailable=[{1}]", [ExternalInterface.available, ExternalInterface.call("isWebRTCAvailable")]);*/ + return (ExternalInterface.available && ExternalInterface.call("isWebRTCAvailable")); + } + + public static function get browserName():String { + return _browserName; + } + + public static function get browserMajorVersion():String { + return _majorVersion; + } + + public static function get browserFullVersion():String { + return _fullVersion; + } + + public static function isChrome():Boolean { + return _browserName.toLowerCase() == "chrome"; + } + + public static function isFirefox():Boolean { + return _browserName.toLowerCase() == "firefox"; + } + + public static function isPuffinBelow46():Boolean { + return _browserName.toLowerCase() == "puffin" && String(_fullVersion).substr(0, 3) < "4.6"; + } + + public static function isPuffin46AndAbove():Boolean { + return browserName.toLowerCase() == "puffin" && String(_fullVersion).substr(0, 3) >= "4.6"; + } + + private static function getBrowserInfo():void { + if (ExternalInterface.available && StringUtils.isEmpty(browserName)) { + var browserInfo:Array = ExternalInterface.call("determineBrowser"); + _browserName = browserInfo[0]; + _majorVersion = String(browserInfo[1]); + _fullVersion = String(browserInfo[2]); + } else { + _browserName = "unknown"; + _majorVersion = "0"; + _fullVersion = "0"; + } + } + + public static function isHttps():Boolean { + var url:String = ExternalInterface.call("window.location.href.toString"); + var httpsPattern:RegExp = /^https/; + return httpsPattern.test(url); + } + } +} From 58f60efe4016c1115cb96342a81c59c15d2504fd Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Thu, 12 Oct 2017 18:21:20 -0300 Subject: [PATCH 2/4] Improve opera browser detection. --- bigbluebutton-client/resources/prod/lib/bbb_blinker.js | 6 ++---- .../src/org/bigbluebutton/util/browser/BrowserCheck.as | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bigbluebutton-client/resources/prod/lib/bbb_blinker.js b/bigbluebutton-client/resources/prod/lib/bbb_blinker.js index beb32772dd..eded9d29f0 100755 --- a/bigbluebutton-client/resources/prod/lib/bbb_blinker.js +++ b/bigbluebutton-client/resources/prod/lib/bbb_blinker.js @@ -97,11 +97,9 @@ function determineBrowser() var nameOffset,verOffset,ix; // In Opera, the true version is after "Opera" or after "Version" - if ((verOffset=nAgt.indexOf("Opera"))!=-1) { + if ((verOffset=nAgt.indexOf("OPR/"))!=-1) { browserName = "Opera"; - fullVersion = nAgt.substring(verOffset+6); - if ((verOffset=nAgt.indexOf("Version"))!=-1) - fullVersion = nAgt.substring(verOffset+8); + fullVersion = nAgt.substring(verOffset+4); } // In MSIE, the true version is after "MSIE" in userAgent else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as b/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as index dfcc645096..7325903ba6 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as +++ b/bigbluebutton-client/src/org/bigbluebutton/util/browser/BrowserCheck.as @@ -57,6 +57,10 @@ package org.bigbluebutton.util.browser { return _browserName.toLowerCase() == "chrome"; } + public static function isOpera():Boolean { + return _browserName.toLowerCase() == "opera"; + } + public static function isFirefox():Boolean { return _browserName.toLowerCase() == "firefox"; } From 770947c06574aa98909f787692d8ff6b1b168a2e Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Thu, 12 Oct 2017 18:30:45 -0300 Subject: [PATCH 3/4] Show a message when accessing webcam from HTTP using chrome >= 60 or opera >= 47 --- .../locale/en_US/bbbResources.properties | 1 + .../videoconf/views/ToolbarPopupButton.mxml | 44 ++++++++++++------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/bigbluebutton-client/locale/en_US/bbbResources.properties b/bigbluebutton-client/locale/en_US/bbbResources.properties index a071e467ff..9c5f4dcafa 100755 --- a/bigbluebutton-client/locale/en_US/bbbResources.properties +++ b/bigbluebutton-client/locale/en_US/bbbResources.properties @@ -369,6 +369,7 @@ bbb.video.publish.closeBtn.accessName = Close the webcam settings dialog box bbb.video.publish.closeBtn.label = Cancel bbb.video.publish.titleBar = Publish Webcam Window bbb.video.streamClose.toolTip = Close stream for: {0} +bbb.video.message.browserhttp = This server is not configured with SSL. As a result, {0} disables sharing of your webcam. bbb.screensharePublish.title = Screen Sharing: Presenter's Preview bbb.screensharePublish.pause.tooltip = Pause screen share bbb.screensharePublish.pause.label = Pause diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml index bcfa0b19b9..84b20d8289 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml @@ -42,25 +42,31 @@ with BigBlueButton; if not, see . . private function openPublishWindow():void{ + if (!BrowserCheck.isHttps() && ((BrowserCheck.isChrome() && BrowserCheck.browserMajorVersion >= "60") || (BrowserCheck.isOpera() && BrowserCheck.browserMajorVersion >= "47"))) { + Alert.show(ResourceUtil.getInstance().getString("bbb.video.message.browserhttp", [BrowserCheck.browserName])); + return; + } this.enabled = false; if(_currentState == ON_STATE) { LOGGER.debug("[ToolbarPopupButton:openPublishWindow] Close window"); From 05b400267f0b8b8e03fb7322101b92dc96b761ae Mon Sep 17 00:00:00 2001 From: Ghazi Triki Date: Thu, 12 Oct 2017 18:40:11 -0300 Subject: [PATCH 4/4] Directly use Flash Audio if under HTTP using chrome >= 60 or opera >= 47 --- .../main/views/AudioSelectionWindow.mxml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml index 11871eb4fc..efe6d4e6b2 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml @@ -77,19 +77,18 @@ with BigBlueButton; if not, see . vboxListen.percentWidth = 100; } } - + private function onMicClick():void { LOGGER.debug("AudioSelectionWindow - Share Microphone Clicked"); var dispatcher:Dispatcher = new Dispatcher(); - if (BrowserCheck.isPuffin46AndAbove()) { - dispatcher.dispatchEvent(new UseFlashModeCommand()); - } - else { + if (BrowserCheck.isPuffin46AndAbove() || (!BrowserCheck.isHttps() && ((BrowserCheck.isChrome() && BrowserCheck.browserMajorVersion >= "60") || (BrowserCheck.isOpera() && BrowserCheck.browserMajorVersion >= "47")))) { + dispatcher.dispatchEvent(new UseFlashModeCommand()); + } else { var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand(); command.mic = true; dispatcher.dispatchEvent(command); } - + PopUpUtil.removePopUp(this); }