Skip to content

Commit

Permalink
Merge remote branch 'ajay/bbb-whiteboard-additions' into merge-whiteb…
Browse files Browse the repository at this point in the history
…oard-features

Conflicts:
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/recorder/whiteboard/AddShapeWhiteboardRecordEvent.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/recorder/whiteboard/WhiteboardEventRecorder.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/IWhiteboardRoomListener.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/Page.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/ShapeGraphic.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardApplication.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardRoom.java
	bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardService.java
	bigbluebutton-client/locale/en_US/bbbResources.properties
	bigbluebutton-client/src/org/bigbluebutton/common/Images.as
	bigbluebutton-client/src/org/bigbluebutton/common/assets/images/text_icon.png
	bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasModel.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/DrawProxy.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/DrawObject.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/DrawObjectFactory.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/Ellipse.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/Pencil.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/Rectangle.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/ShapeFactory.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/managers/PageManager.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/managers/WhiteboardManager.as
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/maps/WhiteboardCanvasEventMap.mxml
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardCanvas.mxml
	bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml
  • Loading branch information
ritzalam committed Jul 16, 2012
2 parents b2973cb + 27b2e5a commit 5742f27
Show file tree
Hide file tree
Showing 86 changed files with 4,490 additions and 310 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ record-and-playback/playback-web/playback-web-0.1.war
bigbluebutton-client/.actionScriptProperties
bigbluebutton-client/.flexProperties
push_to_git.py
a.txt
lor
bigbluebutton-web/logfile
4 changes: 2 additions & 2 deletions bbb-api-demo/src/main/webapp/bbb_api.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public String getJoinMeetingURL(String username, String meetingID, String passwo
//
// Note this meeting will use username for meetingID
public String getJoinURL(String username, String meetingID, String record, String welcome, Map<String, String> metadata, String xml) {
public String getJoinURL(String username, String meetingID, String record, String welcome, Map<String, String> metadata, String xml, String pw) {
String base_url_create = BigBlueButtonURL + "api/create?";
String base_url_join = BigBlueButtonURL + "api/join?";
Expand Down Expand Up @@ -260,7 +260,7 @@ public String getJoinURLXML(String username, String meetingID, String welcome, S
.trim().equals("SUCCESS")) {
String join_parameters = "meetingID=" + urlEncode(meetingID)
+ "&fullName=" + urlEncode(username) + "&password=mp";
+ "&fullName=" + urlEncode(username) + "&password=" + pw;
return base_url_join + join_parameters + "&checksum="
+ checksum("join" + join_parameters + salt);
Expand Down
12 changes: 11 additions & 1 deletion bbb-api-demo/src/main/webapp/demo1.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,17 @@ if (request.getParameterMap().isEmpty()) {
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>";
String joinURL = getJoinURL(request.getParameter("username"), "Demo Meeting", "false", null, null, null);
java.util.Random testIDGen = new java.util.Random();
int userID = testIDGen.nextInt(99999);
String username = request.getParameter("username");
String joinURL = null;
if(!username.startsWith("viewer"))
joinURL = getJoinURL(request.getParameter("username"), "Demo Meeting", "false", null, null, null, "mp");
else
joinURL = getJoinURL(request.getParameter("username"), "Demo Meeting", "false", null, null, null, "ap");
if (joinURL.startsWith("http://")) {
%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void addAnnotation(Map<String, Object> annotation) {
}
}
}


private String pointsToString(ArrayList<Double> points){
String datapoints = "";
for (Double i : points) {
Expand All @@ -31,4 +31,21 @@ private String pointsToString(ArrayList<Double> points){
// Trim the trailing comma
return datapoints.substring(0, datapoints.length() - 1);
}

public void setFillColor(int fillColor) {
eventMap.put("fillColor", Integer.toString(fillColor));
}

public void setThickness(int thickness) {
eventMap.put("thickness", Integer.toString(thickness));
}

public void setFill(boolean fill) {
eventMap.put("fill", Boolean.toString(fill));
}

public void setTransparent(boolean transparent) {
eventMap.put("transparent", Boolean.toString(transparent));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program 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 2.1 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ajay Gopinath <ajgopi124(at)gmail(dot)com>
*/
package org.bigbluebutton.conference.service.recorder.whiteboard;

public class AddTextWhiteboardRecordEvent extends
AbstractWhiteboardRecordEvent {

public AddTextWhiteboardRecordEvent() {
super();
setEvent("AddTextEvent");
}

public void setDataPoints(String points) {
eventMap.put("dataPoints", points);
}

public void setText(String text) {
eventMap.put("text", text);
}

public void setTextColor(int textColor) {
eventMap.put("textColor", Integer.toString(textColor));
}

public void setBGColor(int bgColor) {
eventMap.put("bgColor", Integer.toString(bgColor));
}

public void setBGColorVisible(boolean bgColorVis) {
eventMap.put("bgColorVisible", Boolean.toString(bgColorVis));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program 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 2.1 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ajay Gopinath <ajgopi124(at)gmail(dot)com>
*/
package org.bigbluebutton.conference.service.recorder.whiteboard;

public class ModifyTextWhiteboardRecordEvent extends
AbstractWhiteboardRecordEvent {

public ModifyTextWhiteboardRecordEvent() {
super();
setEvent("ModifyT=TextEvent");
}

public void setDataPoints(String points) {
eventMap.put("dataPoints", points);
}

public void setText(String text) {
eventMap.put("text", text);
}

public void setTextColor(int textColor) {
eventMap.put("textColor", Integer.toString(textColor));
}

public void setBGColor(int bgColor) {
eventMap.put("bgColor", Integer.toString(bgColor));
}

public void setBGColorVisible(boolean bgColorVis) {
eventMap.put("bgColorVisible", Boolean.toString(bgColorVis));
}

public void setModifyingID(String id) {
eventMap.put("modifiedID", id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program 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 2.1 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ajay Gopinath <ajgopi124(at)gmail(dot)com>
*/
package org.bigbluebutton.conference.service.recorder.whiteboard;

public class ToggleGridWhiteboardRecordEvent extends
AbstractWhiteboardRecordEvent {

public ToggleGridWhiteboardRecordEvent() {
super();
setEvent("ToggleGridEvent");
}

public void setGridEnabled(boolean enabled) {
eventMap.put("gridEnabled", Boolean.toString(enabled));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import org.bigbluebutton.conference.service.whiteboard.IWhiteboardRoomListener;
import org.bigbluebutton.conference.service.whiteboard.Presentation;
import org.bigbluebutton.conference.service.whiteboard.Presentation;
import org.bigbluebutton.conference.service.whiteboard.ShapeGraphic;
import org.bigbluebutton.conference.service.whiteboard.TextGraphic;

public class WhiteboardEventRecorder implements IWhiteboardRoomListener{
private static Logger log = Red5LoggerFactory.getLogger( WhiteboardEventRecorder.class, "bigbluebutton" );
Expand All @@ -24,15 +26,36 @@ public String getName() {
}


@Override
public void addAnnotation(Map<String, Object> annotation, Presentation presentation) {
@Override
public void addAnnotation(Map<String, Object> annotation, Presentation presentation) {
AddShapeWhiteboardRecordEvent event = new AddShapeWhiteboardRecordEvent();
event.setMeetingId(session);
event.setTimestamp(System.currentTimeMillis());
event.setPresentation(presentation.getName());
event.setPageNumber(presentation.getActivePage().getPageIndex());
event.setPageNumber(presentation.getActivePage().getPageIndex());
event.addAnnotation(annotation);


// event.setDataPoints(shape.getShape());
// event.setType(shape.getType());
// event.setColor(shape.getColor());
// event.setThickness(shape.getThickness());
// event.setFill(shape.isFill());
// event.setTransparent(shape.isTransparent());
recorder.record(session, event);
}

@Override
public void addText(TextGraphic text, Presentation presentation) {
AddTextWhiteboardRecordEvent event = new AddTextWhiteboardRecordEvent();
event.setMeetingId(session);
event.setTimestamp(System.currentTimeMillis());
event.setPresentation(presentation.getName());
event.setPageNumber(presentation.getActivePage().getPageIndex());
event.setText(text.getText());
event.setTextColor(text.getTextColor());
event.setBGColor(text.getBgColor());
event.setBGColorVisible(text.getBgColorVisible());
event.setDataPoints(text.getLocation());
recorder.record(session, event);
}

Expand All @@ -48,7 +71,7 @@ public void clearPage(Presentation presentation) {
}

@Override
public void undoShape(Presentation presentation) {
public void undoWBGraphic(Presentation presentation) {
UndoShapeWhiteboardRecordEvent event = new UndoShapeWhiteboardRecordEvent();
event.setMeetingId(session);
event.setTimestamp(System.currentTimeMillis());
Expand All @@ -58,4 +81,45 @@ public void undoShape(Presentation presentation) {
recorder.record(session, event);
}

@Override
public void toggleGrid(boolean enabled, Presentation presentation) {
ToggleGridWhiteboardRecordEvent event = new ToggleGridWhiteboardRecordEvent();
event.setMeetingId(session);
event.setTimestamp(System.currentTimeMillis());
event.setPresentation(presentation.getName());
event.setPageNumber(presentation.getActivePage().getPageIndex());
event.setGridEnabled(enabled);

recorder.record(session, event);

}

@Override
public void modifyText(TextGraphic text, Presentation presentation) {
ModifyTextWhiteboardRecordEvent event = new ModifyTextWhiteboardRecordEvent();
event.setMeetingId(session);
event.setTimestamp(System.currentTimeMillis());
event.setPresentation(presentation.getName());
event.setPageNumber(presentation.getActivePage().getPageIndex());
event.setText(text.getText());
event.setTextColor(text.getTextColor());
event.setBGColor(text.getBgColor());
event.setBGColorVisible(text.getBgColorVisible());
event.setDataPoints(text.getLocation());
event.setModifyingID(text.getID());
recorder.record(session, event);
}

@Override
public void undoShape(Presentation presentation) {
// TODO Auto-generated method stub

}

@Override
public void addShape(ShapeGraphic shape, Presentation presentation) {
// TODO Auto-generated method stub

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@

public interface IWhiteboardRoomListener {
public String getName();


public void addAnnotation(Map<String, Object> annotation, Presentation presentation);
public void undoShape(Presentation presentation);
public void undoShape(Presentation presentation);
public void addShape(ShapeGraphic shape, Presentation presentation);
public void addText(TextGraphic shape, Presentation presentation);
public void modifyText(TextGraphic shape, Presentation presentation);
public void undoWBGraphic(Presentation presentation);
public void toggleGrid(boolean value, Presentation presentation);
public void clearPage(Presentation presentation);
}
Loading

0 comments on commit 5742f27

Please sign in to comment.