Merge branch 'master' into merge-master-into-dynamic-config

This commit is contained in:
Richard Alam 2013-03-18 18:06:36 +00:00
commit db8d305d3b
11 changed files with 445 additions and 10 deletions

View File

@ -120,11 +120,18 @@ public String createMeeting(String meetingID, String welcome, String moderatorPa
//
// getJoinMeetingURL() -- get join meeting URL for both viewer and moderator
//
public String getJoinMeetingURL(String username, String meetingID, String password) {
public String getJoinMeetingURL(String username, String meetingID, String password, String clientURL) {
String base_url_join = BigBlueButtonURL + "api/join?";
String clientURL_param = "";
if ((clientURL != null) && !clientURL.equals("")) {
clientURL_param = "&redirectClient=true&clientURL=" + urlEncode( clientURL );
}
String join_parameters = "meetingID=" + urlEncode(meetingID)
+ "&fullName=" + urlEncode(username) + "&password="
+ urlEncode(password);
+ urlEncode(password) + clientURL_param;
return base_url_join + join_parameters + "&checksum="
+ checksum("join" + join_parameters + salt);

View File

@ -0,0 +1,301 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
#headsetButton {
display: block;
width: 16px;
height: 16px;
background-image: url(images/headset.png)
}
#headsetButton:hover {
display: block;
width: 16px;
height: 16px;
background-image: url(images/headset_open.png)
}
#controls {
float:left;
width:20%;
height:100%;
background:#9c9;
}
#client {
float:right;
width:80%;
height:100%;
background:#c9c;
}
#footer {
clear:both;;
background:#c9c;
}
</style>
<script type="text/javascript" src="swfobject/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("BigBlueButton", "11", "expressInstall.swf");
</script>
<script src="lib/jquery-1.5.1.min.js" language="javascript"></script>
<script src="lib/bigbluebutton.js" language="javascript"></script>
<script src="lib/bbb_localization.js" language="javascript"></script>
<script src="lib/bbb_blinker.js" language="javascript"></script>
<script src="lib/bbb_deskshare.js" language="javascript"></script>
<script type="text/javascript" src="lib/bbb_api_bridge.js"></script>
<script>
$(document).ready();
var joinedVoice = false;
var myUserID = "";
function log_message(msg) {
var obj=document.getElementById('log');
if (msg != null && obj != null) {
obj.value += "\n"+msg;
obj.scrollTop = obj.scrollHeight
}
}
window.displayBBBClient = function() {
var bbbc = document.getElementById("flashclient");
bbbc.style.display = "block";
}
//
// Syncrhonous query functions
//
var getMyUserID = function() {
if (myUserID == "" ) {
BBB.getMyUserID(function(userID) {
myUserID=userID;
});
}
}
var getMyRole = function() {
BBB.getMyRole(function(myRole) {
log_message("My role = " + myRole);
});
}
var getMyUserInfo = function() {
BBB.getMyUserInfo(function(bbbEvent) {
log_message("User info response [myUserID=" + bbbEvent.myUserID
+ ",myUsername=" + bbbEvent.myUsername + ",myAvatarURL=" + bbbEvent.myAvatarURL
+ ",myRole=" + bbbEvent.myRole + ",amIPresenter=" + bbbEvent.amIPresenter
+ ",dialNumber=" + bbbEvent.dialNumber + ",voiceBridge=" + bbbEvent.voiceBridge + "].");
for(var key in bbbEvent.customdata){
log_message(key + " " + bbbEvent.customdata[key]);
}
});
}
var getMeetingID = function() {
BBB.getMeetingID(function(meetingID) {
log_message("Meeting ID = [" + meetingID + "]");
});
}
//
// Asynchronous query functions
//
var getMyRoleAsynch = function() {
BBB.listen("GetMyRoleResponse", function(bbbEvent) {
log_message("Received GetMyRoleResponse event [" + bbbEvent.myRole + "]");
});
BBB.getMyRole();
}
//
// Commands
//
var muteMe = function() {
// BBB.muteMe();
alert ("No yet implemented.");
}
var unmuteMe = function() {
// BBB.unmuteMe();
alert ("No yet implemented");
}
var muteAll = function() {
// BBB.muteAll();
alert ("No yet implemented");
}
var unmuteAll = function() {
// BBB.unmuteAll();
alert ("No yet implemented");
}
var switchLayout = function(newLayout) {
log_message( "switchLayout: " + newLayout );
BBB.switchLayout(newLayout);
}
var sendPublicChatMessage = function(message) {
log_message( "sentPublicChatMessage: " + message );
BBB.sendPublicChatMessage("0x7A7A7A", "en", message)
}
var shareVideoCamera = function() {
log_message( "shareVideoCamera" );
BBB.shareVideoCamera();
}
var stopSharingCamera = function() {
log_message( "stopSharingCamera" );
BBB.stopSharingCamera();
}
//
// Listen for events
//
BBB.listen("UserJoinedVoiceEvent", function(bbbEvent) {
log_message( "UserJoinedVoiceEvent: " + bbbEvent.userID );
getMyUserID();
if (bbbEvent.userID == myUserID) {
headsetButton_On();
}
});
BBB.listen("UserLeftVoiceEvent", function(bbbEvent) {
log_message( "UserLeftVoiceEvent: " + bbbEvent.userID );
getMyUserID();
if (bbbEvent.userID == myUserID) {
headsetButton_Off()
}
});
BBB.listen("BroadcastingCameraStartedEvent", function(bbbEvent) {
log_message( "BroadcastingCameraStartedEvent: camIndex=" + bbbEvent.camIndex +
" camWidth=" + bbbEvent.camWidth +
" camHeight=" + bbbEvent.camHeight +
" camKeyFrameInterval=" + bbbEvent.camKeyFrameInterval +
" camModeFps=" + bbbEvent.camModeFps +
" camQualityBandwidth=" + bbbEvent.camQualityBandwidth +
" camQualityPicture=" + bbbEvent.camQualityPicture +
" isPresenter=" + bbbEvent.isPresenter +
" isPublishing=" + bbbEvent.isPublishing +
" streamName=" + bbbEvent.streamName
);
//for(var key in bbbEvent){
// log_message(key + " " + bbbEvent.customdata[key]);
//}
});
BBB.listen("BroadcastingCameraStoppedEvent", function(bbbEvent) {
log_message( "BroadcastingCameraStoppedEvent" );
});
function clickHeadsetButton() {
if (joinedVoice) {
BBB.leaveVoiceConference()
} else {
BBB.joinVoiceConference();
}
}
function headsetButton_On() {
document.getElementById('headsetButton').style.backgroundImage="url('images/headset_open.png')";
//Need to figure out how to set the hover state via JS
joinedVoice = true;
}
function headsetButton_Off() {
document.getElementById('headsetButton').style.backgroundImage="url('images/headset.png')";
//Need to figure out how to set the hover state via JS
joinedVoice = false;
}
</script>
</head>
<body>
<div id="controls">
<button type="button" onclick="getMeetingID()">Get MeetingID</button>
<button type="button" onclick="getMyUserInfo()">Get MyUserInfo </button>
<button type="button" onclick="getMyRoleAsynch()">Get Role Asynch</button>
<button type="button" onclick="getMyRole()">Get Role Synch</button>
<button type="button" onclick="shareVideoCamera()">Start Webcam</button>
<button type="button" onclick="stopSharingCamera()">Stop Webcam</button>
<!--
<button type="button" onclick="muteMe()">Mute</button>
<button type="button" onclick="unmuteMe()">Unmute</button>
<button type="button" onclick="muteAll()">Mute All</button>
<button type="button" onclick="unmuteAll()">Unmute All</button>
-->
</p>
Layout: <select name="Layout" onChange="switchLayout(this.options[this.selectedIndex].value);return false">
<option value="Default">Default</option>
<option value="S2SVideoChat">Video Chat</option>
<option value="S2SPresentation">Presentation</option>
</select>
</p>
Chat: <FORM NAME="chat" onsubmit='BBB.sendPublicChatMessage("0x7A7A7A", "en", this.elements["chat-message"].value); return false;'>
<input id="chat-message" type="text" autofocus name="text" /></td>
<input id="submit-button" type="submit" value="Send Chat Message" /></td>
</FORM>
</p>
Audio:<a id="headsetButton" onclick='clickHeadsetButton()' href="#" title="Join Audio"><span></span></a>
Events:
<form>
<textarea id="log" cols=40 rows=20 readonly>
</textarea>
</form>
</div>
<div id="client" style="background-color:#EEEEEE;height:900px;width:1200px;float:left;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="90%" id="BigBlueButton" name="BigBlueButton" align="middle">
<param name="movie" value="http://192.168.0.36/client/BigBlueButton.swf?v=VERSION" />
<param name="quality" value="high" />
<param name="allowfullscreen" value="true" />
<param name="bgcolor" value="#869ca7" />
<param name="wmode" value="window" />
<param name="allowScriptAccess" value="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="BigBlueButton.swf?v=VERSION" width="100%" height="90%" align="middle">
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="always" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<!-- div id="footer">
<div id="update-display"/>
<div id="notifications" aria-live="polite" role="region" aria-label="Chat Notifications"></div>
</div-->
</body>
</html>

