mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-20 18:28:32 +00:00
Conference listener onActiveSpeakerParticipantDevice signature has changed
This commit is contained in:
parent
5e6186d115
commit
0625239477
1 changed files with 26 additions and 12 deletions
|
|
@ -134,10 +134,11 @@ class ConferenceViewModel
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
override fun onActiveSpeakerParticipantDevice(
|
override fun onActiveSpeakerParticipantDevice(
|
||||||
conference: Conference,
|
conference: Conference,
|
||||||
participantDevice: ParticipantDevice
|
participantDevice: ParticipantDevice?
|
||||||
) {
|
) {
|
||||||
activeSpeaker.value?.isActiveSpeaker?.postValue(false)
|
activeSpeaker.value?.isActiveSpeaker?.postValue(false)
|
||||||
|
|
||||||
|
if (participantDevice != null) {
|
||||||
val found = participantDevices.value.orEmpty().find {
|
val found = participantDevices.value.orEmpty().find {
|
||||||
it.device.address.equal(participantDevice.address)
|
it.device.address.equal(participantDevice.address)
|
||||||
}
|
}
|
||||||
|
|
@ -151,6 +152,19 @@ class ConferenceViewModel
|
||||||
model.isActiveSpeaker.postValue(true)
|
model.isActiveSpeaker.postValue(true)
|
||||||
activeSpeaker.postValue(model)
|
activeSpeaker.postValue(model)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Log.w("$TAG Notified active speaker participant device is null, using first one that's not us")
|
||||||
|
val firstNotUs = participantDevices.value.orEmpty().find {
|
||||||
|
it.isMe == false
|
||||||
|
}
|
||||||
|
if (firstNotUs != null) {
|
||||||
|
Log.i("$TAG Newly active speaker participant is [${firstNotUs.name}]")
|
||||||
|
firstNotUs.isActiveSpeaker.postValue(true)
|
||||||
|
activeSpeaker.postValue(firstNotUs!!)
|
||||||
|
} else {
|
||||||
|
Log.i("$TAG No participant device that's not us found, expected if we're alone")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue