Merge branch 'master' of github.com:bigbluebutton/bigbluebutton

This commit is contained in:
Fred Dixon 2011-08-25 15:44:51 -07:00
commit 585679be68
10 changed files with 298 additions and 37 deletions

Binary file not shown.

View File

@ -5,6 +5,7 @@
<%@ include file="demo_header.jsp"%>
<%
String fileURL = BigBlueButtonURL.replace("/bigbluebutton",":8080/demo");
String name0="BigBlueButton.pptx";
String name1="Demo123.pdf";
String name2="Demo456.pdf";
String name3="Demo789.pdf";
@ -29,6 +30,7 @@ String name3="Demo789.pdf";
<td style="text-align: right">File Name:</td>
<td style="width: 5px;">&nbsp;</td>
<td><select name=filename>
<option value=<%=name0%>><%=name0.substring(0,name0.length()-5)%></option>
<option value=<%=name1%>><%=name1.substring(0,name1.length()-4)%></option>
<option value=<%=name2%>><%=name2.substring(0,name2.length()-4)%></option>
<option value=<%=name3%>><%=name3.substring(0,name3.length()-4)%></option>

View File

@ -69,7 +69,7 @@ bbb.video.publish.close.tooltip = Arrêter le partage vidéo
bbb.presentation.error.convert.nbpage = Erreur lors du calcul du nombre de pages du fichier envoyé. Contactez l'administrateur.
bbb.mainshell.locale.version = 0.71
bbb.chat.title = Discussion
bbb.presentation.uploaded = envoyé
bbb.presentation.uploaded = envoyé.
bbb.mainshell.logBtn.toolTip = Ouvrir la fenêtre de log
bbb.desktopPublish.stop.tooltip = Fermer le partage d'écran
bbb.presentation.uploadwindow.excel = EXCEL
@ -94,7 +94,7 @@ bbb.pageTitle = BigBlueButton
bbb.mainshell.resetLayoutBtn.toolTip = Disposition par défaut
bbb.highlighter.toolbar.color = Sélectionner une couleur
bbb.presentation.uploadwindow.pdf = PDF
bbb.publishVideo.startPublishBtn.toolTip = Activer ma Webcam
bbb.publishVideo.startPublishBtn.toolTip = Démarrer le partage
bbb.logout.connectionfailed = La connexion au serveur a échoué
bbb.settings.isight.text = Si vous avez des problèmes avec votre webcam iSight, vous utilisez peut être OS X 10.6.5, qui est connu pour avoir un problème avec Flash.\r\nPour corriger cela, cliquez sur le lien ci-dessous pour installer une version plus récente de Flash Player, ou mettez à jour votre Mac vers la dernière version.
bbb.highlighter.toolbar.clear = Effacer les annotations
@ -109,7 +109,7 @@ bbb.chat.privateMsgAwaiting = Message privé en attente
bbb.desktopView.fitToWindow = Adapter la taille à la fenêtre
bbb.highlighter.toolbar.pencil = Pinceau
bbb.mainshell.statusProgress.connecting = Connexion au serveur
bbb.listenerItem.lockImg.toolTip = Cliquez pour empêcher le changement micro ouvert/fermé.
bbb.listenerItem.lockImg.toolTip = Cliquez pour empêcher le changement micro activé/désactivé
bbb.listeners.unmuteAllBtn.toolTip = Redonner la parole à tout le monde
bbb.logout.rejected = La connexion au serveur a été rejetée
bbb.presentation.title = Présentation
@ -124,7 +124,7 @@ bbb.desktopPublish.fullscreen.tooltip = Partager l'intégralité de l'écran
bbb.settings.isight.command = Installer Flash 10.2 RC2
bbb.presentation.error.document.convert.failed = Erreur lors de la conversion du fichier
bbb.viewers.viewersGrid.nameItemRenderer = Nom
bbb.oldlocalewindow.reminder1 = La traduction française de BigBlueButton que vous utilisée est probablement trop ancienne.
bbb.oldlocalewindow.reminder1 = La traduction française de BigBlueButton utilisée est probablement trop ancienne.
bbb.highlighter.button.toolTipShow = Affiche le tableau blanc
bbb.settings.deskshare.start = Vérifier le partage d'écran
bbb.viewers.viewersGrid.nameItemRenderer.nameLabel.toolTip = Vous êtes identifié(e) avec ce nom.
@ -138,7 +138,7 @@ bbb.settings.isight.label = Erreur caméra iSight
bbb.mainToolbar.logoutBtn.toolTip = Se déconnecter
bbb.presentation.error.convert.notsupported = Erreur : le format de fichier envoyé n'est pas supporté. Merci d'envoyer un fichier compatible.
bbb.highlighter.toolbar.thickness = Changer la taille
bbb.presentation.uploadwindow.presentationfile = FICHIER PRÉSENTATION
bbb.presentation.uploadwindow.presentationfile = Fichier de présentation
bbb.viewers.raiseHandBtn.toolTip = Cliquez ici pour lever la main et demander la parole.
bbb.presentation.error.convert.format = Erreur lors de la détection du format de fichier envoyé. Le fichier a-t-il bien une extension valide ?
bbb.desktopPublish.fullscreen.label = Pleine écran
bbb.desktopPublish.fullscreen.label = Plein écran

