From 59a7771ea1a3b6dad2688881b690bf99b75b20df Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 22 Jul 2022 10:55:30 +0200 Subject: [PATCH] Workarounds for active speaker: do not display 'me' device name when speaking + showing ourselves when alone --- .../activities/voip/viewmodels/ConferenceViewModel.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt b/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt index d03a497af..76f9d6b89 100644 --- a/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt +++ b/app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt @@ -156,7 +156,11 @@ class ConferenceViewModel : ViewModel() { } if (device != null && device != speakingParticipant.value) { Log.i("[Conference] Found participant device") - speakingParticipant.value = device!! + if (!device.isMe) { + // TODO: FIXME: remove, this is a temporary workaround to not have your name + // displayed above someone else video in active speaker layout when you talk + speakingParticipant.value = device!! + } } else if (device == null) { Log.w("[Conference] Participant device [${participantDevice.address.asStringUriOnly()}] is speaking but couldn't find it in devices list") } @@ -406,6 +410,10 @@ class ConferenceViewModel : ViewModel() { for (device in conference.me.devices) { Log.i("[Conference] Participant device for myself found: ${device.name} (${device.address.asStringUriOnly()})") val deviceData = ConferenceParticipantDeviceData(device, true) + if (devices.isEmpty()) { + // TODO: FIXME: Temporary workaround when alone in a conference in active speaker layout + speakingParticipant.value = deviceData + } devices.add(deviceData) }