244 lines
14 KiB
Plaintext
244 lines
14 KiB
Plaintext
<!--
|
|
|
|
BigBlueButton - http://www.bigbluebutton.org
|
|
|
|
Copyright (c) 2008-2009 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 <http://www.gnu.org/licenses/>.
|
|
|
|
Author: Jesus Federico <jesus@123it.ca>
|
|
|
|
-->
|
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
<%
|
|
request.setCharacterEncoding("UTF-8");
|
|
response.setCharacterEncoding("UTF-8");
|
|
%>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>Record (Matterhorn)</title>
|
|
<style type="text/css">
|
|
#formcreate{
|
|
width:500px;
|
|
height:500px;
|
|
}
|
|
#formcreate ul{
|
|
list-style:none;
|
|
}
|
|
#formcreate li{
|
|
display:block;
|
|
width:400px;
|
|
margin-bottom:5px;
|
|
}
|
|
#formcreate label{
|
|
display:block;
|
|
float:left;
|
|
width:150px;
|
|
text-align:right;
|
|
}
|
|
#labdescription{
|
|
vertical-align:top;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
|
|
<%@ include file="bbb_api.jsp"%>
|
|
<%@ include file="demo_header.jsp"%>
|
|
|
|
<%
|
|
if (request.getParameterMap().isEmpty()) {
|
|
//
|
|
// Assume we want to create a meeting
|
|
//
|
|
%>
|
|
<h2>Customized sessions using a dynamic config.xml</h2>
|
|
|
|
<form id="formcreate" name="formcreate" method="get" action="">
|
|
<fieldset>
|
|
<legend>Meeting Information</legend>
|
|
<ul>
|
|
<li>
|
|
<label for="confname">Meeting Name:</label>
|
|
<input id="confname" autofocus required name="confname" type="text" />
|
|
</li>
|
|
<li>
|
|
<label for="username1">Your Name:</label>
|
|
<input id="username1" required name="username1" type="text" />
|
|
</li>
|
|
</ul>
|
|
</fieldset>
|
|
<fieldset>
|
|
<legend>Predefined layouts</legend>
|
|
<label for="label_Layout">Select layout:</label>
|
|
<select name="Layout">
|
|
<option value="Default" selected="selected">Default</option>
|
|
<option value="VideoChat">Video Chat</option>
|
|
<option value="Users">Users</option>
|
|
<option value="Meeting">Meeting</option>
|
|
<option value="Webinar">Webinar</option>
|
|
<option value="LectureAssistant">Lecture assistant</option>
|
|
<option value="Lecture">Lecture</option>
|
|
<option value="S2SPresentation">S2SPresentation</option>
|
|
<option value="S2SVideoChat">S2SVideoChat</option>
|
|
<option value="Notes">Notes</option>
|
|
<option value="Broadcast">Broadcast</option>
|
|
</select><br><br>
|
|
</fieldset>
|
|
<fieldset>
|
|
<legend>Modules to be included</legend>
|
|
<ul>
|
|
<li><input type="checkbox" name="ChatModule"
|
|
value="ChatModule">ChatModule<br></li>
|
|
<li><input type="hidden" name="ViewersModule" value="ViewersModule" />
|
|
<input type="checkbox" name="ViewersModule"
|
|
value="ViewersModule" checked="checked" disabled="disabled">ViewersModule<br></li>
|
|
<li><input type="hidden" name="ListenersModule" value="ListenersModule" />
|
|
<input type="checkbox" name="ListenersModule"
|
|
value="ListenersModule" checked="checked" disabled="disabled">ListenersModule<br></li>
|
|
<li><input type="checkbox" name="DeskShareModule"
|
|
value="DeskShareModule">DeskShareModule<br></li>
|
|
<li><input type="hidden" name="PhoneModule" value="PhoneModule" />
|
|
<input type="checkbox" name="PhoneModule"
|
|
value="PhoneModule" checked="checked" disabled="disabled">PhoneModule<br></li>
|
|
<li><input type="checkbox" name="VideoconfModule"
|
|
value="VideoconfModule">VideoconfModule<br></li>
|
|
<li><input type="checkbox" name="WhiteboardModule"
|
|
value="WhiteboardModule">WhiteboardModule<br></li>
|
|
<li><input type="checkbox" name="PresentModule"
|
|
value="PresentModule">PresentModule<br></li>
|
|
<li><input type="checkbox" name="VideodockModule"
|
|
value="VideodockModule">VideodockModule<br></li>
|
|
<li><input type="hidden" name="LayoutModule" value="LayoutModule" />
|
|
<input type="checkbox" name="LayoutModule"
|
|
value="LayoutModule" checked="checked" disabled="disabled">LayoutModule<br></li>
|
|
</ul>
|
|
</fieldset>
|
|
|
|
<input type="submit" value="Create" >
|
|
<input type="hidden" name="action" value="create" />
|
|
</form>
|
|
|
|
<%
|
|
} else if (request.getParameter("action").equals("create")) {
|
|
String confname = request.getParameter("confname");
|
|
String username = request.getParameter("username1");
|
|
|
|
String configXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
|
"<config>\n" +
|
|
" <localeversion suppressWarning=\"false\">0.8</localeversion>\n" +
|
|
" <version>4084-2013-01-30</version>\n" +
|
|
" <help url=\"http://192.168.0.158/help.html\"/>\n" +
|
|
" <porttest host=\"192.168.0.158\" application=\"video\" timeout=\"10000\"/>\n" +
|
|
" <application uri=\"rtmp://192.168.0.158/bigbluebutton\" host=\"http://192.168.0.158/bigbluebutton/api/enter\" />\n" +
|
|
" <language userSelectionEnabled=\"true\" />\n" +
|
|
" <skinning enabled=\"true\" url=\"http://192.168.0.158/client/branding/css/BBBDefault.css.swf\" />\n" +
|
|
" <layout showLogButton=\"false\" showVideoLayout=\"false\" showResetLayout=\"true\" defaultLayout=\"%DEFAULTLAYOUT%\" showToolbar=\"true\" showFooter=\"true\" showHelpButton=\"true\" showLogoutWindow=\"true\"/>\n" +
|
|
" <modules>\n" +
|
|
"%CHATMODULE%" + "%VIEWERSMODULE%" + "%LISTENERSMODULE%" + "%DESKSHAREMODULE%" + "%PHONEMODULE%" + "%VIDEOCONFMODULE%" + "%WHITEBOARDMODULE%" + "%PRESENTMODULE%" + "%VIDEODOCKMODULE%" + "%LAYOUTMODULE% \n" +
|
|
" </modules> \n" +
|
|
"</config>\n";
|
|
|
|
String chatModule = " <module name=\"ChatModule\" url=\"http://192.168.0.158/client/ChatModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" dependsOn=\"ViewersModule\" translationOn=\"false\" translationEnabled=\"false\" privateEnabled=\"true\" position=\"top-right\"/>\n";
|
|
String viewersModule = " <module name=\"ViewersModule\" url=\"http://192.168.0.158/client/ViewersModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" host=\"http://192.168.0.158/bigbluebutton/api/enter\" allowKickUser=\"false\" />\n";
|
|
String listenersModule = " <module name=\"ListenersModule\" url=\"http://192.168.0.158/client/ListenersModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" recordingHost=\"http://192.168.0.158\" position=\"bottom-left\" />\n";
|
|
String deskShareModule = " <module name=\"DeskShareModule\" url=\"http://192.168.0.158/client/DeskShareModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/deskShare\" autoStart=\"false\" />\n";
|
|
String phoneModule = " <module name=\"PhoneModule\" url=\"http://192.168.0.158/client/PhoneModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/sip\" autoJoin=\"true\" skipCheck=\"false\" showButton=\"true\" enabledEchoCancel=\"true\" dependsOn=\"ViewersModule\" />\n";
|
|
String videoconfModule = " <module name=\"VideoconfModule\" url=\"http://192.168.0.158/client/VideoconfModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/video\" dependson = \"ViewersModule\" videoQuality = \"100\" presenterShareOnly = \"false\" controlsForPresenter = \"false\" resolutions = \"320x240,640x480,1280x720\" autoStart = \"false\" showButton = \"true\" showCloseButton = \"true\" publishWindowVisible = \"true\" viewerWindowMaxed = \"false\" viewerWindowLocation = \"top\" camKeyFrameInterval = \"30\" camModeFps = \"10\" camQualityBandwidth = \"0\" camQualityPicture = \"90\" smoothVideo=\"false\" applyConvolutionFilter=\"false\" convolutionFilter=\"-1, 0, -1, 0, 6, 0, -1, 0, -1\" filterBias=\"0\" filterDivisor=\"4\" enableH264 = \"true\" h264Level = \"2.1\" h264Profile = \"main\" displayAvatar = \"false\" />\n";
|
|
String whiteboardModule = " <module name=\"WhiteboardModule\" url=\"http://192.168.0.158/client/WhiteboardModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" dependsOn=\"PresentModule\" />\n";
|
|
String presentModule = " <module name=\"PresentModule\" url=\"http://192.168.0.158/client/PresentModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" host=\"http://192.168.0.158\" showPresentWindow=\"true\" showWindowControls=\"true\" dependsOn=\"ViewersModule\" />\n";
|
|
String videodockModule = " <module name=\"VideodockModule\" url=\"http://192.168.0.158/client/VideodockModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" dependsOn=\"VideoconfModule, ViewersModule\" autoDock=\"true\" showControls=\"true\" maximizeWindow=\"false\" position=\"bottom-right\" width=\"172\" height=\"179\" layout=\"smart\" oneAlwaysBigger=\"false\" />\n";
|
|
String layoutModule = " <module name=\"LayoutModule\" url=\"http://192.168.0.158/client/LayoutModule.swf?v=4084\" uri=\"rtmp://192.168.0.158/bigbluebutton\" layoutConfig=\"http://192.168.0.158/client/conf/layout.xml\" enableEdit=\"true\" />\n";
|
|
|
|
String param_ChatModule = request.getParameter("ChatModule");
|
|
String param_ViewersModule = request.getParameter("ViewersModule");
|
|
String param_ListenersModule = request.getParameter("ListenersModule");
|
|
String param_DeskShareModule = request.getParameter("DeskShareModule");
|
|
String param_PhoneModule = request.getParameter("PhoneModule");
|
|
String param_VideoconfModule = request.getParameter("VideoconfModule");
|
|
String param_WhiteboardModule = request.getParameter("WhiteboardModule");
|
|
String param_PresentModule = request.getParameter("PresentModule");
|
|
String param_VideodockModule = request.getParameter("VideodockModule");
|
|
String param_LayoutModule = request.getParameter("LayoutModule");
|
|
|
|
String param_Layout = request.getParameter("Layout");
|
|
configXML = ( request.getParameter("Layout") != null )? configXML.replace("%DEFAULTLAYOUT%", param_Layout): configXML.replace("%DEFAULTLAYOUT%", "Default");
|
|
|
|
configXML = ( request.getParameter("ChatModule") != null )? configXML.replace("%CHATMODULE%", chatModule): configXML.replace("%CHATMODULE%", "");
|
|
configXML = ( request.getParameter("ViewersModule") != null )? configXML.replace("%VIEWERSMODULE%", viewersModule): configXML.replace("%VIEWERSMODULE%", "");
|
|
configXML = ( request.getParameter("ListenersModule") != null )? configXML.replace("%LISTENERSMODULE%", listenersModule): configXML.replace("%LISTENERSMODULE%", "");
|
|
configXML = ( request.getParameter("DeskShareModule") != null )? configXML.replace("%DESKSHAREMODULE%", deskShareModule): configXML.replace("%DESKSHAREMODULE%", "");
|
|
configXML = ( request.getParameter("PhoneModule") != null )? configXML.replace("%PHONEMODULE%", phoneModule): configXML.replace("%PHONEMODULE%", "");
|
|
configXML = ( request.getParameter("VideoconfModule") != null )? configXML.replace("%VIDEOCONFMODULE%", videoconfModule): configXML.replace("%VIDEOCONFMODULE%", "");
|
|
configXML = ( request.getParameter("WhiteboardModule") != null )? configXML.replace("%WHITEBOARDMODULE%", whiteboardModule): configXML.replace("%WHITEBOARDMODULE%", "");
|
|
configXML = ( request.getParameter("PresentModule") != null )? configXML.replace("%PRESENTMODULE%", presentModule): configXML.replace("%PRESENTMODULE%", "");
|
|
configXML = ( request.getParameter("VideodockModule") != null )? configXML.replace("%VIDEODOCKMODULE%", videodockModule): configXML.replace("%VIDEODOCKMODULE%", "");
|
|
configXML = ( request.getParameter("LayoutModule") != null )? configXML.replace("%LAYOUTMODULE%", layoutModule): configXML.replace("%LAYOUTMODULE%", "");
|
|
|
|
//
|
|
// This is the URL for to join the meeting as moderator
|
|
//
|
|
String url = BigBlueButtonURL.replace("bigbluebutton/","demo/");
|
|
String joinURL = getJoinURLwithDynamicConfigXML(username, confname, configXML);
|
|
|
|
if (joinURL.startsWith("http://")) {
|
|
%>
|
|
<h2>Customized sessions using a dynamic config.xml, submit</h2>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
//window.location.href="<%=joinURL%>";
|
|
</script>
|
|
|
|
<%
|
|
} else {
|
|
%>
|
|
<p>Error: <br>
|
|
getJoinURL() failed
|
|
</p>
|
|
<p>
|
|
<%=joinURL %>
|
|
</p>
|
|
<p>
|
|
<%=configXML %>
|
|
</p>
|
|
<p>
|
|
<%=param_ChatModule %>
|
|
<%=param_ChatModule %>
|
|
<%=param_ViewersModule %>
|
|
<%=param_ListenersModule %>
|
|
<%=param_DeskShareModule %>
|
|
<%=param_PhoneModule %>
|
|
<%=param_VideoconfModule %>
|
|
<%=param_WhiteboardModule %>
|
|
<%=param_PresentModule %>
|
|
<%=param_VideodockModule %>
|
|
<%=param_LayoutModule %>
|
|
<%=param_Layout %>
|
|
</p>
|
|
|
|
<%
|
|
}
|
|
}
|
|
%>
|
|
|
|
|
|
<%@ include file="demo_footer.jsp"%>
|
|
|
|
</body>
|
|
</html>
|