diff --git a/bbb-common-message/src/main/java/org/bigbluebutton/common/messages/MessagingConstants.java b/bbb-common-message/src/main/java/org/bigbluebutton/common/messages/MessagingConstants.java index 4013e35676..d4b6bd727b 100755 --- a/bbb-common-message/src/main/java/org/bigbluebutton/common/messages/MessagingConstants.java +++ b/bbb-common-message/src/main/java/org/bigbluebutton/common/messages/MessagingConstants.java @@ -51,6 +51,8 @@ public class MessagingConstants { public static final String FROM_VOICE_CONF_CHANNEL = "bigbluebutton:from-voice-conf"; public static final String FROM_VOICE_CONF_PATTERN = FROM_VOICE_CONF_CHANNEL + ":*"; public static final String FROM_VOICE_CONF_SYSTEM_CHAN = FROM_VOICE_CONF_CHANNEL + ":system"; + + public static final String FROM_BBB_RECORDING_CHANNEL = "bigbluebutton:from-rap"; public static final String DESTROY_MEETING_REQUEST_EVENT = "DestroyMeetingRequestEvent"; public static final String CREATE_MEETING_REQUEST_EVENT = "CreateMeetingRequestEvent"; diff --git a/bbb-voice/src/main/java/org/bigbluebutton/voiceconf/sip/CallAgent.java b/bbb-voice/src/main/java/org/bigbluebutton/voiceconf/sip/CallAgent.java index 8f0047ccab..29af4ce241 100644 --- a/bbb-voice/src/main/java/org/bigbluebutton/voiceconf/sip/CallAgent.java +++ b/bbb-voice/src/main/java/org/bigbluebutton/voiceconf/sip/CallAgent.java @@ -139,10 +139,10 @@ public class CallAgent extends CallListenerAdapter implements CallStreamObserver } private void setupCallerDisplayName(String callerName, String destination) { - String fromURL = "\"" + callerName + "\" "; + String fromURL = "\"" + callerName + "\" "; userProfile.username = callerName; userProfile.fromUrl = fromURL; - userProfile.contactUrl = "sip:" + destination + "@" + sipProvider.getViaAddress(); + userProfile.contactUrl = "sip:" + destination + "@" + clientRtpIp; if (sipProvider.getPort() != SipStack.default_port) { userProfile.contactUrl += ":" + sipProvider.getPort(); } diff --git a/bbb-voice/src/main/java/org/zoolu/sip/call/CallListenerAdapter.java b/bbb-voice/src/main/java/org/zoolu/sip/call/CallListenerAdapter.java index 9dc7efbfa3..994d94a591 100755 --- a/bbb-voice/src/main/java/org/zoolu/sip/call/CallListenerAdapter.java +++ b/bbb-voice/src/main/java/org/zoolu/sip/call/CallListenerAdapter.java @@ -98,17 +98,7 @@ public abstract class CallListenerAdapter implements ExtendedCallListener { //printLog("RE-INVITE/MODIFY"); String local_session; - if (sdp!=null && sdp.length()>0) - { - SessionDescriptor remote_sdp = new SessionDescriptor(sdp); - SessionDescriptor local_sdp = new SessionDescriptor(call.getLocalSessionDescriptor()); - SessionDescriptor new_sdp = new SessionDescriptor(remote_sdp.getOrigin(),remote_sdp.getSessionName(),local_sdp.getConnection(),local_sdp.getTime()); - new_sdp.addMediaDescriptors(local_sdp.getMediaDescriptors()); - new_sdp = SdpTools.sdpMediaProduct(new_sdp,remote_sdp.getMediaDescriptors()); - new_sdp = SdpTools.sdpAttirbuteSelection(new_sdp,"rtpmap"); - local_session = new_sdp.toString(); - } - else local_session=call.getLocalSessionDescriptor(); + local_session=call.getLocalSessionDescriptor(); // accept immediatly call.accept(local_session); } @@ -218,4 +208,3 @@ public abstract class CallListenerAdapter implements ExtendedCallListener } } - diff --git a/bbb-voice/src/main/java/org/zoolu/sip/dialog/InviteDialog.java b/bbb-voice/src/main/java/org/zoolu/sip/dialog/InviteDialog.java index 7d3e933d1e..5dfdd47d95 100644 --- a/bbb-voice/src/main/java/org/zoolu/sip/dialog/InviteDialog.java +++ b/bbb-voice/src/main/java/org/zoolu/sip/dialog/InviteDialog.java @@ -31,6 +31,8 @@ import org.zoolu.sip.header.*; import org.zoolu.sip.provider.*; import org.zoolu.tools.LogLevel; +import org.slf4j.Logger; +import org.red5.logging.Red5LoggerFactory; /** Class InviteDialog can be used to manage invite dialogs. * An InviteDialog can be both client or server. @@ -82,6 +84,8 @@ public class InviteDialog extends Dialog implements TransactionClientListener, I protected static final int D_BYED=8; protected static final int D_CLOSE=9; + private static Logger logger = Red5LoggerFactory.getLogger(InviteDialog.class, "sip"); + /** Gets the dialog state */ protected String getStatus() { switch (status) @@ -381,6 +385,7 @@ public class InviteDialog extends Dialog implements TransactionClientListener, I * This method should be called when the InviteDialog is in D_INVITED or D_ReINVITED state */ public void accept(String contact, String sdp) { printLog("inside accept(sdp)",LogLevel.MEDIUM); + logger.debug("Accepting REINVITE. Responding OK with this sdp: " + sdp); respond(200,SipResponses.reasonOf(200),contact,sdp); } @@ -483,6 +488,7 @@ public class InviteDialog extends Dialog implements TransactionClientListener, I */ public void onReceivedMessage(SipProvider sip_provider, Message msg) { printLog("inside onReceivedMessage(sip_provider,message)",LogLevel.MEDIUM); + logger.debug("Received this message: " + msg.toString()); if (msg.isRequest() && !(msg.isAck() || msg.isCancel()) && msg.getCSeqHeader().getSequenceNumber()<=getRemoteCSeq()) { printLog("Request message is too late (CSeq too small): Message discarded",LogLevel.HIGH); return; diff --git a/bbb-webhooks/config.coffee b/bbb-webhooks/config.coffee index db6731364a..2a680c788c 100644 --- a/bbb-webhooks/config.coffee +++ b/bbb-webhooks/config.coffee @@ -41,7 +41,10 @@ config.hooks.events or= [ { channel: "bigbluebutton:from-rap", name: "publish_started" }, { channel: "bigbluebutton:from-rap", name: "publish_ended" }, { channel: "bigbluebutton:from-rap", name: "post_publish_started" }, - { channel: "bigbluebutton:from-rap", name: "post_publish_ended" } + { channel: "bigbluebutton:from-rap", name: "post_publish_ended" }, + { channel: "bigbluebutton:from-rap", name: "unpublished" }, + { channel: "bigbluebutton:from-rap", name: "published" }, + { channel: "bigbluebutton:from-rap", name: "deleted" } ] # Retry intervals for failed attempts for perform callback calls. diff --git a/bigbluebutton-client/branding/default/style/css/BBBDefault.css b/bigbluebutton-client/branding/default/style/css/BBBDefault.css index f16b9aafa2..29721d78b2 100755 --- a/bigbluebutton-client/branding/default/style/css/BBBDefault.css +++ b/bigbluebutton-client/branding/default/style/css/BBBDefault.css @@ -44,10 +44,10 @@ ToolTip { cornerRadius: 5; borderStyle: solid; borderThickness: 1; - paddingBottom: 3; - paddingTop: 3; - paddingLeft: 3; - paddingRight: 3; + paddingBottom: 2; + paddingTop: 2; + paddingLeft: 2; + paddingRight: 2; } .meetingNameLabelStyle { @@ -305,7 +305,7 @@ DataGrid { .presentationUploadButtonStyle, .pollStartButtonStyle, .presentationBackButtonStyle, .presentationBackButtonDisabledStyle, .presentationForwardButtonStyle, .presentationForwardButtonDisabledStyle, -.presentationFitToWidthButtonStyle, .presentationFitToPageButtonStyle, .presentationDownloadButtonStyle, +.presentationFitToWidthButtonStyle, .presentationFitToPageButtonStyle, .presentationDownloadButtonStyle, .presentationDownloadButtonDisabledStyle, .sharedNotesSaveButtonStyle, .sharedNotesNewButtonStyle, .sharedNotesFormatButtonStyle { textIndent: 0; @@ -325,7 +325,7 @@ DataGrid { fontSize: 12; } -.sharedNotesSaveButtonStyle { +.sharedNotesSaveButtonStyle, .chatSaveButtonStyle { icon: Embed('assets/images/ic_save_16px.png'); } @@ -373,6 +373,10 @@ DataGrid { icon: Embed('assets/images/ic_file_download_16px.png'); } +.presentationDownloadButtonDisabledStyle { + icon: Embed('assets/images/ic_file_download_grey_16px.png'); +} + .presentationZoomSliderStyle{ labelOffset: 0; thumbOffset: 3; @@ -1022,3 +1026,7 @@ EmojiGrid { .moodSadStyle { icon: Embed('assets/images/icon-7-sad-face.png'); } + +.chatCopyButtonStyle{ + icon: Embed('assets/images/ic_content_copy_black_16px.png'); +} diff --git a/bigbluebutton-client/branding/default/style/css/assets/images/ic_content_copy_black_16px.png b/bigbluebutton-client/branding/default/style/css/assets/images/ic_content_copy_black_16px.png new file mode 100644 index 0000000000..5f460b1bb0 Binary files /dev/null and b/bigbluebutton-client/branding/default/style/css/assets/images/ic_content_copy_black_16px.png differ diff --git a/bigbluebutton-client/branding/default/style/css/assets/images/ic_file_download_grey_16px.png b/bigbluebutton-client/branding/default/style/css/assets/images/ic_file_download_grey_16px.png new file mode 100644 index 0000000000..c375962ff3 Binary files /dev/null and b/bigbluebutton-client/branding/default/style/css/assets/images/ic_file_download_grey_16px.png differ diff --git a/bigbluebutton-client/build.xml b/bigbluebutton-client/build.xml index 617d250f87..b6644cb300 100755 --- a/bigbluebutton-client/build.xml +++ b/bigbluebutton-client/build.xml @@ -278,15 +278,11 @@ - - - - - - + + + - - + - + . } else { logo.source = e.config.logo; } + + if (e.config.toolbarColor != "") { + setStyle("backgroundColor", e.config.toolbarColor); + } + if (e.config.toolbarColorAlphas != "") { + setStyle("highlightAlphas", e.config.toolbarColorAlphas.split(",")); + } } private function onDisconnectTest():void{ diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml index 0ffc456f9c..c4d5748b96 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml @@ -150,7 +150,7 @@ with BigBlueButton; if not, see . private var chatListHeight:Number = 100; [Bindable] - private var chatToolbarHeight:Number = 50; + private var chatToolbarHeight:Number = 80; [Bindable] public var chatOptions:ChatOptions = new ChatOptions(); @@ -791,9 +791,9 @@ with BigBlueButton; if not, see . const paddingHeight:int = 5; const paddingWidth:int = 5; - chatToolbar.width = chatMessagesCanvas.width - paddingWidth * 2; - chatToolbar.x = (chatMessagesCanvas.width - chatToolbar.width) / 2; - chatToolbar.y = chatMessagesCanvas.height - chatToolbar.height - paddingHeight; + chatToolbar.width = 45; + chatToolbar.x = (chatMessagesCanvas.width - chatToolbar.width) - 10; + chatToolbar.y = 10; if(chatMessagesList.mx_internal::scroll_verticalScrollBar != null && chatMessagesList.mx_internal::scroll_verticalScrollBar.visible){ chatToolbar.width -= chatMessagesList.mx_internal::scroll_verticalScrollBar.width; @@ -826,11 +826,14 @@ with BigBlueButton; if not, see . - + + accessibilityName="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn.accessibilityName')}" + height="100%"/> + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatToolbar.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatToolbar.mxml index e79f650543..e79810f3ad 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatToolbar.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatToolbar.mxml @@ -1,6 +1,6 @@ - + hideEffect="{fadeOut}" showEffect="{fadeIn}" + backgroundColor="{bgColor}"> - - - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/CustomLayoutNameWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/CustomLayoutNameWindow.mxml index 810ce21849..940e3c72a7 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/CustomLayoutNameWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/CustomLayoutNameWindow.mxml @@ -60,8 +60,8 @@ with BigBlueButton; if not, see . ]]> - - + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml index 130d615a2e..b8613b2221 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml @@ -24,7 +24,7 @@ with BigBlueButton; if not, see . prompt="{ResourceUtil.getInstance().getString('bbb.layout.combo.prompt')}" height="{LayoutButton.BUTTON_SIZE}" creationComplete="init()" change="onSelectedItemChanged(event)" - disabledColor="{getStyle('color')}" rowCount="10" + disabledColor="{getStyle('color')}" rowCount="10" width="240" styleName="languageSelectorStyle" > diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/RemovePresentationEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/RemovePresentationEvent.as index 34f3c43829..c685ca4ff6 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/RemovePresentationEvent.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/RemovePresentationEvent.as @@ -27,6 +27,9 @@ package org.bigbluebutton.modules.present.events // Presentation has been removed from server. public static const PRESENTATION_REMOVED_EVENT:String = "Presentation Removed Event"; + + // Presentation removed from the list of downloadable events. + public static const UPDATE_DOWNLOADABLE_FILES_EVENT:String = "Update Downloadable Files Event"; public var presentationName:String; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as index cd6c882651..0fad260c6f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as @@ -168,6 +168,8 @@ package org.bigbluebutton.modules.present.services } model.removePresentation(presentationID); + var updateEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.UPDATE_DOWNLOADABLE_FILES_EVENT); + dispatcher.dispatchEvent(updateEvent); // this event will trigger the disabling of the download button. } } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/DownloadPresentationRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/DownloadPresentationRenderer.mxml index 2ef5caa02b..0fb604c1b6 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/DownloadPresentationRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/DownloadPresentationRenderer.mxml @@ -15,7 +15,7 @@ } ]]> - + . + @@ -69,6 +70,7 @@ with BigBlueButton; if not, see . . import org.bigbluebutton.modules.present.events.NavigationEvent; import org.bigbluebutton.modules.present.events.PresentationChangedEvent; import org.bigbluebutton.modules.present.events.PresenterCommands; + import org.bigbluebutton.modules.present.events.RemovePresentationEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.model.Page; import org.bigbluebutton.modules.present.model.PresentationModel; @@ -394,6 +397,7 @@ with BigBlueButton; if not, see . displaySlideNavigationControls(false, !!page) } onResetZoom(); + updateDownloadBtn(); } @@ -521,7 +525,8 @@ with BigBlueButton; if not, see . Accessibility.updateProperties(); addContextMenuItems(); - + + updateDownloadBtnTooltip(); setPollMenuData(); } @@ -783,6 +788,36 @@ with BigBlueButton; if not, see . setControlBarState("presenter"); } + private function handleUpdateDownloadableFilesEvent(e:RemovePresentationEvent):void { + updateDownloadBtn(); + } + + private function updateDownloadBtn():void { + if (downloadPres == null) { + return; + } + + var isAnyPres:ArrayCollection = PresentationModel.getInstance().getDownloadablePresentations(); + if (isAnyPres.length > 0) { + LOGGER.debug("Enabling dowload presentation button. There are {0} presentations available for downloading.", [isAnyPres.length]); + downloadPres.enabled = true; + downloadPres.styleName = "presentationDownloadButtonStyle"; + } else { + LOGGER.debug("Disabling download presentation button. There are {0} presentations available for downloading.", [isAnyPres.length]); + downloadPres.enabled = false; + downloadPres.styleName = "presentationDownloadButtonDisabledStyle"; + } + updateDownloadBtnTooltip(); + } + + private function updateDownloadBtnTooltip():void { + if (downloadPres == null) { + return; + } + + const res:String = downloadPres.enabled? "bbb.presentation.downloadPresBtn.toolTip": "bbb.presentation.downloadPresBtn.disabledToolTip"; + downloadPres.toolTip = ResourceUtil.getInstance().getString(res); + } ]]> @@ -797,10 +832,9 @@ with BigBlueButton; if not, see . - - + idList, boolean publish) { for (String id : idList) { + boolean success = false; if (publish) { - recordingService.changeState(id, Recording.STATE_PUBLISHED); + success = recordingService.changeState(id, Recording.STATE_PUBLISHED); } else { - recordingService.changeState(id, Recording.STATE_UNPUBLISHED); + success = recordingService.changeState(id, Recording.STATE_UNPUBLISHED); + } + if (success) { + messagingService.publishRecording(id, publish); } } } public void deleteRecordings(ArrayList idList) { for (String id : idList) { - recordingService.changeState(id, Recording.STATE_DELETED); + boolean success = recordingService.changeState(id, Recording.STATE_DELETED); + if (success) { + messagingService.deleteRecording(id); + } } } diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/RecordingService.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/RecordingService.java index 55c8c3cda6..141c6ca9c7 100755 --- a/bigbluebutton-web/src/java/org/bigbluebutton/api/RecordingService.java +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/RecordingService.java @@ -291,22 +291,25 @@ public class RecordingService { return r; } - public void changeState(String recordingId, String state) { + public boolean changeState(String recordingId, String state) { + boolean anyResult = false; if (state.equals(Recording.STATE_PUBLISHED)) { // It can only be published if it is unpublished - changeState(unpublishedDir, recordingId, state); + anyResult |= changeState(unpublishedDir, recordingId, state); } else if (state.equals(Recording.STATE_UNPUBLISHED)) { // It can only be unpublished if it is published - changeState(publishedDir, recordingId, state); + anyResult |= changeState(publishedDir, recordingId, state); } else if (state.equals(Recording.STATE_DELETED)) { // It can be deleted from any state - changeState(publishedDir, recordingId, state); - changeState(unpublishedDir, recordingId, state); + anyResult |= changeState(publishedDir, recordingId, state); + anyResult |= changeState(unpublishedDir, recordingId, state); } + return anyResult; } - private void changeState(String path, String recordingId, String state) { + private boolean changeState(String path, String recordingId, String state) { String[] format = getPlaybackFormats(path); + boolean anyResult = false; for (int i = 0; i < format.length; i++) { List recordings = getDirectories(path + File.separatorChar + format[i]); for (int f = 0; f < recordings.size(); f++) { @@ -322,7 +325,7 @@ public class RecordingService { dest = new File(deletedDir + File.separatorChar + format[i]); } else { log.debug(String.format("State: %s, is not supported", state)); - return; + return anyResult; } if (!dest.exists()) dest.mkdirs(); @@ -340,10 +343,12 @@ public class RecordingService { } else { log.debug("Recording was not moved"); } + anyResult |= moved; } } } } + return anyResult; } private List getAllDirectories(String state) { diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessageToJson.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessageToJson.java index c03e76c496..3eb7d72fbd 100644 --- a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessageToJson.java +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessageToJson.java @@ -7,6 +7,9 @@ import org.bigbluebutton.api.messaging.converters.messages.DestroyMeetingMessage import org.bigbluebutton.api.messaging.converters.messages.EndMeetingMessage; import org.bigbluebutton.api.messaging.converters.messages.KeepAliveMessage; import org.bigbluebutton.api.messaging.converters.messages.RegisterUserMessage; +import org.bigbluebutton.api.messaging.converters.messages.PublishRecordingMessage; +import org.bigbluebutton.api.messaging.converters.messages.UnpublishRecordingMessage; +import org.bigbluebutton.api.messaging.converters.messages.DeleteRecordingMessage; public class MessageToJson { @@ -68,5 +71,28 @@ public class MessageToJson { return MessageBuilder.buildJson(header, payload); } + public static String publishRecordingMessageToJson(PublishRecordingMessage message) { + HashMap payload = new HashMap(); + payload.put(Constants.MEETING_ID, message.meetingId); + + java.util.HashMap header = MessageBuilder.buildHeader(PublishRecordingMessage.PUBLISH_RECORDING, PublishRecordingMessage.VERSION, null); + return MessageBuilder.buildJson(header, payload); + } + + public static String unpublishRecordingMessageToJson(UnpublishRecordingMessage message) { + HashMap payload = new HashMap(); + payload.put(Constants.MEETING_ID, message.meetingId); + + java.util.HashMap header = MessageBuilder.buildHeader(UnpublishRecordingMessage.UNPUBLISH_RECORDING, UnpublishRecordingMessage.VERSION, null); + return MessageBuilder.buildJson(header, payload); + } + + public static String deleteRecordingMessageToJson(DeleteRecordingMessage message) { + HashMap payload = new HashMap(); + payload.put(Constants.MEETING_ID, message.meetingId); + + java.util.HashMap header = MessageBuilder.buildHeader(DeleteRecordingMessage.DELETE_RECORDING, DeleteRecordingMessage.VERSION, null); + return MessageBuilder.buildJson(header, payload); + } } diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessagingService.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessagingService.java index 6fefe2a79e..c57a780eaf 100755 --- a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessagingService.java +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/MessagingService.java @@ -34,4 +34,6 @@ public interface MessagingService { void sendPolls(String meetingId, String title, String question, String questionType, List answers); void registerUser(String meetingID, String internalUserId, String fullname, String role, String externUserID, String authToken, String guest); void sendKeepAlive(String system, Long timestamp); + void publishRecording(String meetingId, boolean publish); + void deleteRecording(String meetingId); } diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/RedisMessagingService.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/RedisMessagingService.java index c8301fbcca..d314fb8020 100755 --- a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/RedisMessagingService.java +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/RedisMessagingService.java @@ -35,6 +35,9 @@ import org.bigbluebutton.api.messaging.converters.messages.DestroyMeetingMessage import org.bigbluebutton.api.messaging.converters.messages.EndMeetingMessage; import org.bigbluebutton.api.messaging.converters.messages.KeepAliveMessage; import org.bigbluebutton.api.messaging.converters.messages.RegisterUserMessage; +import org.bigbluebutton.api.messaging.converters.messages.PublishRecordingMessage; +import org.bigbluebutton.api.messaging.converters.messages.UnpublishRecordingMessage; +import org.bigbluebutton.api.messaging.converters.messages.DeleteRecordingMessage; import org.bigbluebutton.common.converters.ToJsonEncoder; import org.bigbluebutton.common.messages.MessageHeader; import org.bigbluebutton.common.messages.MessagingConstants; @@ -131,4 +134,30 @@ public class RedisMessagingService implements MessagingService { storeService.removeMeeting(meetingId); } + private void publishRecording(String meetingId) { + PublishRecordingMessage msg = new PublishRecordingMessage(meetingId); + String json = MessageToJson.publishRecordingMessageToJson(msg); + sender.send(MessagingConstants.FROM_BBB_RECORDING_CHANNEL, json); + } + + private void unpublishRecording(String meetingId) { + UnpublishRecordingMessage msg = new UnpublishRecordingMessage(meetingId); + String json = MessageToJson.unpublishRecordingMessageToJson(msg); + sender.send(MessagingConstants.FROM_BBB_RECORDING_CHANNEL, json); + } + + public void publishRecording(String meetingId, boolean publish) { + if (publish) { + publishRecording(meetingId); + } else { + unpublishRecording(meetingId); + } + } + + public void deleteRecording(String meetingId) { + DeleteRecordingMessage msg = new DeleteRecordingMessage(meetingId); + String json = MessageToJson.deleteRecordingMessageToJson(msg); + sender.send(MessagingConstants.FROM_BBB_RECORDING_CHANNEL, json); + } + } diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/DeleteRecordingMessage.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/DeleteRecordingMessage.java new file mode 100644 index 0000000000..40f71cf3b9 --- /dev/null +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/DeleteRecordingMessage.java @@ -0,0 +1,12 @@ +package org.bigbluebutton.api.messaging.converters.messages; + +public class DeleteRecordingMessage { + public static final String DELETE_RECORDING = "deleted"; + public static final String VERSION = "0.0.1"; + + public final String meetingId; + + public DeleteRecordingMessage(String meetingId) { + this.meetingId = meetingId; + } +} diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/PublishRecordingMessage.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/PublishRecordingMessage.java new file mode 100644 index 0000000000..9c0ed85681 --- /dev/null +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/PublishRecordingMessage.java @@ -0,0 +1,12 @@ +package org.bigbluebutton.api.messaging.converters.messages; + +public class PublishRecordingMessage { + public static final String PUBLISH_RECORDING = "published"; + public static final String VERSION = "0.0.1"; + + public final String meetingId; + + public PublishRecordingMessage(String meetingId) { + this.meetingId = meetingId; + } +} diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/UnpublishRecordingMessage.java b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/UnpublishRecordingMessage.java new file mode 100644 index 0000000000..4a7dae4a72 --- /dev/null +++ b/bigbluebutton-web/src/java/org/bigbluebutton/api/messaging/converters/messages/UnpublishRecordingMessage.java @@ -0,0 +1,12 @@ +package org.bigbluebutton.api.messaging.converters.messages; + +public class UnpublishRecordingMessage { + public static final String UNPUBLISH_RECORDING = "unpublished"; + public static final String VERSION = "0.0.1"; + + public final String meetingId; + + public UnpublishRecordingMessage(String meetingId) { + this.meetingId = meetingId; + } +}