View File

@ -146,8 +146,12 @@
* Presentation
*/
public function testPresentationConversion():String {
return didPresentationConvert.toString();
public function checkPresentation():String {
if (didPresentationConvert) {
didPresentationConvert = false;
return "true";
} else
return "false";
}
public function handlePresentationConversion(event:Event):void {

View File

@ -512,6 +512,9 @@ package org.bigbluebutton.modules.present.business {
uploadEvent.presentationName = presentationName;
dispatcher.dispatchEvent(uploadEvent);
dispatcher.dispatchEvent(new BBBEvent(BBBEvent.PRESENTATION_CONVERTED));
var readyEvent:UploadEvent = new UploadEvent(UploadEvent.PRESENTATION_READY);
readyEvent.presentationName = presentationName;
dispatcher.dispatchEvent(readyEvent);
}
public function conversionUpdateMessageCallback(conference:String, room:String,

View File

@ -297,9 +297,6 @@
private function convertSuccess(e:UploadEvent):void{
okCancelBtn.label = ResourceUtil.getInstance().getString('bbb.presentation.ok');
okCancelBtn.visible = true;
var readyEvent:UploadEvent = new UploadEvent(UploadEvent.PRESENTATION_READY);
readyEvent.presentationName = e.presentationName;
globalDispatch.dispatchEvent(readyEvent);
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.CLOSE_UPLOAD_WINDOW));
}

View File

@ -52,6 +52,7 @@ class ApiController {
private static final String ROLE_MODERATOR = "MODERATOR";
private static final String ROLE_ATTENDEE = "VIEWER";
private static final String SECURITY_SALT = '639259d4-9dd8-4b25-bf01-95f9567eaf4b'
private static final String API_VERSION = '0.8'
MeetingService meetingService;
PresentationService presentationService
@ -81,6 +82,28 @@ class ApiController {
String API_CALL = 'create'
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.name)) {
invalid("missingParamName", "You must specify a name for the meeting.");
return
}
if (StringUtils.isEmpty(params.meetingID)) {
invalid("missingParamMeetingID", "You must specify a meeting ID for the meeting.");
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors();
paramsProcessorUtil.processRequiredCreateParams(params, errors);
@ -109,6 +132,11 @@ class ApiController {
uploadDocuments(existing);
respondWithConference(existing, "duplicateWarning", "This conference was already in existence and may currently be in progress.");
} else {
// BEGIN - backward compatibility
invalid("idNotUnique", "A meeting already exists with that meeting ID. Please use a different meeting ID.");
return;
// END - backward compatibility
// enforce meetingID unique-ness
errors.nonUniqueMeetingIdError()
respondWithErrors(errors)
@ -134,6 +162,33 @@ class ApiController {
log.debug CONTROLLER_NAME + "#${API_CALL}"
ApiErrors errors = new ApiErrors()
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.fullName)) {
invalid("missingParamFullName", "You must specify a name for the attendee who will be joining the meeting.");
return
}
if (StringUtils.isEmpty(params.meetingID)) {
invalid("missingParamMeetingID", "You must specify a meeting ID for the meeting.");
return
}
if (StringUtils.isEmpty(params.password)) {
invalid("invalidPassword","You either did not supply a password or the password supplied is neither the attendee or moderator password for this conference.");
return
}
if (!paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
// Do we have a checksum? If none, complain.
if (StringUtils.isEmpty(params.checksum)) {
errors.missingParamError("checksum");
@ -175,6 +230,11 @@ class ApiController {
log.info("Retrieving meeting ${internalMeetingId}")
Meeting meeting = meetingService.getMeeting(internalMeetingId);
if (meeting == null) {
// BEGIN - backward compatibility
invalid("invalidMeetingIdentifier", "The meeting ID that you supplied did not match any existing meetings");
return;
// END - backward compatibility
errors.invalidMeetingIdError();
respondWithErrors(errors)
return;
@ -199,6 +259,11 @@ class ApiController {
// Is this user joining a meeting that has been ended. If so, complain.
if (meeting.isForciblyEnded()) {
// BEGIN - backward compatibility
invalid("meetingForciblyEnded", "You can not re-join a meeting that has already been forcibly ended. However, once the meeting is removed from memory (according to the timeout configured on this server, you will be able to once again create a meeting with the same meeting ID");
return;
// END - backward compatibility
errors.meetingForciblyEndedError();
respondWithErrors(errors)
return;
@ -213,6 +278,11 @@ class ApiController {
}
if (role == null) {
// BEGIN - backward compatibility
invalid("invalidPassword","You either did not supply a password or the password supplied is neither the attendee or moderator password for this conference.");
return
// END - backward compatibility
errors.invalidPasswordError()
respondWithErrors(errors)
return;
@ -253,6 +323,23 @@ class ApiController {
String API_CALL = 'isMeetingRunning'
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.meetingID)) {
invalid("missingParamMeetingID", "You must specify a meeting ID for the meeting.");
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -284,6 +371,11 @@ class ApiController {
log.info("Retrieving meeting ${internalMeetingId}")
Meeting meeting = meetingService.getMeeting(internalMeetingId);
if (meeting == null) {
// BEGIN - backward compatibility
invalid("invalidMeetingIdentifier", "The meeting ID that you supplied did not match any existing meetings");
return;
// END - backward compatibility
errors.invalidMeetingIdError();
respondWithErrors(errors)
return;
@ -309,6 +401,29 @@ class ApiController {
String API_CALL = "end"
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.meetingID)) {
invalid("missingParamMeetingID", "You must specify a meeting ID for the meeting.");
return
}
if (StringUtils.isEmpty(params.password)) {
invalid("invalidPassword","You must supply the moderator password for this call.");
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -346,12 +461,22 @@ class ApiController {
log.info("Retrieving meeting ${internalMeetingId}")
Meeting meeting = meetingService.getMeeting(internalMeetingId);
if (meeting == null) {
// BEGIN - backward compatibility
invalid("notFound", "We could not find a meeting with that meeting ID - perhaps the meeting is not yet running?");
return;
// END - backward compatibility
errors.invalidMeetingIdError();
respondWithErrors(errors)
return;
}
if (meeting.getModeratorPassword().equals(modPW) == false) {
// BEGIN - backward compatibility
invalid("invalidPassword","You must supply the moderator password for this call.");
return;
// END - backward compatibility
errors.invalidPasswordError();
respondWithErrors(errors)
return;
@ -380,6 +505,28 @@ class ApiController {
String API_CALL = "getMeetingInfo"
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.meetingID)) {
invalid("missingParamMeetingID", "You must specify a meeting ID for the meeting.");
return
}
if (StringUtils.isEmpty(params.password)) {
invalid("invalidPassword","You must supply the moderator password for this call.");
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -417,12 +564,22 @@ class ApiController {
log.info("Retrieving meeting ${internalMeetingId}")
Meeting meeting = meetingService.getMeeting(internalMeetingId);
if (meeting == null) {
// BEGIN - backward compatibility
invalid("notFound", "We could not find a meeting with that meeting ID");
return;
// END - backward compatibility
errors.invalidMeetingIdError();
respondWithErrors(errors)
return;
}
if (meeting.getModeratorPassword().equals(modPW) == false) {
// BEGIN - backward compatibility
invalid("invalidPassword","You must supply the moderator password for this call.");
return;
// END - backward compatibility
errors.invalidPasswordError();
respondWithErrors(errors)
return;
@ -438,6 +595,18 @@ class ApiController {
String API_CALL = "getMeetings"
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -587,6 +756,18 @@ class ApiController {
String API_CALL = "getRecordings"
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -596,12 +777,6 @@ class ApiController {
return
}
// Do we have a meeting id? If none, complain.
//String externalMeetingId = params.meetingID
//if (StringUtils.isEmpty(externalMeetingId)) {
//errors.missingParamError("meetingID");
//}
// Do we agree on the checksum? If not, complain.
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
errors.checksumError()
@ -616,7 +791,6 @@ class ApiController {
// Everything is good so far. Translate the external meeting ids to an internal meeting ids.
ArrayList<String> internalMeetingIds = paramsProcessorUtil.convertToInternalMeetingId(externalMeetingIds);
//ArrayList<Recording> recs = meetingService.getRecordings(internalMeetingIds);
HashMap<String,Recording> recs = meetingService.getRecordings(internalMeetingIds);
if (recs.isEmpty()) {
@ -683,6 +857,28 @@ class ApiController {
String API_CALL = "publishRecordings"
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.recordID)) {
invalid("missingParamRecordID", "You must specify a recordID.");
return
}
if (StringUtils.isEmpty(params.publish)) {
invalid("missingParamPublish", "You must specify a publish value true or false.");
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -719,6 +915,11 @@ class ApiController {
}
if(!meetingService.existsAnyRecording(recordIdList)){
// BEGIN - backward compatibility
invalid("notFound", "We could not find recordings");
return;
// END - backward compatibility
errors.recordingNotFound();
respondWithErrors(errors);
return;
@ -744,6 +945,23 @@ class ApiController {
String API_CALL = "deleteRecordings"
log.debug CONTROLLER_NAME + "#${API_CALL}"
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
if (StringUtils.isEmpty(params.recordID)) {
invalid("missingParamRecordID", "You must specify a recordID.");
return
}
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
invalid("checksumError", "You did not pass the checksum security check")
return
}
// END - backward compatibility
ApiErrors errors = new ApiErrors()
// Do we have a checksum? If none, complain.
@ -774,6 +992,17 @@ class ApiController {
recordIdList=paramsProcessorUtil.decodeIds(recordId);
}
if(recordIdList.isEmpty()){
// BEGIN - backward compatibility
invalid("notFound", "We could not find recordings");
return;
// END - backward compatibility
errors.recordingNotFound();
respondWithErrors(errors);
return;
}
meetingService.deleteRecordings(recordIdList);
withFormat {
xml {
@ -968,6 +1197,31 @@ class ApiController {
}
}
}
//TODO: method added for backward compability, it will be removed in next versions after 0.8
def invalid(key, msg) {
String deprecatedMsg=" Note: This xml scheme will be DEPRECATED."
log.debug CONTROLLER_NAME + "#invalid"
response.addHeader("Cache-Control", "no-cache")
withFormat {
xml {
render(contentType:"text/xml") {
response() {
returncode(RESP_CODE_FAILED)
messageKey(key)
message(msg+deprecatedMsg)
}
}
}
json {
log.debug "Rendering as json"
render(contentType:"text/json") {
returncode(RESP_CODE_FAILED)
messageKey(key)
message(msg+deprecatedMsg)
}
}
}
}
def parseBoolean(obj) {
if (obj instanceof Number) {

View File

@ -40,10 +40,10 @@ public class MeetingService {
log.info("Cleaning up expired meetings");
for (Meeting m : meetings.values()) {
if (m.hasExpired(defaultMeetingExpireDuration)) {
log.info("Removing expired meeting [{} - {}]", m.getInternalId(), m.getName());
log.info("Removing expired meeting [id={} , name={}]", m.getInternalId(), m.getName());
log.info("Expired meeting [start={} , end={}]", m.getStartTime(), m.getEndTime());
if (m.isRecord()) {
log.debug("[" + m.getInternalId() + "] is recorded. Process it.");
processRecording(m.getInternalId());
}
meetings.remove(m.getInternalId());
@ -160,7 +160,7 @@ public class MeetingService {
}
public void processRecording(String meetingId) {
log.debug("Checking if we need to process recording for [{}]", meetingId);
log.debug("Process recording for [{}]", meetingId);
Meeting m = getMeeting(meetingId);
if (m != null) {
int numUsers = m.getNumUsers();
@ -235,8 +235,8 @@ public class MeetingService {
public void meetingStarted(String meetingId) {
Meeting m = getMeeting(meetingId);
if (m != null) {
m.setStartTime(System.currentTimeMillis());
log.debug("Setting meeting started time");
m.setStartTime(System.currentTimeMillis());
}
}
@ -244,8 +244,8 @@ public class MeetingService {
public void meetingEnded(String meetingId) {
Meeting m = getMeeting(meetingId);
if (m != null) {
m.setEndTime(System.currentTimeMillis());
log.debug("Setting meeting end time");
m.setEndTime(System.currentTimeMillis());
}
}

View File

@ -56,6 +56,7 @@ public class ParamsProcessorUtil {
return welcomeMessage;
}
public void processRequiredCreateParams(Map<String, String> params, ApiErrors errors) {
// Do we have a checksum? If not, complain.
if (StringUtils.isEmpty(params.get("checksum"))) {

View File

@ -205,7 +205,7 @@ public class Meeting {
}
public boolean hasExpired(int expiry) {
return (hasStarted() && hasEnded() && didExpire(expiry));
return (hasStarted() && hasEnded() && !isRunning() && didExpire(expiry));
}
public boolean hasExceededDuration() {