diff --git a/bbb-api-demo/src/main/webapp/demo_header.jsp b/bbb-api-demo/src/main/webapp/demo_header.jsp
index c53b5688e3..c85f730600 100755
--- a/bbb-api-demo/src/main/webapp/demo_header.jsp
+++ b/bbb-api-demo/src/main/webapp/demo_header.jsp
@@ -20,4 +20,6 @@
Login with OpenidJavascript API
+
+Mobile Demo  
diff --git a/bbb-api-demo/src/main/webapp/mobile.jsp b/bbb-api-demo/src/main/webapp/mobile.jsp
old mode 100644
new mode 100755
index 036abebe4b..9c45ba2e3d
--- a/bbb-api-demo/src/main/webapp/mobile.jsp
+++ b/bbb-api-demo/src/main/webapp/mobile.jsp
@@ -1,51 +1,119 @@
-<%
-/*
- BigBlueButton - http://www.bigbluebutton.org
-
- Copyright (c) 2011 by respective authors (see below). All rights reserved.
-
- BigBlueButton 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 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, If not, see .
-
- Author: Felipe Cecagno
-*/
-%>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+
+
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
%>
+
+
+
+
+ Join Demo Meeting From Mobile
+
-<%@page import="org.apache.commons.httpclient.HttpClient"%>
-<%@page import="org.apache.commons.httpclient.HttpMethod"%>
-<%@page import="org.apache.commons.httpclient.methods.GetMethod"%>
+
+
+<%@ include file="bbb_api.jsp"%>
+
+<%
+if (request.getParameterMap().isEmpty()) {
+ //
+ // Assume we want to create a meeting
+ //
+ %>
+<%@ include file="demo_header.jsp"%>
+
+
Join Demo Meeting From Mobile
+
+You must have the BigBlueButton mobile client installed on your device for this demo to work.
+
+
-<%@ include file="mobile_api.jsp"%>
<%
- String result = error(E_INVALID_URL);
- if (request.getParameterMap().isEmpty()) {
- result = success("mobileSupported", "This server supports mobile devices.");
- } else if (request.getParameter("action") == null) {
- // return the default result
- } else if (request.getParameter("action").equals("getTimestamp")) {
- result = getTimestamp(request);
- } else if (request.getParameter("action").equals("getMeetings")) {
- result = mobileGetMeetings(request);
- } else if (request.getParameter("action").equals("join")) {
- result = mobileJoinMeeting(request);
- } else if (request.getParameter("action").equals("create")) {
- result = mobileCreate(request);
- }
+} else if (request.getParameter("action").equals("create")) {
+
+ //
+ // Got an action=create
+ //
+
+ String username = request.getParameter("username");
+ String url = BigBlueButtonURL.replace("bigbluebutton/","demo/");
+ // String preUploadPDF = "";
+
+ String joinURL = getJoinURL(request.getParameter("username"), "Demo Meeting", "false", null, null, null);
+
+ if (joinURL.startsWith("http://")) {
+ joinURL = joinURL.replace("http", "bigbluebutton");
%>
-<%=result%>
+
+
+
+<%
+ } else {
+%>
+
+Error: getJoinURL() failed
+
+<%=joinURL %>
+
+<%
+ }
+}
+%>
+
+
+<%@ include file="demo_footer.jsp"%>
+
+
+
diff --git a/bbb-api-demo/src/main/webapp/mobile_api.jsp b/bbb-api-demo/src/main/webapp/mobile_api.jsp
deleted file mode 100644
index 9dfabc8192..0000000000
--- a/bbb-api-demo/src/main/webapp/mobile_api.jsp
+++ /dev/null
@@ -1,182 +0,0 @@
-<%
-/*
- BigBlueButton - http://www.bigbluebutton.org
-
- Copyright (c) 2011 by respective authors (see below). All rights reserved.
-
- BigBlueButton 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 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, If not, see .
-
- Author: Felipe Cecagno
-*/
-%>
-<%@ include file="bbb_api.jsp"%>
-<%@ include file="mobile_conf.jsp"%>
-
-<%@page import="org.apache.commons.httpclient.HttpClient"%>
-<%@page import="org.apache.commons.httpclient.HttpMethod"%>
-<%@page import="org.apache.commons.httpclient.methods.GetMethod"%>
-
-<%!
- public final int E_OK = 0;
- public final int E_CHECKSUM_NOT_INFORMED = 1;
- public final int E_INVALID_CHECKSUM = 2;
- public final int E_INVALID_TIMESTAMP = 3;
- public final int E_EMPTY_SECURITY_KEY = 4;
- public final int E_MISSING_PARAM_MEETINGID = 5;
- public final int E_MISSING_PARAM_FULLNAME = 6;
- public final int E_MISSING_PARAM_PASSWORD = 7;
- public final int E_MISSING_PARAM_TIMESTAMP = 8;
- public final int E_INVALID_URL = 9;
-
- public String error(int code) {
- switch(code) {
- case E_CHECKSUM_NOT_INFORMED:
- case E_INVALID_CHECKSUM:
- return error("checksumError", "You did not pass the checksum security check.");
- case E_INVALID_TIMESTAMP:
- return error("invalidTimestamp", "You did not pass the timestamp check.");
- case E_EMPTY_SECURITY_KEY:
- return error("emptySecurityKey", "The mobile security key is empty. Please contact the administrator.");
- case E_MISSING_PARAM_MEETINGID:
- return error("missingParamMeetingID", "You must specify a meeting ID for the meeting.");
- case E_MISSING_PARAM_FULLNAME:
- return error("missingParamFullName", "You must specify a name for the attendee who will be joining the meeting.");
- case E_MISSING_PARAM_PASSWORD:
- return error("invalidPassword", "You either did not supply a password or the password supplied is neither the attendee or moderator password for this conference.");
- case E_MISSING_PARAM_TIMESTAMP:
- return error("missingParamTimestamp", "You must specify the timestamp provided by the server when you called the method getTimestamp.");
- case E_INVALID_URL:
- return error("invalidAction", "The requested URL is unavailable.");
- default:
- return error("unknownError", "An unexpected error occurred");
- }
- }
-
- private String getRequestURL(HttpServletRequest request) {
- return request.getQueryString();
- }
-
- private String removeChecksum(String requestURL) {
- return requestURL.substring(0, requestURL.lastIndexOf("&checksum="));
- }
-
- private String addValidChecksum(String requestURL) {
- return requestURL + "&checksum=" + checksum(requestURL + mobileSalt);
- }
-
- private int isRequestValid(HttpServletRequest request) {
- // if there's no checksum parameter, the request isn't valid
- if (request.getParameter("checksum") == null)
- return E_CHECKSUM_NOT_INFORMED;
-
- // check the timestamp for all the requests except getTimestamp
- if (!request.getParameter("action").equals("getTimestamp")) {
- String requestTimestamp = request.getParameter("timestamp");
- if (requestTimestamp == null)
- return E_MISSING_PARAM_TIMESTAMP;
-
- Long requestTimestampL = Long.valueOf(requestTimestamp);
- // the timestamp is valid for 60 seconds
- if (Math.abs(getTimestamp() - requestTimestampL) > 60)
- return E_INVALID_TIMESTAMP;
- }
-
- if (mobileSalt.isEmpty())
- return E_EMPTY_SECURITY_KEY;
-
- String requestURL = getRequestURL(request);
- String urlWithoutChecksum = removeChecksum(requestURL);
- String urlWithChecksum = addValidChecksum(urlWithoutChecksum);
- return (requestURL.equals(urlWithChecksum)? E_OK: E_INVALID_CHECKSUM);
- }
-
- private String mountResponse(String returncode, String messageKey, String message) {
- return "" + returncode + "" + messageKey + "" + message + "";
- }
-
- public String success(String messageKey, String message) {
- return mountResponse("SUCCESS", messageKey, message);
- }
-
- public String error(String messageKey, String message) {
- return mountResponse("FAILED", messageKey, message);
- }
-
- private long getTimestamp() {
- return (System.currentTimeMillis() / 1000L);
- }
-
- public String getTimestamp(HttpServletRequest request) {
- int code = isRequestValid(request);
- if (code != E_OK)
- return error(code);
-
- return "SUCCESS" + getTimestamp() + "";
- }
-
- public String mobileGetMeetings(HttpServletRequest request) {
- int code = isRequestValid(request);
- if (code != E_OK)
- return error(code);
-
- return getMeetings();
- }
-
- public String mobileJoinMeeting(HttpServletRequest request) {
- int code = isRequestValid(request);
- if (code != E_OK)
- return error(code);
-
- String meetingID = request.getParameter("meetingID");
- if (meetingID == null) return error(E_MISSING_PARAM_MEETINGID);
-
- String fullName = request.getParameter("fullName");
- if (fullName == null) return error(E_MISSING_PARAM_FULLNAME);
-
- String password = request.getParameter("password");
- if (password == null) return error(E_MISSING_PARAM_PASSWORD);
-
- String result = error("failedJoin", "Couldn't join the meeting.");
- String joinUrl = getJoinMeetingURL(fullName, meetingID, password, null);
- String enterUrl = BigBlueButtonURL + "api/enter";
- try {
- HttpClient client = new HttpClient();
- HttpMethod method = new GetMethod(joinUrl);
- client.executeMethod(method);
- method.releaseConnection();
-
- method = new GetMethod(enterUrl);
- client.executeMethod(method);
- result = method.getResponseBodyAsString();
- method.releaseConnection();
- } catch (Exception e) {
- }
- return result;
- }
-
- public String mobileCreate(HttpServletRequest request) {
- int code = isRequestValid(request);
- if (code != E_OK)
- return error(code);
-
- String meetingID = request.getParameter("meetingID");
- if (meetingID == null) return error(E_MISSING_PARAM_MEETINGID);
-
- return createMeeting(meetingID, "", "", "", "", 0, BigBlueButtonURL);
- }
-
- // it's just for testing purposes
- private String fixURL(HttpServletRequest request) {
- return addValidChecksum(removeChecksum(getRequestURL(request)));
- }
-%>
diff --git a/bbb-api-demo/src/main/webapp/mobile_conf.jsp b/bbb-api-demo/src/main/webapp/mobile_conf.jsp
deleted file mode 100644
index 7ee04df0ee..0000000000
--- a/bbb-api-demo/src/main/webapp/mobile_conf.jsp
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<%!
-// This is the mobile security salt that must be used to check the requests on mobile.jsp
-String mobileSalt = "";
-%>
-
diff --git a/labs/bbb-client-check/.gitignore b/bbb-client-check/.gitignore
similarity index 59%
rename from labs/bbb-client-check/.gitignore
rename to bbb-client-check/.gitignore
index 4878804214..2d4fa21ea8 100644
--- a/labs/bbb-client-check/.gitignore
+++ b/bbb-client-check/.gitignore
@@ -1,9 +1,11 @@
-bin-debug/
-bin-release/
+check/
.actionScriptProperties
.flexProperties
.project
org.eclipse.core.resources.prefs
org.eclipse.ltk.core.refactoring.prefs
FlexPrettyPrintCommand.prefs
-
+index.template.html
+conf/config.xml
+resources/lib/bbb_webrtc_bridge_sip.js
+resources/lib/sip.js
diff --git a/labs/bbb-client-check/build.xml b/bbb-client-check/build.xml
similarity index 67%
rename from labs/bbb-client-check/build.xml
rename to bbb-client-check/build.xml
index 34b57438ba..7f1cab5f98 100755
--- a/labs/bbb-client-check/build.xml
+++ b/bbb-client-check/build.xml
@@ -9,6 +9,11 @@
value="${basedir}"/>
+
+
+
@@ -28,19 +33,19 @@
-
-
-
-
-
@@ -48,13 +53,13 @@
description="Compile MXML file to release SWF application.">
Compiling source...false
- ${SRC_DIR}/locale/{locale}
+ locale/{locale}resources
@@ -90,7 +95,7 @@
+ value="${OUTPUT_DIR}"/>
@@ -98,8 +103,14 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bbb-client-check/check.nginx b/bbb-client-check/check.nginx
new file mode 100644
index 0000000000..0648dccd49
--- /dev/null
+++ b/bbb-client-check/check.nginx
@@ -0,0 +1,4 @@
+location /check {
+ root /var/www/bigbluebutton;
+ index index.html index.htm;
+}
diff --git a/bbb-client-check/gen-file.sh b/bbb-client-check/gen-file.sh
new file mode 100755
index 0000000000..ec123ec374
--- /dev/null
+++ b/bbb-client-check/gen-file.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+head -c $1 < /dev/urandom
diff --git a/labs/bbb-client-check/html-template/history/history.css b/bbb-client-check/html-template/history/history.css
similarity index 100%
rename from labs/bbb-client-check/html-template/history/history.css
rename to bbb-client-check/html-template/history/history.css
diff --git a/labs/bbb-client-check/html-template/history/history.js b/bbb-client-check/html-template/history/history.js
similarity index 100%
rename from labs/bbb-client-check/html-template/history/history.js
rename to bbb-client-check/html-template/history/history.js
diff --git a/labs/bbb-client-check/html-template/history/historyFrame.html b/bbb-client-check/html-template/history/historyFrame.html
similarity index 100%
rename from labs/bbb-client-check/html-template/history/historyFrame.html
rename to bbb-client-check/html-template/history/historyFrame.html
diff --git a/bbb-client-check/html-template/index.html b/bbb-client-check/html-template/index.html
new file mode 100755
index 0000000000..1032a8e289
--- /dev/null
+++ b/bbb-client-check/html-template/index.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To view this page ensure that Adobe Flash Player version
+ 10.2.0 or greater is installed.
+