Merge branch 'v2.0.x-release' of https://github.com/bigbluebutton/bigbluebutton into settings-lock-video-dock

This commit is contained in:
Lucas Fialho Zawacki 2018-02-08 14:48:33 +00:00
commit 23b635b4ff
140 changed files with 5946 additions and 7856 deletions

View File

@ -38,7 +38,6 @@
<script type="text/javascript" src="resources/lib/api-bridge.js"></script>
<script type="text/javascript" src="resources/lib/sip.js"></script>
<script type="text/javascript" src="resources/lib/bbb_webrtc_bridge_sip.js"></script>
<script type="text/javascript" src="resources/lib/deployJava.js"></script>
<script type="text/javascript" src="resources/lib/bbb_localization.js"></script>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
@ -66,7 +65,6 @@
</script>
</head>
<body>
<div id="deployJavaPluginContainer" style="visibility:hidden; height:0px; "></div>
<!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
when JavaScript is disabled.

View File

@ -37,7 +37,6 @@
<script type="text/javascript" src="resources/lib/api-bridge.js"></script>
<script type="text/javascript" src="resources/lib/sip.js"></script>
<script type="text/javascript" src="resources/lib/bbb_webrtc_bridge_sip.js"></script>
<script type="text/javascript" src="resources/lib/deployJava.js"></script>
<script type="text/javascript" src="resources/lib/bbb_localization.js"></script>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
@ -65,7 +64,6 @@
</script>
</head>
<body>
<div id="deployJavaPluginContainer" style="visibility:hidden; height:0px; "></div>
<!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
when JavaScript is disabled.

View File

@ -7,8 +7,6 @@ bbbsystemcheck.dataGridColumn.status = Status
bbbsystemcheck.dataGridColumn.result = Result
bbbsystemcheck.copyAllText = Copy all text
bbbsystemcheck.result.undefined = Undefined
bbbsystemcheck.result.javaEnabled.disabled = Java is disabled in your browser
bbbsystemcheck.result.javaEnabled.notDetected = No Java detected
bbbsystemcheck.result.browser.changeBrowser = Recommend you use Firefox or Chrome for better audio
bbbsystemcheck.result.browser.browserOutOfDate = Your browser is out-of-date. Recommend you update to latest version.
bbbsystemcheck.status.succeeded = Succeded
@ -20,7 +18,6 @@ bbbsystemcheck.test.name.cookieEnabled = Cookie Enabled
bbbsystemcheck.test.name.downloadSpeed = Download Speed
bbbsystemcheck.test.name.flashVersion = Flash Version
bbbsystemcheck.test.name.pepperFlash = Is Pepper Flash
bbbsystemcheck.test.name.javaEnabled = Java Enabled
bbbsystemcheck.test.name.language = Language
bbbsystemcheck.test.name.ping = Ping
bbbsystemcheck.test.name.screenSize = Screen Size

View File

@ -7,8 +7,6 @@ bbbsystemcheck.dataGridColumn.status = Status
bbbsystemcheck.dataGridColumn.result = Resultado
bbbsystemcheck.copyAllText = Copiar resultados
bbbsystemcheck.result.undefined = Indefinido
bbbsystemcheck.result.javaEnabled.disabled = O Java está desabilitado em seu navegador
bbbsystemcheck.result.javaEnabled.notDetected = Java não detectado
bbbsystemcheck.result.browser.changeBrowser = Recomendamos o uso de Firefox ou Chrome para uma melhor qualidade de áudio
bbbsystemcheck.result.browser.browserOutOfDate = Seu navegador está desatualizado. Recomendamos que você o atualize para uma versão mais nova.
bbbsystemcheck.status.succeeded = Sucesso
@ -20,7 +18,6 @@ bbbsystemcheck.test.name.cookieEnabled = Cookies habilitados
bbbsystemcheck.test.name.downloadSpeed = Velocidade de download
bbbsystemcheck.test.name.flashVersion = Versão do Adobe Flash Player
bbbsystemcheck.test.name.pepperFlash = Pepper Flash
bbbsystemcheck.test.name.javaEnabled = Java habilitado
bbbsystemcheck.test.name.language = Idioma
bbbsystemcheck.test.name.ping = Ping
bbbsystemcheck.test.name.screenSize = Tamanho da tela

View File

