You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2017/11/17 03:49:38 UTC
openmeetings git commit: [OPENMEETINGS-1758] build is updated,
nettest is almost moved
Repository: openmeetings
Updated Branches:
refs/heads/master 3d58d78a7 -> ed2ef5d3b
[OPENMEETINGS-1758] build is updated, nettest is almost moved
Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/ed2ef5d3
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/ed2ef5d3
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/ed2ef5d3
Branch: refs/heads/master
Commit: ed2ef5d3b853fa9dccfbfd4c9922c426c37923fe
Parents: 3d58d78
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Fri Nov 17 10:49:28 2017 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Fri Nov 17 10:49:28 2017 +0700
----------------------------------------------------------------------
openmeetings-flash/openlaszlo.xml | 108 ------------
openmeetings-flash/pom.xml | 109 +++++++++---
.../src/main/flex/assets/edit-copy.png | Bin 0 -> 498 bytes
.../src/main/flex/assets/failed.png | Bin 0 -> 7193 bytes
.../src/main/flex/assets/notrun.png | Bin 0 -> 5853 bytes
.../src/main/flex/assets/passed.png | Bin 0 -> 8809 bytes
.../src/main/flex/assets/passed_result.png | Bin 0 -> 8036 bytes
.../src/main/flex/assets/running.swf | Bin 0 -> 65877 bytes
openmeetings-flash/src/main/flex/nettest.mxml | 82 +++++++++
.../openmeetings/nettest/BaseURLLoadTest.mxml | 129 ++++++++++++++
.../openmeetings/nettest/DownloadSpeedTest.mxml | 47 +++++
.../apache/openmeetings/nettest/JitterTest.mxml | 52 ++++++
.../openmeetings/nettest/NetworkTest.mxml | 174 +++++++++++++++++++
.../apache/openmeetings/nettest/PingTest.mxml | 41 +++++
.../nettest/PortAvailabilityTest.mxml | 79 +++++++++
.../openmeetings/nettest/UploadSpeedTest.mxml | 23 +++
.../networkTesting/resources/edit-copy.png | Bin 498 -> 0 bytes
.../networkTesting/tests/resources/failed.png | Bin 7193 -> 0 bytes
.../networkTesting/tests/resources/notrun.png | Bin 5853 -> 0 bytes
.../networkTesting/tests/resources/passed.png | Bin 8809 -> 0 bytes
.../tests/resources/passed_result.png | Bin 8036 -> 0 bytes
.../networkTesting/tests/resources/running.swf | Bin 65877 -> 0 bytes
.../src/test/flex/org/test/TestApp.as | 31 ----
.../apache/openmeetings/web/pages/HashPage.html | 2 +-
.../apache/openmeetings/web/room/SwfPanel.html | 3 -
.../apache/openmeetings/web/room/SwfPanel.java | 22 +--
.../openmeetings/web/room/VideoSettings.java | 2 +
.../org/apache/openmeetings/web/room/room.js | 2 +-
.../apache/openmeetings/web/room/settings.js | 14 +-
.../openmeetings/web/room/swf-functions.js | 48 ++---
.../src/main/webapp/css/general.css | 4 +
31 files changed, 743 insertions(+), 229 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/openlaszlo.xml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/openlaszlo.xml b/openmeetings-flash/openlaszlo.xml
deleted file mode 100644
index 1cffc9a..0000000
--- a/openmeetings-flash/openlaszlo.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- -->
-<!DOCTYPE project>
-<project name="openmeetings" basedir="./" default="client.only"
- xmlns="antlib:org.apache.tools.ant"
- xmlns:rat="antlib:org.apache.rat.anttasks"
- xmlns:ivy="antlib:org.apache.ivy.ant"
- xmlns:artifact="antlib:org.apache.maven.artifact.ant"
- >
- <property name="laszlo46.home" value="${openlaszlo}/openlaszlo46" />
- <!-- LPS Properties -->
- <property name="out.dir.swf" value="${dist.webapps.dir}/public" />
- <property name="flex.src.dir" value="${webcontent.base.dir}/flex" />
- <property name="laszlo.as3.src.dir" value="${webcontent.base.dir}/swf10" />
- <path id="laszlo46.lib">
- <fileset dir="${laszlo46.home}/WEB-INF/lib" includes="*.jar" />
- </path>
-
- <target name="client.only" depends="compile.flex, compile.laszlo.networktesting" unless="client-already-built">
- <property name="client-already-built" value="true"/>
- </target>
-
- <target name="client.debug.only" depends="compile.flex.debug,compile.laszlo.networktesting.debug" />
-
- <target name="-compile.flash" description="compile flash application">
- <java classname="org.openlaszlo.compiler.Main" fork="true" newenvironment="true" failonerror="true" dir="${flash.src.dir}" classpathref="${flash.classpath.ref}">
- <jvmarg value="-DLPS_HOME=${flash.lps.home}" />
- <jvmarg value="-Dlzdebug=false" />
- <jvmarg value="-Dlzproxied=${laszlo.proxied}" />
- <jvmarg value="-Xms512M" />
- <jvmarg value="-Xmx512M" />
- <arg line="--runtime=${flash.runtime} ${flash.debug} --dir "${out.dir.swf}" --onerror warn ${flash.main.file} -o ${flash.out.file}" />
- </java>
- </target>
-
- <target name="compile.laszlo.networktesting" depends="compile.laszlo.networktesting.debug">
- <antcall target="-compile.flash" inheritAll="true" inheritRefs="true">
- <param name="flash.classpath.ref" value="laszlo46.lib" />
- <param name="flash.src.dir" value="${laszlo.as3.src.dir}/networkTesting" />
- <param name="flash.lps.home" value="${laszlo46.home}" />
- <param name="flash.runtime" value="swf11" />
- <param name="flash.main.file" value="networktesting.lzx" />
- <param name="flash.out.file" value="networktesting.swf10.swf" />
- <param name="flash.debug" value="" />
- </antcall>
- </target>
-
- <target name="compile.laszlo.networktesting.debug">
- <antcall target="-compile.flash" inheritAll="true" inheritRefs="true">
- <param name="flash.classpath.ref" value="laszlo46.lib" />
- <param name="flash.src.dir" value="${laszlo.as3.src.dir}/networkTesting" />
- <param name="flash.lps.home" value="${laszlo46.home}" />
- <param name="flash.runtime" value="swf11" />
- <param name="flash.main.file" value="networktesting.lzx" />
- <param name="flash.out.file" value="networktestingdebug.swf10.swf" />
- <param name="flash.debug" value="--debug" />
- </antcall>
- </target>
-
- <condition property="isWindows">
- <os family="windows" />
- </condition>
-
- <condition property="isUnix">
- <os family="unix" />
- </condition>
-
- <target name="if_windows" if="isWindows">
- <property name="mxmlc_bin" value="mxmlc.bat" />
- </target>
-
- <target name="if_unix" if="isUnix">
- <property name="mxmlc_bin" value="mxmlc" />
- </target>
-
- <target name="-compile.flex" description="compile flash application" depends="if_windows, if_unix">
- <exec dir="${flex.src.dir}" executable="${laszlo46.home}/WEB-INF/flexsdk/4.15.0/bin/${mxmlc_bin}">
- <arg value="main.mxml"/>
- <arg line="-output ${out.dir.swf}/main.swf"/>
- <env key="PLAYERGLOBAL_HOME" value="${laszlo46.home}/WEB-INF/flexsdk/4.15.0/frameworks/libs/player"/>
- </exec>
- </target>
-
- <target name="compile.flex" depends="compile.flex.debug">
- <antcall target="-compile.flex" inheritAll="true" inheritRefs="true"/>
- </target>
-
- <target name="compile.flex.debug">
- <!--antcall target="-compile.flex" inheritAll="true" inheritRefs="true"/-->
- </target>
-</project>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/pom.xml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/pom.xml b/openmeetings-flash/pom.xml
index 51a196d..cd15bda 100644
--- a/openmeetings-flash/pom.xml
+++ b/openmeetings-flash/pom.xml
@@ -25,39 +25,87 @@
<relativePath>..</relativePath>
</parent>
<artifactId>openmeetings-flash</artifactId>
- <packaging>jar</packaging>
+ <packaging>swf</packaging>
<name>Openmeetings Flash</name>
<description>Module for OpenMeetings OpenLaszlo/Flex client</description>
<properties>
- <openlaszlo>${project.build.directory}</openlaszlo>
- <out.dir.swf>${project.build.directory}</out.dir.swf>
- <webcontent.base.dir>${project.basedir}/src/main</webcontent.base.dir>
<site.basedir>${project.parent.basedir}</site.basedir>
<skip.site.copy>false</skip.site.copy>
+ <flex.sdk.version>4.16.0</flex.sdk.version>
</properties>
+ <repositories>
+ <repository>
+ <id>jpresso</id>
+ <url>http://repository.jspresso.org/maven2/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jpresso</id>
+ <url>http://repository.jspresso.org/maven2/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>framework</artifactId>
+ <version>${flex.sdk.version}</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>com.adobe.flash.framework</groupId>
+ <artifactId>playerglobal</artifactId>
+ <version>23.0</version>
+ <type>swc</type>
+ </dependency>
+ </dependencies>
<build>
- <!-- sourceDirectory>src/main/flex</sourceDirectory-->
+ <sourceDirectory>src/main/flex</sourceDirectory>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-maven-plugin</artifactId>
+ <version>7.1.1</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>compiler</artifactId>
+ <version>${flex.sdk.version}</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
<executions>
<execution>
- <id>unpack</id>
- <phase>initialize</phase>
+ <id>main-compile</id>
+ <phase>generate-sources</phase>
<goals>
- <goal>unpack</goal>
+ <goal>compile-swf</goal>
</goals>
<configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.openlaszlo</groupId>
- <artifactId>openlaszlo</artifactId>
- <version>4.9.8</version>
- <type>tgz</type>
- <outputDirectory>${openlaszlo}</outputDirectory>
- </artifactItem>
- </artifactItems>
+ <sourceFile>main.mxml</sourceFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>nettest-compile</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>compile-swf</goal>
+ </goals>
+ <configuration>
+ <sourceFile>nettest.mxml</sourceFile>
</configuration>
</execution>
</executions>
@@ -66,11 +114,28 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <phase>compile</phase>
+ <id>main-move</id>
+ <phase>process-sources</phase>
+ <configuration>
+ <target>
+ <move verbose="true" force="true" overwrite="true"
+ file="${project.build.directory}/${project.build.finalName}.${project.packaging}"
+ tofile="${project.build.directory}/main.swf"/>
+ </target>
+ <skip>${om.quick.build}</skip>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>nettest-move</id>
+ <phase>process-resources</phase>
<configuration>
- <exportAntProperties>true</exportAntProperties>
<target>
- <ant antfile="${basedir}/openlaszlo.xml" target="client.only"/>
+ <move verbose="true" force="true" overwrite="true"
+ file="${project.build.directory}/${project.build.finalName}.${project.packaging}"
+ tofile="${project.build.directory}/networktest.swf"/>
</target>
<skip>${om.quick.build}</skip>
</configuration>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/assets/edit-copy.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/edit-copy.png b/openmeetings-flash/src/main/flex/assets/edit-copy.png
new file mode 100644
index 0000000..8dd48c4
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/edit-copy.png differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/assets/failed.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/failed.png b/openmeetings-flash/src/main/flex/assets/failed.png
new file mode 100644
index 0000000..8654b24
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/failed.png differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/assets/notrun.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/notrun.png b/openmeetings-flash/src/main/flex/assets/notrun.png
new file mode 100644
index 0000000..cb869eb
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/notrun.png differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/assets/passed.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/passed.png b/openmeetings-flash/src/main/flex/assets/passed.png
new file mode 100644
index 0000000..5929d15
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/passed.png differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/assets/passed_result.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/passed_result.png b/openmeetings-flash/src/main/flex/assets/passed_result.png
new file mode 100644
index 0000000..d4d6f84
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/passed_result.png differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/assets/running.swf
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/running.swf b/openmeetings-flash/src/main/flex/assets/running.swf
new file mode 100644
index 0000000..138d3e1
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/running.swf differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/nettest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/nettest.mxml b/openmeetings-flash/src/main/flex/nettest.mxml
new file mode 100644
index 0000000..bbe098a
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/nettest.mxml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<s:Application
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:nettest="org.apache.openmeetings.nettest.*"
+ name="nettest"
+ width="570" height="900" pageTitle="OpenMeetings" fontSize="12" focusEnabled="true"
+ initialize="appInit(event)" uncaughtError="uncaughtError(event)">
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ <mx:TraceTarget/>
+ </fx:Declarations>
+ <fx:Script><![CDATA[
+ import mx.core.FlexGlobals;
+ import flash.desktop.Clipboard;
+ import flash.desktop.ClipboardFormats;
+
+ public var params:Object = {};
+ private var logStr:String = "";
+ public var busy:Boolean = false;
+
+ [Embed(source="assets/edit-copy.png")]
+ [Bindable]
+ private var copyImgCls:Class;
+ [Bindable]
+ private var labels:Object = {};
+
+ public function debug(...rest):void {
+ if ('true' === params.debug) {
+ ExternalInterface.call("console.log", rest);
+ }
+ }
+
+ private function appInit(evt:Event):void {
+ this.params = FlexGlobals.topLevelApplication.parameters;
+ debug("appInit()", params);
+ var lbls:Array = ExternalInterface.call("getStringLabels");
+ for (var i:int = 0; i < lbls.length; ++i) {
+ labels[lbls[i].id] = lbls[i].value;
+ }
+ }
+
+ private function uncaughtError(e:UncaughtErrorEvent):void {
+ debug("Unexpected ERROR", e);
+ }
+
+ public function lbl(key:String):String {
+ var s:String = labels['network.test.' + key];
+ return !!s ? s : "Missing[" + key + "]";
+ }
+
+ public function log(str:String):void {
+ logStr += str;
+ debug(str);
+ }
+ ]]></fx:Script>
+
+ <s:HGroup id="tests" paddingBottom="15">
+ <nettest:PingTest id="pingTest"/>
+ <nettest:PortAvailabilityTest id="portTest"/>
+ <nettest:JitterTest id="jitterTest"/>
+ <nettest:DownloadSpeedTest id="speedTest"/>
+ </s:HGroup>
+</s:Application>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/BaseURLLoadTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/BaseURLLoadTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/BaseURLLoadTest.mxml
new file mode 100755
index 0000000..e0f128e
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/BaseURLLoadTest.mxml
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<nettest:NetworkTest
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:nettest="org.apache.openmeetings.nettest.*">
+ <fx:Script><![CDATA[
+ private var hostUrl:String;
+ private var request:URLRequest;
+ protected var testTypeParameter:String;
+ protected var loader:URLLoader;
+ private var loaderInited:Boolean = false;
+ protected var verbose:Boolean = false;
+ protected var finishedTestsCount:int;
+ protected var successfulTestsCount:int;
+ protected var wholeTime:int;
+ protected var maxTime:int;
+ protected var minTime:int;
+ protected var startTime:int;
+ protected var testsCount:int;
+
+ private function initLoader():void {
+ hostUrl = getBaseUrl() + "services/networktest?type=" + testTypeParameter;
+ request = new URLRequest(hostUrl);
+
+ loader = new URLLoader();
+ loader.addEventListener(Event.COMPLETE, onComplete);
+ loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
+ loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
+
+ loaderInited = true;
+ }
+
+ private function onComplete(event:Event):void {
+ var endTime:int = getTimer();
+ var pingTime:int = endTime - startTime;
+ wholeTime += pingTime;
+ if (pingTime > maxTime) {
+ maxTime = pingTime;
+ }
+ if (pingTime < minTime) {
+ minTime = pingTime;
+ }
+
+ if (verbose) {
+ log(lbl('ping.load') + " = " + pingTime + " " + lbl('ms'));
+ }
+
+ finishedTestsCount++;
+ successfulTestsCount++;
+ if (finishedTestsCount < testsCount && running) {
+ startTime = getTimer();
+ loader.load(request);
+ } else {
+ report();
+ }
+ }
+
+ private function onError(e:ErrorEvent):void {
+ if (verbose) {
+ this.log("Error - " + e);
+ }
+
+ finishedTestsCount++;
+ if (finishedTestsCount < testsCount && running) {
+ startTime = getTimer();
+ loader.load(request);
+ } else {
+ report();
+ }
+ }
+
+ override protected function start():void {
+ if (!loaderInited) {
+ this.initLoader();
+ }
+ finishedTestsCount = 0;
+ successfulTestsCount = 0;
+ wholeTime = 0;
+ maxTime = 0;
+ minTime = 999999;
+
+ this.log(lbl('report.start') + " " + hostUrl);
+ startTime = getTimer();
+ loader.load(request);
+ }
+
+ override protected function forcedStop():void {
+ loader.close();
+ this.log("stopped");
+ }
+
+ protected function generateReport():String {
+ return "";
+ }
+
+ private function report():void {
+ var report:String = lbl('report') + ":";
+ if (successfulTestsCount > 0) {
+ report += "\n" + generateReport();
+ } else {
+ report += " " + lbl('report.con.err');
+ }
+ log(report);
+
+ if (successfulTestsCount > 0) {
+ setPassed();
+ } else {
+ setFailed();
+ }
+ }
+ ]]></fx:Script>
+</nettest:NetworkTest>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/DownloadSpeedTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/DownloadSpeedTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/DownloadSpeedTest.mxml
new file mode 100755
index 0000000..1397066
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/DownloadSpeedTest.mxml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<nettest:BaseURLLoadTest
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:nettest="org.apache.openmeetings.nettest.*">
+ <fx:Script><![CDATA[
+ override protected function init():void {
+ super.init();
+ testsCount = 1;
+ title = lbl('dwn');
+ testTypeParameter = "download";
+ verbose = false;
+ resultText = true;
+ }
+
+ override protected function generateReport():String {
+ var mBytes:Number = loader.bytesTotal / (1024 * 1024);
+ var timeSec:Number = wholeTime / 1000;
+ var speed:Number = mBytes / timeSec;
+
+ var report:String = lbl('dwn.bytes') + ": " + mBytes + " " + lbl('mb') + "\n";
+ report += lbl('dwn.time') + ": " + timeSec + " " + lbl('sec') + "\n";
+ report += lbl('dwn.speed') + ": " + speed + " " + lbl('mb') + "/" + lbl('sec') + "\n";
+
+ result.text = formatNumber(speed) + "\n" + lbl('mb') + "/" + lbl('sec');
+
+ return report;
+ }
+ ]]></fx:Script>
+</nettest:BaseURLLoadTest>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/JitterTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/JitterTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/JitterTest.mxml
new file mode 100755
index 0000000..7516db5
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/JitterTest.mxml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<nettest:BaseURLLoadTest
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:nettest="org.apache.openmeetings.nettest.*">
+ <fx:Script><![CDATA[
+ override protected function init():void {
+ super.init();
+ testsCount = 10;
+ title = lbl('jitter');
+ testTypeParameter = "jitter";
+ verbose = false;
+ resultText = true;
+ }
+
+ override protected function generateReport():String {
+ var averageTime:Number = wholeTime / successfulTestsCount;
+ var jitterMax:Number = maxTime - averageTime;
+ var jitterMin:Number = minTime - averageTime;
+ var report:String = lbl('jitter.avg') + ": " + averageTime + " " + lbl('ms') + "\n";
+ report += lbl('jitter.min') + ": " + minTime + " " + lbl('ms') + "\n";
+ report += lbl('jitter.max') + ": " + maxTime + " " + lbl('ms') + "\n";
+ report += lbl('jitter') + ": " + jitterMax + " " + lbl('ms') + "; " + jitterMin + " " + lbl('ms') + " \n";
+
+ var max:Number = -jitterMin;
+ if (jitterMax > max) {
+ max = jitterMax;
+ }
+
+ result.text = formatNumber(max) + lbl('ms');
+
+ return report;
+ }
+ ]]></fx:Script>
+</nettest:BaseURLLoadTest>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/NetworkTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/NetworkTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/NetworkTest.mxml
new file mode 100644
index 0000000..cbe5e9d
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/NetworkTest.mxml
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<s:Panel width="115" height="150"
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ borderVisible="false" creationComplete="init()">
+ <fx:Script><![CDATA[
+ import flash.globalization.NumberFormatter;
+
+ protected var running:Boolean = false;
+ protected var allTests:Boolean = false;
+ protected var resultText:Boolean = false;
+ private var myMC:MovieClip;
+ private var nf:NumberFormatter = new NumberFormatter("en_US");
+
+ [Embed(source="../../../../assets/notrun.png")]
+ [Bindable]
+ protected var notRunImgCls:Class;
+ [Embed(source="../../../../assets/running.swf")]
+ [Bindable]
+ protected var runCls:Class;
+ [Embed(source="../../../../assets/failed.png")]
+ [Bindable]
+ protected var failedImgCls:Class;
+ [Embed(source="../../../../assets/passed.png")]
+ [Bindable]
+ protected var passedImgCls:Class;
+ [Embed(source="../../../../assets/passed_result.png")]
+ [Bindable]
+ protected var passResultImgCls:Class;
+
+ protected function init():void {
+ addEventListener(MouseEvent.CLICK, clickHandler);
+ myMC = new runCls();
+ container.addChild(myMC);
+ nf.decimalSeparator = ".";
+ nf.fractionalDigits = 2;
+ nf.useGrouping = false;
+ }
+
+ private function clickHandler(evt:MouseEvent):void {
+ if (running) {
+ setStopped();
+ } else {
+ allTests = false;
+ setRunning();
+ }
+ }
+
+ protected function start():void {
+ }
+
+ protected function forcedStop():void {
+ }
+
+ private function hideAll():void {
+ notRun.visible = false;
+ container.visible = false;
+ failed.visible = false;
+ passed.visible = false;
+ passResult.visible = false;
+ result.visible = false;
+ }
+
+ protected function setRunning():void {
+ var app:nettest = parentApplication as nettest;
+ if (app.busy) {
+ return;
+ }
+ app.busy = true;
+ start();
+ running = true;
+ hideAll();
+ container.visible = true;
+ myMC.play();
+ }
+
+ protected function setStopped():void {
+ forcedStop();
+ running = false;
+ hideAll();
+ notRun.visible = true;
+ var app:nettest = parentApplication as nettest;
+ app.busy = false;
+ handleAllTestsMode();
+ }
+
+ protected function setPassed():void {
+ if (running) {
+ running = false;
+ hideAll();
+ if (resultText) {
+ passResult.visible = true;
+ result.visible = true;
+ } else {
+ passed.visible = true;
+ }
+ var app:nettest = parentApplication as nettest;
+ app.busy = false;
+ handleAllTestsMode();
+ }
+ }
+
+ protected function setFailed():void {
+ if (running) {
+ running = false;
+ hideAll();
+ failed.visible = true;
+ var app:nettest = parentApplication as nettest;
+ app.busy = false;
+ handleAllTestsMode();
+ }
+ }
+
+ protected function handleAllTestsMode():void {
+ if (allTests) {
+ var app:nettest = parentApplication as nettest;
+ //canvas.testsView.testAll();
+ }
+ }
+
+ protected function lbl(key:String):String {
+ var app:nettest = parentApplication as nettest;
+ return app.lbl(key);
+ }
+
+ protected function debug(msg:String):void {
+ var str:String = this.title + ": " + msg + "\n";
+ var app:nettest = parentApplication as nettest;
+ app.debug(str);
+ }
+
+ protected function log(msg:String):void {
+ var str:String = this.title + ": " + msg + "\n";
+ var app:nettest = parentApplication as nettest;
+ app.log(str);
+ }
+
+ protected function formatNumber(num:Number):String {
+ return nf.formatNumber(num);
+ }
+
+ protected function getBaseUrl():String {
+ var app:nettest = parentApplication as nettest;
+ var hostUrl:String = app.params.httpProtocol + "://" + app.params.host + ":" + app.params.httpPort + "/" + app.params.path;
+ return hostUrl + (hostUrl.slice(-1) == '/' ? '' : '/');
+ }
+ ]]></fx:Script>
+
+ <s:Image id="notRun" source="{notRunImgCls}" visible="true" width="113" height="113" x="0" y="0"/> <!-- toolTip="{exclusiveTitle}" -->
+ <mx:UIComponent id="container" visible="false" width="113" height="113" x="0" y="0"/>
+ <s:Image id="failed" source="{failedImgCls}" visible="false" width="113" height="113" x="0" y="0"/>
+ <s:Image id="passed" source="{passedImgCls}" visible="false" width="113" height="113" x="0" y="0"/>
+ <s:Image id="passResult" source="{passResultImgCls}" visible="false" width="113" height="113" x="0" y="0"/>
+ <s:Label id="result" visible="false" color="white" fontSize="16" x="32" y="32"/>
+</s:Panel>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PingTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PingTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PingTest.mxml
new file mode 100755
index 0000000..74fce06
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PingTest.mxml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<nettest:BaseURLLoadTest
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:nettest="org.apache.openmeetings.nettest.*">
+ <fx:Script><![CDATA[
+ override protected function init():void {
+ super.init();
+ testsCount = 10;
+ title = lbl('ping');
+ testTypeParameter = "ping";
+ }
+
+ override protected function generateReport():String {
+ var averageTime:Number = wholeTime / successfulTestsCount;
+ var packetsLost:Number = testsCount - successfulTestsCount;
+ var report:String = lbl('ping.avg') + ": " + averageTime + " " + lbl('ms') + "\n";
+ report += lbl('ping.rcv') + ": " + successfulTestsCount + "\n";
+ report += lbl('ping.lost') + ": " + packetsLost + "\n";
+
+ return report;
+ }
+ ]]></fx:Script>
+</nettest:BaseURLLoadTest>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PortAvailabilityTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PortAvailabilityTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PortAvailabilityTest.mxml
new file mode 100644
index 0000000..bd09088
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/PortAvailabilityTest.mxml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<nettest:NetworkTest
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:nettest="org.apache.openmeetings.nettest.*">
+ <fx:Script><![CDATA[
+ import mx.core.FlexGlobals;
+
+ private var nc:NetConnection;
+
+ override protected function init():void {
+ super.init();
+ title = lbl('port');
+ }
+
+ override protected function start():void {
+ var app:nettest = parentApplication as nettest;
+ var url:String = app.params.flashProtocol + "://" + app.params.host + ":" + app.params.flashPort + "/" + app.params.path + "hibernate";
+ nc = new NetConnection();
+ nc.addEventListener(NetStatusEvent.NET_STATUS, function onConnectionStatus(e:NetStatusEvent):void {
+ switch (e.info.code) {
+ case 'NetConnection.Connect.Failed':
+ setFailed();
+ break;
+ case 'NetConnection.Connect.Success':
+ if (running) {
+ log(lbl('port.avail') + "\n");
+ setPassed();
+ disconnect();
+ }
+ break;
+ }
+ debug(": RTMP connect status - " + e.info.code);
+ });
+ nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, function (event:AsyncErrorEvent):void {
+ if (running) {
+ log(lbl('report.con.err') + " - " + event + "\n");
+ setFailed();
+ }
+ });
+ nc.client = {
+ onMetaData: function (infoObject:Object):void {
+ }
+ , onBWDone: function (...rest):void {
+ }
+ , onBWCheck: function (...rest):Number {
+ return 0;
+ }
+ };
+ this.log(": " + lbl('report.start') + " " + url);
+ nc.connect(url, {
+ sid: "noclient"
+ , roomClient: true
+ , nativeSsl: 'best' === app.params.proxy
+ });
+ }
+
+ private function disconnect():void {
+ nc.close();
+ }
+ ]]></fx:Script>
+</nettest:NetworkTest>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/UploadSpeedTest.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/UploadSpeedTest.mxml b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/UploadSpeedTest.mxml
new file mode 100755
index 0000000..729eb1f
--- /dev/null
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/nettest/UploadSpeedTest.mxml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<nettest:NetworkTest
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:nettest="org.apache.openmeetings.nettest.*">
+</nettest:NetworkTest>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/swf10/networkTesting/resources/edit-copy.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/swf10/networkTesting/resources/edit-copy.png b/openmeetings-flash/src/main/swf10/networkTesting/resources/edit-copy.png
deleted file mode 100644
index 8dd48c4..0000000
Binary files a/openmeetings-flash/src/main/swf10/networkTesting/resources/edit-copy.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/failed.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/failed.png b/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/failed.png
deleted file mode 100644
index 8654b24..0000000
Binary files a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/failed.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/notrun.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/notrun.png b/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/notrun.png
deleted file mode 100644
index cb869eb..0000000
Binary files a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/notrun.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed.png b/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed.png
deleted file mode 100644
index 5929d15..0000000
Binary files a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed_result.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed_result.png b/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed_result.png
deleted file mode 100644
index d4d6f84..0000000
Binary files a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/passed_result.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/running.swf
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/running.swf b/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/running.swf
deleted file mode 100644
index 138d3e1..0000000
Binary files a/openmeetings-flash/src/main/swf10/networkTesting/tests/resources/running.swf and /dev/null differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-flash/src/test/flex/org/test/TestApp.as
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/test/flex/org/test/TestApp.as b/openmeetings-flash/src/test/flex/org/test/TestApp.as
deleted file mode 100644
index 9e23e4a..0000000
--- a/openmeetings-flash/src/test/flex/org/test/TestApp.as
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
- * Copyright (C) 2008-2012 Marvin Froeder <ma...@flexmojos.net>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.test
-{
-
- public class TestApp
- {
-
- [Test]
- public function testNothing():void
- {
- //TODO un implemented
- trace("Hello test");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.html
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.html
index 142a879..5b389c7 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.html
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.html
@@ -26,7 +26,7 @@
</div>
</div>
<div wicket:id="i-pass"></div>
- <div wicket:id="panel-main" style="width: 100%; height: 100%;"></div>
+ <div wicket:id="panel-main" class="hash-panel-main"></div>
<div wicket:id="access-denied"></div>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.html
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.html
index fc318ca..42b2568 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.html
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.html
@@ -40,9 +40,6 @@
</style>
</wicket:head>
<wicket:panel>
- <div id="swfloading" style="z-index: 666666; position: absolute; top: 50%; left: 50%;">
- <img src="images/ajax-loader.gif" />
- </div>
<noscript>Please enable JavaScript in order to use this application.</noscript>
</wicket:panel>
</html>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java
index 92fcb94..e08e97b 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java
@@ -23,7 +23,6 @@ import static org.apache.openmeetings.util.OpenmeetingsVariables.FLASH_PORT;
import static org.apache.openmeetings.util.OpenmeetingsVariables.FLASH_SECURE;
import static org.apache.openmeetings.util.OpenmeetingsVariables.FLASH_SSL_PORT;
import static org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKey;
-import static org.apache.wicket.RuntimeConfigurationType.DEVELOPMENT;
import java.net.URL;
@@ -38,7 +37,6 @@ import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.markup.head.PriorityHeaderItem;
import org.apache.wicket.protocol.http.request.WebClientInfo;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.request.mapper.parameter.PageParametersEncoder;
import org.apache.wicket.request.resource.JavaScriptResourceReference;
import org.apache.wicket.request.resource.ResourceReference;
import org.apache.wicket.util.string.StringValue;
@@ -52,6 +50,7 @@ import com.github.openjson.JSONObject;
public class SwfPanel extends BasePanel {
private static final long serialVersionUID = 1L;
private static final Logger log = Red5LoggerFactory.getLogger(SwfPanel.class, getWebAppRootKey());
+ public static final ResourceReference FLASH_JS_REFERENCE = new JavaScriptResourceReference(SwfPanel.class, "swf-functions.js");
public static final String SWF = "swf";
public static final String SWF_TYPE_NETWORK = "network";
public static final String SWF_TYPE_SETTINGS = "settings";
@@ -115,9 +114,6 @@ public class SwfPanel extends BasePanel {
, "network.test.upl.speed"
);
}
- JSONObject options = new JSONObject().put("src", swf + new PageParametersEncoder().encodePageParameters(pp));
- options.put("wmode", cp.isBrowserInternetExplorer() && cp.getBrowserVersionMajor() == 11 ? "opaque" : "direct");
-
JSONObject s = new JSONObject();
try {
URL url = new URL(cp.getCodebase());
@@ -130,23 +126,21 @@ public class SwfPanel extends BasePanel {
.put("httpProtocol", url.getProtocol())
.put("httpPort", url.getPort())
.put("host", url.getHost())
- .put("path", path);
+ .put("path", path)
+ .put("width", "100%")
+ .put("height", "100%")
+ .put("wmode", cp.isBrowserInternetExplorer() && cp.getBrowserVersionMajor() == 11 ? "opaque" : "direct");
} catch (Exception e) {
log.error("Error while constructing video settings parameters", e);
}
- initStr = String.format("labels = %s; config = %s; initSwf(%s);", lbls, s, options.toString());
+ initStr = String.format("labels = %s; initSwf(%s, '%s', '%s', %s);"
+ , lbls, "$('.hash-panel-main')", swf, "nettest", s.toString());
}
return initStr;
}
private String getFlashFile(StringValue type) {
- String fmt;
- if (SWF_TYPE_NETWORK.equals(type.toString())) {
- fmt = "networktesting%s.swf10.swf";
- } else {
- return "";
- }
- return String.format(fmt, DEVELOPMENT == getApplication().getConfigurationType() ? "debug" : "");
+ return SWF_TYPE_NETWORK.equals(type.toString()) ? "networktest.swf" : "";
}
public static String getStringLabels(String... ids) {
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java
index 21c882d..76e3875 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java
@@ -24,6 +24,7 @@ import static org.apache.openmeetings.util.OpenmeetingsVariables.FLASH_SSL_PORT;
import static org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKey;
import static org.apache.openmeetings.web.app.Application.NAME_ATTR_KEY;
import static org.apache.openmeetings.web.app.Application.getBean;
+import static org.apache.openmeetings.web.room.SwfPanel.FLASH_JS_REFERENCE;
import static org.apache.wicket.RuntimeConfigurationType.DEVELOPMENT;
import java.net.URL;
@@ -64,6 +65,7 @@ public class VideoSettings extends Panel {
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
+ response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(FLASH_JS_REFERENCE)));
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(SETTINGS_JS_REFERENCE)));
}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
index 0e7e34c..5564ed3 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
@@ -342,7 +342,7 @@ var Video = (function() {
o.broadcastId = c.broadcastId;
o.type = c.type;
delete o.keycode;
- swf = initVideo(vc, _id + '-swf', o);
+ swf = initSwf(vc, 'main.swf', _id + '-swf', o);
swf.attr('width', _w).attr('height', _h);
v.dialog("widget").css(_pos);
}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
index 3b67728..429ac30 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/settings.js
@@ -1,16 +1,4 @@
/* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */
-function initVideo(el, id, options) {
- const type = 'application/x-shockwave-flash'
- , src = 'public/main.swf?cache' + new Date().getTime()
- , o = $('<object>').attr('id', id).attr('type', type).attr('data', src).attr('width', options.width).attr('height', options.height);
- o.append($('<param>').attr('name', 'quality').attr('value', 'best'))
- .append($('<param>').attr('name', 'wmode').attr('value', options.wmode))
- .append($('<param>').attr('name', 'allowscriptaccess').attr('value', 'sameDomain'))
- .append($('<param>').attr('name', 'allowfullscreen').attr('value', 'false'))
- .append($('<param>').attr('name', 'flashvars').attr('value', $.param(options)));
- el.append(o);
- return o;
-}
var VideoSettings = (function() {
let vs, lm, swf, s, cam, mic, res, o
, vidScroll, recBtn, playBtn, recAllowed = false;
@@ -82,7 +70,7 @@ var VideoSettings = (function() {
o.mode = 'settings';
o.rights = (o.rights || []).join();
delete o.keycode;
- swf = initVideo(vidScroll, 'video-settings-swf', o)[0];
+ swf = initSwf(vidScroll, 'main.swf', 'video-settings-swf', o)[0];
vs.find('input, button').prop('disabled', true);
vs.find('button').button();
const rr = vs.find('.cam-resolution').parents('.sett-row');
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/swf-functions.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/swf-functions.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/swf-functions.js
index 13908ec..bf54fe4 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/swf-functions.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/swf-functions.js
@@ -1,41 +1,17 @@
/* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */
-var labels, config;
-function initSwf(_options) {
- const options = $.extend({
- allowfullscreen : 'true',
- bgcolor : '#ffffff',
- width : '100%',
- height : '100%',
- id : 'lzapp',
- __lzminimumversion : 8
- }, _options);
- $('div[id="contents"], div[id="contents"] > div').css('height', '100%');
- const embed = $('<embed>')
- .attr('quality', 'high')
- .attr('bgcolor', options.bgcolor)
- .attr('src', "public/" + options.src)
- .attr('wmode', options.wmode)
- .attr('allowfullscreen', true)
- .attr('width', options.width).attr('height', options.height)
- .attr('id', 'lzapp')
- .attr('name', 'lzapp')
- //.attr('flashvars', $.param(options))
- .attr('swliveconnect', true)
- .attr('align', 'middle')
- .attr('allowscriptaccess', 'sameDomain')
- .attr('type', 'application/x-shockwave-flash')
- .attr('pluginspage', 'http://www.macromedia.com/go/getflashplayer');
- $('#swfloading').after($('<div id="lzappContainer">').append(embed)).width('1px').height('1px');
-}
-function loadingComplete() {
- document.getElementById("swfloading").style.display = 'none';
- const lzApp = document.getElementById("lzappContainer");
- lzApp.style.width = '100%';
- lzApp.style.height = '100%';
+var labels;
+function initSwf(el, swf, id, options) {
+ const type = 'application/x-shockwave-flash'
+ , src = 'public/' + swf + '?cache' + new Date().getTime()
+ , o = $('<object>').attr('id', id).attr('type', type).attr('data', src).attr('width', options.width).attr('height', options.height);
+ o.append($('<param>').attr('name', 'quality').attr('value', 'best'))
+ .append($('<param>').attr('name', 'wmode').attr('value', options.wmode))
+ .append($('<param>').attr('name', 'allowscriptaccess').attr('value', 'sameDomain'))
+ .append($('<param>').attr('name', 'allowfullscreen').attr('value', 'false'))
+ .append($('<param>').attr('name', 'flashvars').attr('value', $.param(options)));
+ el.append(o);
+ return o;
}
function getStringLabels() {
return labels;
}
-function getConfig() {
- return config;
-}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ed2ef5d3/openmeetings-web/src/main/webapp/css/general.css
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/webapp/css/general.css b/openmeetings-web/src/main/webapp/css/general.css
index 56c9663..6a2b604 100644
--- a/openmeetings-web/src/main/webapp/css/general.css
+++ b/openmeetings-web/src/main/webapp/css/general.css
@@ -628,3 +628,7 @@ div.formRefreshButton input {
margin-left: 2px;
margin-top: 2px;
}
+.hash-panel-main {
+ width: 100%;
+ height: 100%;
+}