Merge pull request #4518 from ritzalam/change-listen-only-for-html5

- do not set listenOnly status when receiving user joined voice event..
This commit is contained in:
Richard Alam 2017-10-12 17:43:42 -04:00 committed by GitHub
commit 2c103ce6fc
2 changed files with 12 additions and 3 deletions

View File

@ -29,8 +29,14 @@ trait UserConnectedToGlobalAudioMsgHdlr {
for {
user <- Users2x.findWithIntId(liveMeeting.users2x, msg.body.userId)
} yield {
val vu = VoiceUserState(intId = user.intId, voiceUserId = user.intId, callingWith = "flash", callerName = user.name,
callerNum = user.name, muted = true, talking = false, listenOnly = true)
val vu = VoiceUsers.findWIthIntId(liveMeeting.voiceUsers, user.intId) match {
case Some(vus) => VoiceUserState(intId = user.intId, voiceUserId = vus.voiceUserId, callingWith = "flash", callerName = user.name,
callerNum = user.name, muted = true, talking = false, listenOnly = true)
case None => VoiceUserState(intId = user.intId, voiceUserId = user.intId, callingWith = "flash", callerName = user.name,
callerNum = user.name, muted = true, talking = false, listenOnly = true)
}
VoiceUsers.add(liveMeeting.voiceUsers, vu)
broadcastEvent(vu)

View File

@ -41,7 +41,10 @@ trait UserJoinedVoiceConfEvtMsgHdlr extends BreakoutHdlrHelpers {
outGW.send(msgEvent)
}
val voiceUserState = VoiceUserState(intId, voiceUserId, callingWith, callerIdName, callerIdNum, muted, talking, listenOnly = false)
val voiceUserState = VoiceUsers.findWIthIntId(liveMeeting.voiceUsers, intId) match {
case Some(vus) => VoiceUserState(intId, voiceUserId, callingWith, callerIdName, callerIdNum, muted, talking, listenOnly = vus.listenOnly)
case None => VoiceUserState(intId, voiceUserId, callingWith, callerIdName, callerIdNum, muted, talking, listenOnly = false)
}
VoiceUsers.add(liveMeeting.voiceUsers, voiceUserState)