From 2a856bc77aac2fe34ae800e267f1d64dcf43f81d Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Wed, 31 Jan 2024 11:58:26 +0100 Subject: [PATCH] avoid to send "speaking" data channel message when mic is muted Signed-off-by: Marcel Hibbe --- app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt index aebaabe24..07f555975 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt @@ -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) {