Hide switch camera button if video call is receive only
This commit is contained in:
parent
18756a840d
commit
93ac3f8c41
2 changed files with 5 additions and 5 deletions
|
@ -540,12 +540,12 @@ class ControlsViewModel : ViewModel() {
|
|||
|
||||
isVideoEnabled.value = enabled
|
||||
showTakeSnapshotButton.value = enabled && corePreferences.showScreenshotButton
|
||||
val isVideoBeingSent = if (coreContext.core.currentCall?.conference != null) {
|
||||
val videoDirection = coreContext.core.currentCall?.currentParams?.videoDirection
|
||||
videoDirection == MediaDirection.SendRecv || videoDirection == MediaDirection.SendOnly
|
||||
val videoDirection = if (coreContext.core.currentCall?.conference != null) {
|
||||
coreContext.core.currentCall?.currentParams?.videoDirection
|
||||
} else {
|
||||
true
|
||||
coreContext.core.currentCall?.params?.videoDirection
|
||||
}
|
||||
val isVideoBeingSent = videoDirection == MediaDirection.SendRecv || videoDirection == MediaDirection.SendOnly
|
||||
isSendingVideo.value = isVideoBeingSent
|
||||
isSwitchCameraAvailable.value = enabled && coreContext.showSwitchCameraButton() && isVideoBeingSent
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@
|
|||
android:onClick="@{() -> controlsViewModel.switchCamera()}"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/icon_call_camera_switch"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && !callsViewModel.currentCallData.isRemotelyPaused && !callsViewModel.currentCallData.isPaused && controlsViewModel.isSwitchCameraAvailable && !controlsViewModel.pipMode ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:visibility="@{controlsViewModel.isSendingVideo && !callsViewModel.currentCallData.isRemotelyPaused && !callsViewModel.currentCallData.isPaused && controlsViewModel.isSwitchCameraAvailable && !controlsViewModel.pipMode ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintEnd_toEndOf="@id/local_preview_video_surface"
|
||||
app:layout_constraintTop_toTopOf="@id/local_preview_video_surface" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue