<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> API Demo - 3 <%@ include file="bbb_api.jsp"%> <%@ include file="demo_header.jsp"%> <%@ page import="java.util.regex.*"%>
<% if (request.getParameterMap().isEmpty()) { // // Assume we want to create a meeting // %>

Demo #3: Create a You Own Meeting.


Step 1. Enter your name.

Enter your name:

<% } else if (request.getParameter("action").equals("create")) { // // User has requested to create a meeting // String username = request.getParameter("username1"); String meetingID = URLEncoder.encode(username+"'s meeting","UTF-8"); String meetingToken = ""; String joinURL = getJoinURL(URLEncoder.encode(username,"UTF-8"), meetingID); String p = "meetingToken=[^&]*"; Pattern pattern = Pattern.compile( p ); Matcher matcher = pattern.matcher( joinURL ); if (matcher.find()) { meetingToken = joinURL.substring(matcher.start(), matcher.end()); } else { out.print("Error: Did not find meeting token."); } //out.print ("Match : " + meetingToken ); String inviteURL = BigBlueButtonURL+"demo/demo3.jsp?action=invite&meetingID="+meetingID+"&"+meetingToken; %>

Created: <%=username %>'s meeting.


<%=username %>'s meeting has been created.

Step 2. Invite others using the following link:

 

Step 3. Click to start your meeting:

Start Meeting

 

<% } else if (request.getParameter("action").equals("enter")) { String meetingID = request.getParameter("meetingID"); String username = request.getParameter("username"); String meetingToken = request.getParameter("meetingToken"); String enterURL = BigBlueButtonURL+"demo/demo3.jsp?action=join&username="+URLEncoder.encode(username,"UTF-8")+"&meetingID="+URLEncoder.encode(meetingID,"UTF-8"); if ( isMeetingRunning( meetingToken, URLEncoder.encode(meetingID,"UTF-8")).equals("true") ) { // // The meeting is running so let's join now // %> <% } else { // // The meeting has not yet started, so let's poll every five seconds until the meeting begins // String checkMeetingStatus = getURLisMeetingRunning(meetingToken, URLEncoder.encode(meetingID,"UTF-8") ); %>

<%=meetingID %> has not yet started.


Hi <%=username %>,

Now waiting for the moderator to start <%=meetingID %>.


(Your browser will automatically refresh and join the meeting when it starts.)

<% } } else if (request.getParameter("action").equals("invite")) { // // We have an invite to an active meeting. Ask the person for their name // so they can join. // String meetingID = request.getParameter("meetingID"); String meetingToken = request.getParameter("meetingToken"); %>

You are requesting to join <%=meetingID %>.


You are requesting to join
<%=meetingID %>.

Enter your name:

<% } else if (request.getParameter("action").equals("join")) { // // We have an invite request to join an existing meeting and the meeting is running // String username = URLEncoder.encode(request.getParameter("username"),"UTF-8"); String meetingID = URLEncoder.encode(request.getParameter("meetingID"),"UTF-8"); String joinURL = getJoinURL(username, meetingID); %> <% } %> <%@ include file="demo_footer.jsp"%>