diff --git a/akka-bbb-apps/src/main/resources/application.conf b/akka-bbb-apps/src/main/resources/application.conf index 5367f32162bc99b77ca1796d6281988c5a606223..5fb752e861ccde6fbe8d9b38dd95f95d93592d17 100755 --- a/akka-bbb-apps/src/main/resources/application.conf +++ b/akka-bbb-apps/src/main/resources/application.conf @@ -59,7 +59,7 @@ services { } red5 { - deskshareip="192.168.0.109" + deskshareip="10.130.218.89" deskshareapp="video-broadcast" } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala index 1d94b5480fbc649642aeb00ad42028e577122c65..aa108502629bfa754bf205d4fc9b8eb6c1764f15 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala @@ -10,18 +10,19 @@ trait DeskshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr { val outGW: OutMessageGateway def handleDeskshareRtmpBroadcastStartedVoiceConfEvtMsg(msg: DeskshareRtmpBroadcastStartedVoiceConfEvtMsg): Unit = { - def broadcastEvent(msg: DeskshareRtmpBroadcastStartedVoiceConfEvtMsg): Unit = { - /* - val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) - val envelope = BbbCoreEnvelope(ClearPublicChatHistoryEvtMsg.NAME, routing) - val header = BbbClientMsgHeader(ClearPublicChatHistoryEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) - - val body = ClearPublicChatHistoryEvtMsgBody() - val event = ClearPublicChatHistoryEvtMsg(header, body) - val msgEvent = BbbCommonEnvCoreMsg(envelope, event) - outGW.send(msgEvent) - */ - //record(event) + def broadcastEvent(voiceConf: String, deskshareConf: String, stream: String, vidWidth: Int, vidHeight: Int, + timestamp: String): BbbCommonEnvCoreMsg = { + + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, + liveMeeting.props.meetingProp.intId, "not-used") + val envelope = BbbCoreEnvelope(ScreenshareRtmpBroadcastStartedEvtMsg.NAME, routing) + val header = BbbClientMsgHeader(ScreenshareRtmpBroadcastStartedEvtMsg.NAME, + liveMeeting.props.meetingProp.intId, "not-used") + + val body = ScreenshareRtmpBroadcastStartedEvtMsgBody(voiceConf, deskshareConf, + stream, vidWidth, vidHeight, timestamp) + val event = ScreenshareRtmpBroadcastStartedEvtMsg(header, body) + BbbCommonEnvCoreMsg(envelope, event) } log.info("handleDeskShareRTMPBroadcastStartedRequest: isBroadcastingRTMP=" + @@ -32,13 +33,14 @@ trait DeskshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr { if (!DeskshareModel.isBroadcastingRTMP(liveMeeting.deskshareModel)) { DeskshareModel.setRTMPBroadcastingUrl(liveMeeting.deskshareModel, msg.body.stream) DeskshareModel.broadcastingRTMPStarted(liveMeeting.deskshareModel) - DeskshareModel.setDesktopShareVideoWidth(liveMeeting.deskshareModel, msg.body.vidHeight) + DeskshareModel.setDesktopShareVideoWidth(liveMeeting.deskshareModel, msg.body.vidWidth) DeskshareModel.setDesktopShareVideoHeight(liveMeeting.deskshareModel, msg.body.vidHeight) log.info("START broadcast ALLOWED when isBroadcastingRTMP=false") // Notify viewers in the meeting that there's an rtmp stream to view - //outGW.send(new DeskShareNotifyViewersRTMP(props.meetingProp.intId, msg.streamname, msg.videoWidth, msg.videoHeight, true)) - broadcastEvent(msg) + val msgEvent = broadcastEvent(msg.body.voiceConf, msg.body.deskshareConf, msg.body.stream, + msg.body.vidWidth, msg.body.vidHeight, msg.body.timestamp) + outGW.send(msgEvent) } else { log.info("START broadcast NOT ALLOWED when isBroadcastingRTMP=true") } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr.scala index 2ccb07816e4b7788512bbdc57fa788acf5bd6b71..618bc5d5435af4917e0caaa81dd515595f8979e1 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr.scala @@ -10,18 +10,21 @@ trait DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr { val outGW: OutMessageGateway def handleDeskshareRtmpBroadcastStoppedVoiceConfEvtMsg(msg: DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg): Unit = { - def broadcastEvent(msg: DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg): Unit = { - /* - val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) - val envelope = BbbCoreEnvelope(ClearPublicChatHistoryEvtMsg.NAME, routing) - val header = BbbClientMsgHeader(ClearPublicChatHistoryEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) - - val body = ClearPublicChatHistoryEvtMsgBody() - val event = ClearPublicChatHistoryEvtMsg(header, body) - val msgEvent = BbbCommonEnvCoreMsg(envelope, event) - outGW.send(msgEvent) - */ - //record(event) + + def broadcastEvent(voiceConf: String, deskshareConf: String, + stream: String, vidWidth: Int, vidHeight: Int, + timestamp: String): BbbCommonEnvCoreMsg = { + + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, + liveMeeting.props.meetingProp.intId, "not-used") + val envelope = BbbCoreEnvelope(ScreenshareRtmpBroadcastStoppedEvtMsg.NAME, routing) + val header = BbbClientMsgHeader(ScreenshareRtmpBroadcastStoppedEvtMsg.NAME, + liveMeeting.props.meetingProp.intId, "not-used") + + val body = ScreenshareRtmpBroadcastStoppedEvtMsgBody(voiceConf, deskshareConf, + stream, vidWidth, vidHeight, timestamp) + val event = ScreenshareRtmpBroadcastStoppedEvtMsg(header, body) + BbbCommonEnvCoreMsg(envelope, event) } log.info("handleDeskShareRTMPBroadcastStoppedRequest: isBroadcastingRTMP=" + @@ -34,10 +37,9 @@ trait DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgHdlr { DeskshareModel.broadcastingRTMPStopped(liveMeeting.deskshareModel) // notify viewers that RTMP broadcast stopped - //outGW.send(new DeskShareNotifyViewersRTMP(props.meetingProp.intId, - // DeskshareModel.getRTMPBroadcastingUrl(liveMeeting.deskshareModel), - // msg.videoWidth, msg.videoHeight, false)) - broadcastEvent(msg) + val msgEvent = broadcastEvent(msg.body.voiceConf, msg.body.deskshareConf, msg.body.stream, + msg.body.vidWidth, msg.body.vidHeight, msg.body.timestamp) + outGW.send(msgEvent) } else { log.info("STOP broadcast NOT ALLOWED when isBroadcastingRTMP=false") } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStartedVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStartedVoiceConfEvtMsgHdlr.scala index 3af13b951c60dc90703702316fc01089b6bf1489..b91f653c814720e38e18b609a9730d8a96b1dd54 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStartedVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStartedVoiceConfEvtMsgHdlr.scala @@ -10,31 +10,31 @@ trait DeskshareStartedVoiceConfEvtMsgHdlr { val outGW: OutMessageGateway def handleDeskshareStartedVoiceConfEvtMsg(msg: DeskshareStartedVoiceConfEvtMsg): Unit = { - def broadcastEvent(msg: DeskshareStartedVoiceConfEvtMsg): Unit = { - /* - val routing = Routing.addMsgToClientRouting(MessageTypes.SYSTEM, liveMeeting.props.meetingProp.intId, msg.header.userId) + + def broadcastEvent(voiceConf: String, deskshareConf: String, url: String, timestamp: String): BbbCommonEnvCoreMsg = { + + val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka") val envelope = BbbCoreEnvelope(DeskshareStartRtmpBroadcastVoiceConfMsg.NAME, routing) - val header = BbbClientMsgHeader(DeskshareStartRtmpBroadcastVoiceConfMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) + val header = BbbCoreHeaderWithMeetingId(DeskshareStartRtmpBroadcastVoiceConfMsg.NAME, + liveMeeting.props.meetingProp.intId) - val body = DeskshareStartRtmpBroadcastVoiceConfMsgBody() + val body = DeskshareStartRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String) val event = DeskshareStartRtmpBroadcastVoiceConfMsg(header, body) - val msgEvent = BbbCommonEnvCoreMsg(envelope, event) - outGW.send(msgEvent) - */ - //record(event) + BbbCommonEnvCoreMsg(envelope, event) } log.info("handleDeskShareStartedRequest: dsStarted=" + DeskshareModel.getDeskShareStarted(liveMeeting.deskshareModel)) if (!DeskshareModel.getDeskShareStarted(liveMeeting.deskshareModel)) { val timestamp = System.currentTimeMillis().toString - val streamPath = "rtmp://" + liveMeeting.props.screenshareProps.red5ScreenshareIp + "/" + liveMeeting.props.screenshareProps.red5ScreenshareApp + + val streamPath = "rtmp://" + liveMeeting.props.screenshareProps.red5ScreenshareIp + "/" + + liveMeeting.props.screenshareProps.red5ScreenshareApp + "/" + liveMeeting.props.meetingProp.intId + "/" + liveMeeting.props.meetingProp.intId + "-" + timestamp log.info("handleDeskShareStartedRequest: streamPath=" + streamPath) // Tell FreeSwitch to broadcast to RTMP - broadcastEvent(msg) - //outGW.send(new DeskShareStartRTMPBroadcast(msg.conferenceName, streamPath)) + val msgEvent = broadcastEvent(msg.body.voiceConf, msg.body.deskshareConf, streamPath, timestamp) + outGW.send(msgEvent) DeskshareModel.setDeskShareStarted(liveMeeting.deskshareModel, true) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStoppedVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStoppedVoiceConfEvtMsgHdlr.scala index abbf6eb16c1d52929756f27fe0a7f8640eb59f7b..bf21a22a8f9b6829ac065659be1d8c09d76b846f 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStoppedVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/deskshare/DeskshareStoppedVoiceConfEvtMsgHdlr.scala @@ -10,28 +10,27 @@ trait DeskshareStoppedVoiceConfEvtMsgHdlr { val outGW: OutMessageGateway def handleDeskshareStoppedVoiceConfEvtMsg(msg: DeskshareStoppedVoiceConfEvtMsg): Unit = { - def broadcastEvent(msg: DeskshareStoppedVoiceConfEvtMsg): Unit = { - /* - val routing = Routing.addMsgToClientRouting(MessageTypes.SYSTEM, liveMeeting.props.meetingProp.intId, msg.header.userId) + + def broadcastEvent(voiceConf: String, deskshareConf: String, url: String, timestamp: String): BbbCommonEnvCoreMsg = { + val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka") val envelope = BbbCoreEnvelope(DeskshareStopRtmpBroadcastVoiceConfMsg.NAME, routing) - val header = BbbClientMsgHeader(DeskshareStopRtmpBroadcastVoiceConfMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) + val header = BbbCoreHeaderWithMeetingId(DeskshareStopRtmpBroadcastVoiceConfMsg.NAME, + liveMeeting.props.meetingProp.intId) - val body = DeskshareStopRtmpBroadcastVoiceConfMsgBody() + val body = DeskshareStopRtmpBroadcastVoiceConfMsgBody(voiceConf, deskshareConf, url, timestamp) val event = DeskshareStopRtmpBroadcastVoiceConfMsg(header, body) - val msgEvent = BbbCommonEnvCoreMsg(envelope, event) - outGW.send(msgEvent) - */ - //record(event) + BbbCommonEnvCoreMsg(envelope, event) } log.info("handleDeskShareStoppedRequest: dsStarted=" + DeskshareModel.getDeskShareStarted(liveMeeting.deskshareModel) + " URL:" + DeskshareModel.getRTMPBroadcastingUrl(liveMeeting.deskshareModel)) + val timestamp = System.currentTimeMillis().toString // Tell FreeSwitch to stop broadcasting to RTMP - broadcastEvent(msg) - //outGW.send(new DeskShareStopRTMPBroadcast(msg.conferenceName, - // DeskshareModel.getRTMPBroadcastingUrl(liveMeeting.deskshareModel))) + val msgEvent = broadcastEvent(msg.body.voiceConf, msg.body.deskshareConf, + DeskshareModel.getRTMPBroadcastingUrl(liveMeeting.deskshareModel), timestamp) + outGW.send(msgEvent) DeskshareModel.setDeskShareStarted(liveMeeting.deskshareModel, false) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserMutedInVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserMutedInVoiceConfEvtMsgHdlr.scala index 20864bd668a442ba3db68427f77070310b26b398..01a7a5cef1b4363a12cba0aad3629d843a31171e 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserMutedInVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserMutedInVoiceConfEvtMsgHdlr.scala @@ -17,13 +17,13 @@ trait UserMutedInVoiceConfEvtMsgHdlr { val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, vu.intId) - val envelope = BbbCoreEnvelope(UserMutedToClientEvtMsg.NAME, routing) - val header = BbbClientMsgHeader(UserMutedToClientEvtMsg.NAME, + val envelope = BbbCoreEnvelope(UserMutedVoiceEvtMsg.NAME, routing) + val header = BbbClientMsgHeader(UserMutedVoiceEvtMsg.NAME, liveMeeting.props.meetingProp.intId, vu.intId) - val body = UserMutedToClientEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId, vu.muted) + val body = UserMutedVoiceEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId, vu.muted) - val event = UserMutedToClientEvtMsg(header, body) + val event = UserMutedVoiceEvtMsg(header, body) val msgEvent = BbbCommonEnvCoreMsg(envelope, event) outGW.send(msgEvent) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserTalkingInVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserTalkingInVoiceConfEvtMsgHdlr.scala index da0a736a87c34777665104852ec0fdb44d32d27a..c39c4384b36087b5ae89b3202ffd3df3472ccfd3 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserTalkingInVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/UserTalkingInVoiceConfEvtMsgHdlr.scala @@ -17,13 +17,13 @@ trait UserTalkingInVoiceConfEvtMsgHdlr { val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, vu.intId) - val envelope = BbbCoreEnvelope(UserTalkingToClientEvtMsg.NAME, routing) - val header = BbbClientMsgHeader(UserTalkingToClientEvtMsg.NAME, + val envelope = BbbCoreEnvelope(UserTalkingVoiceEvtMsg.NAME, routing) + val header = BbbClientMsgHeader(UserTalkingVoiceEvtMsg.NAME, liveMeeting.props.meetingProp.intId, vu.intId) - val body = UserTalkingToClientEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId, vu.talking) + val body = UserTalkingVoiceEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId, vu.talking) - val event = UserTalkingToClientEvtMsg(header, body) + val event = UserTalkingVoiceEvtMsg(header, body) val msgEvent = BbbCommonEnvCoreMsg(envelope, event) outGW.send(msgEvent) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala index 452c618167b73c669d6e904b6f36010ad12f926b..4d4ca03e6283504d69d44cc5567f748ffc57ecf7 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala @@ -183,6 +183,11 @@ class MeetingActor(val props: DefaultProps, case m: UserMutedInVoiceConfEvtMsg => handleUserMutedInVoiceConfEvtMsg(m) case m: UserTalkingInVoiceConfEvtMsg => handleUserTalkingInVoiceConfEvtMsg(m) case m: RecordingStartedVoiceConfEvtMsg => handleRecordingStartedVoiceConfEvtMsg(m) + case m: MuteUserCmdMsg => handleMuteUserCmdMsg(m) + case m: MuteAllExceptPresentersCmdMsg => handleMuteAllExceptPresentersCmdMsg(m) + case m: EjectUserFromVoiceCmdMsg => handleEjectUserFromVoiceCmdMsg(m) + case m: IsMeetingMutedReqMsg => handleIsMeetingMutedReqMsg(m) + case m: MuteMeetingCmdMsg => handleMuteMeetingCmdMsg(m) // Layout case m: GetCurrentLayoutReqMsg => handleGetCurrentLayoutReqMsg(m) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala index e802c4bf8bbbe3f9339206a512a3987018e38020..c42c93f9796683faae03de4008eb74b6a8419a73 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala @@ -2,7 +2,7 @@ package org.bigbluebutton.core2 import akka.actor.{ Actor, ActorLogging, Props } import org.bigbluebutton.SystemConfiguration -import org.bigbluebutton.common2.msgs.{ BbbCommonEnvCoreMsg, SyncGetMeetingInfoRespMsg, SyncGetPresentationInfoRespMsg, SyncGetUsersMeetingRespMsg } +import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.common2.util.JsonUtil import org.bigbluebutton.core.MessageSender @@ -25,6 +25,27 @@ class FromAkkaAppsMsgSenderActor(msgSender: MessageSender) case SyncGetPresentationInfoRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) case SyncGetMeetingInfoRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) case SyncGetUsersMeetingRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) + + // Sent to FreeSWITCH + case DeskshareStartRtmpBroadcastVoiceConfMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case DeskshareStopRtmpBroadcastVoiceConfMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case EjectAllFromVoiceConfMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case GetUsersInVoiceConfSysMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case EjectUserFromVoiceConfSysMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case MuteUserInVoiceConfSysMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case StartRecordingVoiceConfSysMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case StopRecordingVoiceConfSysMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case TransferUserToVoiceConfSysMsg.NAME => + msgSender.send(toVoiceConfRedisChannel, json) + case _ => msgSender.send(fromAkkaAppsRedisChannel, json) } } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala index 7e7f39e364d85a33ab7e48946b9d0eb49b82662d..a17425135efb068aa0dd5ca4c76c821cb531d20f 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala @@ -11,7 +11,7 @@ trait EjectUserFromVoiceCmdMsgHdlr { val outGW: OutMessageGateway - def handleEjectUserRequest(msg: EjectUserFromVoiceCmdMsg) { + def handleEjectUserFromVoiceCmdMsg(msg: EjectUserFromVoiceCmdMsg) { log.info("Received eject user request. meetingId=" + msg.header.meetingId + " userId=" + msg.body.userId) for { diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RecordingStartedVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RecordingStartedVoiceConfEvtMsgHdlr.scala index ef98c7917c9e665475e00411873d7b70b7ac8067..06644392d91df5537b69493e15e5afda6e29d093 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RecordingStartedVoiceConfEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RecordingStartedVoiceConfEvtMsgHdlr.scala @@ -15,12 +15,13 @@ trait RecordingStartedVoiceConfEvtMsgHdlr { if (msg.body.recording) { MeetingStatus2x.setVoiceRecordingFilename(liveMeeting.status, msg.body.stream) - def buildVoiceRecordingStartedEvtMsg(meetingId: String, stream: String, timestamp: String, voiceConf: String): BbbCommonEnvCoreMsg = { + def buildVoiceRecordingStartedEvtMsg(meetingId: String, stream: String, timestamp: String, + voiceConf: String): BbbCommonEnvCoreMsg = { val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka") val envelope = BbbCoreEnvelope(VoiceRecordingStartedEvtMsg.NAME, routing) val body = VoiceRecordingStartedEvtMsgBody(meetingId, stream, timestamp, voiceConf) - val header = BbbCoreVoiceConfHeader(VoiceRecordingStartedEvtMsg.NAME, meetingId) + val header = BbbClientMsgHeader(VoiceRecordingStartedEvtMsg.NAME, meetingId, "not-used") val event = VoiceRecordingStartedEvtMsg(header, body) BbbCommonEnvCoreMsg(envelope, event) @@ -32,12 +33,13 @@ trait RecordingStartedVoiceConfEvtMsgHdlr { } else { MeetingStatus2x.setVoiceRecordingFilename(liveMeeting.status, "") - def buildVoiceRecordingStoppedEvtMsg(meetingId: String, stream: String, timestamp: String, voiceConf: String): BbbCommonEnvCoreMsg = { + def buildVoiceRecordingStoppedEvtMsg(meetingId: String, stream: String, timestamp: String, + voiceConf: String): BbbCommonEnvCoreMsg = { val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka") val envelope = BbbCoreEnvelope(VoiceRecordingStoppedEvtMsg.NAME, routing) val body = VoiceRecordingStoppedEvtMsgBody(meetingId, stream, timestamp, voiceConf) - val header = BbbCoreVoiceConfHeader(VoiceRecordingStoppedEvtMsg.NAME, meetingId) + val header = BbbClientMsgHeader(VoiceRecordingStoppedEvtMsg.NAME, meetingId, "not-used") val event = VoiceRecordingStoppedEvtMsg(header, body) BbbCommonEnvCoreMsg(envelope, event) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala index e60c9649fa2b8f51959b03b8a10035d5f39a741f..ec59779540624b16ecaffe632842b78b2962ac6c 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala @@ -51,7 +51,7 @@ class AppsRedisSubscriberActor(msgReceiver: RedisMessageReceiver, jsonMsgBus: In //log.error(s"SHOULD NOT BE RECEIVING: $message") if (message.channel == toAkkaAppsRedisChannel || message.channel == fromVoiceConfRedisChannel) { val receivedJsonMessage = new ReceivedJsonMessage(message.channel, message.data.utf8String) - // log.debug(s"RECEIVED:\n [${receivedJsonMessage.channel}] \n ${receivedJsonMessage.data} \n") + //log.debug(s"RECEIVED:\n [${receivedJsonMessage.channel}] \n ${receivedJsonMessage.data} \n") jsonMsgBus.publish(IncomingJsonMessage(toAkkaAppsJsonChannel, receivedJsonMessage)) } } diff --git a/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java b/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java index 9e90a4a0f7e88a42cb0a3ecabe4d1e185450f2e5..a878bef4f9d77ba0d97132c562c5e4ebffcac96d 100755 --- a/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java +++ b/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java @@ -229,8 +229,8 @@ public class ESLEventListener implements IEslEventListener { @Override public void eventReceived(EslEvent event) { - System.out.println("ESL Event Listener received event=[" + event.getEventName() + "]" + - event.getEventHeaders().toString()); +// System.out.println("ESL Event Listener received event=[" + event.getEventName() + "]" + +// event.getEventHeaders().toString()); // if (event.getEventName().equals(FreeswitchHeartbeatMonitor.EVENT_HEARTBEAT)) { //// setChanged(); // notifyObservers(event); diff --git a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala index f6cff44d915dc876df0a0152215be023798636bd..a94546ef359e935380d82e626928dbfdf3f3d17c 100755 --- a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala +++ b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/endpoint/redis/AppsRedisSubscriberActor.scala @@ -20,7 +20,7 @@ import redis.api.servers.ClientSetname object AppsRedisSubscriberActor extends SystemConfiguration { - val channels = Seq("time") + val channels = Seq(toVoiceConfRedisChannel) val patterns = Seq("bigbluebutton:to-voice-conf:*", "bigbluebutton:from-bbb-apps:*") def props(system: ActorSystem, msgReceiver: RedisMessageReceiver, inJsonMgBus: InsonMsgBus): Props = @@ -64,7 +64,6 @@ class AppsRedisSubscriberActor(val system: ActorSystem, msgReceiver: RedisMessag } def onMessage(message: Message) { - log.debug(s"message received: $message") if (message.channel == toVoiceConfRedisChannel) { val receivedJsonMessage = new ReceivedJsonMsg(message.channel, message.data.utf8String) log.debug(s"RECEIVED:\n [${receivedJsonMessage.channel}] \n ${receivedJsonMessage.data} \n") diff --git a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgDeserializer.scala b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgDeserializer.scala index 67d05e0357ee8a1ee5d04e4398de2b302790a455..8de6380c18e186626ba6d649dc0a9a49f51fae6f 100755 --- a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgDeserializer.scala +++ b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgDeserializer.scala @@ -9,6 +9,60 @@ trait RxJsonMsgDeserializer { object JsonDeserializer extends Deserializer + def routeDeskshareStartRtmpBroadcastVoiceConfMsg(envelope: BbbCoreEnvelope, jsonNode: JsonNode): Unit = { + def deserialize(jsonNode: JsonNode): Option[DeskshareStartRtmpBroadcastVoiceConfMsg] = { + val (result, error) = JsonDeserializer.toBbbCommonMsg[DeskshareStartRtmpBroadcastVoiceConfMsg](jsonNode) + result match { + case Some(msg) => Some(msg.asInstanceOf[DeskshareStartRtmpBroadcastVoiceConfMsg]) + case None => + log.error("Failed to deserialize message: error: {} \n msg: {}", error, jsonNode) + None + } + } + + for { + m <- deserialize(jsonNode) + } yield { + fsApp.deskShareBroadcastRTMP(m.body.deskshareConf, m.body.url, m.body.timestamp, true) + } + } + + def routeDeskshareStopRtmpBroadcastVoiceConfMsg(envelope: BbbCoreEnvelope, jsonNode: JsonNode): Unit = { + def deserialize(jsonNode: JsonNode): Option[DeskshareStopRtmpBroadcastVoiceConfMsg] = { + val (result, error) = JsonDeserializer.toBbbCommonMsg[DeskshareStopRtmpBroadcastVoiceConfMsg](jsonNode) + result match { + case Some(msg) => Some(msg.asInstanceOf[DeskshareStopRtmpBroadcastVoiceConfMsg]) + case None => + log.error("Failed to deserialize message: error: {} \n msg: {}", error, jsonNode) + None + } + } + + for { + m <- deserialize(jsonNode) + } yield { + fsApp.deskShareBroadcastRTMP(m.body.deskshareConf, m.body.url, m.body.timestamp, false) + } + } + + def routeGetUsersInVoiceConfSysMsg(envelope: BbbCoreEnvelope, jsonNode: JsonNode): Unit = { + def deserialize(jsonNode: JsonNode): Option[GetUsersInVoiceConfSysMsg] = { + val (result, error) = JsonDeserializer.toBbbCommonMsg[GetUsersInVoiceConfSysMsg](jsonNode) + result match { + case Some(msg) => Some(msg.asInstanceOf[GetUsersInVoiceConfSysMsg]) + case None => + log.error("Failed to deserialize message: error: {} \n msg: {}", error, jsonNode) + None + } + } + + for { + m <- deserialize(jsonNode) + } yield { + fsApp.getAllUsers(m.body.voiceConf) + } + } + def routeEjectAllFromVoiceConfMsg(envelope: BbbCoreEnvelope, jsonNode: JsonNode): Unit = { def deserialize(jsonNode: JsonNode): Option[EjectAllFromVoiceConfMsg] = { val (result, error) = JsonDeserializer.toBbbCommonMsg[EjectAllFromVoiceConfMsg](jsonNode) @@ -59,7 +113,7 @@ trait RxJsonMsgDeserializer { for { m <- deserialize(jsonNode) } yield { - fsApp.eject(m.body.voiceConf, m.body.voiceUserId) + fsApp.muteUser(m.body.voiceConf, m.body.voiceUserId, m.body.mute) } } diff --git a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgHdlrActor.scala b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgHdlrActor.scala index 143d6e5393f487513b82e9c42362cf910ca86a3a..7089b8a3d36dc016b040b513bbc27b47b123ff00 100755 --- a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgHdlrActor.scala +++ b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/RxJsonMsgHdlrActor.scala @@ -30,6 +30,8 @@ class RxJsonMsgHdlrActor(val fsApp: FreeswitchApplication) extends Actor with Ac def handle(envelope: BbbCoreEnvelope, jsonNode: JsonNode): Unit = { log.debug("Route envelope name " + envelope.name) envelope.name match { + case GetUsersInVoiceConfSysMsg.NAME => + routeGetUsersInVoiceConfSysMsg(envelope, jsonNode) case EjectAllFromVoiceConfMsg.NAME => routeEjectAllFromVoiceConfMsg(envelope, jsonNode) case EjectUserFromVoiceConfSysMsg.NAME => @@ -42,6 +44,10 @@ class RxJsonMsgHdlrActor(val fsApp: FreeswitchApplication) extends Actor with Ac routeStartRecordingVoiceConfMsg(envelope, jsonNode) case StopRecordingVoiceConfSysMsg.NAME => routeStopRecordingVoiceConfMsg(envelope, jsonNode) + case DeskshareStopRtmpBroadcastVoiceConfMsg.NAME => + routeDeskshareStopRtmpBroadcastVoiceConfMsg(envelope, jsonNode) + case DeskshareStartRtmpBroadcastVoiceConfMsg.NAME => + routeDeskshareStartRtmpBroadcastVoiceConfMsg(envelope, jsonNode) case _ => // do nothing } } diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala index 7779ab06d96f9537445a791eb546526d48edaa84..dd103db9c3e62ae5059498956f170130ebb77b88 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala @@ -12,13 +12,31 @@ trait VoiceStandardMsg extends BbbCoreMsg { body: DeskshareHangUpVoiceConfMsgBody) extends BbbCoreMsg case class DeskshareHangUpVoiceConfMsgBody(voiceConf: String, deskshareConf: String, timestamp: String) +/** + * Sent from FS that RTMP stream has started. + */ object DeskshareRtmpBroadcastStartedVoiceConfEvtMsg { val NAME = "DeskshareRtmpBroadcastStartedVoiceConfEvtMsg"} case class DeskshareRtmpBroadcastStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader, - body: DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody) extends VoiceStandardMsg + body: DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody) + extends VoiceStandardMsg case class DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String, stream: String, vidWidth: Int, vidHeight: Int, timestamp: String) +/** + * Sent to clients to notify them of an RTMP stream starting. + */ +object ScreenshareRtmpBroadcastStartedEvtMsg { val NAME = "ScreenshareRtmpBroadcastStartedEvtMsg"} +case class ScreenshareRtmpBroadcastStartedEvtMsg(header: BbbClientMsgHeader, + body: ScreenshareRtmpBroadcastStartedEvtMsgBody) + extends BbbCoreMsg +case class ScreenshareRtmpBroadcastStartedEvtMsgBody(voiceConf: String, deskshareConf: String, + stream: String, vidWidth: Int, vidHeight: Int, + timestamp: String) + +/** + * Send by FS that RTMP stream has stopped. + */ object DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg { val NAME = "DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg"} case class DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader, body: DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgBody) extends VoiceStandardMsg @@ -26,30 +44,54 @@ trait VoiceStandardMsg extends BbbCoreMsg { stream: String, vidWidth: Int, vidHeight: Int, timestamp: String) +/** + * Sent to clients to notify them of an RTMP stream stopping. + */ +object ScreenshareRtmpBroadcastStoppedEvtMsg { val NAME = "ScreenshareRtmpBroadcastStoppedEvtMsg"} +case class ScreenshareRtmpBroadcastStoppedEvtMsg(header: BbbClientMsgHeader, + body: ScreenshareRtmpBroadcastStoppedEvtMsgBody) + extends BbbCoreMsg +case class ScreenshareRtmpBroadcastStoppedEvtMsgBody(voiceConf: String, deskshareConf: String, + stream: String, vidWidth: Int, vidHeight: Int, + timestamp: String) + +/** + * Sent by FS that screenshare has started. + */ object DeskshareStartedVoiceConfEvtMsg { val NAME = "DeskshareStartedVoiceConfEvtMsg" } case class DeskshareStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader, body: DeskshareStartedVoiceConfEvtMsgBody) extends VoiceStandardMsg case class DeskshareStartedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String, callerIdNum: String, callerIdName: String) +/** + * Sent to FS to broadcast ans RTMP stream to Red5. + */ object DeskshareStartRtmpBroadcastVoiceConfMsg { val NAME = "DeskshareStartRtmpBroadcastVoiceConfMsg" } case class DeskshareStartRtmpBroadcastVoiceConfMsg(header: BbbCoreHeaderWithMeetingId, body: DeskshareStartRtmpBroadcastVoiceConfMsgBody) extends BbbCoreMsg case class DeskshareStartRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String) - +/** + * Sent by FS that screenshare has stopped. + */ object DeskshareStoppedVoiceConfEvtMsg { val NAME = "DeskshareStoppedVoiceConfEvtMsg"} case class DeskshareStoppedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader, body: DeskshareStoppedVoiceConfEvtMsgBody) extends VoiceStandardMsg case class DeskshareStoppedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String, callerIdNum: String, callerIdName: String) +/** + * Sent to FS to stop broadcasting RTMP stream to Red5. + */ object DeskshareStopRtmpBroadcastVoiceConfMsg { val NAME = "DeskshareStopRtmpBroadcastVoiceConfMsg" } case class DeskshareStopRtmpBroadcastVoiceConfMsg(header: BbbCoreHeaderWithMeetingId, body: DeskshareStopRtmpBroadcastVoiceConfMsgBody) extends BbbCoreMsg case class DeskshareStopRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String) - +/** + * Sent to FS to eject all users from the voice conference. + */ object EjectAllFromVoiceConfMsg { val NAME = "EjectAllFromVoiceConfMsg" } case class EjectAllFromVoiceConfMsg(header: BbbCoreHeaderWithMeetingId, body: EjectAllFromVoiceConfMsgBody) extends BbbCoreMsg @@ -204,9 +246,9 @@ case class MeetingMutedEvtMsgBody(muted: Boolean, mutedBy: String) /** * Sent to client that user has been muted in the voice conference. */ - object UserMutedToClientEvtMsg { val NAME = "UserMutedToClientEvtMsg" } - case class UserMutedToClientEvtMsg(header: BbbClientMsgHeader, body: UserMutedToClientEvtMsgBody) extends BbbCoreMsg - case class UserMutedToClientEvtMsgBody(intId: String, voiceUserId: String, muted: Boolean) + object UserMutedVoiceEvtMsg { val NAME = "UserMutedVoiceEvtMsg" } + case class UserMutedVoiceEvtMsg(header: BbbClientMsgHeader, body: UserMutedVoiceEvtMsgBody) extends BbbCoreMsg + case class UserMutedVoiceEvtMsgBody(intId: String, voiceUserId: String, muted: Boolean) /** * Received from FS that user has been muted in voice conference. @@ -221,9 +263,9 @@ case class MeetingMutedEvtMsgBody(muted: Boolean, mutedBy: String) * Sent to client that user is talking in voice conference. */ - object UserTalkingToClientEvtMsg { val NAME = "UserTalkingToClientEvtMsg" } - case class UserTalkingToClientEvtMsg(header: BbbClientMsgHeader, body: UserTalkingToClientEvtMsgBody) extends BbbCoreMsg - case class UserTalkingToClientEvtMsgBody(intId: String, voiceUserId: String, talking: Boolean) + object UserTalkingVoiceEvtMsg { val NAME = "UserTalkingVoiceEvtMsg" } + case class UserTalkingVoiceEvtMsg(header: BbbClientMsgHeader, body: UserTalkingVoiceEvtMsgBody) extends BbbCoreMsg + case class UserTalkingVoiceEvtMsgBody(intId: String, voiceUserId: String, talking: Boolean) /** * Received from FS that user is talking in voice conference. @@ -233,14 +275,19 @@ case class MeetingMutedEvtMsgBody(muted: Boolean, mutedBy: String) body: UserTalkingInVoiceConfEvtMsgBody) extends VoiceStandardMsg case class UserTalkingInVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, talking: Boolean) - +/** + * Sent to clients that voice conf is being recorded. + */ object VoiceRecordingStartedEvtMsg { val NAME = "VoiceRecordingStartedEvtMsg" } -case class VoiceRecordingStartedEvtMsg(header: BbbCoreVoiceConfHeader, +case class VoiceRecordingStartedEvtMsg(header: BbbClientMsgHeader, body: VoiceRecordingStartedEvtMsgBody) extends BbbCoreMsg case class VoiceRecordingStartedEvtMsgBody(meetingId: String, stream: String, timestamp: String, voiceConf: String) +/** + * Sent to clients that voice conf is no longer being recorded. + */ object VoiceRecordingStoppedEvtMsg { val NAME = "VoiceRecordingStoppedEvtMsg" } -case class VoiceRecordingStoppedEvtMsg(header: BbbCoreVoiceConfHeader, +case class VoiceRecordingStoppedEvtMsg(header: BbbClientMsgHeader, body: VoiceRecordingStoppedEvtMsgBody) extends BbbCoreMsg case class VoiceRecordingStoppedEvtMsgBody(meetingId: String, stream: String, timestamp: String, voiceConf: String) diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala index ac334a0ca56b22b410b3fb9ad22dea24a25cfb35..64d41f4afd894781da69e1eb255d694781ae1aef 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala @@ -13,7 +13,10 @@ import org.bigbluebutton.presentation.messages._ import scala.concurrent.duration._ -class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW) extends IBbbWebApiGWApp with SystemConfiguration{ +class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW, + val screenshareRtmpServer: String, + val screenshareRtmpBroadcastApp: String, + val screenshareConfSuffix: String) extends IBbbWebApiGWApp with SystemConfiguration{ implicit val system = ActorSystem("bbb-web-common") @@ -98,8 +101,9 @@ class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW) extends IBb val usersProp = UsersProp(maxUsers = maxUsers.intValue(), webcamsOnlyForModerator = webcamsOnlyForModerator.booleanValue(), guestPolicy = guestPolicy) val metadataProp = MetadataProp(mapAsScalaMap(metadata).toMap) - val screenshareProps = ScreenshareProps(screenshareConf = "FixMe!", red5ScreenshareIp = "fixMe!", - red5ScreenshareApp = "fixMe!") + val screenshareProps = ScreenshareProps(screenshareConf = voiceBridge + screenshareConfSuffix, + red5ScreenshareIp = screenshareRtmpServer, + red5ScreenshareApp = screenshareRtmpBroadcastApp) val defaultProps = DefaultProps(meetingProp, breakoutProps, durationProps, password, recordProp, welcomeProp, voiceProp, usersProp, metadataProp, screenshareProps) diff --git a/bigbluebutton-client/.actionScriptProperties b/bigbluebutton-client/.actionScriptProperties index d2e77eac9cff4944cf168f95dbf57a8124f59d08..06a78d9f4aa04a1da79ae79bc5b858ed7ec2f0cf 100755 --- a/bigbluebutton-client/.actionScriptProperties +++ b/bigbluebutton-client/.actionScriptProperties @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<actionScriptProperties analytics="false" mainApplicationPath="BigBlueButton.mxml" projectUUID="e523e78c-d93e-4765-a6e3-8e9bfcd14e2f" version="11"> +<actionScriptProperties analytics="false" mainApplicationPath="BigBlueButton.mxml" projectUUID="d0ee1158-6eb2-478c-9e78-b5aa55d7b59c" version="11"> <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true"> <compilerSourcePath/> <libraryPath defaultLinkType="0"> @@ -13,18 +13,8 @@ </libraryPath> <sourceAttachmentPath/> </compiler> - <theme themeIsDefault="false" themeIsSDK="true" themeLocation="${SDK_THEMES_DIR}/frameworks/themes/Halo"/> <applications> - <application path="BigBlueButtonTest.mxml"/> - <application path="CameraCheck.mxml"/> <application path="BigBlueButton.mxml"/> - <application path="BigBlueButtonUnitTests.mxml"/> - <application path="MicrophoneCheck.mxml"/> - <application path="WebcamPreviewStandalone.mxml"/> - <application path="org/red5/flash/bwcheck/app/BandwidthDetectionApp.as"/> - <application path="WebcamViewStandalone.mxml"/> - <application path="RTMPConnCheck.mxml"/> - <application path="ScreenshareStandalone.mxml"/> </applications> <modules/> <workers/> diff --git a/bigbluebutton-client/.project b/bigbluebutton-client/.project index 8de7e4b0ae09acc8dd2d1ea15f8e2efa3f2fce39..671c3111ec41e6e7668c3e51e96744d63897b807 100755 --- a/bigbluebutton-client/.project +++ b/bigbluebutton-client/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>v-bbb-client</name> + <name>z-bbb-client</name> <comment></comment> <projects> </projects> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as index 6e0d65d3f6a82b812372147928decf380ced47ba..f366c15bd2538be261711f1080ba58c014689b0a 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as @@ -103,10 +103,10 @@ package org.bigbluebutton.modules.users.services case "UserLeftVoiceConfToClientEvtMsg": handleUserLeftVoiceConfToClientEvtMsg(message); break; - case "UserTalkingEvtMsg": + case "UserTalkingVoiceEvtMsg": handleUserTalkingEvtMsg(message); break; - case "UserMutedEvtMsg": + case "UserMutedVoiceEvtMsg": handleUserMutedEvtMsg(message); break; case "GuestsWaitingForApprovalEvtMsg": @@ -176,8 +176,11 @@ package org.bigbluebutton.modules.users.services case "UserEjectedFromMeetingEvtMsg": handleUserEjectedFromMeeting(message); break; - case "DeskShareRTMPBroadcastNotification": - handleDeskShareRTMPBroadcastNotification(message); + case "ScreenshareRtmpBroadcastStartedEvtMsg": + handleScreenshareRtmpBroadcastStartedEvtMsg(message); + break; + case "ScreenshareRtmpBroadcastStoppedEvtMsg": + handleScreenshareRtmpBroadcastStoppedEvtMsg(message); break; case "get_guest_policy_reply": handleGetGuestPolicyReply(message); @@ -412,18 +415,34 @@ package org.bigbluebutton.modules.users.services } } - private function handleDeskShareRTMPBroadcastNotification(msg:Object):void { - var event:WebRTCViewStreamEvent; - if (msg.broadcasting) { - event = new WebRTCViewStreamEvent(WebRTCViewStreamEvent.START); - } else { - event = new WebRTCViewStreamEvent(WebRTCViewStreamEvent.STOP); - } - - event.videoWidth = msg.width; - event.videoHeight = msg.height; - event.rtmp = msg.rtmpUrl; + private function handleScreenshareRtmpBroadcastStartedEvtMsg(msg:Object):void { + var body: Object = msg.body as Object + var stream: String = body.stream as String; + var vidWidth: Number = body.vidWidth as Number; + var vidHeight: Number = body.vidHeight as Number; + + var event:WebRTCViewStreamEvent = new WebRTCViewStreamEvent(WebRTCViewStreamEvent.START); + + event.videoWidth = vidWidth; + event.videoHeight = vidHeight; + event.rtmp = stream; + + dispatcher.dispatchEvent(event); + } + + private function handleScreenshareRtmpBroadcastStoppedEvtMsg(msg:Object):void { + var body: Object = msg.body as Object + var stream: String = body.stream as String; + var vidWidth: Number = body.vidWidth as Number; + var vidHeight: Number = body.vidHeight as Number; + + var event:WebRTCViewStreamEvent = new WebRTCViewStreamEvent(WebRTCViewStreamEvent.STOP); + + event.videoWidth = vidWidth; + event.videoHeight = vidHeight; + event.rtmp = stream; + dispatcher.dispatchEvent(event); } diff --git a/bigbluebutton-web/grails-app/conf/bigbluebutton.properties b/bigbluebutton-web/grails-app/conf/bigbluebutton.properties index 47a73c09cc4b339af00292c2d7f8f2439f942fcd..4112ec00a048bc002f02f60a687648132ca4b5cb 100755 --- a/bigbluebutton-web/grails-app/conf/bigbluebutton.properties +++ b/bigbluebutton-web/grails-app/conf/bigbluebutton.properties @@ -134,7 +134,7 @@ webcamsOnlyForModerator=false #---------------------------------------------------- # This URL is where the BBB client is accessible. When a user sucessfully # enters a name and password, she is redirected here to load the client. -bigbluebutton.web.serverURL=http://192.168.211.128 +bigbluebutton.web.serverURL=https://ritz-ss.blindside-dev.com #---------------------------------------------------- @@ -158,7 +158,7 @@ defaultConfigURL=${bigbluebutton.web.serverURL}/client/conf/config.xml apiVersion=1.1 # Salt which is used by 3rd-party apps to authenticate api calls -securitySalt=7b57554fb27b009345de01664490c4e1 +securitySalt=3895c0fc987abdd47edf0352fea2a458 # Directory where we drop the <meeting-id-recorded>.done file recordStatusDir=/var/bigbluebutton/recording/status/recorded @@ -213,3 +213,7 @@ accessControlAllowOrigin=${bigbluebutton.web.serverURL} # The lapsus of seconds for polling the BBB Server in order to check if it's down. # After 5 tries if there isn't response, it will be declared down checkBBBServerEvery=10 + +screenshareRtmpServer=ritz-ss.blindside-dev.com +screenshareRtmpBroadcastApp=video-broadcast +screenshareConfSuffix=-DESKSHARE \ No newline at end of file diff --git a/bigbluebutton-web/grails-app/conf/spring/resources.xml b/bigbluebutton-web/grails-app/conf/spring/resources.xml index 745e0e1950c984a18896118798d311eca67d3f5e..814fd1b7e4762f4a9a34f5c1d86240edba178fb8 100755 --- a/bigbluebutton-web/grails-app/conf/spring/resources.xml +++ b/bigbluebutton-web/grails-app/conf/spring/resources.xml @@ -51,6 +51,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <bean id="bbbWebApiGWApp" class="org.bigbluebutton.api2.BbbWebApiGWApp"> <constructor-arg index="0" ref="oldMessageReceivedGW"/> + <constructor-arg index="1" value="${screenshareRtmpServer}"/> + <constructor-arg index="2" value="${screenshareRtmpBroadcastApp}"/> + <constructor-arg index="3" value="${screenshareConfSuffix}"/> </bean> <bean id="redisStorageService" class="org.bigbluebutton.api.messaging.RedisStorageService"