<%@ 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.*" errorPage="/error.jsp"%>
<% if (request.getParameterMap().isEmpty()) { // // Assume we want to create a meeting // %>

Demo #3: Create a You Own Meeting.


Enter your name:


<% } else if (request.getParameter("action").equals("create")) { // // User has requested to create a meeting // String username = request.getParameter("username"); String meetingID = URLEncoder.encode(username+"xxxmeeting","UTF-8"); String meetingToken = ""; String joinURL = getJoinURL(username, 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; %>

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


<%=username %>'s meeting has been created.
Click (or book mark) the following link to join:

Join Invite

 

To invite others, send them the following link:

<% } else if (request.getParameter("action").equals("invite")) { String meetingID = request.getParameter("meetingID"); String meetingToken = request.getParameter("meetingToken"); String enterURL = BigBlueButtonURL+"demo/demo3.jsp?action=enter&meetingID="+meetingID+"&"+meetingToken; //out.print( "meetingID: # 1 #" + meetingID +"#" ); //out.print( "meetingToken: ##" + meetingToken +"#" ); // out.print( "meetingRunning: ## ##" + isMeetingRunning( meetingToken, meetingID ) + "## #"); //out.print( "meetingRunning: ##" + getURLisMeetingRunning(meetingToken, meetingID )); // String hard = "http://192.168.0.154/bigbluebutton/api/isMeetingRunning?meetingToken=34e57723-2529-4e33-b4ba-3626d2941bdb&meetingID=asfsdxxxmeeting&checksum=aea313057ef4cc9b32913c8c257381b47fde86ca"; if ( isMeetingRunning( meetingToken, meetingID ).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, meetingID ); %>

Waiting for <%=meetingID %> to start.


Waiting for <%=meetingID %> to start.

 
<% } } else if (request.getParameter("action").equals("enter")) { // // 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"); //out.print( "meetingID: #" + meetingID +"#" ); //out.print( "meetingToken: #" + meetingToken +"#" ); //out.print( "meetingRunning: #" + isMeetingRunning( meetingToken, meetingID )); %>

<%=meetingID %> has started.


Enter your name:

You are joining <%=meetingID %>.


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