Simplified code using newly added API in SDK

This commit is contained in:
Sylvain Berfini 2025-10-02 10:49:38 +02:00
parent f8556aa46b
commit 6dc4790597

View file

@ -125,10 +125,13 @@ class ConferenceViewModel
conference: Conference,
device: ParticipantDevice
) {
if (conference.isMe(device.address)) {
if (device.isMe) {
Log.i("$TAG Our device media capability changed")
val direction = device.getStreamCapability(StreamType.Video)
val sendingVideo = direction == MediaDirection.SendRecv || direction == MediaDirection.SendOnly
localVideoStreamToggled(sendingVideo)
} else {
Log.i("$TAG Participant [${device.address.asStringUriOnly()}] device media capability changed")
}
}