Simple modification to avoid multiple start audio recording events

This commit is contained in:
Pedro Beschorner Marin 2016-01-22 16:43:17 +00:00
parent 58292b198d
commit 086e339653
2 changed files with 17 additions and 2 deletions

View File

@ -459,7 +459,8 @@ trait UsersApp {
}
def startRecordingVoiceConference() {
if (usersModel.numUsersInVoiceConference == 1 && mProps.recorded) {
if (usersModel.numUsersInVoiceConference == 1 && mProps.recorded && !usersModel.isVoiceRecording) {
usersModel.startRecordingVoice
log.info("Send START RECORDING voice conf. meetingId=" + mProps.meetingID + " voice conf=" + mProps.voiceBridge)
outGW.send(new StartRecordingVoiceConf(mProps.meetingID, mProps.recorded, mProps.voiceBridge))
}
@ -527,7 +528,8 @@ trait UsersApp {
}
def stopRecordingVoiceConference() {
if (usersModel.numUsersInVoiceConference == 0 && mProps.recorded) {
if (usersModel.numUsersInVoiceConference == 0 && mProps.recorded && usersModel.isVoiceRecording) {
usersModel.stopRecordingVoice
log.info("Send STOP RECORDING voice conf. meetingId=" + mProps.meetingID + " voice conf=" + mProps.voiceBridge)
outGW.send(new StopRecordingVoiceConf(mProps.meetingID, mProps.recorded,
mProps.voiceBridge, meetingModel.getVoiceRecordingFilename()))

View File

@ -22,6 +22,7 @@ class UsersModel {
private var locked = false
private var meetingMuted = false
private var recordingVoice = false
private var currentPresenter = new Presenter("system", "system", "system")
@ -180,4 +181,16 @@ class UsersModel {
}
}
}
def startRecordingVoice {
recordingVoice = true
}
def stopRecordingVoice {
recordingVoice = false
}
def isVoiceRecording: Boolean = {
recordingVoice
}
}