Merge pull request #699 from ritzalam/add-more-logging-to-video-disconnect

- only remove stream if present
This commit is contained in:
Richard Alam 2015-07-14 14:15:40 -04:00
commit 82f2033d18

View File

@ -249,12 +249,15 @@ trait UsersApp {
def handleUserunshareWebcam(msg: UserUnshareWebcam) {
usersModel.getUser(msg.userId) foreach { user =>
val streams = user.webcamStreams - 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))
}
}
}
def handleChangeUserStatus(msg: ChangeUserStatus): Unit = {