Fixed broken active speaker video if when joining conference speaking participants info wasn't available

This commit is contained in:
Sylvain Berfini 2023-12-12 17:23:19 +01:00
parent 1e69aa227b
commit 04dcbd6075
2 changed files with 4 additions and 10 deletions

View file

@ -595,7 +595,7 @@ class ConferenceViewModel : ViewModel() {
val deviceData = devices.first() val deviceData = devices.first()
speakingParticipant.value = deviceData speakingParticipant.value = deviceData
deviceData.isActiveSpeaker.value = true deviceData.isActiveSpeaker.value = true
speakingParticipantFound.value = false speakingParticipantFound.value = true
} }
for (device in conference.me.devices) { for (device in conference.me.devices) {

View file

@ -123,12 +123,10 @@
<View <View
android:id="@+id/active_speaker_background" android:id="@+id/active_speaker_background"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="@{conferenceViewModel.speakingParticipantFound ? View.VISIBLE : View.GONE}" android:visibility="@{conferenceViewModel.speakingParticipantFound ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toBottomOf="@id/top_barrier" app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/miniatures" app:layout_constraintBottom_toTopOf="@id/miniatures"
android:layout_marginTop="@{controlsViewModel.fullScreenMode ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}" android:layout_marginTop="@{controlsViewModel.fullScreenMode ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}"
android:background="@{!conferenceViewModel.speakingParticipant.isInConference ? @drawable/shape_remote_paused_background : @drawable/shape_remote_background, default=@drawable/shape_remote_background}" android:background="@{!conferenceViewModel.speakingParticipant.isInConference ? @drawable/shape_remote_paused_background : @drawable/shape_remote_background, default=@drawable/shape_remote_background}"
@ -180,12 +178,10 @@
<org.linphone.activities.voip.views.RoundCornersTextureView <org.linphone.activities.voip.views.RoundCornersTextureView
android:id="@+id/conference_active_speaker_remote_video" android:id="@+id/conference_active_speaker_remote_video"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="@{!conferenceViewModel.isConferenceLocallyPaused &amp;&amp; conferenceViewModel.speakingParticipant.videoEnabled &amp;&amp; conferenceViewModel.speakingParticipant.isInConference ? View.VISIBLE : View.GONE}" android:visibility="@{!conferenceViewModel.isConferenceLocallyPaused &amp;&amp; conferenceViewModel.speakingParticipant.videoEnabled &amp;&amp; conferenceViewModel.speakingParticipant.isInConference ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toBottomOf="@id/active_speaker_background" app:layout_constraintBottom_toBottomOf="@id/active_speaker_background"
app:layout_constraintEnd_toEndOf="@id/active_speaker_background"
app:layout_constraintStart_toStartOf="@id/active_speaker_background"
app:layout_constraintTop_toTopOf="@id/active_speaker_background" /> app:layout_constraintTop_toTopOf="@id/active_speaker_background" />
<ImageView <ImageView
@ -254,12 +250,10 @@
<View <View
android:id="@+id/local_participant_background" android:id="@+id/local_participant_background"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="@{conferenceViewModel.isMeListenerOnly ? View.GONE : View.VISIBLE}" android:visibility="@{conferenceViewModel.isMeListenerOnly ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toBottomOf="@id/top_barrier" app:layout_constraintTop_toBottomOf="@id/top_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@id/hinge_bottom" app:layout_constraintBottom_toBottomOf="@id/hinge_bottom"
android:layout_marginTop="@{controlsViewModel.fullScreenMode || conferenceViewModel.twoOrMoreParticipants ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}" android:layout_marginTop="@{controlsViewModel.fullScreenMode || conferenceViewModel.twoOrMoreParticipants ? @dimen/margin_0dp : @dimen/voip_active_speaker_top_margin, default=@dimen/voip_active_speaker_top_margin}"
android:background="@drawable/shape_me_background" android:background="@drawable/shape_me_background"