Merge pull request #3613 from nextcloud/bugfix/3560/notSendSpeakingMessageWhenMuted

avoid to send "speaking" data channel message when mic is muted
This commit is contained in:
Marcel Hibbe 2024-02-16 13:09:39 +01:00 committed by GitHub
commit c016804314
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1117,7 +1117,7 @@ class CallActivity : CallBaseActivity() {
micInputAudioRecorder.read(byteArr, 0, byteArr.size)
val isCurrentlySpeaking = abs(byteArr[0].toDouble()) > MICROPHONE_VALUE_THRESHOLD
if (isCurrentlySpeaking && !isSpeakingLongTerm) {
if (microphoneOn && isCurrentlySpeaking && !isSpeakingLongTerm) {
isSpeakingLongTerm = true
sendIsSpeakingMessage(true)
} else if (!isCurrentlySpeaking && isSpeakingLongTerm) {