feat: Presenter added to presentationInfo analytics message

This commit is contained in:
Aron Engineer 2021-03-19 19:21:15 +00:00
parent af528b26d1
commit f598862149
2 changed files with 22 additions and 21 deletions

View File

@ -31,7 +31,6 @@ import org.bigbluebutton.core.apps.voice._
import akka.actor.Props
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy.Resume
import org.bigbluebutton.common2.msgs
import scala.concurrent.duration._
import org.bigbluebutton.core.apps.layout.LayoutApp2x
@ -211,8 +210,8 @@ class MeetingActor(
)
context.system.scheduler.schedule(
5 seconds,
5 second,
60 seconds,
60 seconds,
self,
MeetingInfoAnalyticsMsg
)
@ -510,11 +509,11 @@ class MeetingActor(
}
def handleMeetingInfoAnalyticsLogging(): Unit = {
println("***********Reaches here************")
val meetingName: String = liveMeeting.props.meetingProp.name
val externalId: String = liveMeeting.props.meetingProp.extId
val internalId: String = liveMeeting.props.meetingProp.intId
val hasUserJoined: Boolean = hasAuthedUserJoined(liveMeeting.status)
val isRecording: Boolean = isVoiceRecording(liveMeeting.status)
val liveWebcams: Vector[WebcamStream] = findAll(liveMeeting.webcams)
@ -537,7 +536,17 @@ class MeetingActor(
val listOfUsers: List[String] = Users2x.findAll(liveMeeting.users2x).map(_.name).toList
val presentation: msgs.Presentation = msgs.Presentation("test", "test")
val presentationId: String = state.presentationPodManager.getAllPresentationPodsInMeeting()
.flatMap(_.getCurrentPresentation.map(_.id))
.mkString
val presentationName: String = state.presentationPodManager.getAllPresentationPodsInMeeting()
.flatMap(_.getCurrentPresentation.map(_.name))
.mkString
val presenter: Option[String] = Users2x.findPresenter(liveMeeting.users2x).map(_.name)
val presentationInfo = PresentationInfo(presentationId, presentationName, presenter.getOrElse(""))
val breakoutRoom: BreakoutRoom = BreakoutRoom(
liveMeeting.props.breakoutProps.parentId,
@ -545,12 +554,10 @@ class MeetingActor(
)
val meetingInfoAnalyticsLogMessage: MeetingInfoAnalytics = MeetingInfoAnalytics(meetingName, externalId, internalId,
hasUserJoined, isRecording, numOfLiveWebcams, numOfVoiceUsers,
webcam, audio, screenshare, listOfUsers, presentation, breakoutRoom)
hasUserJoined, isRecording, numOfLiveWebcams, numOfVoiceUsers, webcam, audio, screenshare, listOfUsers,
presentationInfo, breakoutRoom)
val event = MsgBuilder.buildMeetingInfoAnalyticsMsg(
meetingInfoAnalyticsLogMessage
)
val event = MsgBuilder.buildMeetingInfoAnalyticsMsg(meetingInfoAnalyticsLogMessage)
outGW.send(event)
}

View File

@ -10,10 +10,10 @@ case class MeetingInfoAnalyticsMessageBody(meetingInfo: MeetingInfoAnalytics)
object MeetingInfoAnalytics {
def apply(meetingName: String, meetingExternalId: String, meetingInternalId: String, hasUserJoined: Boolean,
isRecording: Boolean, numberOfVideos: Int, numberOfUsers: Int, numberOfVoiceUsers: Int,
webcam: Webcam, audio: Audio, screenshare: Screenshare, users: List[String], presentation: Presentation,
webcam: Webcam, audio: Audio, screenshare: Screenshare, users: List[String], presentationInfo: PresentationInfo,
breakoutRoom: BreakoutRoom): MeetingInfoAnalytics =
new MeetingInfoAnalytics(meetingName, meetingExternalId, meetingInternalId, hasUserJoined,
isRecording, numberOfVideos, numberOfVoiceUsers, webcam, audio, screenshare, users, presentation, breakoutRoom)
new MeetingInfoAnalytics(meetingName, meetingExternalId, meetingInternalId, hasUserJoined, isRecording,
numberOfVideos, numberOfVoiceUsers, webcam, audio, screenshare, users, presentationInfo, breakoutRoom)
}
case class MeetingInfoAnalytics(
@ -28,7 +28,7 @@ case class MeetingInfoAnalytics(
audio: Audio,
screenshare: Screenshare,
users: List[String],
presentation: Presentation,
presentationInfo: PresentationInfo,
breakoutRoom: BreakoutRoom
)
@ -39,12 +39,6 @@ case class Audio(totalVoiceUsers: Int, totalListenOnlyUsers: Int, listeners: Lis
case class Screenshare(name: String)
case class Presentation(id: String, name: String)
case class PresentationInfo(id: String, name: String, presenter: String)
case class BreakoutRoom(parentId: String, rooms: List[String])
// number of webcam streams and viewers {total: 123, [{broadcast, viewers:[]}]}
// audio streams listeners and two ways
// screenshare
// users
// current presentation id and name
// breakout rooms id and name