Fix conflicts and merge master

This commit is contained in:
Oswaldo Acauan 2016-07-28 19:50:44 +00:00
commit afe1a66e02
30 changed files with 212 additions and 124 deletions

View File

@ -33,7 +33,7 @@ redis {
password=""
# recording keys should expire in 14 days
keyExpiry=1209600
}
}
http {
interface = "0.0.0.0"
@ -41,14 +41,10 @@ http {
}
services {
bbbWebHost = "localhost"
bbbWebPort = 88888
bbbWebAPI = "http://192.168.23.33/bigbluebutton/api"
sharedSecret = "changeme"
moderatorPassword = "mp"
viewerPassword = "ap"
defaultPresentationURL = "http://localhost/default.pdf"
}
}
red5 {
deskshareip="192.168.0.109"

View File

@ -94,7 +94,7 @@ class JsonMessageSenderActor(val service: MessageSender)
private def handleCreateBreakoutRoom(msg: CreateBreakoutRoom) {
val payload = new CreateBreakoutRoomRequestPayload(msg.room.breakoutId, msg.room.parentId, msg.room.name,
msg.room.voiceConfId, msg.room.viewerPassword, msg.room.moderatorPassword,
msg.room.durationInMinutes, msg.room.defaultPresentationURL, msg.room.record)
msg.room.durationInMinutes, msg.room.defaultPresentationURL, msg.room.recordType)
val request = new CreateBreakoutRoomRequest(payload)
service.send(MessagingConstants.FROM_MEETING_CHANNEL, request.toJson())
}

View File

@ -25,7 +25,7 @@ object UserMessagesProtocol extends DefaultJsonProtocol {
}
implicit val breakoutRoomInPayloadFormat = jsonFormat2(BreakoutRoomInPayload)
implicit val createBreakoutRoomsFormat = jsonFormat3(CreateBreakoutRooms)
implicit val createBreakoutRoomsFormat = jsonFormat4(CreateBreakoutRooms)
implicit val breakoutRoomsListMessageFormat = jsonFormat1(BreakoutRoomsListMessage)
implicit val requestBreakoutJoinURLInMessageFormat = jsonFormat3(RequestBreakoutJoinURLInMessage)
implicit val transferUserToMeetingRequestFormat = jsonFormat3(TransferUserToMeetingRequest)

View File

