From ef4c7169e640fa58596ca0bd2016454910eca553 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 25 Mar 2022 08:58:04 +0100 Subject: [PATCH] Indicate when participant in conference has muted it's microphone --- .../voip/data/ConferenceParticipantDeviceData.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt b/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt index 1476ea4a4..2c61e87fd 100644 --- a/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt +++ b/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt @@ -59,6 +59,11 @@ class ConferenceParticipantDeviceData( activeSpeaker.value = isSpeaking } + override fun onIsMuted(participantDevice: ParticipantDevice, isMuted: Boolean) { + Log.i("[Conference Participant Device] Participant [${participantDevice.address.asStringUriOnly()}] is ${if (isMuted) "muted" else "not muted"}") + micMuted.value = isMuted + } + override fun onConferenceJoined(participantDevice: ParticipantDevice) { Log.i("[Conference Participant Device] Participant [${participantDevice.address.asStringUriOnly()}] has joined the conference") isInConference.value = true @@ -101,10 +106,10 @@ class ConferenceParticipantDeviceData( participantDevice.addListener(listener) activeSpeaker.value = false + micMuted.value = participantDevice.isMuted videoAvailable.value = participantDevice.getStreamAvailability(StreamType.Video) val videoCapability = participantDevice.getStreamCapability(StreamType.Video) videoSendReceive.value = videoCapability == MediaDirection.SendRecv - micMuted.value = false // TODO isInConference.value = participantDevice.isInConference videoEnabled.value = isVideoAvailableAndSendReceive()