View File

@ -0,0 +1,124 @@
<!--
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: Fred Dixon <ffdixon@bigbluebutton.org>
-->
<%@ 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>Join Demo Meeting</title>
</head>
<body>
<%@ include file="bbb_api.jsp"%>
<%
if (request.getParameterMap().isEmpty()) {
//
// Assume we want to create a meeting
//
%>
<%@ include file="demo_header.jsp"%>
<h2>Join Demo Meeting (JavaScript API Client)</h2>
<FORM NAME="form1" METHOD="GET">
<table cellpadding="5" cellspacing="5" style="width: 400px; ">
<tbody>
<tr>
<td>
&nbsp;</td>
<td style="text-align: right; ">
Full Name:</td>
<td style="width: 5px; ">
&nbsp;</td>
<td style="text-align: left ">
<input type="text" autofocus required name="username" /></td>
</tr>
<tr>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
&nbsp;</td>
<td>
<input type="submit" value="Join" /></td>
</tr>
</tbody>
</table>
<INPUT TYPE=hidden NAME=action VALUE="create">
</FORM>
<%
} else if (request.getParameter("action").equals("create")) {
//
// Got an action=create
//
String url = BigBlueButtonURL.replace("bigbluebutton/","demo/");
// String preUploadPDF = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='"+url+"pdfs/sample.pdf'/></module></modules>";
//java.util.Random testIDGen = new java.util.Random();
//int userID = testIDGen.nextInt(99999);
// String joinURL = getJoinURL(request.getParameter("username"), "Demo Meeting", "false", null, null, null);
String meeting_ID = createMeeting( "Demo Meeting", null, null, null, null, null);
String clientURL = BigBlueButtonURL.replace("bigbluebutton/","client/demo11.html");
String joinURL = getJoinMeetingURL(request.getParameter("username"), "Demo Meeting", "mp", clientURL );
if (joinURL.startsWith("http://")) {
%>
<script language="javascript" type="text/javascript">
window.location.href="<%=joinURL%>";
</script>
<%
} else {
%>
Error: getJoinURL() failed
<p/>
<%=joinURL %>
<%
}
}
%>
<%@ include file="demo_footer.jsp"%>
</body>
</html>