@ -42,7 +42,7 @@ case class LockSetting(meetingID: String, locked: Boolean, settings: Map[String,
// Sent by user to request the breakout rooms list of a room
case class BreakoutRoomsListMessage(meetingId: String) extends InMessage
// Sent by user to request creation of breakout rooms
case class CreateBreakoutRooms(meetingId: String, durationInMinutes: Int,
case class CreateBreakoutRooms(meetingId: String, durationInMinutes: Int, recordType: String,
rooms: Vector[BreakoutRoomInPayload]) extends InMessage
case class BreakoutRoomInPayload(name: String, users: Vector[String])
// Sent by user to request for a join URL in order to be able to join a breakout room

View File

@ -29,11 +29,11 @@ case object IsAliveMessage extends IOutMessage
// Breakout Rooms
case class BreakoutRoomsListOutMessage(meetingId: String, rooms: Vector[BreakoutRoomBody]) extends IOutMessage
case class CreateBreakoutRoom(meetingId: String, recorded: Boolean, room: BreakoutRoomOutPayload) extends IOutMessage
case class CreateBreakoutRoom(meetingId: String, room: BreakoutRoomOutPayload) extends IOutMessage
case class EndBreakoutRoom(breakoutId: String) extends IOutMessage
case class BreakoutRoomOutPayload(breakoutId: String, name: String, parentId: String,
voiceConfId: String, durationInMinutes: Int, moderatorPassword: String, viewerPassword: String,
defaultPresentationURL: String, record: Boolean)
defaultPresentationURL: String, recordType: String)
case class BreakoutRoomJoinURLOutMessage(meetingId: String, recorded: Boolean, breakoutId: String, userId: String, joinURL: String) extends IOutMessage
case class BreakoutRoomStartedOutMessage(meetingId: String, recorded: Boolean, breakout: BreakoutRoomBody) extends IOutMessage
case class BreakoutRoomBody(name: String, breakoutId: String)

View File

@ -43,9 +43,9 @@ trait BreakoutRoomApp extends SystemConfiguration {
val voiceConfId = BreakoutRoomsUtil.createVoiceConfId(mProps.voiceBridge, i)
val r = breakoutModel.createBreakoutRoom(breakoutMeetingId, room.name, voiceConfId, room.users, presURL)
val p = new BreakoutRoomOutPayload(r.id, r.name, mProps.meetingID,
r.voiceConfId, msg.durationInMinutes, bbbWebModeratorPassword, bbbWebViewerPassword,
r.defaultPresentationURL, mProps.recorded)
outGW.send(new CreateBreakoutRoom(mProps.meetingID, mProps.recorded, p))
r.voiceConfId, msg.durationInMinutes, mProps.moderatorPass, mProps.viewerPass,
r.defaultPresentationURL, msg.recordType)
outGW.send(new CreateBreakoutRoom(mProps.meetingID, p))
}
meetingModel.breakoutRoomsdurationInMinutes = msg.durationInMinutes;
meetingModel.breakoutRoomsStartedOn = timeNowInSeconds;
@ -55,7 +55,7 @@ trait BreakoutRoomApp extends SystemConfiguration {
for {
user <- usersModel.getUser(userId)
apiCall = "join"
params = BreakoutRoomsUtil.joinParams(user.name, userId, true, breakoutId, bbbWebModeratorPassword, true)
params = BreakoutRoomsUtil.joinParams(user.name, userId, true, breakoutId, mProps.moderatorPass, true)
baseString = BreakoutRoomsUtil.createBaseString(params)
checksum = BreakoutRoomsUtil.calculateChecksum(apiCall, baseString, bbbWebSharedSecret)
joinURL = BreakoutRoomsUtil.createJoinURL(bbbWebAPI, apiCall, baseString, checksum)

View File

@ -9,11 +9,11 @@ public class CreateBreakoutRoomRequestPayload {
public final String moderatorPassword;
public final Integer durationInMinutes; // The duration of the breakout room
public final String defaultPresentationURL;
public final Boolean record;
public final String recordType;
public CreateBreakoutRoomRequestPayload(String breakoutId, String parentId, String name,
String voiceConfId, String viewerPassword, String moderatorPassword,
Integer duration, String defaultPresentationURL, Boolean record) {
Integer duration, String defaultPresentationURL, String recordType) {
this.breakoutId = breakoutId;
this.parentId = parentId;
this.name = name;
@ -22,6 +22,6 @@ public class CreateBreakoutRoomRequestPayload {
this.moderatorPassword = moderatorPassword;
this.durationInMinutes = duration;
this.defaultPresentationURL = defaultPresentationURL;
this.record = record;
this.recordType = recordType;
}
}

View File

@ -9,12 +9,15 @@ public class CreateBreakoutRoomsRequestPayload {
public final ArrayList<BreakoutRoomRequestPayload> rooms;
// The duration of the breakout room
public final Integer durationInMinutes;
// Breakout rooms recording option
public final String recordType;
public CreateBreakoutRoomsRequestPayload(String meetingId,
ArrayList<BreakoutRoomRequestPayload> breakoutRooms,
Integer duration) {
Integer duration, String recordType) {
this.meetingId = meetingId;
this.rooms = breakoutRooms;
this.durationInMinutes = duration;
this.recordType = recordType;
}
}

View File

@ -17,10 +17,11 @@ public class CreateBreakoutRoomRequestTest {
String viewerPassword = "vp";
String moderatorPassword = "mp";
String defaultPresentationURL = "http://localhost/foo.pdf";
String recordType = "none";
CreateBreakoutRoomRequestPayload payload =
new CreateBreakoutRoomRequestPayload(breakoutId, parentId, name, voiceConfId,
viewerPassword, moderatorPassword, durationInMinutes, defaultPresentationURL);
viewerPassword, moderatorPassword, durationInMinutes, defaultPresentationURL, recordType);
CreateBreakoutRoomRequest msg = new CreateBreakoutRoomRequest(payload);
Gson gson = new Gson();
String json = gson.toJson(msg);
@ -36,5 +37,6 @@ public class CreateBreakoutRoomRequestTest {
Assert.assertEquals(rxMsg.payload.moderatorPassword, moderatorPassword);
Assert.assertEquals(rxMsg.payload.durationInMinutes, durationInMinutes);
Assert.assertEquals(rxMsg.payload.defaultPresentationURL, defaultPresentationURL);
Assert.assertEquals(rxMsg.payload.recordType, recordType);
}
}

View File

@ -14,6 +14,7 @@ public class CreateBreakoutRoomsRequestTest {
public void testCreateBreakoutRoomsRequest() {
String meetingId = "abc123";
Integer durationInMinutes = 20;
String recordType = "moderator";
ArrayList<String> room1Users = new ArrayList<String>();
room1Users.add("Tidora"); room1Users.add("Nidora"); room1Users.add("Tinidora");
@ -30,7 +31,7 @@ public class CreateBreakoutRoomsRequestTest {
ArrayList<BreakoutRoomRequestPayload> rooms = new ArrayList<BreakoutRoomRequestPayload>();
rooms.add(room1); rooms.add(room2); rooms.add(room3);
CreateBreakoutRoomsRequestPayload payload = new CreateBreakoutRoomsRequestPayload(meetingId, rooms, durationInMinutes);
CreateBreakoutRoomsRequestPayload payload = new CreateBreakoutRoomsRequestPayload(meetingId, rooms, durationInMinutes, recordType);
CreateBreakoutRoomsRequest msg = new CreateBreakoutRoomsRequest(payload);
Gson gson = new Gson();
String json = gson.toJson(msg);
@ -42,5 +43,6 @@ public class CreateBreakoutRoomsRequestTest {
Assert.assertEquals(rxMsg.payload.meetingId, meetingId);
Assert.assertEquals(rxMsg.payload.rooms.size(), 3);
Assert.assertEquals(rxMsg.payload.durationInMinutes, durationInMinutes);
Assert.assertEquals(rxMsg.payload.recordType, recordType);
}
}

View File

@ -639,6 +639,10 @@ bbb.users.breakout.room = Breakout Room
bbb.users.breakout.randomAssign = Randomly Assign Users
bbb.users.breakout.timeLimit = Time Limit
bbb.users.breakout.minutes = Minutes
bbb.users.breakout.record = Record
bbb.users.breakout.recordTypeNone = No
bbb.users.breakout.recordTypeModerator = Yes: Moderator starts recording
bbb.users.breakout.recordTypeAll = Yes: Record Everything
bbb.users.breakout.notAssigned = Not Assigned
bbb.users.breakout.dragAndDropToolTip = Tip: you can drag-and-drop users between rooms before you click 'Start'
bbb.users.breakout.start = Start

View File

@ -155,7 +155,6 @@ docall_verto = function(extension, conferenceUsername, conferenceIdNumber, callb
return;
}
// determine the resolution the user chose for webcam video
my_check_vid_res();
outgoingBandwidth = "default";
incomingBandwidth = "default";
var useVideo = useCamera = useMic = false;
@ -335,7 +334,6 @@ function makeVerto(callbacks, stunsConfig, videoTag, vertoServerCredentials) {
// sets verto to begin using the resolution that the user selected
my_check_vid_res = function() {
return;
var selectedVideoConstraints = getChosenWebcamResolution();
my_real_size(selectedVideoConstraints);

View File

@ -45,6 +45,8 @@ package org.bigbluebutton.main.events {
public var durationInMinutes:int;
public var recordType:String;
public var joinURL:String;
public var listen:Boolean;

View File

@ -206,7 +206,7 @@ package org.bigbluebutton.main.model.users
}
public function createBreakoutRooms(e:BreakoutRoomEvent):void{
sender.createBreakoutRooms(_conferenceParameters.meetingID, e.rooms, e.durationInMinutes);
sender.createBreakoutRooms(_conferenceParameters.meetingID, e.rooms, e.durationInMinutes, e.recordType);
}
public function requestBreakoutJoinUrl(e:BreakoutRoomEvent):void{

View File

@ -87,11 +87,12 @@ package org.bigbluebutton.modules.users.services
);
}
public function createBreakoutRooms(meetingId:String, rooms:Array, durationInMinutes:int):void {
public function createBreakoutRooms(meetingId:String, rooms:Array, durationInMinutes:int, recordType:String):void {
var message:Object = new Object();
message["meetingId"] = meetingId;
message["rooms"] = rooms;
message["durationInMinutes"] = durationInMinutes;
message["recordType"] = recordType;
var jsonMsg:String = JSON.stringify(message);
var _nc:ConnectionManager = BBB.initConnectionManager();

View File

@ -24,7 +24,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:mate="http://mate.asfusion.com/"
width="630" height="600"
width="630" height="650"
close="onCloseClicked()"
creationComplete="creationCompleteHandler(event)"
showCloseButton="false">
@ -45,7 +45,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
[Bindable]
private var roomsProvider:Array;
[Bindable]
private var recordTypesProvider:Array;
private var dispatcher:Dispatcher;
private function onCloseClicked():void {
@ -77,6 +80,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
if (totalUsers > 0) {
event.durationInMinutes = durationStepper.value;
event.recordType = recordTypesCombo.selectedItem.data;
dispatcher.dispatchEvent(event);
PopUpManager.removePopUp(this);
} else {
@ -127,6 +131,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
roomsProvider.push(i.toString() + " " + ResourceUtil.getInstance().getString('bbb.users.breakout.rooms'));
}
roomsCombo.selectedIndex = 0;
recordTypesProvider = new Array(
{label:ResourceUtil.getInstance().getString('bbb.users.breakout.recordTypeNone'), data:"none"},
{label:ResourceUtil.getInstance().getString('bbb.users.breakout.recordTypeModerator'), data:"moderator"},
{label:ResourceUtil.getInstance().getString('bbb.users.breakout.recordTypeAll'), data:"all"}
);
recordTypesCombo.selectedIndex = 0;
assignUsers();
}
@ -157,6 +168,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.users.breakout.minutes')}"/>
</mx:HBox>
<mx:HBox width="100%" paddingTop="12">
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.users.breakout.record')}" />
<mx:ComboBox id="recordTypesCombo" dataProvider="{recordTypesProvider}"/>
</mx:HBox>
<mx:Tile id="roomsContainer" styleName="roomsContainer" width="100%" height="100%"/>
<mx:HBox width="100%" horizontalAlign="right" verticalGap="15">

View File

@ -6,7 +6,9 @@
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BreakoutRoomEvent;
import org.bigbluebutton.main.model.users.BreakoutRoom;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -32,11 +34,12 @@
]]>
</mx:Script>
<mx:Button id="listenBtn" toggle="true"
width="20" height="20"
icon="{images.transfer}" toolTip="{ResourceUtil.getInstance().getString('bbb.users.roomsGrid.transfer')}"
click="listenToBreakoutRoom(event)" visible="{data.listenStatus != BreakoutRoom.OTHER}"/>
<mx:Button id="joinImg" width="20" height="20"
icon="{images.join}" toolTip="{ResourceUtil.getInstance().getString('bbb.users.roomsGrid.join')}"
click="requestBreakoutJoinUrl(event)"/>
<mx:Button id="listenBtn" toggle="true"
width="20" height="20"
visible="{data.listenStatus != BreakoutRoom.OTHER &amp;&amp; UserManager.getInstance().getConference().voiceJoined}" includeInLayout="{listenBtn.visible}"
icon="{images.transfer}" toolTip="{ResourceUtil.getInstance().getString('bbb.users.roomsGrid.transfer')}"
click="listenToBreakoutRoom(event)"/>
</mx:HBox>

View File

@ -580,10 +580,10 @@ while [ $# -gt 0 ]; do
SALT="${2}"
if [ -z "$SALT" ]; then
BBB_WEB_URL=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | sed -n '/^bigbluebutton.web.serverURL/{s/.*=//;p}')
SALT=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | grep securitySalt | cut -d= -f2);
SECRET=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | grep securitySalt | cut -d= -f2);
echo
echo " URL: $BBB_WEB_URL/bigbluebutton/"
echo " Salt: $SALT"
echo " Secret: $SECRET"
echo
exit 0
fi
@ -646,11 +646,10 @@ if [ $SALT ]; then
fi
if [ -f /usr/share/bbb-apps-akka/conf/application.conf ]; then
sed -i "s/sharedSecret.[ ]*=[ ]*\"[^\"]*\"/sharedSecret.=\"$SALT\"/g" \
sed -i "s/sharedSecret[ ]*=[ ]*\"[^\"]*\"/sharedSecret=\"$SALT\"/g" \
/usr/share/bbb-apps-akka/conf/application.conf
fi
change_var_salt ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties securitySalt $SALT
echo "Changed BigBlueButton's shared secret to $SALT"
echo
fi
@ -891,6 +890,14 @@ check_configuration() {
echo "# /var/bigbluebutton"
echo "# is not owned by $TOMCAT_USER"
fi
if [ $PROTOCOL_HTTP == "https" ]; then
if ! grep jnlpUrl /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties | grep -q https; then
echo "# Warning: Detected the value for jnlpUrl is not configured for HTTPS"
echo "# /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties"
echo "#"
fi
fi
}
@ -1174,7 +1181,7 @@ check_state() {
COUNT=0
while [ $COUNT -lt 20 ]; do
let COUNT=COUNT+1
timeout 1s wget http://$BBB_WEB/bigbluebutton/api -O - --quiet | grep -q SUCCESS
timeout 1s wget $PROTOCOL_HTTP://$BBB_WEB/bigbluebutton/api -O - --quiet | grep -q SUCCESS
if [ $? -eq 0 ]; then
let COUNT=30
else
@ -1184,10 +1191,10 @@ check_state() {
done
echo
if ! wget http://$BBB_WEB/bigbluebutton/api -O - --quiet | grep -q SUCCESS; then
if ! wget $PROTOCOL_HTTP://$BBB_WEB/bigbluebutton/api -O - --quiet | grep -q SUCCESS; then
echo "# Error: Could not connect to the configured hostname/IP address"
echo "#"
echo "# http://$BBB_WEB/"
echo "# $PROTOCOL_HTTP://$BBB_WEB/"
echo "#"
echo "# If your BigBlueButton server is behind a firewall, see FAQ."
echo
@ -1457,7 +1464,7 @@ if [ $CHECK ]; then
fi
if [ -f ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties ]; then
LTI_URL=$(cat ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties | grep -v '#' | sed -n '/^bigbluebuttonURL/{s/.*http:\/\///;s/\/.*//;p}' | tr -d '\015')
LTI_URL=$(cat ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties | grep -v '#' | sed -n '/^bigbluebuttonURL/{s/.*http[s]:\/\///;s/\/.*//;p}' | tr -d '\015')
echo
echo "${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties (LTI integration)"
echo " api url: $LTI_URL"
@ -1665,8 +1672,8 @@ if [ -n "$HOST" ]; then
${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties streamBaseUrl rtmp://$HOST/screenshare
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties jnlpUrl http://$HOST/screenshare
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties jnlpFile http://$HOST/screenshare/screenshare.jnlp
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties jnlpUrl $PROTOCOL_HTTP://$HOST/screenshare
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties jnlpFile $PROTOCOL_HTTP://$HOST/screenshare/screenshare.jnlp
if ! grep -q server_names_hash_bucket_size /etc/nginx/nginx.conf; then
sudo sed -i "s/gzip on;/gzip on;\n server_names_hash_bucket_size 64;/g" /etc/nginx/nginx.conf
@ -1684,9 +1691,14 @@ if [ -n "$HOST" ]; then
/usr/share/bbb-apps-akka/conf/application.conf
sed -i "s/deskshareip[ ]*=[ ]*\"[^\"]*\"/deskshareip=\"$HOST\"/g" \
/usr/share/bbb-apps-akka/conf/application.conf
sed -i "s/defaultPresentationURL[ ]*=[ ]*\"[^\"]*\"/defaultPresentationURL=\"${PROTOCOL_HTTP}:\/\/$HOST\/default.pdf\"/g" \
/usr/share/bbb-apps-akka/conf/application.conf
# XXX Temporary fix to ensure application.conf has the latest shared secret
SECRET=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | grep securitySalt | cut -d= -f2);
sed -i "s/sharedSecret[ ]*=[ ]*\"[^\"]*\"/sharedSecret=\"$SECRET\"/g" \
/usr/share/bbb-apps-akka/conf/application.conf
fi
#
# Update api demos
#

View File

@ -48,6 +48,9 @@ clientConfig.app.listenOnly = false;
clientConfig.app.skipCheck = false;
// Flag for HTTPS. True by default
clientConfig.app.httpsConnection = true;
// The amount of time the client will wait before making another call to
// successfully hangup the WebRTC conference call

View File

@ -1,51 +1,69 @@
import sizeOf from 'image-size';
import Slides from '/imports/api/slides';
import { clientConfig } from '/config';
export function addSlideToCollection(meetingId, presentationId, slideObject) {
const url = Npm.require('url');
const http = Npm.require('http');
const imageUri = slideObject.svg_uri != null ? slideObject.svg_uri : slideObject.png_uri;
if (Slides.findOne({
meetingId: meetingId,
'slide.id': slideObject.id,
}) == null) {
const options = url.parse(imageUri);
http.get(options, Meteor.bindEnvironment(function (response) {
let addSlideHelper = function (response) {
let contentType = response.headers['content-type'];
if (contentType.match(/svg/gi) || contentType.match(/png/gi)) {
let chunks = [];
response.on('data', Meteor.bindEnvironment(function (chunk) {
chunks.push(chunk);
})).on('end', Meteor.bindEnvironment(function () {
let buffer = Buffer.concat(chunks);
const dimensions = sizeOf(buffer);
const entry = {
meetingId: meetingId,
presentationId: presentationId,
slide: {
height_ratio: slideObject.height_ratio,
y_offset: slideObject.y_offset,
num: slideObject.num,
x_offset: slideObject.x_offset,
current: slideObject.current,
img_uri: slideObject.svg_uri != null ? slideObject.svg_uri : slideObject.png_uri,
txt_uri: slideObject.txt_uri,
id: slideObject.id,
width_ratio: slideObject.width_ratio,
swf_uri: slideObject.swf_uri,
thumb_uri: slideObject.thumb_uri,
width: dimensions.width,
height: dimensions.height,
},
};
Slides.insert(entry);
}));
} else {
console.log(`Slide file is not accessible or not ready yet`);
console.log(`response content-type`, response.headers['content-type']);
}
}));
if (contentType.match(/svg/gi) || contentType.match(/png/gi)) {
let chunks = [];
response.on('data', Meteor.bindEnvironment(function (chunk) {
chunks.push(chunk);
})).on('end', Meteor.bindEnvironment(function () {
let buffer = Buffer.concat(chunks);
const dimensions = sizeOf(buffer);
const entry = {
meetingId: meetingId,
presentationId: presentationId,
slide: {
height_ratio: slideObject.height_ratio,
y_offset: slideObject.y_offset,
num: slideObject.num,
x_offset: slideObject.x_offset,
current: slideObject.current,
img_uri: slideObject.svg_uri != null ? slideObject.svg_uri : slideObject.png_uri,
txt_uri: slideObject.txt_uri,
id: slideObject.id,
width_ratio: slideObject.width_ratio,
swf_uri: slideObject.swf_uri,
thumb_uri: slideObject.thumb_uri,
width: dimensions.width,
height: dimensions.height,
},
};
Slides.insert(entry);
}));
} else {
console.log(`Slide file is not accessible or not ready yet`);
console.log(`response content-type`, response.headers['content-type']);
}
};
// HTTPS connection
if (clientConfig.app.httpsConnection) {
const https = Npm.require('https');
https.get(options, Meteor.bindEnvironment(function (response) {
addSlideHelper(response);
}));
} else {
// HTTP connection
const http = Npm.require('http');
http.get(options, Meteor.bindEnvironment(function (response) {
addSlideHelper(response);
}));
}
//logger.info "added slide id =[#{id}]:#{slideObject.id} in #{meetingId}. Now there
// are #{Slides.find({meetingId: meetingId}).count()} slides in the meeting"

View File

@ -44,7 +44,7 @@ Meteor.publish('users', function (credentials) {
}
} else { //subscribing before the user was added to the collection
Meteor.call('validateAuthToken', credentials);
logger.error(`there was no user ${userid} in ${meetingId}. Sending validateAuthToken`);
logger.info(`Sending validateAuthTokenthere for user ${userid} in ${meetingId}.`);
return getUsers(meetingId);
}
});

View File

@ -3,10 +3,18 @@ import '/server/server';
import { RedisPubSub } from '/imports/startup/server/RedisPubSub';
import { EventQueue } from '/imports/startup/server/EventQueue';
import { clearCollections } from '/imports/api/common/server/helpers';
import { clientConfig } from '/config';
Meteor.startup(function () {
clearCollections();
logger.info('server start');
let determineConnectionType = function() {
let baseConnection = 'HTTP';
if(clientConfig.app.httpsConnection) {
baseConnection += ('S');
}
return baseConnection;
};
logger.info(`server start. Connection type:${determineConnectionType()}`);
});
WebApp.connectHandlers.use('/check', (req, res, next) => {

View File

@ -1,7 +1,7 @@
// Setting up a logger
const log = {};
if (process != null && process.env != null && process.env.NODE_ENV == 'production') {
log.path = '/var/log/bigbluebutton/bbbnode.log';
log.path = '/var/log/bigbluebutton/html5/html5client.log';
} else {
log.path = `${process.env.PWD}/log/development.log`;
}

View File

@ -1,4 +1,4 @@
import React, { Component, PropTypes } from 'react';
import React, { Component, PropTypes, cloneElement } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import App from './component';
import { subscribeForData, pollExists, didUserWasKicked, redirectToLogoutUrl } from './service';
@ -8,9 +8,9 @@ import MediaContainer from '../media/container';
import SettingsModal from '../modals/settings/SettingsModal';
const defaultProps = {
navbar: <NavBarContainer/>,
actionsbar: <ActionsBarContainer/>,
media: <MediaContainer/>,
navbar: <NavBarContainer />,
actionsbar: <ActionsBarContainer />,
media: <MediaContainer />,
settings: <SettingsModal />,
};
@ -20,8 +20,11 @@ class AppContainer extends Component {
}
render() {
// inject location on the navbar container
let navbarWithLocation = cloneElement(this.props.navbar, { location: this.props.location });
return (
<App {...this.props}>
<App {...this.props} navbar={navbarWithLocation}>
{this.props.children}
</App>
);

View File

@ -1,6 +1,5 @@
import React, { Component, PropTypes } from 'react';
import styles from './styles.scss';
import { withRouter } from 'react-router';
import Button from '../button/component';
import RecordButton from './recordbutton/component';
@ -24,11 +23,7 @@ class NavBar extends Component {
}
handleToggleUserList() {
/*
TODO: Find out how to get the current route here
so we can change the click behavior
*/
this.props.router.push('/users');
this.props.toggleUserList();
}
render() {
@ -66,4 +61,4 @@ class NavBar extends Component {
NavBar.propTypes = propTypes;
NavBar.defaultProps = defaultProps;
export default withRouter(NavBar);
export default NavBar;

View File

@ -1,5 +1,7 @@
import React, { Component, PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import { withRouter } from 'react-router';
import Auth from '/imports/ui/services/auth';
import Meetings from '/imports/api/meetings';
@ -19,7 +21,7 @@ class NavBarContainer extends Component {
}
}
export default createContainer(() => {
export default withRouter(createContainer(({ location, router }) => {
let meetingTitle;
let meetingRecorded;
@ -33,10 +35,16 @@ export default createContainer(() => {
meetingRecorded = meetingObject.currentlyBeingRecorded;
}
let data = {
return {
presentationTitle: meetingTitle,
hasUnreadMessages: true,
beingRecorded: meetingRecorded,
toggleUserList: () => {
if (location.pathname.indexOf('/users') !== -1) {
router.push('/');
} else {
router.push('/users');
}
},
};
return data;
}, NavBarContainer);
}, NavBarContainer));

View File

@ -1,4 +1,4 @@
#
# the idea is that this way we prevent test runs (for whenever needed)
HOME=/usr/share/meteor JASMINE_SERVER_UNIT=0 JASMINE_SERVER_INTEGRATION=0 JASMINE_CLIENT_INTEGRATION=0 JASMINE_BROWSER=PhantomJS JASMINE_MIRROR_PORT=3000 ROOT_URL=http://127.0.0.1/html5client meteor
JASMINE_SERVER_UNIT=0 JASMINE_SERVER_INTEGRATION=0 JASMINE_CLIENT_INTEGRATION=0 JASMINE_BROWSER=PhantomJS JASMINE_MIRROR_PORT=3000 ROOT_URL=http://127.0.0.1/html5client meteor
# ROOT_URL_PATH_PREFIX=html5client meteor

View File

@ -524,7 +524,19 @@ public class MeetingService implements MessageListener {
params.put("moderatorPW", message.moderatorPassword);
params.put("voiceBridge", message.voiceConfId);
params.put("duration", message.durationInMinutes.toString());
params.put("record", message.record.toString());
String recordType = message.recordType.toString();
if (recordType.equals("moderator")) {
params.put("record", "true");
}
else if (recordType.equals("all")) {
params.put("record", "true");
params.put("autoStartRecording", "true");
params.put("allowStartStopRecording", "false");
}
else {
// The sent value should "none", but whatever value is passed expecting "moderator" & "all" we set recording to false
params.put("record", "false");
}
Meeting breakout = paramsProcessorUtil.processCreateParams(params);

View File

@ -80,8 +80,9 @@ public class MeetingMessageHandler implements MessageHandler {
msg.payload.moderatorPassword,
msg.payload.durationInMinutes,
msg.payload.defaultPresentationURL,
msg.payload.record));
msg.payload.recordType
)
);
}
}
else if (EndBreakoutRoomRequest.NAME.equals(messageName)) {

View File

@ -2,27 +2,28 @@ package org.bigbluebutton.api.messaging.messages;
public class CreateBreakoutRoom implements IMessage {
public final String breakoutId;
public final String parentId; // The main meeting internal id
public final String name; // The name of the breakout room
public final String voiceConfId; // The voice conference id
public final String viewerPassword;
public final String moderatorPassword;
public final Integer durationInMinutes; // The duration of the breakout room
public final String defaultPresentationURL;
public final Boolean record;
public CreateBreakoutRoom(String breakoutId, String parentId, String name,
String voiceConfId, String viewerPassword, String moderatorPassword,
Integer duration, String defaultPresentationURL, Boolean record) {
this.breakoutId = breakoutId;
this.parentId = parentId;
this.name = name;
this.voiceConfId = voiceConfId;
this.viewerPassword = viewerPassword;
this.moderatorPassword = moderatorPassword;
this.durationInMinutes = duration;
this.defaultPresentationURL = defaultPresentationURL;
this.record = record;
}
public final String breakoutId;
public final String parentId; // The main meeting internal id
public final String name; // The name of the breakout room
public final String voiceConfId; // The voice conference id
public final String viewerPassword;
public final String moderatorPassword;
public final Integer durationInMinutes; // The duration of the breakout room
public final String defaultPresentationURL;
public final String recordType;
public CreateBreakoutRoom(String breakoutId, String parentId, String name,
String voiceConfId, String viewerPassword,
String moderatorPassword, Integer duration,
String defaultPresentationURL, String recordType) {
this.breakoutId = breakoutId;
this.parentId = parentId;
this.name = name;
this.voiceConfId = voiceConfId;
this.viewerPassword = viewerPassword;
this.moderatorPassword = moderatorPassword;
this.durationInMinutes = duration;
this.defaultPresentationURL = defaultPresentationURL;
this.recordType = recordType;
}
}