Initial implementation to let slides be passed in the backend
This commit is contained in:
parent
f390049fea
commit
8b6cdc6edf
@ -18,8 +18,11 @@ object BreakoutModel {
|
|||||||
captureSlides: Boolean,
|
captureSlides: Boolean,
|
||||||
captureNotesFilename: String,
|
captureNotesFilename: String,
|
||||||
captureSlidesFilename: String,
|
captureSlidesFilename: String,
|
||||||
|
allPages: Boolean,
|
||||||
|
presId: String,
|
||||||
): BreakoutRoom2x = {
|
): BreakoutRoom2x = {
|
||||||
new BreakoutRoom2x(id, externalId, name, parentId, sequence, shortName, isDefaultName, freeJoin, voiceConf, assignedUsers, Vector(), Vector(), None, false, captureNotes, captureSlides, captureNotesFilename, captureSlidesFilename)
|
new BreakoutRoom2x(id, externalId, name, parentId, sequence, shortName, isDefaultName, freeJoin, voiceConf, assignedUsers, Vector(), Vector(), None, false,
|
||||||
|
captureNotes, captureSlides, captureNotesFilename, captureSlidesFilename, allPages, presId)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,26 +40,30 @@ trait CreateBreakoutRoomsCmdMsgHdlr extends RightsManagementTrait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def processRequest(msg: CreateBreakoutRoomsCmdMsg, state: MeetingState2x): MeetingState2x = {
|
def processRequest(msg: CreateBreakoutRoomsCmdMsg, state: MeetingState2x): MeetingState2x = {
|
||||||
|
val presId = getPresentationId(state) // The current presentation
|
||||||
val presId = getPresentationId(state)
|
val presSlide = getPresentationSlide(state) // The current slide
|
||||||
val presSlide = getPresentationSlide(state)
|
|
||||||
val parentId = liveMeeting.props.meetingProp.intId
|
val parentId = liveMeeting.props.meetingProp.intId
|
||||||
var rooms = new collection.immutable.HashMap[String, BreakoutRoom2x]
|
var rooms = new collection.immutable.HashMap[String, BreakoutRoom2x]
|
||||||
|
|
||||||
var i = 0
|
var i = 0
|
||||||
for (room <- msg.body.rooms) {
|
for (room <- msg.body.rooms) {
|
||||||
|
val roomPresId = if (room.presId.isEmpty) presId else room.presId;
|
||||||
|
|
||||||
i += 1
|
i += 1
|
||||||
val (internalId, externalId) = BreakoutRoomsUtil.createMeetingIds(liveMeeting.props.meetingProp.intId, i)
|
val (internalId, externalId) = BreakoutRoomsUtil.createMeetingIds(liveMeeting.props.meetingProp.intId, i)
|
||||||
val voiceConf = BreakoutRoomsUtil.createVoiceConfId(liveMeeting.props.voiceProp.voiceConf, i)
|
val voiceConf = BreakoutRoomsUtil.createVoiceConfId(liveMeeting.props.voiceProp.voiceConf, i)
|
||||||
|
|
||||||
val breakout = BreakoutModel.create(parentId, internalId, externalId, room.name, room.sequence, room.shortName,
|
val breakout = BreakoutModel.create(parentId, internalId, externalId, room.name, room.sequence, room.shortName,
|
||||||
room.isDefaultName, room.freeJoin, voiceConf, room.users, msg.body.captureNotes,
|
room.isDefaultName, room.freeJoin, voiceConf, room.users, msg.body.captureNotes,
|
||||||
msg.body.captureSlides, room.captureNotesFilename, room.captureSlidesFilename)
|
msg.body.captureSlides, room.captureNotesFilename, room.captureSlidesFilename,
|
||||||
|
room.allPages, roomPresId)
|
||||||
|
|
||||||
rooms = rooms + (breakout.id -> breakout)
|
rooms = rooms + (breakout.id -> breakout)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (breakout <- rooms.values.toVector) {
|
for (breakout <- rooms.values.toVector) {
|
||||||
|
val roomSlides = if (breakout.allPages) -1 else presSlide;
|
||||||
|
|
||||||
val roomDetail = new BreakoutRoomDetail(
|
val roomDetail = new BreakoutRoomDetail(
|
||||||
breakout.id, breakout.name,
|
breakout.id, breakout.name,
|
||||||
liveMeeting.props.meetingProp.intId,
|
liveMeeting.props.meetingProp.intId,
|
||||||
@ -72,7 +76,9 @@ trait CreateBreakoutRoomsCmdMsgHdlr extends RightsManagementTrait {
|
|||||||
msg.body.durationInMinutes * 60,
|
msg.body.durationInMinutes * 60,
|
||||||
liveMeeting.props.password.moderatorPass,
|
liveMeeting.props.password.moderatorPass,
|
||||||
liveMeeting.props.password.viewerPass,
|
liveMeeting.props.password.viewerPass,
|
||||||
presId, presSlide, msg.body.record,
|
breakout.presId,
|
||||||
|
roomSlides,
|
||||||
|
msg.body.record,
|
||||||
liveMeeting.props.breakoutProps.privateChatEnabled,
|
liveMeeting.props.breakoutProps.privateChatEnabled,
|
||||||
breakout.captureNotes,
|
breakout.captureNotes,
|
||||||
breakout.captureSlides,
|
breakout.captureSlides,
|
||||||
|
@ -19,6 +19,8 @@ case class BreakoutRoom2x(
|
|||||||
captureSlides: Boolean,
|
captureSlides: Boolean,
|
||||||
captureNotesFilename: String,
|
captureNotesFilename: String,
|
||||||
captureSlidesFilename: String,
|
captureSlidesFilename: String,
|
||||||
|
allPages: Boolean,
|
||||||
|
presId: String,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ case class BreakoutRoomDetail(
|
|||||||
object CreateBreakoutRoomsCmdMsg { val NAME = "CreateBreakoutRoomsCmdMsg" }
|
object CreateBreakoutRoomsCmdMsg { val NAME = "CreateBreakoutRoomsCmdMsg" }
|
||||||
case class CreateBreakoutRoomsCmdMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsCmdMsgBody) extends StandardMsg
|
case class CreateBreakoutRoomsCmdMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsCmdMsgBody) extends StandardMsg
|
||||||
case class CreateBreakoutRoomsCmdMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, captureNotes: Boolean, captureSlides: Boolean, rooms: Vector[BreakoutRoomMsgBody], sendInviteToModerators: Boolean)
|
case class CreateBreakoutRoomsCmdMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, captureNotes: Boolean, captureSlides: Boolean, rooms: Vector[BreakoutRoomMsgBody], sendInviteToModerators: Boolean)
|
||||||
case class BreakoutRoomMsgBody(name: String, sequence: Int, shortName: String, captureNotesFilename: String, captureSlidesFilename: String, isDefaultName: Boolean, freeJoin: Boolean, users: Vector[String])
|
case class BreakoutRoomMsgBody(name: String, sequence: Int, shortName: String, captureNotesFilename: String, captureSlidesFilename: String, isDefaultName: Boolean, freeJoin: Boolean, users: Vector[String], allPages: Boolean, presId: String)
|
||||||
|
|
||||||
// Sent by user to request ending all the breakout rooms
|
// Sent by user to request ending all the breakout rooms
|
||||||
object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" }
|
object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" }
|
||||||
|
@ -94,6 +94,7 @@ public class PresentationUrlDownloadService {
|
|||||||
}, 5, TimeUnit.SECONDS);
|
}, 5, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A negative presentationSlide indicates the entire presentation deck should be used.
|
||||||
private void extractPage(final String sourceMeetingId, final String presentationId,
|
private void extractPage(final String sourceMeetingId, final String presentationId,
|
||||||
final Integer presentationSlide, final String destinationMeetingId) {
|
final Integer presentationSlide, final String destinationMeetingId) {
|
||||||
|
|
||||||
@ -146,7 +147,7 @@ public class PresentationUrlDownloadService {
|
|||||||
+ newFilename;
|
+ newFilename;
|
||||||
File newPresentation = new File(newFilePath);
|
File newPresentation = new File(newFilePath);
|
||||||
|
|
||||||
if (sourcePresentationFile.getName().toLowerCase().endsWith("pdf")) {
|
if (sourcePresentationFile.getName().toLowerCase().endsWith("pdf") && presentationSlide >= 0) {
|
||||||
pageExtractor.extractPage(sourcePresentationFile, new File(
|
pageExtractor.extractPage(sourcePresentationFile, new File(
|
||||||
newFilePath), presentationSlide);
|
newFilePath), presentationSlide);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user