View File

@ -273,7 +273,7 @@ Error: createMeeting() failed
// We've got a valid meeting_ID and passoword -- let's join!
//
String joinURL = getJoinMeetingURL(username, meeting_ID, password);
String joinURL = getJoinMeetingURL(username, meeting_ID, password, null);
%>
<script language="javascript" type="text/javascript">

View File

@ -17,4 +17,5 @@
<a href="demo_openid.jsp">Login with Openid</a> &nbsp;&nbsp;&nbsp;
<a href="demo11.jsp">Javascript API</a> &nbsp;&nbsp;&nbsp;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View File

@ -147,7 +147,7 @@
if (password == null) return error(E_MISSING_PARAM_PASSWORD);
String result = error("failedJoin", "Couldn't join the meeting.");
String joinUrl = getJoinMeetingURL(fullName, meetingID, password);
String joinUrl = getJoinMeetingURL(fullName, meetingID, password, null);
String enterUrl = BigBlueButtonURL + "api/enter";
try {
HttpClient client = new HttpClient();

View File

@ -97,7 +97,7 @@ dependencies {
//redis
compile 'redis.clients:jedis:2.0.0'
providedCompile 'commons:commons-pool:1.5.6'
providedCompile 'commons-pool:commons-pool:1.5.6'
// Libraries needed to run the scala tools
scalaTools 'org.scala-lang:scala-compiler:2.9.2'

View File

@ -210,10 +210,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function disableCamera():void {
_camera = null;
_video.attachCamera(null);
_video.clear();
_videoHolder.remove(_video);
_video = null;
if(_video != null){
_video.attachCamera(null);
_video.clear();
_videoHolder.remove(_video);
_video = null;
}
}
private function handleKeyDown(event:KeyboardEvent):void {
@ -245,7 +247,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
onCameraAccessAllowed();
// this is just to overwrite the message of waiting for approval
_videoHolder.showWarning('bbb.video.publish.hint.openingCamera');
} else if (e.code == "Camera.Muted") {
} else {//if (e.code == "Camera.Muted") {
onCameraAccessDisallowed();
}
}