@ -153,33 +153,6 @@
swfObj.cookieEnabled(cookieEnabledInfo);
}
BBBClientCheck.javaEnabled = function(){
var result = {
enabled: navigator.javaEnabled(),
version: [],
minimum: '1.7.0_51+',
appropriate: false
};
if (result.enabled) {
result.version = getJavaVersion();
result.appropriate = isJavaVersionAppropriateForDeskshare(result.minimum);
}
console.log(result);
var swfObj = getSwfObj();
swfObj.javaEnabled(result);
}
function getJavaVersion() {
return deployJava.getJREs();
}
function isJavaVersionAppropriateForDeskshare(required) {
return deployJava.versionCheck(required);
}
BBBClientCheck.language = function(){
var languageInfo = '';
var swfObj = getSwfObj();

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,6 @@ package org.bigbluebutton.clientcheck.command
externalApiCalls.requestIsPepperFlash();
externalApiCalls.requestLanguage();
externalApiCalls.requestCookiesEnabled();
externalApiCalls.requestJavaEnabled();
externalApiCalls.requestIsWebRTCSupported();
externalApiCalls.requestWebRTCEchoAndSocketTest();

View File

@ -24,7 +24,6 @@ package org.bigbluebutton.clientcheck.model
import org.bigbluebutton.clientcheck.model.test.DownloadBandwidthTest;
import org.bigbluebutton.clientcheck.model.test.FlashVersionTest;
import org.bigbluebutton.clientcheck.model.test.IsPepperFlashTest;
import org.bigbluebutton.clientcheck.model.test.JavaEnabledTest;
import org.bigbluebutton.clientcheck.model.test.LanguageTest;
import org.bigbluebutton.clientcheck.model.test.PingTest;
import org.bigbluebutton.clientcheck.model.test.ScreenSizeTest;
@ -42,7 +41,6 @@ package org.bigbluebutton.clientcheck.model
function get flashVersion():FlashVersionTest;
function get isPepperFlash():IsPepperFlashTest;
function get cookieEnabled():CookieEnabledTest;
function get javaEnabled():JavaEnabledTest;
function get language():LanguageTest;
function get isWebRTCSupported():WebRTCSupportedTest;
function get webRTCEchoTest():WebRTCEchoTest;

View File

@ -24,7 +24,6 @@ package org.bigbluebutton.clientcheck.model
import org.bigbluebutton.clientcheck.model.test.DownloadBandwidthTest;
import org.bigbluebutton.clientcheck.model.test.FlashVersionTest;
import org.bigbluebutton.clientcheck.model.test.IsPepperFlashTest;
import org.bigbluebutton.clientcheck.model.test.JavaEnabledTest;
import org.bigbluebutton.clientcheck.model.test.LanguageTest;
import org.bigbluebutton.clientcheck.model.test.PingTest;
import org.bigbluebutton.clientcheck.model.test.ScreenSizeTest;
@ -42,7 +41,6 @@ package org.bigbluebutton.clientcheck.model
private var _flashVersion:FlashVersionTest=new FlashVersionTest;
private var _isPepperFlash:IsPepperFlashTest=new IsPepperFlashTest;
private var _cookieEnabled:CookieEnabledTest=new CookieEnabledTest;
private var _javaEnabled:JavaEnabledTest=new JavaEnabledTest;
private var _language:LanguageTest=new LanguageTest;
private var _isWebRTCSupported:WebRTCSupportedTest=new WebRTCSupportedTest;
private var _webRTCEchoTest:WebRTCEchoTest=new WebRTCEchoTest;
@ -88,11 +86,6 @@ package org.bigbluebutton.clientcheck.model
return _cookieEnabled;
}
public function get javaEnabled():JavaEnabledTest
{
return _javaEnabled;
}
public function get language():LanguageTest
{
return _language

View File

@ -1,62 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2014 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 <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.clientcheck.model.test
{
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
import mx.resources.ResourceManager;
public class JavaEnabledTest implements ITestable
{
public static var JAVA_ENABLED:String=ResourceManager.getInstance().getString('resources', 'bbbsystemcheck.test.name.javaEnabled');
private var _testSuccessfull:Boolean;
private var _testResult:String;
private var _javaEnabledTestSuccessfullChangedSignal:ISignal=new Signal;
public function get testSuccessfull():Boolean
{
return _testSuccessfull;
}
public function set testSuccessfull(value:Boolean):void
{
_testSuccessfull=value;
javaEnabledTestSuccessfullChangedSignal.dispatch();
}
public function get testResult():String
{
return _testResult;
}
public function set testResult(value:String):void
{
_testResult=value;
}
public function get javaEnabledTestSuccessfullChangedSignal():ISignal
{
return _javaEnabledTestSuccessfullChangedSignal;
}
}
}

View File

@ -44,7 +44,6 @@ package org.bigbluebutton.clientcheck.service
ExternalInterface.addCallback("screenSize", screenSizeCallbackHandler);
ExternalInterface.addCallback("isPepperFlash", isPepperFlashCallbackHandler);
ExternalInterface.addCallback("cookieEnabled", cookieEnabledCallbackHandler);
ExternalInterface.addCallback("javaEnabled", javaEnabledCallbackHandler);
ExternalInterface.addCallback("language", languageCallbackHandler);
ExternalInterface.addCallback("isWebRTCSupported", isWebRTCSupportedCallbackHandler);
ExternalInterface.addCallback("webRTCEchoTest", webRTCEchoTestCallbackHandler);
@ -88,21 +87,6 @@ package org.bigbluebutton.clientcheck.service
checkResult(value, systemConfiguration.language);
}
public function javaEnabledCallbackHandler(value:Object):void
{
var testResult:String;
if (!value.enabled) {
testResult = ResourceManager.getInstance().getString('resources', 'bbbsystemcheck.result.javaEnabled.disabled');
} else if (value.version.length == 0) {
testResult = ResourceManager.getInstance().getString('resources', 'bbbsystemcheck.result.javaEnabled.notDetected');
} else {
testResult = value.version.join(', ');
}
systemConfiguration.javaEnabled.testResult = testResult;
systemConfiguration.javaEnabled.testSuccessfull = value.appropriate;
}
public function isWebRTCSupportedCallbackHandler(value:String):void
{
checkResult(value, systemConfiguration.isWebRTCSupported);

View File

@ -48,11 +48,6 @@ package org.bigbluebutton.clientcheck.service
ExternalInterface.call('BBBClientCheck.cookieEnabled');
}
public function requestJavaEnabled():void
{
ExternalInterface.call('BBBClientCheck.javaEnabled');
}
public function requestLanguage():void
{
ExternalInterface.call('BBBClientCheck.language');

View File

@ -26,7 +26,6 @@ package org.bigbluebutton.clientcheck.service
function cookieEnabledCallbackHandler(value:String):void;
function isPepperFlashCallbackHandler(value:String):void;
function languageCallbackHandler(value:String):void;
function javaEnabledCallbackHandler(value:Object):void;
function screenSizeCallbackHandler(value:String):void;
function isWebRTCSupportedCallbackHandler(value:String):void;
function webRTCEchoTestCallbackHandler(success:Boolean, result:String):void;

View File

@ -27,7 +27,6 @@ package org.bigbluebutton.clientcheck.service
function requestScreenSize():void;
function requestIsPepperFlash():void;
function requestCookiesEnabled():void;
function requestJavaEnabled():void;
function requestLanguage():void;
function requestIsWebRTCSupported():void;
function requestWebRTCEchoAndSocketTest():void;

View File

@ -39,7 +39,6 @@ package org.bigbluebutton.clientcheck.view.mainview
import org.bigbluebutton.clientcheck.model.test.DownloadBandwidthTest;
import org.bigbluebutton.clientcheck.model.test.FlashVersionTest;
import org.bigbluebutton.clientcheck.model.test.IsPepperFlashTest;
import org.bigbluebutton.clientcheck.model.test.JavaEnabledTest;
import org.bigbluebutton.clientcheck.model.test.LanguageTest;
import org.bigbluebutton.clientcheck.model.test.PingTest;
import org.bigbluebutton.clientcheck.model.test.PortTest;
@ -122,7 +121,6 @@ package org.bigbluebutton.clientcheck.view.mainview
systemConfiguration.isPepperFlash.pepperFlashTestSuccessfullChangedSignal.add(isPepperFlashChangedHandler);
systemConfiguration.cookieEnabled.cookieEnabledTestSuccessfullChangedSignal.add(cookieEnabledChangedHandler);
systemConfiguration.language.languageTestSuccessfullChangedSignal.add(languageChangedHandler);
systemConfiguration.javaEnabled.javaEnabledTestSuccessfullChangedSignal.add(javaEnabledChangedHandler);
systemConfiguration.isWebRTCSupported.webRTCSupportedTestSuccessfullChangedSignal.add(isWebRTCSupportedChangedHandler);
systemConfiguration.webRTCEchoTest.webRTCEchoTestSuccessfullChangedSignal.add(webRTCEchoTestChangedHandler);
systemConfiguration.webRTCSocketTest.webRTCSocketTestSuccessfullChangedSignal.add(webRTCSocketTestChangedHandler);
@ -151,7 +149,6 @@ package org.bigbluebutton.clientcheck.view.mainview
dp.addData({Item: DownloadBandwidthTest.DOWNLOAD_SPEED, Result: null}, StatusENUM.LOADING);
dp.addData({Item: FlashVersionTest.FLASH_VERSION, Result: null}, StatusENUM.LOADING);
dp.addData({Item: IsPepperFlashTest.PEPPER_FLASH, Result: null}, StatusENUM.LOADING);
dp.addData({Item: JavaEnabledTest.JAVA_ENABLED, Result: null}, StatusENUM.LOADING);
dp.addData({Item: LanguageTest.LANGUAGE, Result: null}, StatusENUM.LOADING);
dp.addData({Item: PingTest.PING, Result: null}, StatusENUM.LOADING);
dp.addData({Item: ScreenSizeTest.SCREEN_SIZE, Result: null}, StatusENUM.LOADING);
@ -275,12 +272,6 @@ package org.bigbluebutton.clientcheck.view.mainview
dp.updateData({Item: LanguageTest.LANGUAGE, Result: systemConfiguration.language.testResult}, status);
}
private function javaEnabledChangedHandler():void
{
var status:Object = (systemConfiguration.javaEnabled.testSuccessfull == true) ? StatusENUM.SUCCEED : StatusENUM.WARNING;
dp.updateData({Item: JavaEnabledTest.JAVA_ENABLED, Result: systemConfiguration.javaEnabled.testResult}, status);
}
private function isWebRTCSupportedChangedHandler():void
{
var status:Object = (systemConfiguration.isWebRTCSupported.testSuccessfull == true) ? StatusENUM.SUCCEED : StatusENUM.FAILED;
@ -350,7 +341,6 @@ package org.bigbluebutton.clientcheck.view.mainview
systemConfiguration.webRTCEchoTest.webRTCEchoTestSuccessfullChangedSignal.remove(webRTCEchoTestChangedHandler);
systemConfiguration.webRTCSocketTest.webRTCSocketTestSuccessfullChangedSignal.remove(webRTCSocketTestChangedHandler);
systemConfiguration.language.languageTestSuccessfullChangedSignal.remove(languageChangedHandler);
systemConfiguration.javaEnabled.javaEnabledTestSuccessfullChangedSignal.remove(javaEnabledChangedHandler);
systemConfiguration.isWebRTCSupported.webRTCSupportedTestSuccessfullChangedSignal.remove(isWebRTCSupportedChangedHandler);
systemConfiguration.downloadBandwidthTest.downloadSpeedTestSuccessfullChangedSignal.remove(downloadSpeedTestChangedHandler);
systemConfiguration.uploadBandwidthTest.uploadSpeedTestSuccessfullChangedSignal.remove(uploadSpeedTestChangedHandler);

View File

@ -157,7 +157,14 @@ public class Red5AppService {
public void screenShareClientPongMessage(Map<String, Object> msg) {
String meetingId = Red5.getConnectionLocal().getScope().getName();
String streamId = (String) msg.get("streamId");
Double timestamp = (Double) msg.get("timestamp");
Double timestamp;
if (msg.get("timestamp") instanceof Integer) {
Integer tempTimestamp = (Integer) msg.get("timestamp");
timestamp = tempTimestamp.doubleValue();
} else {
timestamp = (Double) msg.get("timestamp");
}
String userId = (String) Red5.getConnectionLocal().getAttribute("USERID");
//log.debug("Received screenShareClientPongMessage for meeting=[{}]", meetingId);

View File

@ -7,6 +7,8 @@ import static org.bytedeco.javacpp.avutil.AV_PIX_FMT_RGB0;
import static org.bytedeco.javacpp.avutil.AV_PIX_FMT_YUV420P;
import java.awt.AWTException;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Executor;
@ -114,6 +116,7 @@ public class FfmpegScreenshare {
mainRecorder.start();
} catch (Exception e) {
System.out.println("Exception starting recorder. \n" + e.toString());
System.out.println(printStacktrace(e));
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
}
@ -166,6 +169,7 @@ public class FfmpegScreenshare {
}
} catch (Exception e1) {
System.out.println("Exception grabbing image");
System.out.println(printStacktrace(e1));
listener.networkConnectionException(ExitCode.INTERNAL_ERROR, null);
}
@ -477,6 +481,17 @@ private FFmpegFrameRecorder setupMacOsXRecorder(String url, int width, int heig
return macGrabber;
}
private String printStacktrace(Exception exception) {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter( writer );
exception.printStackTrace( printWriter );
printWriter.flush();
String stackTrace = writer.toString();
return stackTrace;
}
}

View File

@ -411,6 +411,9 @@
<copy todir="${OUTPUT_DIR}/swfobject/">
<fileset dir="${PROD_RESOURCES_DIR}/swfobject" />
</copy>
<copy todir="${OUTPUT_DIR}/logos/">
<fileset dir="${PROD_RESOURCES_DIR}/logos" />
</copy>
<copy todir="${OUTPUT_DIR}/lib/">
<fileset dir="${PROD_RESOURCES_DIR}/lib" />
</copy>
@ -423,7 +426,6 @@
<copy file="${PROD_RESOURCES_DIR}/get_flash_player.gif" todir="${OUTPUT_DIR}" overwrite="true" />
<copy file="${PROD_RESOURCES_DIR}/bbb.gif" todir="${OUTPUT_DIR}" overwrite="true" />
<copy file="${PROD_RESOURCES_DIR}/avatar.png" todir="${OUTPUT_DIR}" overwrite="true" />
<copy file="${PROD_RESOURCES_DIR}/logo.swf" todir="${OUTPUT_DIR}" overwrite="true" />
<copy file="${PROD_RESOURCES_DIR}/background.jpg" todir="${OUTPUT_DIR}" overwrite="true" />
<copy file="${PROD_RESOURCES_DIR}/locales.xml" todir="${OUTPUT_DIR}/conf" overwrite="true" />
<copy file="${PROD_RESOURCES_DIR}/expressInstall.swf" todir="${OUTPUT_DIR}" overwrite="true" />

View File

@ -140,7 +140,7 @@ bbb.clientstatus.title = Configuration Notifications
bbb.clientstatus.notification = Unread notifications
bbb.clientstatus.close = Close
bbb.clientstatus.tunneling.title = Firewall
bbb.clientstatus.tunneling.message = A firewall is preventing your client from connecting directly on port 1935 to the remote server. Recommend joining a less restrictive network for a more stable connection
bbb.clientstatus.tunneling.message = A firewall is preventing your client from connecting directly to the remote server. Recommend joining a less restrictive network for a more stable connection
bbb.clientstatus.browser.title = Browser Version
bbb.clientstatus.browser.message = Your browser ({0}) is not up-to-date. Recommend updating to the latest version.
bbb.clientstatus.flash.title = Flash Player

View File

@ -4,12 +4,12 @@
<version>VERSION</version>
<help url="http://HOST/help.html"/>
<javaTest url="http://HOST/testjava.html"/>
<porttest host="HOST" application="video/portTest" timeout="10000"/>
<bwMon server="HOST" application="video/bwTest"/>
<porttest host="rtmp://HOST" application="video/portTest" timeout="10000"/>
<bwMon server="rtmp://HOST" application="video/bwTest"/>
<application uri="rtmp://HOST/bigbluebutton" host="http://HOST/bigbluebutton/api/enter"/>
<language userSelectionEnabled="true" rtlEnabled="false"/>
<skinning url="http://HOST/client/branding/css/V2Theme.css.swf?v=VERSION" />
<branding logo="logo.swf" copyright="&#169; 2017 &lt;u&gt;&lt;a href=&quot;http://HOST/home.html&quot; target=&quot;_blank&quot;&gt;BigBlueButton Inc.&lt;/a&gt;&lt;/u&gt; (build {0})" background="" toolbarColor="" showQuote="true"/>
<branding logo="logos/logo.swf" copyright="&#169; 2017 &lt;u&gt;&lt;a href=&quot;http://HOST/home.html&quot; target=&quot;_blank&quot;&gt;BigBlueButton Inc.&lt;/a&gt;&lt;/u&gt; (build {0})" background="" toolbarColor="" showQuote="true"/>
<shortcutKeys showButton="true" />
<browserVersions chrome="CHROME_VERSION" firefox="FIREFOX_VERSION" flash="FLASH_VERSION"/>
<layout showLogButton="false" defaultLayout="bbb.layout.name.defaultlayout"

View File

@ -90,7 +90,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function getSessionToken():String {
return BBB.getSessionTokenUtil().getSessionToken();
return BBB.getQueryStringParameters().getSessionToken();
}
private function timerHandler(e:TimerEvent):void{

View File

@ -46,8 +46,8 @@
rtmp = testRTMP;
netConnection = new NetConnection();
netConnection.proxyType = "best";
netConnection.client = this;
netConnection.proxyType = "best";
netConnection.objectEncoding = ObjectEncoding.AMF3;
netConnection.addEventListener(NetStatusEvent.NET_STATUS, connectionHandler);
var connStr:String = (rtmp ? "rtmp:" : "rtmpt:") + "//" + server + "/" + application;

View File

@ -41,7 +41,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private static const LOGGER:ILogger = getClassLogger(ScreenshareModule);
private var _moduleName:String = "Desk Share";
private var _attributes:Object;
private var globalDispatcher:Dispatcher = new Dispatcher();;
@ -53,34 +52,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
return _moduleName;
}
public function get uri():String{
return _attributes.uri;
}
public function get username():String{
return _attributes.username;
}
public function get mode():String{
if (_attributes.mode == null){
_attributes.mode = "LIVE";
LOGGER.debug("Setting DeskShare mode: " + _attributes.mode);
}
LOGGER.debug("DeskShare mode: " + _attributes.mode);
return _attributes.mode;
}
public function get userid():Number{
return _attributes.userid as Number;
}
public function get role():String{
return _attributes.userrole as String;
}
public function start(attributes:Object):void{
LOGGER.debug("desk share attr: " + attributes.username);
_attributes = attributes;
LOGGER.debug("desk share attr: " + attributes.username)
var startEvent:ModuleEvent = new ModuleEvent(ModuleEvent.START);
startEvent.module = this;
@ -93,27 +66,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
globalDispatcher.dispatchEvent(stopEvent);
}
public function getRoom():String{
return _attributes.room;
}
public function getRed5ServerUri():String{
return _attributes.uri;
}
public function getCaptureServerUri():String{
var uri:String = _attributes.uri;
uri = uri.split("/")[2];
return uri;
}
public function tunnel():Boolean {
if (_attributes.protocol == "RTMPT") {
LOGGER.debug("Use tunneling for desktop sharing");
return true;
}
return false;
}
]]>
</fx:Script>

View File

