Fixed video direction when toggling camera during call

This commit is contained in:
Sylvain Berfini 2024-04-18 12:43:53 +02:00
parent 0c261ca4cb
commit 7607607857

View file

@ -615,9 +615,8 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
} else if (params != null) {
params.isVideoEnabled = true
params.videoDirection = when (currentCall.currentParams.videoDirection) {
MediaDirection.RecvOnly -> MediaDirection.SendRecv
MediaDirection.SendRecv, MediaDirection.SendOnly -> MediaDirection.RecvOnly
else -> MediaDirection.SendOnly
else -> MediaDirection.SendRecv
}
Log.i(
"$TAG Updating call with video enabled and media direction set to ${params.videoDirection}"