Fixed no video while being alone in video conference with mosaic layout + fixed issue in French translation
This commit is contained in:
parent
9128f2eadd
commit
f33eec8617
5 changed files with 16 additions and 15 deletions
|
@ -40,7 +40,7 @@ class ConferenceParticipantDeviceData(
|
|||
|
||||
val videoAvailable = MutableLiveData<Boolean>()
|
||||
|
||||
val videoSendReceive = MutableLiveData<Boolean>()
|
||||
val isSendingVideo = MutableLiveData<Boolean>()
|
||||
|
||||
val activeSpeaker = MutableLiveData<Boolean>()
|
||||
|
||||
|
@ -82,7 +82,7 @@ class ConferenceParticipantDeviceData(
|
|||
) {
|
||||
if (streamType == StreamType.Video) {
|
||||
Log.i("[Conference Participant Device] Participant [${participantDevice.address.asStringUriOnly()}] video capability changed to $direction")
|
||||
videoSendReceive.value = direction == MediaDirection.SendRecv
|
||||
isSendingVideo.value = direction == MediaDirection.SendRecv || direction == MediaDirection.SendOnly
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,14 +110,14 @@ class ConferenceParticipantDeviceData(
|
|||
|
||||
videoAvailable.value = participantDevice.getStreamAvailability(StreamType.Video)
|
||||
val videoCapability = participantDevice.getStreamCapability(StreamType.Video)
|
||||
videoSendReceive.value = videoCapability == MediaDirection.SendRecv
|
||||
isSendingVideo.value = videoCapability == MediaDirection.SendRecv || videoCapability == MediaDirection.SendOnly
|
||||
isInConference.value = participantDevice.isInConference
|
||||
|
||||
videoEnabled.value = isVideoAvailableAndSendReceive()
|
||||
videoEnabled.addSource(videoAvailable) {
|
||||
videoEnabled.value = isVideoAvailableAndSendReceive()
|
||||
}
|
||||
videoEnabled.addSource(videoSendReceive) {
|
||||
videoEnabled.addSource(isSendingVideo) {
|
||||
videoEnabled.value = isVideoAvailableAndSendReceive()
|
||||
}
|
||||
|
||||
|
@ -183,6 +183,6 @@ class ConferenceParticipantDeviceData(
|
|||
}
|
||||
|
||||
private fun isVideoAvailableAndSendReceive(): Boolean {
|
||||
return videoAvailable.value == true && videoSendReceive.value == true
|
||||
return videoAvailable.value == true && isSendingVideo.value == true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class ControlsViewModel : ViewModel() {
|
|||
|
||||
val isVideoEnabled = MutableLiveData<Boolean>()
|
||||
|
||||
val isVideoSendReceive = MutableLiveData<Boolean>()
|
||||
val isSendingVideo = MutableLiveData<Boolean>()
|
||||
|
||||
val isVideoUpdateInProgress = MutableLiveData<Boolean>()
|
||||
|
||||
|
@ -312,7 +312,7 @@ class ControlsViewModel : ViewModel() {
|
|||
params.isVideoEnabled = true
|
||||
params.videoDirection = MediaDirection.SendRecv
|
||||
} else {
|
||||
if (params?.videoDirection == MediaDirection.SendRecv) {
|
||||
if (params?.videoDirection == MediaDirection.SendRecv || params?.videoDirection == MediaDirection.SendOnly) {
|
||||
params.videoDirection = MediaDirection.RecvOnly
|
||||
} else {
|
||||
params?.videoDirection = MediaDirection.SendRecv
|
||||
|
@ -457,10 +457,11 @@ class ControlsViewModel : ViewModel() {
|
|||
isVideoEnabled.value = enabled
|
||||
showTakeSnaptshotButton.value = enabled && corePreferences.showScreenshotButton
|
||||
isSwitchCameraAvailable.value = enabled && coreContext.showSwitchCameraButton()
|
||||
if (coreContext.core.currentCall?.conference != null) {
|
||||
isVideoSendReceive.value = coreContext.core.currentCall?.currentParams?.videoDirection == MediaDirection.SendRecv
|
||||
isSendingVideo.value = if (coreContext.core.currentCall?.conference != null) {
|
||||
val videoDirection = coreContext.core.currentCall?.currentParams?.videoDirection
|
||||
videoDirection == MediaDirection.SendRecv || videoDirection == MediaDirection.SendOnly
|
||||
} else {
|
||||
isVideoSendReceive.value = true
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,11 +94,11 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:background="@drawable/button_background_reverse"
|
||||
android:contentDescription="@{controlsViewModel.isVideoEnabled && controlsViewModel.isVideoSendReceive ? @string/content_description_disable_video : @string/content_description_enable_video}"
|
||||
android:contentDescription="@{controlsViewModel.isVideoEnabled && controlsViewModel.isSendingVideo ? @string/content_description_disable_video : @string/content_description_enable_video}"
|
||||
android:enabled="@{controlsViewModel.isVideoAvailable && !controlsViewModel.isVideoUpdateInProgress && conferenceViewModel.conferenceDisplayMode != ConferenceDisplayMode.AUDIO_ONLY}}"
|
||||
android:onClick="@{() -> controlsViewModel.toggleVideo()}"
|
||||
android:padding="5dp"
|
||||
android:selected="@{controlsViewModel.isVideoEnabled && controlsViewModel.isVideoSendReceive}"
|
||||
android:selected="@{controlsViewModel.isVideoEnabled && controlsViewModel.isSendingVideo}"
|
||||
android:src="@drawable/icon_toggle_camera"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="W,1:1"
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.isVideoSendReceive && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.isSendingVideo && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background"
|
||||
app:layout_constraintEnd_toEndOf="@id/background"
|
||||
app:layout_constraintStart_toStartOf="@id/background"
|
||||
|
|
|
@ -684,10 +684,10 @@
|
|||
<string name="conference_schedule_time">Heure</string>
|
||||
<string name="conference_schedule_duration">Durée</string>
|
||||
<string name="conference_schedule_timezone">Fuseau horaire</string>
|
||||
<string name="conference_schedule_send_invite_chat">Envoyer l\'invitation par &appName;</string>
|
||||
<string name="conference_schedule_send_invite_chat">Envoyer l\'invitation par &appName;</string>
|
||||
<string name="conference_schedule_send_invite_email">Envoyer l\'invitation par courriel</string>
|
||||
<string name="conference_schedule_encryption">Voulez-vous chiffrer la conférence \?</string>
|
||||
<string name="conference_schedule_send_invite_chat_summary">L\'invitation va être envoyée depuis mon compte &appName;</string>
|
||||
<string name="conference_schedule_send_invite_chat_summary">L\'invitation va être envoyée depuis mon compte &appName;</string>
|
||||
<string name="conference_schedule_participants_list">Liste des participants</string>
|
||||
<string name="conference_schedule_create">Créer la conférence</string>
|
||||
<string name="conference_schedule">Planifier une conférence</string>
|
||||
|
|
Loading…
Reference in a new issue