Skip to content

Commit

Permalink
Merge pull request bigbluebutton#433 from mconf/improving-client-checks
Browse files Browse the repository at this point in the history
Improving client checks
  • Loading branch information
ritzalam committed Nov 14, 2014
2 parents d79654a + ff46c8d commit f53ec02
Show file tree
Hide file tree
Showing 46 changed files with 1,286 additions and 572 deletions.
18 changes: 12 additions & 6 deletions bbb-client-check/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
value="${basedir}"/>
<property name="SRC_DIR"
value="${BASE_DIR}/src"/>
<property name="TEST_IMAGE_URL" value="http://upload.wikimedia.org/wikipedia/commons/a/a2/Polycyclic_Aromatic_Hydrocarbons_In_Space.jpg" />
<property name="TEST_IMAGE_URL" value="http://upload.wikimedia.org/wikipedia/commons/0/0a/Keswick,_Cumbria_Panorama_1_-_June_2009.jpg" />
<property name="OUTPUT_DIR"
value="check"/>
<property name="TEST_IMAGE_PATH"
value="${OUTPUT_DIR}/test_image.jpg"/>
<taskdef resource="flexTasks.tasks"
classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<macrodef name="create-rsl">
Expand Down Expand Up @@ -91,7 +95,7 @@
</mxmlc>
<antcall target="Resolve-Dependency">
<param name="html.output"
value="check"/>
value="${OUTPUT_DIR}"/>
</antcall>
</target>
<target name="Build-Release">
Expand All @@ -117,26 +121,28 @@
</copy>
</target>
<target name="build"
depends="Create-Config, Extract-rsls, Build-Release"
depends="gen-config-xml, Extract-rsls, Build-Release"
description="Launcher for building whole release process"/>

<target name="Get-IP">
<target name="get-local-ip">
<exec executable="bash" outputproperty="IP">
<arg value="-c"/>
<arg value="ifconfig | grep -v '127.0.0.1' | grep -E '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | tail -1 | cut -d: -f2 | awk '{ print $1}'"/>
</exec>
</target>

<target name="Init" depends="Get-IP">
<target name="init">
<available file="conf/config.xml" property="config.xml.exists" />
<available file="${TEST_IMAGE_PATH}" property="test_image.exists" />
</target>

<target name="Create-Config" depends="Init" unless="${config.xml.exists}">
<target name="gen-config-xml" depends="init, get-local-ip" unless="${config.xml.exists}">
<copy file="resources/config.xml.template" tofile="conf/config.xml" />
<exec executable="sed">
<arg value="-i"/>
<arg value="s:HOST:${IP}:g"/>
<arg value="conf/config.xml"/>
</exec>
<echo message="config.xml generated" />
</target>
</project>
3 changes: 3 additions & 0 deletions bbb-client-check/gen-file.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

head -c $1 < /dev/urandom
2 changes: 2 additions & 0 deletions bbb-client-check/html-template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

<script type="text/javascript" src="resources/lib/api-bridge.js"></script>
<script type="text/javascript" src="resources/lib/sip-0.6.2.js"></script>
<script type="text/javascript" src="resources/lib/deployJava.js"></script>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
// For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
Expand All @@ -62,6 +63,7 @@
</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.
Expand Down
28 changes: 26 additions & 2 deletions bbb-client-check/locale/en_US/resources.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
bbbsystemcheck.title=BigBlueButton Client Check
bbbsystemcheck.title = BigBlueButton Client Check
bbbsystemcheck.refresh = Refresh
bbbsystemcheck.mail = Mail
bbbsystemcheck.version = Client Check Version
bbbsystemcheck.dataGridColumn.item = Item
bbbsystemcheck.dataGridColumn.status = Status
bbbsystemcheck.dataGridColumn.result = Result
bbbsystemcheck.copyAllText = Copy all text
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.status.succeeded = Succeded
bbbsystemcheck.status.warning = Warning
bbbsystemcheck.status.failed = Failed
bbbsystemcheck.status.loading = Loading...
bbbsystemcheck.test.name.browser = Browser
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
bbbsystemcheck.test.name.uploadSpeed = Upload Speed
bbbsystemcheck.test.name.userAgent = User Agent
bbbsystemcheck.test.name.webRTCEcho = WebRTC Echo Test
bbbsystemcheck.test.name.webRTCSocket = WebRTC Socket Test
bbbsystemcheck.test.name.webRTCSupported = WebRTC Supported
2 changes: 2 additions & 0 deletions bbb-client-check/resources/config.xml.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
<version>VERSION</version>
<mail>MAIL</mail>
<downloadFilePath url="test_image.jpg"/>
<ports>
<port>
Expand Down
29 changes: 24 additions & 5 deletions bbb-client-check/resources/lib/api-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,32 @@
}

BBBClientCheck.javaEnabled = function(){
var javaEnabledInfo = '';
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();

javaEnabledInfo = navigator.javaEnabled();
swfObj.javaEnabled(javaEnabledInfo);
swfObj.javaEnabled(result);
}


function getJavaVersion() {
return deployJava.getJREs();
}

function isJavaVersionAppropriateForDeskshare(required) {
return deployJava.versionCheck(required);
}

BBBClientCheck.language = function(){
var languageInfo = '';
var swfObj = getSwfObj();
Expand Down
Loading

0 comments on commit f53ec02

Please sign in to comment.