Merge pull request #699 from ritzalam/add-more-logging-to-video-disconnect
- only remove stream if present
This commit is contained in:
commit
82f2033d18
@ -249,11 +249,14 @@ trait UsersApp {
|
||||
|
||||
def handleUserunshareWebcam(msg: UserUnshareWebcam) {
|
||||
usersModel.getUser(msg.userId) foreach { user =>
|
||||
val streams = user.webcamStreams - msg.stream
|
||||
val uvo = user.copy(hasStream = (!streams.isEmpty), webcamStreams = streams)
|
||||
usersModel.addUser(uvo)
|
||||
log.info("User unshared webcam: mid=[" + mProps.meetingID + "] uid=[" + uvo.userID + "] unsharedStream=[" + msg.stream + "] streams=[" + streams + "]")
|
||||
outGW.send(new UserUnsharedWebcam(mProps.meetingID, mProps.recorded, uvo.userID, msg.stream))
|
||||
val streamName = user.webcamStreams find (w => w == msg.stream) foreach { streamName =>
|
||||
val streams = user.webcamStreams - streamName
|
||||
val uvo = user.copy(hasStream = (!streams.isEmpty), webcamStreams = streams)
|
||||
usersModel.addUser(uvo)
|
||||
log.info("User unshared webcam: mid=[" + mProps.meetingID + "] uid=[" + uvo.userID + "] unsharedStream=[" + msg.stream + "] streams=[" + streams + "]")
|
||||
outGW.send(new UserUnsharedWebcam(mProps.meetingID, mProps.recorded, uvo.userID, msg.stream))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user