@ -38,15 +38,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<fx:Script>
<![CDATA[
import mx.core.UIComponent;
import mx.core.UIComponent;
import org.bigbluebutton.modules.screenshare.events.AppletStartedEvent;
import org.bigbluebutton.modules.screenshare.events.CursorEvent;
import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.screenshare.services.ScreenshareService;
import org.bigbluebutton.modules.screenshare.services.red5.ConnectionEvent;
import org.bigbluebutton.util.QueryStringParameters;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.modules.screenshare.events.AppletStartedEvent;
import org.bigbluebutton.modules.screenshare.events.CursorEvent;
import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.screenshare.services.ScreenshareService;
import org.bigbluebutton.modules.screenshare.services.red5.ConnectionEvent;
import org.bigbluebutton.util.QueryStringParameters;
private var videoHolder:UIComponent;
@ -67,12 +67,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var videoHeight:int;
private function onCreationComplete():void {
var p:QueryStringParameters = new QueryStringParameters();
var p:QueryStringParameters = BBB.getQueryStringParameters();
p.collectParameters();
logoutURL = p.getParameter("LOGOUTURL");
host = p.getParameter("HOST");
room = p.getParameter("ROOM");
service.connect(host, room);
service.connect();
cursor.graphics.lineStyle(6, 0xFF0000, 0.6);
cursor.graphics.drawCircle(0,0,3);

26
bigbluebutton-client/src/VideoconfModule.mxml Normal file → Executable file
View File

@ -44,38 +44,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
return _moduleName;
}
public function get uri():String {
return _attributes.uri + "/" + _attributes.room;
}
public function get username():String {
return _attributes.username;
}
public function get mode():String {
if (_attributes.mode == null) {
//_attributes.mode = "PLAYBACK"
_attributes.mode = "LIVE"
LOGGER.debug('Setting NotesModule mode: {0}', [_attributes.mode]);
}
LOGGER.debug('VideoconfVModule mode: {0}', [_attributes.mode]);
return _attributes.mode;
}
public function get userid():String {
return _attributes.userid as String;
}
public function get role():String {
return _attributes.userrole as String;
}
public function start(attributes:Object):void {
LOGGER.debug("Starting Video Module");
_attributes = attributes;
var globalDispatcher:Dispatcher = new Dispatcher();
var event:VideoModuleStartEvent = new VideoModuleStartEvent(VideoModuleStartEvent.START);
event.uri = uri;
globalDispatcher.dispatchEvent(event);
}

View File

@ -102,7 +102,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function connect(url:String):void {
nc = new NetConnection();
nc.proxyType = "best";
nc.proxyType = "best";
nc.objectEncoding = ObjectEncoding.AMF3;
nc.client = this;
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
nc.addEventListener(IOErrorEvent.IO_ERROR, onIOError);

View File

@ -28,7 +28,7 @@ package org.bigbluebutton.core {
import org.bigbluebutton.core.managers.VideoProfileManager;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.core.model.VideoProfile;
import org.bigbluebutton.util.SessionTokenUtil;
import org.bigbluebutton.util.QueryStringParameters;
public class BBB {
private static var configManager:ConfigManager2 = null;
@ -37,13 +37,13 @@ package org.bigbluebutton.core {
private static var videoProfileManager:VideoProfileManager = null;
private static var sessionTokenUtil:SessionTokenUtil = null;
private static var queryStringParameters:QueryStringParameters = null;
public static function getSessionTokenUtil():SessionTokenUtil {
if (sessionTokenUtil == null) {
sessionTokenUtil = new SessionTokenUtil();
public static function getQueryStringParameters():QueryStringParameters {
if (queryStringParameters == null) {
queryStringParameters = new QueryStringParameters();
}
return sessionTokenUtil;
return queryStringParameters;
}
public static function getConfigManager():ConfigManager2 {
@ -119,7 +119,7 @@ package org.bigbluebutton.core {
}
public static function getSignoutURL():String {
var sessionToken:String = BBB.sessionTokenUtil.getSessionToken();
var sessionToken:String = getQueryStringParameters().getSessionToken();
var logoutUrl:String = getBaseURL();
if (sessionToken != "") {
logoutUrl += "/bigbluebutton/api/signOut?sessionToken=" + sessionToken;

View File

@ -33,7 +33,6 @@ package org.bigbluebutton.core
import org.bigbluebutton.core.vo.LockSettingsVO;
import org.bigbluebutton.main.model.options.LockOptions;
import org.bigbluebutton.main.model.users.BreakoutRoom;
import org.bigbluebutton.util.SessionTokenUtil;
public class UsersUtil
{
@ -313,8 +312,7 @@ package org.bigbluebutton.core
}
public static function getUserSession():String {
var sessionUtil:SessionTokenUtil = new SessionTokenUtil()
return sessionUtil.getSessionToken();
return BBB.getQueryStringParameters().getSessionToken();
}
public static function applyLockSettings():void {

View File

@ -32,11 +32,11 @@ package org.bigbluebutton.core.managers {
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.model.Config;
import org.bigbluebutton.main.events.ConfigLoadedEvent;
import org.bigbluebutton.main.events.MeetingNotFoundEvent;
import org.bigbluebutton.main.model.modules.ModuleDescriptor;
import org.bigbluebutton.util.QueryStringParameters;
public class ConfigManager2 {
private static const LOGGER:ILogger = getClassLogger(ConfigManager2);
@ -46,9 +46,7 @@ package org.bigbluebutton.core.managers {
private var _config:Config = null;
public function loadConfig():void {
var p:QueryStringParameters = new QueryStringParameters();
p.collectParameters();
var sessionToken:String = p.getParameter("sessionToken");
var sessionToken:String = BBB.getQueryStringParameters().getSessionToken();
var reqVars:URLVariables = new URLVariables();
reqVars.sessionToken = sessionToken;

View File

@ -18,15 +18,17 @@
*/
package org.bigbluebutton.core.managers {
import flash.net.NetConnection;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.main.model.options.PortTestOptions;
import org.bigbluebutton.main.model.users.IMessageListener;
import org.bigbluebutton.main.model.users.NetConnectionDelegate;
public class ConnectionManager {
private var connDelegate:NetConnectionDelegate;
[Bindable]
public var isTunnelling:Boolean = false;
private var _isTunnelling:Boolean = false;
private var portTestOptions : PortTestOptions;
public function ConnectionManager() {
connDelegate = new NetConnectionDelegate();
@ -45,6 +47,30 @@ package org.bigbluebutton.core.managers {
connDelegate.disconnect(onUserAction);
}
public function initPortTestOption():void {
portTestOptions = Options.getOptions(PortTestOptions) as PortTestOptions;
}
public function useProtocol(tunnel:Boolean):void {
_isTunnelling = tunnel;
}
public function get isTunnelling():Boolean {
return _isTunnelling;
}
public function get portTestHost():String {
return portTestOptions.host;
}
public function get portTestApplication():String {
return portTestOptions.application;
}
public function get portTestTimeout():Number {
return portTestOptions.timeout;
}
public function addMessageListener(listener:IMessageListener):void {
connDelegate.addMessageListener(listener);
}

View File

@ -0,0 +1,18 @@
package org.bigbluebutton.core.model
{
import org.bigbluebutton.core.Options;
public class BandwidthMonOptions extends Options
{
[Bindable]
public var server:String = "";
[Bindable]
public var application:String = "";
public function BandwidthMonOptions()
{
name = "bwMon";
}
}
}

View File

@ -25,7 +25,11 @@ package org.bigbluebutton.core.services
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.model.BandwidthMonOptions;
import org.bigbluebutton.main.model.NetworkStatsData;
import org.bigbluebutton.util.ConnUtil;
import org.red5.flash.bwcheck.ClientServerBandwidth;
import org.red5.flash.bwcheck.ServerClientBandwidth;
import org.red5.flash.bwcheck.events.BandwidthDetectEvent;
@ -35,8 +39,6 @@ package org.bigbluebutton.core.services
public static const INTERVAL_BETWEEN_CHECKS:int = 30000; // in ms
private static var _instance:BandwidthMonitor = null;
private var _serverURL:String = "localhost";
private var _serverApplication:String = "video";
private var _clientServerService:String = "checkBandwidthUp";
private var _serverClientService:String = "checkBandwidth";
private var _pendingClientToServer:Boolean;
@ -84,25 +86,42 @@ package org.bigbluebutton.core.services
return _instance;
}
public function set serverURL(url:String):void {
if (_nc.connected)
_nc.close();
_serverURL = url;
}
public function set serverApplication(app:String):void {
if (_nc.connected)
_nc.close();
_serverApplication = app;
}
public function start():void {
connect();
}
private function connect():void {
if (!_nc.connected && !_connecting) {
_nc.connect("rtmp://" + _serverURL + "/" + _serverApplication);
var bwMonOption:BandwidthMonOptions = Options.getOptions(BandwidthMonOptions) as BandwidthMonOptions;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)/;
var result:Array = pattern.exec(bwMonOption.server);
var bwMonUrl: String;
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
_nc.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
bwMonUrl = tunnelProtocol + "://" + result.server + "/" + bwMonOption.application;
LOGGER.debug("BW MON CONNECT tunnel = TRUE " + "url=" + bwMonUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
_nc.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
bwMonUrl = nativeProtocol + "://" + result.server + "/" + bwMonOption.application;
LOGGER.debug("BBB MON CONNECT tunnel = FALSE " + "url=" + bwMonUrl);
}
_nc.connect(bwMonUrl);
_connecting = true;
}
}

View File

@ -264,7 +264,7 @@ package org.bigbluebutton.main.api
}
private function handleGetSessionToken():String {
return BBB.getSessionTokenUtil().getSessionToken();
return BBB.getQueryStringParameters().getSessionToken();
}

View File

@ -18,7 +18,6 @@
*/
package org.bigbluebutton.main.model
{
import flash.events.NetStatusEvent;
import flash.events.TimerEvent;
import flash.net.NetConnection;
@ -29,7 +28,7 @@ package org.bigbluebutton.main.model
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.util.ConnUtil;
[Bindable]
/**
@ -95,11 +94,6 @@ package org.bigbluebutton.main.model
private var closeConnectionTimer:Timer;
/**
* Set default encoding to AMF0 so FMS also understands.
*/
NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
/**
* Create new port test and connect to the RTMP server.
*
@ -125,12 +119,12 @@ package org.bigbluebutton.main.model
} else {
this.port = port;
}
// Construct URI.
if (tunnel) {
this.baseURI = "rtmpt://" + this.hostname + "/" + this.application;
} else {
this.baseURI = "rtmp://" + this.hostname + this.port + "/" + this.application;
}
}
private function parseRTMPConn(appURL: String):Array {
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)/;
var result:Array = pattern.exec(appURL);
return result;
}
/**
@ -139,8 +133,34 @@ package org.bigbluebutton.main.model
public function connect():void {
nc = new NetConnection();
nc.client = this;
nc.proxyType = "best";
LOGGER.debug("Connecting PORT TEST hostname= " + this.hostname);
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)/;
var result:Array = pattern.exec(this.hostname);
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
// Construct URI.
if (tunnel) {
LOGGER.debug("Connecting PORT TEST tunnel= " + tunnel);
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
tunnelProtocol = ConnUtil.RTMPS;
nc.proxyType = ConnUtil.PROXY_NONE;
}
this.baseURI = tunnelProtocol + "://" + result.server + "/" + this.application;
} else {
LOGGER.debug("Connecting PORT TEST tunnel= " + tunnel);
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
nativeProtocol = ConnUtil.RTMPS;
nc.proxyType = ConnUtil.PROXY_BEST;
}
this.baseURI = nativeProtocol + "://" + result.server + "/" + this.application;
}
nc.objectEncoding = ObjectEncoding.AMF3;
nc.addEventListener( NetStatusEvent.NET_STATUS, netStatus );
// connect to server
try {
@ -155,6 +175,8 @@ package org.bigbluebutton.main.model
connectionTimer.start();
var curTime:Number = new Date().getTime();
LOGGER.debug("Connecting PORT TEST = " + this.baseURI);
// Create connection with the server.
nc.connect( this.baseURI, "portTestMeetingId-" + curTime,
"portTestDummyUserId-" + curTime, "portTestDummyAuthToken");
@ -175,7 +197,7 @@ package org.bigbluebutton.main.model
logData.tags = ["initialization", "port-test", "connection"];
logData.message = "Port testing connection timedout.";
LOGGER.info(JSON.stringify(logData));
LOGGER.debug("Connect FAILED PORT TEST = " + this.baseURI);
status = "FAILED";
_connectionListener(status, tunnel, hostname, port, application);
closeConnection();
@ -232,11 +254,13 @@ package org.bigbluebutton.main.model
logData.connection = this.baseURI;
logData.tags = ["initialization", "port-test", "connection"];
LOGGER.debug("Connect SUCCESS PORT TEST connected= " + nc.connected);
if ( statusCode == "NetConnection.Connect.Success" ) {
status = "SUCCESS";
logData.message = "Port test successfully connected.";
LOGGER.info(JSON.stringify(logData));
LOGGER.debug("Connect SUCCESS PORT TEST = " + this.baseURI);
_connectionListener(status, tunnel, hostname, port, application);
} else if ( statusCode == "NetConnection.Connect.Rejected" ||
statusCode == "NetConnection.Connect.Failed" ||
@ -244,7 +268,7 @@ package org.bigbluebutton.main.model
logData.statusCode = statusCode;
logData.message = "Port test failed to connect.";
LOGGER.info(JSON.stringify(logData));
LOGGER.debug("Connect FAILED (2) PORT TEST = " + this.baseURI);
status = "FAILED";
_connectionListener(status, tunnel, hostname, port, application);

View File

@ -36,7 +36,9 @@ package org.bigbluebutton.main.model {
this.modulesDispatcher = modulesDispatcher;
}
public function connect(tunnel:Boolean, hostname:String = "", port:String = "", application:String = "", testTimeout:Number = 10000):void {
public function connect( tunnel:Boolean, hostname:String = "",
port:String = "", application:String = "",
testTimeout:Number = 10000):void {
this.tunnel = tunnel;
portTest = new PortTest(tunnel, hostname, port, application, testTimeout);
portTest.addConnectionSuccessListener(connectionListener);

View File

@ -22,16 +22,12 @@ package org.bigbluebutton.main.model.modules
import flash.system.ApplicationDomain;
import flash.utils.Dictionary;
import mx.collections.ArrayCollection;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.IBigBlueButtonModule;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.main.events.AppVersionEvent;
import org.bigbluebutton.main.model.options.PortTestOptions;
public class ModuleManager
{
@ -48,11 +44,11 @@ package org.bigbluebutton.main.model.modules
private var modulesDispatcher:ModulesDispatcher;
private var portTestOptions : PortTestOptions;
public function ModuleManager(modulesDispatcher: ModulesDispatcher)
{
this.modulesDispatcher = modulesDispatcher;
this.modulesDispatcher = modulesDispatcher;
_applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
}
@ -66,7 +62,7 @@ package org.bigbluebutton.main.model.modules
var resolver:DependancyResolver = new DependancyResolver();
sorted = resolver.buildDependencyTree(modules);
portTestOptions = Options.getOptions(PortTestOptions) as PortTestOptions;
BBB.initConnectionManager().initPortTestOption();
modulesDispatcher.sendPortTestEvent();
}
@ -76,22 +72,6 @@ package org.bigbluebutton.main.model.modules
BBB.loadConfig();
}
public function useProtocol(tunnel:Boolean):void {
BBB.initConnectionManager().isTunnelling = tunnel;
}
public function get portTestHost():String {
return portTestOptions.host;
}
public function get portTestApplication():String {
return portTestOptions.application;
}
public function get portTestTimeout():Number {
return portTestOptions.timeout;
}
private function getModule(name:String):ModuleDescriptor {
return BBB.getConfigManager().getModuleFor(name);
}

View File

@ -20,6 +20,7 @@ package org.bigbluebutton.main.model.modules
{
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.main.model.PortTestProxy;
@ -49,7 +50,7 @@ package org.bigbluebutton.main.model.modules
logData.message = "Successfully tested connection to server.";
LOGGER.info(JSON.stringify(logData));
modulesManager.useProtocol(tunnel);
BBB.initConnectionManager().useProtocol(tunnel);
modulesManager.startUserServices();
}
@ -58,15 +59,15 @@ package org.bigbluebutton.main.model.modules
}
public function getPortTestHost():String {
return modulesManager.portTestHost;
return BBB.initConnectionManager().portTestHost;
}
public function getPortTestApplication():String {
return modulesManager.portTestApplication;
return BBB.initConnectionManager().portTestApplication;
}
public function getPortTestTimeout():Number {
return modulesManager.portTestTimeout;
return BBB.initConnectionManager().portTestTimeout;
}
public function handleConfigLoaded():void {
@ -78,13 +79,13 @@ package org.bigbluebutton.main.model.modules
}
public function testRTMP():void{
portTestProxy.connect(false /*"RTMP"*/, getPortTestHost(), "1935", getPortTestApplication(), getPortTestTimeout());
portTestProxy.connect(false /*tunnel*/, getPortTestHost(), "", getPortTestApplication(), getPortTestTimeout());
}
public function testRTMPT(tunnel:Boolean):void {
if (!tunnel) {
// Try to test using rtmpt as rtmp failed.
portTestProxy.connect(true /*"RTMPT"*/, getPortTestHost(), "", getPortTestApplication(), getPortTestTimeout());
portTestProxy.connect(true /*tunnel*/, getPortTestHost(), "", getPortTestApplication(), getPortTestTimeout());
} else {
modulesDispatcher.sendTunnelingFailedEvent(getPortTestHost(), getPortTestApplication());
}

View File

@ -394,7 +394,7 @@ package org.bigbluebutton.main.model.users {
var p:Object = getUserIndex(userID);
if (p != null) {
var u:BBBUser = p.participant as BBBUser;
if(u.avatarURL == null || u.avatarURL == ""){
if(StringUtils.isEmpty(u.avatarURL)){
return LiveMeeting.inst().me.avatarURL;
}
return u.avatarURL;

View File

@ -30,10 +30,10 @@ package org.bigbluebutton.main.model.users
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.main.events.MeetingNotFoundEvent;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
import org.bigbluebutton.util.QueryStringParameters;
public class JoinService
{
@ -50,9 +50,7 @@ package org.bigbluebutton.main.model.users
}
public function load(url:String):void {
var p:QueryStringParameters = new QueryStringParameters();
p.collectParameters();
var sessionToken:String = p.getParameter("sessionToken");
var sessionToken:String = BBB.getQueryStringParameters().getSessionToken();
reqVars.sessionToken = sessionToken;

View File

@ -26,6 +26,7 @@ package org.bigbluebutton.main.model.users
import flash.events.SecurityErrorEvent;
import flash.events.TimerEvent;
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.net.Responder;
import flash.utils.Timer;
@ -41,12 +42,12 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.core.events.TokenValidReconnectEvent;
import org.bigbluebutton.core.managers.ReconnectionManager;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.core.services.BandwidthMonitor;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.InvalidAuthTokenEvent;
import org.bigbluebutton.main.model.options.ApplicationOptions;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
import org.bigbluebutton.util.ConnUtil;
public class NetConnectionDelegate {
private static const LOGGER:ILogger = getClassLogger(NetConnectionDelegate);
@ -78,7 +79,7 @@ package org.bigbluebutton.main.model.users
public function NetConnectionDelegate():void {
dispatcher = new Dispatcher();
_netConnection = new NetConnection();
_netConnection.proxyType = "best";
_netConnection.objectEncoding = ObjectEncoding.AMF3;
_netConnection.client = this;
_netConnection.addEventListener( NetStatusEvent.NET_STATUS, netStatus );
_netConnection.addEventListener( AsyncErrorEvent.ASYNC_ERROR, netASyncError );
@ -218,8 +219,6 @@ package org.bigbluebutton.main.model.users
var message: ValidateAuthTokenReqMsg = new ValidateAuthTokenReqMsg(body);
LOGGER.debug("******* msg \n" + JSON.stringify(message));
sendMessage2x(
// result - On successful result
function(result:Object):void {
@ -402,18 +401,31 @@ package org.bigbluebutton.main.model.users
try {
var appURL:String = _applicationOptions.uri;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
var result:Array = pattern.exec(appURL);
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
var result:Array = pattern.exec(appURL);
BandwidthMonitor.getInstance().serverURL = result.server;
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
var protocol:String = "rtmp";
var uri:String = appURL + "/" + intMeetingId;
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
_netConnection.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
bbbAppsUrl = tunnelProtocol + "://" + result.server + "/" + result.app + "/" + intMeetingId;
LOGGER.debug("BBB APPS CONNECT tunnel = TRUE " + "url=" + bbbAppsUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
_netConnection.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
bbbAppsUrl = nativeProtocol + "://" + result.server + "/" + result.app + "/" + intMeetingId;
LOGGER.debug("BBB APPS CONNECT tunnel = FALSE " + "url=" + bbbAppsUrl);
if (BBB.initConnectionManager().isTunnelling) {
bbbAppsUrl = "rtmpt://" + result.server + "/" + result.app + "/" + intMeetingId;
} else {
bbbAppsUrl = "rtmp://" + result.server + ":1935/" + result.app + "/" + intMeetingId;
}
var logData:Object = UsersUtil.initLogData();
@ -448,10 +460,10 @@ package org.bigbluebutton.main.model.users
// Invalid parameters.
switch (e.errorID) {
case 2004 :
LOGGER.debug("Error! Invalid server location: {0}", [uri]);
LOGGER.debug("Error! Invalid server location: {0}", [bbbAppsUrl]);
break;
default :
LOGGER.debug("UNKNOWN Error! Invalid server location: {0}", [uri]);
LOGGER.debug("UNKNOWN Error! Invalid server location: {0}", [bbbAppsUrl]);
break;
}
}

View File

@ -42,7 +42,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:states>
<mx:State name="default"/>
<mx:State name="chromeMic"/>
<mx:State name="chromeMicMacOSX" basedOn="chromeMic"/>
<mx:State name="chromeCam"/>
<mx:State name="chromeCamMacOSX" basedOn="chromeCam"/>
<mx:State name="firefoxMic"/>
<mx:State name="firefoxMicMacOSX" basedOn="firefoxMic"/>
</mx:states>
@ -80,8 +82,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
text.firefoxMic="{ResourceUtil.getInstance().getString('bbb.micPermissions.firefox.message')}"
selectable="false"
styleName="permissionSettingsTextStyle" />
<mx:Image source.chromeMic="@Embed('assets/chrome-permissions.png')"
source.chromeCam="@Embed('assets/chrome-permissions.png')"
<mx:Image source.chromeMic="@Embed('assets/chrome-permissions-windows.png')"
source.chromeMicMacOSX="@Embed('assets/chrome-permissions-macosx.png')"
source.chromeCam="@Embed('assets/chrome-permissions-windows.png')"
source.chromeCamMacOSX="@Embed('assets/chrome-permissions-macosx.png')"
source.firefoxMic="@Embed('assets/firefox-permissions-windows.png')"
source.firefoxMicMacOSX="@Embed('assets/firefox-permissions-macosx.png')"/>
</mx:HBox>

View File

@ -95,6 +95,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function reInitialize():void {
my_nc = new NetConnection();
my_nc.objectEncoding = ObjectEncoding.AMF3;
my_nc.proxyType = "best";
my_nc.connect(null);
nsStream = new NetStream(my_nc);

View File

@ -563,7 +563,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
logData.message = "Loaded locale.";
LOGGER.info(JSON.stringify(logData));
if ((version == "old-locales") || (version == "") || (version == null)) {
if ((version == "old-locales") || StringUtils.isEmpty(version)) {
wrongLocaleVersion();
} else {
if (version != localeVersion) wrongLocaleVersion();
@ -626,7 +626,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
} else if (BrowserCheck.isChrome()) {
if (browserPermissionHelper) {
browserPermissionHelper.currentState = "chromeMic";
if (Capabilities.os.indexOf("Mac") >= 0){
browserPermissionHelper.currentState = "chromeMicMacOSX";
} else {
browserPermissionHelper.currentState = "chromeMic";
}
browserPermissionHelper.x = 50;
browserPermissionHelper.y = 130;
}
@ -647,7 +651,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function showbrowserPermissionHelper() : void {
var browserPermissionHelper : BrowserPermissionHelper = PopUpUtil.createNonModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, BrowserPermissionHelper, false) as BrowserPermissionHelper;
if (browserPermissionHelper) {
browserPermissionHelper.currentState = "chromeCam";
if (Capabilities.os.indexOf("Mac") >= 0){
browserPermissionHelper.currentState = "chromeCamMacOSX";
} else {
browserPermissionHelper.currentState = "chromeCam";
}
browserPermissionHelper.x = 20;
browserPermissionHelper.y = 150;
}

View File

@ -240,7 +240,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function refreshModeratorButtonsVisibility(e:*):void {
showGuestSettingsButton = UsersUtil.amIModerator() && usersOptions.enableGuestUI;
showRecordButton = LiveMeeting.inst().meeting.recorded && UsersUtil.amIModerator();
showRecordButton = LiveMeeting.inst().meeting.recorded;
}
private function getFlashPlayerCapabilities():Object {

View File

@ -23,6 +23,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:mate="http://mate.asfusion.com/"
xmlns:common="org.bigbluebutton.common.*"
width="620"
alpha="0"
verticalScrollPolicy="off"
@ -83,12 +84,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Image source="{getStyle('iconQuote')}" />
<s:Label id="quoteLabel"
<common:AdvancedLabel id="quoteLabel"
styleName="quoteSentenceStyle"
selectable="false"
width="620" />
<s:Label id="quoteAttribution"
<common:AdvancedLabel id="quoteAttribution"
styleName="quoteAttributionStyle"
selectable="false"
width="620" />
<mx:HRule width="120" />

View File

@ -39,11 +39,11 @@ package org.bigbluebutton.main.views
public function VideoWithWarnings() {
super();
this.addEventListener(FlexEvent.CREATION_COMPLETE , creationCompleteHandler);
}
private function creationCompleteHandler(e:FlexEvent):void {
override protected function creationCompleteHandler(e:FlexEvent):void {
super.creationCompleteHandler(e);
_video.smoothing = true;
_videoHolder.addChild(_video);

View File

@ -21,13 +21,34 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:VBox xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mate="http://mate.asfusion.com/" width="100%" height="100%"
creationComplete="creationCompleteHandler(event)"
horizontalAlign="center" >
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function creationCompleteHandler(event:FlexEvent):void
{
if (Capabilities.os.indexOf("Mac") >= 0){
this.currentState = "chromeMacOSX";
} else {
this.currentState = "chrome";
}
}
]]>
</fx:Script>
<fx:Declarations>
<mx:Fade id="dissolveOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
<mx:Fade id="dissolveIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
</fx:Declarations>
<mx:states>
<mx:State name="chrome"/>
<mx:State name="chromeMacOSX" basedOn="chrome"/>
</mx:states>
<mx:Canvas
id="videoCanvas"
width="100%"
@ -42,7 +63,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
y="60"
x="{this.width/2 - imgChromeHelp.width/2}"
visible="false"
source="@Embed('assets/chrome-permissions.png')" />
source.chrome="@Embed('assets/chrome-permissions-windows.png')"
source.chromeMacOSX="@Embed('assets/chrome-permissions-macosx.png')"/>
<mx:VBox
width="100%"
height="100%"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -24,6 +24,7 @@ package org.bigbluebutton.modules.broadcast.models
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.net.ObjectEncoding;
import mx.core.UIComponent;
@ -119,6 +120,7 @@ package org.bigbluebutton.modules.broadcast.models
private function connect():void {
LOGGER.debug("Connecting {0}", [uri]);
nc = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF3;
nc.proxyType = "best";
nc.connect(uri);
nc.client = this;

View File

@ -44,6 +44,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import flexlib.controls.tabBarClasses.SuperTab;
import org.as3commons.lang.StringUtils;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
@ -185,7 +186,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function setTextTabLabel(ownerId:String):void {
var ownerText:String = null;
if (ownerId == "") {
if (StringUtils.isEmpty(ownerId)) {
//unclaimed text
//ownerNameOutputLabel.text = "Owner - " + "None";
ownerText = ResourceUtil.getInstance().getString('bbb.caption.transcript.noowner');

View File

@ -17,6 +17,9 @@
*
*/
package org.bigbluebutton.modules.chat.model {
import org.as3commons.lang.StringUtils;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.util.i18n.ResourceUtil;
public class ChatMessage {
@ -30,20 +33,31 @@ package org.bigbluebutton.modules.chat.model {
[Bindable] public var lastTime:String;
[Bindable] public var text:String;
// Stores the time (millis) when the sender sent the message.
public var fromTime:Number;
// Stores the timezone offset (minutes) of the sender.
public var fromTimezoneOffset:Number;
// Stores the time (millis) when the sender sent the message.
public var fromTime:Number;
// Stores the timezone offset (minutes) of the sender.
public var fromTimezoneOffset:Number;
/*
// Stores what we display to the user. The converted fromTime and fromTimezoneOffset to local time.
[Bindable] public var senderTime:String;
*/
/*
// Stores what we display to the user. The converted fromTime and fromTimezoneOffset to local time.
[Bindable] public var senderTime:String;
*/
public function get differentLastSenderAndTime():Boolean {
return !(lastTime == time) || !sameLastSender;
}
public function get sameLastSender() : Boolean {
return StringUtils.trimToEmpty(senderId) == StringUtils.trimToEmpty(lastSenderId);
}
public function get isModerator():Boolean {
return UsersUtil.getUser(senderId) && UsersUtil.getUser(senderId).role == Role.MODERATOR
}
public function toString() : String {
var result:String;
var accName:String = (!name || name == "" || name == " "? ResourceUtil.getInstance().getString("bbb.chat.chatMessage.systemMessage") : name);
var accName:String = (StringUtils.isBlank(name) ? ResourceUtil.getInstance().getString("bbb.chat.chatMessage.systemMessage") : name);
result = ResourceUtil.getInstance().getString("bbb.chat.chatMessage.stringRespresentation", [accName, stripTags(text), time]);
return result;
}

View File

@ -22,19 +22,19 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:VBox xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:common="org.bigbluebutton.common.*"
verticalScrollPolicy="off" horizontalScrollPolicy="off"
xmlns:common="org.bigbluebutton.common.*">
dataChange="dataChangeHandler(event)"
>
<fx:Script>
<![CDATA[
import mx.core.UITextField;
import mx.core.mx_internal;
import mx.events.FlexEvent;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.UsersUtil;
private static const LOGGER:ILogger = getClassLogger(ChatMessageRenderer);
@ -45,50 +45,28 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
//private function dataChangeHandler(e:Event = null):void{
override public function set data(value:Object):void {
//if (data == null) {
// return;
//}
super.data = value;
//chatMsg = data as ChatMessage;
//data = null;
if (data == null) return;
// The visibility check has to go here becasue ORs don't work with databinding
lblTime.visible = (!(data.lastTime == data.time) || !(data.senderId == data.lastSenderId));
// check the visibility of the name as well because events might fire in different order
lblName.visible = !(StringUtils.trimToEmpty(data.senderId) == StringUtils.trimToEmpty(data.lastSenderId));
//remove the header if not needed to save space
hbHeader.includeInLayout = hbHeader.visible = lblName.visible || lblTime.visible;
if (data.hasOwnProperty("senderId") && UsersUtil.getUser(data.senderId) && UsersUtil.getUser(data.senderId).role == Role.MODERATOR) {
lblName.styleName = "chatMessageHeaderModerator";
moderatorIcon.visible = lblName.visible;
}
// If you remove this some of the chat messages will fail to render
validateNow();
}
private function onKeyDown(event:KeyboardEvent):void{
if(event.ctrlKey == true && event.keyCode == Keyboard.C){
System.setClipboard(UITextField(txtMessage.mx_internal::getTextField()).selectedText);
}
}
protected function dataChangeHandler(event:FlexEvent):void {
// If you remove this some of the chat messages will fail to render
validateNow();
}
]]>
</fx:Script>
<mx:Canvas width="100%" id="hbHeader" styleName="chatMessageHeader" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Label id="lblName" text="{data.name}" visible="true" verticalCenter="0" textAlign="left" left="0" maxWidth="{this.width - lblTime.width - moderatorIcon.width - 22}"/>
<mx:Image id="moderatorIcon" visible="false" source="{getStyle('moderatorIcon')}" x="{lblName.width + 4}" verticalCenter="0"/>
<mx:Text id="lblTime" htmlText="{data.time}" textAlign="right"
<mx:Canvas width="100%" id="hbHeader" styleName="chatMessageHeader" verticalScrollPolicy="off" horizontalScrollPolicy="off"
visible="{lblName.visible || lblTime.visible}" includeInLayout="{lblName.visible || lblTime.visible}">
<mx:Label id="lblName" text="{data.name}" visible="{!data.sameLastSender}"
verticalCenter="0" textAlign="left" left="0" maxWidth="{this.width - lblTime.width - moderatorIcon.width - 22}"
styleName="{data.isModerator ? 'chatMessageHeaderModerator' : ''}"/>
<mx:Image id="moderatorIcon" visible="{lblName.visible &amp;&amp; data.isModerator}"
source="{getStyle('moderatorIcon')}" x="{lblName.width + 4}" verticalCenter="0"/>
<mx:Text id="lblTime" visible="{data.differentLastSenderAndTime}" htmlText="{data.time}" textAlign="right"
verticalCenter="0"
visible="true"
right="4" />
</mx:Canvas>
<mx:Text id="txtMessage" htmlText="{data.text}" link="onLinkClick(event)" color="{data.senderColor}"

View File

@ -53,6 +53,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import flexlib.controls.tabBarClasses.SuperTab;
import flexlib.events.SuperTabEvent;
import org.as3commons.lang.StringUtils;
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
@ -128,7 +129,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var chatBox:ChatBox = getPublicChatBox();
var saveEvent:ChatSaveEvent = new ChatSaveEvent(ChatSaveEvent.SAVE_CHAT_EVENT);
if (chatBox.chatWithUsername == null || chatBox.chatWithUsername == "") {
if (StringUtils.isEmpty(chatBox.chatWithUsername)) {
saveEvent.filename = ResourceUtil.getInstance().getString('bbb.chat.save.filename');
} else {
saveEvent.filename = chatBox.chatWithUsername;

View File

@ -4,6 +4,7 @@ package org.bigbluebutton.modules.layout.services {
import flash.events.TimerEvent;
import flash.utils.Timer;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
@ -90,7 +91,7 @@ package org.bigbluebutton.modules.layout.services {
private function onReceivedFirstLayout(message:Object):void {
LOGGER.debug("LayoutService: handling the first layout. locked = [{0}] layout = [{1}]", [message.locked, message.layout]);
trace("LayoutService: handling the first layout. locked = [" + message.locked + "] layout = [" + message.layout + "], moderator = [" + UsersUtil.amIModerator() + "]");
if (message.layout == "" || UsersUtil.amIModerator())
if (StringUtils.isEmpty(message.layout) || UsersUtil.amIModerator())
_dispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.APPLY_DEFAULT_LAYOUT_EVENT));
else {
handleSyncLayout(message);
@ -103,7 +104,7 @@ package org.bigbluebutton.modules.layout.services {
// is this event needed? Doesn't seem to do anything becasue it only applies to the original layout and then it's changed right afterwards once the new one is loaded
_dispatcher.dispatchEvent(new RemoteSyncLayoutEvent(message.layout));
if (message.layout == "")
if (StringUtils.isEmpty(message.layout))
return;
var layoutDefinition:LayoutDefinition = new LayoutDefinition();

View File

@ -25,6 +25,7 @@ package org.bigbluebutton.modules.phone.managers {
import flash.events.SecurityErrorEvent;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.net.ObjectEncoding;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
@ -36,6 +37,7 @@ package org.bigbluebutton.modules.phone.managers {
import org.bigbluebutton.modules.phone.events.FlashCallConnectedEvent;
import org.bigbluebutton.modules.phone.events.FlashCallDisconnectedEvent;
import org.bigbluebutton.modules.phone.events.FlashVoiceConnectionStatusEvent;
import org.bigbluebutton.util.ConnUtil;
public class ConnectionManager {
private static const LOGGER:ILogger = getClassLogger(ConnectionManager);
@ -86,14 +88,38 @@ package org.bigbluebutton.modules.phone.managers {
public function connect():void {
if (!reconnecting || amIListenOnly) {
closedByUser = false;
var isTunnelling:Boolean = BBB.initConnectionManager().isTunnelling;
if (isTunnelling) {
uri = uri.replace(/rtmp:/gi, "rtmpt:");
}
LOGGER.debug("Connecting to uri=[{0}]", [uri]);
NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
var result:Array = pattern.exec(uri);
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS
netConnection = new NetConnection();
netConnection.proxyType = "best";
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
netConnection.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
uri = tunnelProtocol + "://" + result.server + "/" + result.app;
LOGGER.debug("BBB SIP CONNECT tunnel = TRUE " + "url=" + uri);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
netConnection.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
uri = nativeProtocol + "://" + result.server + "/" + result.app;
LOGGER.debug("BBB SIP CONNECT tunnel = FALSE " + "url=" + uri);
}
LOGGER.debug("VOICE CONF == Connecting to uri=[{0}]", [uri]);
netConnection.objectEncoding = ObjectEncoding.AMF3;
netConnection.client = this;
netConnection.addEventListener( NetStatusEvent.NET_STATUS , netStatus );
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

View File

@ -4,6 +4,7 @@ package org.bigbluebutton.modules.polling.service
import flash.accessibility.Accessibility;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.modules.chat.ChatConstants;
@ -77,7 +78,7 @@ package org.bigbluebutton.modules.polling.service
for (var k:int = 0; k < answers.length; k++) {
var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.'+answers[k].key);
if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") {
if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") {
localizedKey = answers[k].key;
}
accessibleAnswers += ResourceUtil.getInstance().getString("bbb.polling.results.accessible.answer", [localizedKey, answers[k].numVotes]) + "<br />";

View File

@ -14,6 +14,7 @@ package org.bigbluebutton.modules.polling.views
import mx.controls.HRule;
import mx.controls.Label;
import org.as3commons.lang.StringUtils;
import org.bigbluebutton.common.AdvancedLabel;
import org.bigbluebutton.core.PopUpUtil;
import org.bigbluebutton.modules.polling.events.PollStoppedEvent;
@ -130,7 +131,7 @@ package org.bigbluebutton.modules.polling.views
var a:SimpleAnswer = answers[j] as SimpleAnswer;
var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.' + a.key);
if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") {
if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") {
localizedKey = a.key
}
resultData.push({a:localizedKey, v:0});
@ -155,7 +156,7 @@ package org.bigbluebutton.modules.polling.views
var a:SimpleAnswerResult = answers[j] as SimpleAnswerResult;
var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.' + a.key);
if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") {
if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") {
localizedKey = a.key;
}

View File

@ -376,9 +376,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
</fx:Script>
<mx:states>
<s:State name="normal" />
<s:State name="uploading" />
<s:State name="error" />
<mx:State name="normal" />
<mx:State name="uploading" />
<mx:State name="error" />
</mx:states>

View File

@ -77,6 +77,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import flexlib.mdi.events.MDIWindowEvent;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.events.AddUIComponentToMainCanvas;
@ -721,7 +722,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.'+e.poll.answers[i].key);
if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") {
if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") {
localizedKey = e.poll.answers[i].key;
}

View File

@ -46,11 +46,11 @@ package org.bigbluebutton.modules.screenshare.managers {
if (shareWindow != null) shareWindow.stopSharing();
}
public function startSharing(uri:String, room:String, tunnel:Boolean):void {
public function startSharing():void {
LOGGER.debug("DS:PublishWindowManager::opening desk share window");
if (shareWindow == null) {
shareWindow = new ScreensharePublishWindow();
shareWindow.initWindow(service.getConnection(), uri, room, tunnel);
shareWindow.initWindow(service.getConnection());
shareWindow.visible = true;
openWindow(shareWindow);
}

View File

@ -152,7 +152,7 @@ package org.bigbluebutton.modules.screenshare.managers {
if (force || (options.tryWebRTCFirst && !BrowserCheck.isWebRTCSupported()) || !options.tryWebRTCFirst) {
usingJava = true;
publishWindowManager.startSharing(module.getCaptureServerUri(), module.getRoom(), BBB.initConnectionManager().isTunnelling);
publishWindowManager.startSharing();
sharing = true;
service.requestShareToken();
} else {
@ -200,7 +200,7 @@ package org.bigbluebutton.modules.screenshare.managers {
public function handleStartSharingEvent():void {
//toolbarButtonManager.disableToolbarButton();
toolbarButtonManager.startedSharing();
publishWindowManager.startSharing(module.getCaptureServerUri(), module.getRoom(), module.tunnel());
publishWindowManager.startSharing();
sharing = true;
}

View File

@ -34,12 +34,10 @@ package org.bigbluebutton.modules.screenshare.managers
private var viewWindow:WebRTCDesktopViewWindow;
private var shareWindow:WebRTCDesktopPublishWindow;
private var service:WebRTCDeskshareService;
private var isViewing:Boolean = false;
private var globalDispatcher:Dispatcher;
public function WebRTCViewerWindowManager(service:WebRTCDeskshareService) {
this.service = service;
globalDispatcher = new Dispatcher();
}

View File

@ -21,6 +21,9 @@ package org.bigbluebutton.modules.screenshare.model {
public class ScreenshareOptions extends Options {
[Bindable]
public var uri: String = "";
[Bindable]
public var showButton:Boolean = true;

View File

@ -18,8 +18,6 @@
*/
package org.bigbluebutton.modules.screenshare.services {
import com.asfusion.mate.events.Dispatcher;
import flash.net.NetConnection;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.UsersUtil;
@ -52,19 +50,14 @@ package org.bigbluebutton.modules.screenshare.services {
public function handleStartModuleEvent(module:ScreenshareModule):void {
LOGGER.debug("Screenshare Module starting");
this.module = module;
connect(module.uri, module.getRoom());
connect();
}
public function connect(uri:String, room:String):void {
this.uri = uri;
this.room = room;
LOGGER.debug("Screenshare Service connecting to " + uri);
conn = new Connection(room);
public function connect():void {
conn = new Connection();
sender = new MessageSender(conn);
receiver = new MessageReceiver(conn);
conn.setURI(uri);
conn.connect();
}

View File

@ -37,13 +37,10 @@ package org.bigbluebutton.modules.screenshare.services
private var sender:MessageSender;
private var uri:String;
private var room:String;
public function WebRTCDeskshareService() {
this.dispatcher = new Dispatcher();
red5conn = new Connection(room);
red5conn = new Connection();
sender = new MessageSender(red5conn);
sender.queryForScreenshare();
}
@ -51,13 +48,6 @@ package org.bigbluebutton.modules.screenshare.services
public function handleStartModuleEvent(module:ScreenshareModule):void {
LOGGER.debug("Deskshare Module starting");
this.module = module;
connect(module.uri, module.getRoom());
}
public function connect(uri:String, room:String):void {
this.uri = uri;
this.room = room;
LOGGER.debug("Deskshare Service connecting to {0}", [uri]);
}
public function getConnection():NetConnection{

View File

@ -19,65 +19,77 @@
package org.bigbluebutton.modules.screenshare.services.red5 {
import com.asfusion.mate.events.Dispatcher;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.net.Responder;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.managers.ReconnectionManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.screenshare.model.ScreenshareModel;
import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions;
import org.bigbluebutton.util.ConnUtil;
public class Connection {
private static const LOGGER:ILogger = getClassLogger(Connection);
private var netConnection:NetConnection;
private var uri:String;
private var responder:Responder;
private var width:Number;
private var height:Number;
private var meetingId:String;
private var dispatcher:Dispatcher = new Dispatcher();
private var _messageListeners:Array = new Array();
private var logoutOnUserCommand:Boolean = false;
private var reconnecting:Boolean = false;
private var numNetworkChangeCount:int = 0;
private var ssAppUrl: String = null;
public function Connection(meetingId:String) {
this.meetingId = meetingId;
}
public function connect():void {
netConnection = new NetConnection();
netConnection.objectEncoding = ObjectEncoding.AMF3;
public function connect():void {
var isTunnelling:Boolean = BBB.initConnectionManager().isTunnelling;
if (isTunnelling) {
uri = uri.replace(/rtmp:/gi, "rtmpt:");
}
var options: ScreenshareOptions = Options.getOptions(ScreenshareOptions) as ScreenshareOptions;
var appURL: String = options.uri;
NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
netConnection = new NetConnection();
netConnection.proxyType = "best";
netConnection.client = this;
netConnection.addEventListener( NetStatusEvent.NET_STATUS , netStatusHandler);
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
var result:Array = pattern.exec(appURL);
// uri may include internal meetingId if we are reconnecting
var internalMeetingID:String = UsersUtil.getInternalMeetingID();
if (uri.indexOf(internalMeetingID) == -1) {
uri = uri + "/" + internalMeetingID;
}
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
LOGGER.debug("Connecting to uri=[{0}]", [uri]);
netConnection.connect(uri);
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
}
if (useRTMPS) {
netConnection.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
ssAppUrl = tunnelProtocol + "://" + result.server + "/" + result.app + "/" + UsersUtil.getInternalMeetingID();
LOGGER.debug("SCREENSHARE CONNECT tunnel = TRUE " + "url=" + ssAppUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
netConnection.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
ssAppUrl = nativeProtocol + "://" + result.server + "/" + result.app + "/" + UsersUtil.getInternalMeetingID();
LOGGER.debug("SCREENSHARE CONNECT tunnel = FALSE " + "url=" + ssAppUrl);
}
netConnection.client = this;
netConnection.addEventListener( NetStatusEvent.NET_STATUS , netStatusHandler);
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
LOGGER.debug("Connecting to uri=[{0}]", [ssAppUrl]);
netConnection.connect(ssAppUrl);
}
public function addMessageListener(listener:IMessageListener):void {
_messageListeners.push(listener);
@ -217,10 +229,6 @@ package org.bigbluebutton.modules.screenshare.services.red5 {
}, message);
}
public function setURI(p_URI:String):void {
uri = p_URI;
}
public function onBWCheck(... rest):Number {
return 0;
}
@ -235,7 +243,7 @@ package org.bigbluebutton.modules.screenshare.services.red5 {
private function sendUserIdToServer():void {
var message:Object = new Object();
message["meetingId"] = meetingId;
message["meetingId"] = UsersUtil.getInternalMeetingID();
message["userId"] = UsersUtil.getMyUserID();
sendMessage("screenshare.setUserId", function(result:String):void { // On successful result
@ -345,11 +353,11 @@ package org.bigbluebutton.modules.screenshare.services.red5 {
}
public function connectionFailedHandler(e:ConnectionEvent):void {
LOGGER.error("connection failed to " + uri + " with message " + e.toString());
LOGGER.error("connection failed to " + ssAppUrl + " with message " + e.toString());
}
public function connectionRejectedHandler(e:ConnectionEvent):void {
LOGGER.error("connection rejected " + uri + " with message " + e.toString());
LOGGER.error("connection rejected " + ssAppUrl + " with message " + e.toString());
}
}

View File

@ -49,32 +49,33 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<fx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import com.asfusion.mate.events.Dispatcher;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.managers.ReconnectionManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.screenshare.events.RequestToPauseSharing;
import org.bigbluebutton.modules.screenshare.events.RequestToRestartSharing;
import org.bigbluebutton.modules.screenshare.events.RequestToStopSharing;
import org.bigbluebutton.modules.screenshare.events.ScreenSharePausedEvent;
import org.bigbluebutton.modules.screenshare.events.ShareStartEvent;
import org.bigbluebutton.modules.screenshare.events.ShareStoppedEvent;
import org.bigbluebutton.modules.screenshare.events.ShareWindowEvent;
import org.bigbluebutton.modules.screenshare.events.StartShareRequestSuccessEvent;
import org.bigbluebutton.modules.screenshare.events.StopSharingButtonEvent;
import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.screenshare.model.ScreenshareModel;
import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions;
import org.bigbluebutton.modules.screenshare.services.red5.Connection;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.managers.ReconnectionManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.screenshare.events.RequestToPauseSharing;
import org.bigbluebutton.modules.screenshare.events.RequestToRestartSharing;
import org.bigbluebutton.modules.screenshare.events.RequestToStopSharing;
import org.bigbluebutton.modules.screenshare.events.ScreenSharePausedEvent;
import org.bigbluebutton.modules.screenshare.events.ShareStartEvent;
import org.bigbluebutton.modules.screenshare.events.ShareStoppedEvent;
import org.bigbluebutton.modules.screenshare.events.ShareWindowEvent;
import org.bigbluebutton.modules.screenshare.events.StartShareRequestSuccessEvent;
import org.bigbluebutton.modules.screenshare.events.StopSharingButtonEvent;
import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.screenshare.model.ScreenshareModel;
import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions;
import org.bigbluebutton.modules.screenshare.services.red5.Connection;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const LOGGER:ILogger = getClassLogger(ScreensharePublishWindow);
@ -84,9 +85,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private static const VID_WIDTH_PAD:Number = 6;
private var connection:Connection;
private var uri:String;
private var room:String;
private var tunnel:Boolean = false;
private var sharingFullScreen:Boolean = false;
private var streaming:Boolean = false;
@ -137,7 +135,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
focusManager.setFocus(titleBarOverlay);
if (tunnel) {
if (BBB.initConnectionManager().isTunnelling) {
helpInfoBox.visible = helpInfoBox.includeInLayout = false;
previewBox.visible = previewBox.includeInLayout = false;
tunnelBox.visible = tunnelBox.includeInLayout = true;
@ -184,11 +182,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*/
public function resetWidthAndHeight():void{/* do nothing */}
public function initWindow(connection:Connection, uri:String, room:String, tunnel:Boolean):void {
public function initWindow(connection:Connection):void {
this.connection = connection;
this.uri = uri;
this.room = room;
this.tunnel = tunnel;
}
private function handleStartShareRequestSuccessEvent(event:StartShareRequestSuccessEvent):void {
@ -254,10 +249,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
startBtn.enabled = false;
var shareStartEvent:ShareStartEvent = new ShareStartEvent();
dispatchEvent(shareStartEvent);
startSharing(connection.getConnection(), uri, room, fullScreen);
startSharing(connection.getConnection(), fullScreen);
}
private function startSharing(connection:NetConnection, uri:String, room:String, fullScreen:Boolean):void {
private function startSharing(connection:NetConnection, fullScreen:Boolean):void {
var captureX:Number = 0;
var captureY:Number = 0;
sharingFullScreen = fullScreen;

View File

@ -58,6 +58,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.main.api.JSLog;
import org.bigbluebutton.main.events.BBBEvent;
@ -74,6 +75,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.screenshare.events.WebRTCViewStreamEvent;
import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions;
import org.bigbluebutton.modules.screenshare.services.red5.WebRTCConnectionEvent;
import org.bigbluebutton.util.ConnUtil;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const LOGGER:ILogger = getClassLogger(WebRTCDesktopPublishWindow);
@ -240,13 +242,41 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
connection = new NetConnection();
connection.proxyType = "best";
connection.objectEncoding = ObjectEncoding.AMF0;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<serverAndApp>.+)/;
var result:Array = pattern.exec(meetingUrl);
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
var ssAppUrl: String = null;
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
connection.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
ssAppUrl = tunnelProtocol + "://" + result.serverAndApp;
LOGGER.debug("WEBRTC SSHARE CONNECT tunnel = TRUE " + "url=" + ssAppUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
connection.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
ssAppUrl = nativeProtocol + "://" + result.serverAndApp;
LOGGER.debug("WEBRTC SSHARE CONNECT tunnel = FALSE " + "url=" + ssAppUrl);
}
connection.objectEncoding = ObjectEncoding.AMF3;
connection.client = this;
connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
connection.connect(meetingUrl);
connection.connect(ssAppUrl);
}
private function netStatusHandler(event:NetStatusEvent):void {
@ -268,7 +298,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
break;
case "NetConnection.Connect.Closed":
trace("Deskshare connection closed.");
LOGGER.debug("Deskshare connection closed.");
ce.status = WebRTCConnectionEvent.CLOSED;
break;
@ -281,7 +311,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
break;
case "NetConnection.Connect.NetworkChange":
trace("Detected network change. User might be on a wireless and " +
LOGGER.debug("Detected network change. User might be on a wireless and " +
"temporarily dropped connection. Doing nothing. Just making a note.");
break;
}

View File

@ -40,19 +40,19 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<fx:Script>
<![CDATA[
import mx.core.UIComponent;
import flexlib.mdi.events.MDIWindowEvent;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.screenshare.events.ViewWindowEvent;
import org.bigbluebutton.modules.screenshare.model.ScreenshareOptions;
import org.bigbluebutton.modules.screenshare.services.red5.WebRTCConnectionEvent;
import org.bigbluebutton.util.ConnUtil;
import org.bigbluebutton.util.i18n.ResourceUtil;
public static const LOG:String = "Deskshare::DesktopViewWindow - ";
@ -130,13 +130,41 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
public function connect(rtmpUrl: String):void {
nc = new NetConnection();
nc.proxyType = "best";
nc.objectEncoding = ObjectEncoding.AMF0;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<serverAndApp>.+)/;
var result:Array = pattern.exec(rtmpUrl);
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
var ssAppUrl: String = null;
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
nc.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
ssAppUrl = tunnelProtocol + "://" + result.serverAndApp;
LOGGER.debug("WEBRTC SSHARE CONNECT tunnel = TRUE " + "url=" + ssAppUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
nc.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
ssAppUrl = nativeProtocol + "://" + result.serverAndApp;
LOGGER.debug("WEBRTC SSHARE CONNECT tunnel = FALSE " + "url=" + ssAppUrl);
}
nc.objectEncoding = ObjectEncoding.AMF3;
nc.client = this;
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
nc.connect(rtmpUrl);
nc.connect(ssAppUrl);
}
public function connectionSuccessHandler():void{
@ -193,7 +221,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
break;
case "NetConnection.Connect.NetworkChange":
trace(LOG + "Detected network change. User might be on a wireless and temporarily dropped connection. Doing nothing. Just making a note.");
LOGGER.debug(LOG + "Detected network change. User might be on a wireless and temporarily dropped connection. Doing nothing. Just making a note.");
break;
}
}

View File

@ -283,23 +283,23 @@
<fx:Script>
<![CDATA[
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TextEvent;
import flash.text.TextFormat;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TextEvent;
import flash.text.TextFormat;
import mx.collections.ArrayCollection;
import mx.controls.textClasses.TextRange;
import mx.core.IUITextField;
import mx.core.UITextFormat;
import mx.core.mx_internal;
import mx.collections.ArrayCollection;
import mx.controls.textClasses.TextRange;
import mx.core.IUITextField;
import mx.core.UITextFormat;
import mx.core.mx_internal;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.modules.sharednotes.util.DiffPatch;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.modules.sharednotes.util.DiffPatch;
use namespace mx_internal;
private static const LOGGER:ILogger = getClassLogger(SharedNotesRichTextEditor);
@ -902,7 +902,7 @@
if (carIndex < textArea.getTextField().length)
{
var tfNext:TextFormat=textArea.getTextField().getTextFormat(carIndex, carIndex + 1);
if (!tfNext.url || tfNext.url == "")
if (StringUtils.isEmpty(tfNext.url))
tf.url = tf.target = "";
}
else
@ -938,7 +938,7 @@
if (!previousTextFormat || previousTextFormat.bullet != tf.bullet)
bulletButton.selected = tf.bullet;
if (!previousTextFormat || previousTextFormat.url != tf.url)
linkTextInput.text = (tf.url == "" || tf.url == null) ? defaultLinkProtocol : tf.url;
linkTextInput.text = (StringUtils.isEmpty(tf.url)) ? defaultLinkProtocol : tf.url;
if (textArea.getTextField().defaultTextFormat != tf)
textArea.getTextField().defaultTextFormat = tf;

View File

@ -75,17 +75,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Label htmlText="{ResourceUtil.getInstance().getString('bbb.users.breakout.invited')}" paddingTop="4" />
<mx:Canvas>
<mx:Image source="{getStyle('iconRooms')}" />
<mx:Canvas x="16"
y="47"
height="38"
width="70">
<s:Label id="sequenceLabel"
<mx:Canvas x="16" y="47" height="38" width="70"
verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Label id="sequenceLabel"
styleName="roomNumberStyle"
verticalCenter="0"
horizontalCenter="0" />
</mx:Canvas>
</mx:Canvas>
<s:Label width="100%" textAlign="center" text="{ResourceUtil.getInstance().getString('bbb.users.breakout.accept')}" />
<mx:Label width="100%" textAlign="center" text="{ResourceUtil.getInstance().getString('bbb.users.breakout.accept')}" />
<mx:Button id="joinButton"
label="{ResourceUtil.getInstance().getString('bbb.users.breakout.joinSession')}"
accessibilityName="{ResourceUtil.getInstance().getString('bbb.users.breakout.joinSession.accessibilityName')}"

View File

@ -209,6 +209,12 @@
muteImg.includeInLayout = true;
muteBtn.visible = false;
muteBtn.includeInLayout = false;
if (data.talking && !rolledOver) {
muteImg.filters = [new GlowFilter(getStyle("glowFilterColor"), 1, 6, 6, 2, BitmapFilterQuality.HIGH, false, false)];
} else {
muteImg.filters = [];
}
} else {
muteImg.visible = !rolledOver;
muteImg.includeInLayout = !rolledOver;

View File

@ -38,7 +38,8 @@ $Id: $
<mate:Listener type="{ShortcutEvent.MUTE_ALL_BUT_PRES}" method="remoteMuteAllButPres" />
<mate:Listener type="{ShortcutEvent.OPEN_BREAKOUT_ROOMS}" method="handleOpenBreakoutRooms" />
<mate:Listener type="{MeetingMutedEvent.MEETING_MUTED}" method="handleMeetingMuted" />
<mate:Listener type="{LockControlEvent.CHANGED_LOCK_SETTINGS}" method="handleChangedLockSettingsEvent" />
<mate:Listener type="{LockControlEvent.CHANGED_LOCK_SETTINGS}" method="setRoomLocked" />
<mate:Listener type="{BBBEvent.CHANGE_WEBCAMS_ONLY_FOR_MODERATOR}" method="setRoomLocked"/>
<mate:Listener type="{BreakoutRoomEvent.UPDATE_REMAINING_TIME_PARENT}" method="handleRemainingTimeUpdate" />
<mate:Listener type="{BreakoutRoomEvent.BREAKOUT_JOIN_URL}" method="handleBreakoutJoinUrl" />
<mate:Listener type="{ChangeMyRole.CHANGE_MY_ROLE_EVENT}" method="onChangeMyRole" />
@ -266,8 +267,7 @@ $Id: $
resourcesChanged();
roomMuted = LiveMeeting.inst().meetingStatus.isMeetingMuted;
var lockSettings:LockSettingsVO = UsersUtil.getLockSettings();
roomLocked = lockSettings.isAnythingLocked() && ( lockSettings.getLockOnJoin() || UsersUtil.isAnyoneLocked());
setRoomLocked();
titleBarOverlay.tabIndex = partOptions.baseTabIndex;
minimizeBtn.tabIndex = partOptions.baseTabIndex+1;
@ -421,10 +421,10 @@ $Id: $
}
}
private function handleChangedLockSettingsEvent(e:LockControlEvent):void {
var lockSettings:LockSettingsVO = UsersUtil.getLockSettings();
roomLocked = lockSettings.isAnythingLocked() && (lockSettings.getLockOnJoin() || UsersUtil.isAnyoneLocked());
}
private function setRoomLocked(e:Event = null) {
var lockSettings:LockSettingsVO = UsersUtil.getLockSettings();
roomLocked = (lockSettings.isAnythingLocked() || LiveMeeting.inst().meeting.webcamsOnlyForModerator) && (lockSettings.getLockOnJoin() || UsersUtil.isAnyoneLocked());
}
private function lockSettings():void {
var event:LockControlEvent = new LockControlEvent(LockControlEvent.OPEN_LOCK_SETTINGS);

View File

@ -37,13 +37,12 @@ package org.bigbluebutton.modules.videoconf.business
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.managers.ReconnectionManager;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.api.JSLog;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.modules.videoconf.events.ConnectedEvent;
import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent;
import org.bigbluebutton.modules.videoconf.events.StopBroadcastEvent;
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
import org.bigbluebutton.util.ConnUtil;
public class VideoProxy
{
@ -52,12 +51,12 @@ package org.bigbluebutton.modules.videoconf.business
public var videoOptions:VideoConfOptions;
private var nc:NetConnection;
private var _url:String;
private var camerasPublishing:Object = new Object();
private var reconnect:Boolean = false;
private var reconnecting:Boolean = false;
private var dispatcher:Dispatcher = new Dispatcher();
private var videoConnUrl: String;
private var numNetworkChangeCount:int = 0;
private function parseOptions():void {
@ -65,12 +64,11 @@ package org.bigbluebutton.modules.videoconf.business
videoOptions.parseOptions();
}
public function VideoProxy(url:String)
public function VideoProxy()
{
_url = url;
parseOptions();
nc = new NetConnection();
nc.proxyType = "best";
nc.client = this;
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
nc.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
@ -82,10 +80,41 @@ package org.bigbluebutton.modules.videoconf.business
reconnect = connect;
}
public function connect():void {
public function connect():void {
var options: VideoConfOptions = Options.getOptions(VideoConfOptions) as VideoConfOptions;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
var result:Array = pattern.exec(options.uri);
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
nc.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
videoConnUrl = tunnelProtocol + "://" + result.server + "/" + result.app;
LOGGER.debug("VIDEO CONNECT tunnel = TRUE " + "url=" + videoConnUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
nc.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
videoConnUrl = nativeProtocol + "://" + result.server + "/" + result.app;
LOGGER.debug("VIDEO CONNECT tunnel = FALSE " + "url=" + videoConnUrl);
}
videoConnUrl = videoConnUrl + "/" + UsersUtil.getInternalMeetingID();
var authToken: String = LiveMeeting.inst().me.authToken;
nc.connect(_url, UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID(), authToken);
}
nc.objectEncoding = flash.net.ObjectEncoding.AMF3;
nc.connect(videoConnUrl, UsersUtil.getInternalMeetingID(),
UsersUtil.getMyUserID(), authToken);
}
private function onAsyncError(event:AsyncErrorEvent):void{
var logData:Object = UsersUtil.initLogData();
@ -114,7 +143,7 @@ package org.bigbluebutton.modules.videoconf.business
private function onNetStatus(event:NetStatusEvent):void{
LOGGER.debug("[{0}] for [{1}]", [event.info.code, _url]);
LOGGER.debug("[{0}] for [{1}]", [event.info.code, videoConnUrl]);
var logData:Object = UsersUtil.initLogData();
logData.tags = ["webcam"];
logData.user.eventCode = event.info.code + "[reconnecting=" + reconnecting + ",reconnect=" + reconnect + "]";
@ -178,7 +207,7 @@ package org.bigbluebutton.modules.videoconf.business
}
break;
default:
LOGGER.debug("[{0}] for [{1}]", [event.info.code, _url]);
LOGGER.debug("[{0}] for [{1}]", [event.info.code, videoConnUrl]);
break;
}
}

View File

@ -24,8 +24,6 @@ package org.bigbluebutton.modules.videoconf.events
{
public static const START:String = "video module start event";
public var uri:String;
public function VideoModuleStartEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);

View File

@ -46,7 +46,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<fx:Declarations>
<EventHandlers type="{VideoModuleStartEvent.START}">
<ObjectBuilder generator="{VideoEventMapDelegate}" cache="global" constructorArguments="{scope.dispatcher}"/>
<MethodInvoker generator="{VideoEventMapDelegate}" method="start" arguments="{event.uri}"/>
<MethodInvoker generator="{VideoEventMapDelegate}" method="start"/>
<EventAnnouncer generator="{ConnectAppEvent}" type="{ConnectAppEvent.CONNECT_VIDEO_APP}" />
</EventHandlers>

View File

@ -68,7 +68,6 @@ package org.bigbluebutton.modules.videoconf.maps
private static var PERMISSION_DENIED_ERROR:String = "PermissionDeniedError";
private var options:VideoConfOptions;
private var uri:String;
private var button:ToolbarPopupButton = new ToolbarPopupButton();
private var proxy:VideoProxy;
@ -100,9 +99,8 @@ package org.bigbluebutton.modules.videoconf.maps
return UsersUtil.getMyUsername();
}
public function start(uri:String):void {
public function start():void {
LOGGER.debug("VideoEventMapDelegate:: [{0}] Video Module Started.", [me]);
this.uri = uri;
_videoDock = new VideoDock();
var windowEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
@ -328,7 +326,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function connectToVideoApp():void {
proxy = new VideoProxy(uri);
proxy = new VideoProxy();
proxy.reconnectWhenDisconnected(true);
proxy.connect();
}

View File

@ -26,6 +26,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.as3commons.logging.util.jsonXify;
@ -313,7 +314,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
var ar:Object = answers[j];
var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.' + ar.key);
if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") {
if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") {
localizedKey = ar.key;
}
var rs:Object = {a: localizedKey, v: ar.numVotes};

View File

@ -0,0 +1,18 @@
package org.bigbluebutton.util
{
public class ConnUtil
{
public static const RTMPS: String = "rtmps";
public static const RTMPT: String = "rtmpt";
public static const RTMP: String = "rtmp";
public static const PROXY_NONE: String = "none";
public static const PROXY_BEST: String = "best";
public static function parseRTMPConn(appURL: String):Array {
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)\/(?P<app>.+)/;
var result:Array = pattern.exec(appURL);
return result;
}
}
}

View File

@ -1,25 +1,25 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 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 <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.util
{
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 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 <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.util {
import flash.external.ExternalInterface;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
@ -28,6 +28,8 @@ package org.bigbluebutton.util
private var params:Array = [];
private var _sessionToken:String = null;
public function collectParameters():void {
try {
var url:String = ExternalInterface.call("window.location.search.substring", 1);
@ -39,7 +41,7 @@ package org.bigbluebutton.util
// Create an array of name=value Strings.
params = url.split("&");
} catch(e:Error) {
} catch (e:Error) {
LOGGER.error(e.toString());
}
}
@ -57,5 +59,13 @@ package org.bigbluebutton.util
}
return value;
}
public function getSessionToken():String {
if (StringUtils.isEmpty(_sessionToken)) {
collectParameters();
_sessionToken = getParameter("sessionToken");
}
return _sessionToken;
}
}
}

View File

@ -1,33 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2017 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 <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.util {
public class SessionTokenUtil {
private var _sessionToken:String = null;
public function getSessionToken():String {
if (_sessionToken == null || _sessionToken == "") {
var p:QueryStringParameters = new QueryStringParameters();
p.collectParameters();
_sessionToken = p.getParameter("sessionToken");
}
return _sessionToken;
}
}
}

View File

@ -7,6 +7,10 @@ package org.red5.flash.bwcheck.app
import mx.core.Application;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.model.BandwidthMonOptions;
import org.bigbluebutton.util.ConnUtil;
import org.red5.flash.bwcheck.ClientServerBandwidth;
import org.red5.flash.bwcheck.ServerClientBandwidth;
import org.red5.flash.bwcheck.events.BandwidthDetectEvent;
@ -17,7 +21,7 @@ package org.red5.flash.bwcheck.app
private var _serverApplication:String = "";
private var _clientServerService:String = "";
private var _serverClientService:String = "";
private var bwMonOption: BandwidthMonOptions;
private var nc:NetConnection;
public function BandwidthDetectionApp()
@ -47,12 +51,41 @@ package org.red5.flash.bwcheck.app
public function connect():void
{
bwMonOption = Options.getOptions(BandwidthMonOptions) as BandwidthMonOptions;
var pattern:RegExp = /(?P<protocol>.+):\/\/(?P<server>.+)/;
var result:Array = pattern.exec(bwMonOption.server);
var bwMonUrl: String;
nc = new NetConnection();
nc.proxyType = "best";
nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
var useRTMPS: Boolean = result.protocol == ConnUtil.RTMPS;
if (BBB.initConnectionManager().isTunnelling) {
var tunnelProtocol: String = ConnUtil.RTMPT;
if (useRTMPS) {
nc.proxyType = ConnUtil.PROXY_NONE;
tunnelProtocol = ConnUtil.RTMPS;
}
bwMonUrl = tunnelProtocol + "://" + result.server + "/" + bwMonOption.application;
trace("******* BW MON CONNECT tunnel = TRUE " + "url=" + bwMonUrl);
} else {
var nativeProtocol: String = ConnUtil.RTMP;
if (useRTMPS) {
nc.proxyType = ConnUtil.PROXY_BEST;
nativeProtocol = ConnUtil.RTMPS;
}
bwMonUrl = nativeProtocol + "://" + result.server + "/" + bwMonOption.application;
trace("******* BBB MON CONNECT tunnel = FALSE " + "url=" + bwMonUrl);
}
nc.objectEncoding = flash.net.ObjectEncoding.AMF3;
nc.client = this;
nc.addEventListener(NetStatusEvent.NET_STATUS, onStatus);
nc.connect("rtmp://" + _serverURL + "/" + _serverApplication);
nc.connect(bwMonUrl);
}

View File

@ -355,7 +355,12 @@ start_bigbluebutton () {
BBB_TRANSCODE_AKKA=bbb-transcode-akka
fi
systemctl start red5 $TOMCAT_SERVICE nginx freeswitch $REDIS_SERVICE bbb-apps-akka $BBB_TRANSCODE_AKKA bbb-fsesl-akka bbb-record-core.timer $HTML5 $WEBHOOKS
systemctl start red5 $TOMCAT_SERVICE nginx freeswitch $REDIS_SERVICE bbb-apps-akka $BBB_TRANSCODE_AKKA bbb-fsesl-akka bbb-record-core.timer $WEBHOOKS
if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
systemctl start mongod
sleep 3
systemctl start bbb-html5
fi
else
$FREESWITCH_INIT_D start
@ -1727,7 +1732,7 @@ if [ -n "$HOST" ]; then
# Just use the IP for port test in /var/www/bigbluebutton/client/conf/config.xml
#
echo "Assigning $HOST for testing for firewall in /var/www/bigbluebutton/client/conf/config.xml"
sudo sed -i "s/porttest host=\(\"[^\"]*\"\)/porttest host=\"$HOST\"/g" /var/www/bigbluebutton/client/conf/config.xml
sudo sed -i "s/porttest host=\(\"[^\"]*\"\)/porttest host=\"$PROTOCOL_RTMP:\/\/$HOST\"/g" /var/www/bigbluebutton/client/conf/config.xml
echo "Assigning $HOST for rtmp:// in /var/www/bigbluebutton/client/conf/config.xml"
sudo sed -i "s/rtmp[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_RTMP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
@ -1735,11 +1740,14 @@ if [ -n "$HOST" ]; then
echo "Assigning $HOST for servername in /etc/nginx/sites-available/bigbluebutton"
sudo sed -i "s/server_name .*/server_name $HOST;/g" /etc/nginx/sites-available/bigbluebutton
#
# Update configuration for BigBlueButton client
#
echo "Assigning $HOST for http[s]:// in /var/www/bigbluebutton/client/conf/config.xml"
sudo sed -i "s/http[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_HTTP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
#
# Update configuration for BigBlueButton client (and perserve hostname for chromeExtensionLink if exists)
#
echo "Assigning $HOST for http[s]:// in /var/www/bigbluebutton/client/conf/config.xml"
chromeExtensionLinkURL=$(cat /var/www/bigbluebutton/client/conf/config.xml | sed -n '/chromeExtensionLink/{s/.*https*:\/\///;s/\/.*//;p}')
sudo sed -i "s/http[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_HTTP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
sudo sed -i "s/chromeExtensionLink=\"https:\/\/[^\/]*/chromeExtensionLink=\"https:\/\/$chromeExtensionLinkURL/g" /var/www/bigbluebutton/client/conf/config.xml
echo "Assigning $HOST for publishURI in /var/www/bigbluebutton/client/conf/config.xml"
sudo sed -i "s/publishURI=\"[^\"]*\"/publishURI=\"$HOST\"/" /var/www/bigbluebutton/client/conf/config.xml

View File

@ -716,10 +716,11 @@ if [ $CHECK ]; then
#set -x
for type in $TYPES; do
for recording in $(find $BASE/publish/$type -name metadata.xml); do
url_playback=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>http:\/\/\([^\"\/]*\)[^>]*>/\1/g')
if [ "$BBB_WEB" != "$url_playback" ]; then
url_playback_http=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>http:\/\/\([^\"\/]*\)[^>]*>/\1/g')
url_playback_https=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>https:\/\/\([^\"\/]*\)[^>]*>/\1/g')
if [ "$BBB_WEB" != "$url_playback_http" ] && [ "$BBB_WEB" != "$url_playback_https" ]; then
echo
echo "# The hostname in <link> .. </link> ($url_playback)"
echo "# The hostname in <link> .. </link> ($url_playback_http)"
echo "# $recording"
echo "# do not match the hostname for bigbluebutton.web.serverURL ($BBB_WEB)"
echo "# /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties"
@ -727,10 +728,11 @@ if [ $CHECK ]; then
fi
done
for recording in $(find /var/bigbluebutton/published/$type -name metadata.xml); do
url_playback=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>http:\/\/\([^\"\/]*\)[^>]*>/\1/g')
if [ "$BBB_WEB" != "$url_playback" ]; then
url_playback_http=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>http:\/\/\([^\"\/]*\)[^>]*>/\1/g')
url_playback_https=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>https:\/\/\([^\"\/]*\)[^>]*>/\1/g')
if [ "$BBB_WEB" != "$url_playback_http" ] && [ "$BBB_WEB" != "$url_playback_https" ]; then
echo
echo "# The hostname in <link> .. </link> ($url_playback)"
echo "# The hostname in <link> .. </link> ($url_playback_http)"
echo "# $recording"
echo "# do not match the hostname for bigbluebutton.web.serverURL ($BBB_WEB)"
echo "# /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties"

View File

@ -261,8 +261,8 @@
<div class="row">
<div class="span twelve center">
<p>Copyright &copy; 2017 BigBlueButton Inc.<br>
<small>Version <a href="http://docs.bigbluebutton.org/">2.0-dev</a></small>
<p>Copyright &copy; 2018 BigBlueButton Inc.<br>
<small>Version <a href="http://docs.bigbluebutton.org/">2.0-beta</a></small>
</p>
</div>
</div>

View File

@ -287,7 +287,7 @@
<div class="row">
<div class="span twelve center">
<p>Copyright &copy; 2017 BigBlueButton Inc.<br>
<p>Copyright &copy; 2018 BigBlueButton Inc.<br>
<small>Version <a href="http://docs.bigbluebutton.org/">2.0-beta</a></small>
</p>
</div>

View File

@ -6,6 +6,7 @@ import handleMeetingDestruction from './handlers/meetingDestruction';
import handleMeetingLocksChange from './handlers/meetingLockChange';
import handleUserLockChange from './handlers/userLockChange';
import handleRecordingStatusChange from './handlers/recordingStatusChange';
import handleChangeWebcamOnlyModerator from './handlers/webcamOnlyModerator';
RedisPubSub.on('MeetingCreatedEvtMsg', handleMeetingCreation);
RedisPubSub.on('SyncGetMeetingInfoRespMsg', handleGetAllMeetings);
@ -14,3 +15,4 @@ RedisPubSub.on('MeetingDestroyedEvtMsg', handleMeetingDestruction);
RedisPubSub.on('LockSettingsInMeetingChangedEvtMsg', handleMeetingLocksChange);
RedisPubSub.on('UserLockedInMeetingEvtMsg', handleUserLockChange);
RedisPubSub.on('RecordingStatusChangedEvtMsg', handleRecordingStatusChange);
RedisPubSub.on('WebcamsOnlyForModeratorChangedEvtMsg', handleChangeWebcamOnlyModerator);

View File

@ -0,0 +1,5 @@
import changeWebcamOnlyModerator from '../modifiers/webcamOnlyModerator';
export default function handleChangeWebcamOnlyModerator({ body }, meetingId) {
return changeWebcamOnlyModerator(meetingId, body);
}

View File

@ -0,0 +1,37 @@
import Logger from '/imports/startup/server/logger';
import Meetings from '/imports/api/meetings';
import { check } from 'meteor/check';
export default function changeWebcamOnlyModerator(meetingId, payload) {
check(meetingId, String);
check(payload, {
webcamsOnlyForModerator: Boolean,
setBy: String,
});
const { webcamsOnlyForModerator } = payload;
const selector = {
meetingId,
};
const modifier = {
$set: {
'usersProp.webcamsOnlyForModerator': webcamsOnlyForModerator,
},
};
const cb = (err, numChanged) => {
if (err) {
return Logger.error(`Changwing meeting={${meetingId}} webcam Only for Moderator: ${err}`);
}
if (!numChanged) {
return Logger.info(`meeting={${meetingId}} webcam Only for Moderator were not updated`);
}
return Logger.info(`Changed meeting={${meetingId}} updated webcam Only for Moderator`);
};
return Meetings.upsert(selector, modifier, cb);
}

View File

@ -18,7 +18,9 @@ export function joinRouteHandler(nextState, replace, callback) {
fetch(url)
.then(response => response.json())
.then((data) => {
const { meetingID, internalUserID, authToken, logoutUrl } = data.response;
const {
meetingID, internalUserID, authToken, logoutUrl,
} = data.response;
Auth.set(meetingID, internalUserID, authToken, logoutUrl, sessionToken);
replace({ pathname: '/' });

View File

@ -5,17 +5,15 @@ import { createHistory } from 'history';
import LoadingScreen from '/imports/ui/components/loading-screen/component';
import ChatContainer from '/imports/ui/components/chat/container';
import UserListContainer from '/imports/ui/components/user-list/container';
import MeetingEnded from '/imports/ui/components/meeting-ended/component';
import { joinRouteHandler, logoutRouteHandler, authenticatedRouteHandler } from './auth';
import Base from './base';
const browserHistory = useRouterHistory(createHistory)({
basename: Meteor.settings.public.app.basename,
});
const renderRoutes = () => (
<Router history={browserHistory}>
<Router history={browserHistory} >
<Route path="/logout" onEnter={logoutRouteHandler} />
<Route
path="/join"
@ -35,9 +33,10 @@ const renderRoutes = () => (
/>
<Redirect from="users/chat" to="/users/chat/public" />
</Route>
<Route name="meeting-ended" path="/ended/:endedCode" component={Base} />
<Route name="meeting-ended" path="/ended/:endedCode" component={Base} onLeave={logoutRouteHandler} />
<Route name="error" path="/error/:errorCode" component={Base} />
<Redirect from="*" to="/error/404" />
</Router>
);
export default renderRoutes;

View File

@ -16,32 +16,47 @@ Logger.configure({
},
});
// Write logs to console
Logger.add(Winston.transports.Console, {
prettyPrint: false,
humanReadableUnhandledException: true,
colorize: true,
handleExceptions: true,
});
Meteor.startup(() => {
const LOG_CONFIG = Meteor.settings.private.log || {};
let { filename } = LOG_CONFIG;
const { level } = LOG_CONFIG;
// Set Logger message level priority for the console
Logger.transports.console.level = LOG_CONFIG.level;
// console logging
if (Meteor.isDevelopment) {
Logger.add(Winston.transports.Console, {
prettyPrint: false,
humanReadableUnhandledException: true,
colorize: true,
handleExceptions: true,
level,
});
}
// Determine file to write logs to
// file logging
if (filename) {
// no file rotation
if (Meteor.isDevelopment) {
const path = Npm.require('path');
filename = path.join(process.env.PWD, filename);
Logger.add(Winston.transports.File, {
filename,
prettyPrint: true,
level,
prepend: true,
});
}
Logger.add(Winston.transports.File, {
filename,
prettyPrint: true,
});
// daily file rotation
if (Meteor.isProduction) {
Winston.transports.DailyRotateFile = Npm.require('winston-daily-rotate-file');
Logger.add(Winston.transports.DailyRotateFile, {
filename,
datePattern: '.yyyy-MM-dd',
prepend: false,
level,
});
}
}
});

View File

@ -65,7 +65,7 @@ class MettingMessageQueue {
};
const onError = (reason) => {
this.debug(`${eventName}: ${reason}`);
this.debug(`${eventName}: ${reason.stack ? reason.stack : reason}`);
callNext();
};

View File

@ -65,7 +65,6 @@ $btn-jumbo-padding: $jumbo-padding-y $jumbo-padding-x;
cursor: not-allowed;
opacity: .65;
box-shadow: none;
pointer-events: none;
}
&,
@ -100,11 +99,10 @@ $btn-jumbo-padding: $jumbo-padding-y $jumbo-padding-x;
background: none;
padding: 0 !important;
&[aria-disabled="true"] {
&[aria-disabled="true"] > span {
cursor: not-allowed;
opacity: .65;
box-shadow: none;
pointer-events: none;
}
}
@ -178,7 +176,7 @@ $btn-jumbo-padding: $jumbo-padding-y $jumbo-padding-x;
border: $border-size-large solid transparent;
&:focus,
.buttonWrapper:focus & {
.buttonWrapper:focus:not([aria-disabled="true"]) & {
outline: none !important;
color: $color;
background-color: $background;

View File

@ -1,6 +1,8 @@
import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Settings from '/imports/ui/services/settings';
import Meetings from '/imports/api/meetings/';
import Auth from '/imports/ui/services/auth';
import Media from './component';
import MediaService from './service';
import PresentationAreaContainer from '../presentation/container';
@ -57,6 +59,9 @@ export default withTracker(() => {
const data = {};
data.currentPresentation = MediaService.getPresentationInfo();
const meeting = Meetings.findOne({ meetingId: Auth.meetingID });
const webcamOnlyModerator = meeting.usersProp.webcamsOnlyForModerator;
data.content = <DefaultContent />;
if (MediaService.shouldShowWhiteboard()) {
@ -67,7 +72,7 @@ export default withTracker(() => {
data.content = <ScreenshareContainer />;
}
if (MediaService.shouldShowOverlay() && viewVideoDock) {
if (MediaService.shouldShowOverlay() && viewVideoDock && !webcamOnlyModerator) {
data.overlay = <VideoDockContainer />;
}

View File

@ -1,5 +1,6 @@
import React from 'react';
import { withRouter } from 'react-router';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component';
import { styles } from './styles';
@ -23,24 +24,42 @@ const intlMessage = defineMessages({
},
});
const MeetingEnded = ({ intl, router, code }) => (
<div className={styles.parent}>
<div className={styles.modal}>
<div className={styles.content}>
<h1 className={styles.title}>{intl.formatMessage(intlMessage[code])}</h1>
<div className={styles.text}>
{intl.formatMessage(intlMessage.messageEnded)}
const propTypes = {
intl: PropTypes.shape({
formatMessage: PropTypes.func.isRequired,
}).isRequired,
code: PropTypes.string.isRequired,
router: PropTypes.shape({
push: PropTypes.func.isRequired,
}).isRequired,
};
class MeetingEnded extends React.PureComponent {
render() {
const { intl, router, code } = this.props;
return (
<div className={styles.parent}>
<div className={styles.modal}>
<div className={styles.content}>
<h1 className={styles.title}>{intl.formatMessage(intlMessage[code])}</h1>
<div className={styles.text}>
{intl.formatMessage(intlMessage.messageEnded)}
</div>
<Button
color="primary"
className={styles.button}
label={intl.formatMessage(intlMessage.buttonOkay)}
size="sm"
onClick={() => router.push('/logout')}
/>
</div>
</div>
<Button
color="primary"
className={styles.button}
label={intl.formatMessage(intlMessage.buttonOkay)}
size="sm"
onClick={() => router.push('/logout')}
/>
</div>
</div>
</div>
);
);
}
}
MeetingEnded.propTypes = propTypes;
export default injectIntl(withRouter(MeetingEnded));

Some files were not shown because too many files have changed in this diff Show More