Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
linphone-android
Commits
3b121289
Commit
3b121289
authored
1 year ago
by
Sylvain Berfini
Browse files
Options
Download
Patches
Plain Diff
Fixed active speaker video hidden when alone in a conference and then someone else joins
parent
06750ad9
master
feature/5.3
feature/UZ-8
feature/show_unsecure_conversation_event_at_top
feature/use_theme_main_color_for_icon_and_splashscreen
fix/insistent_notification
fix/telecom_default_audio_endpoint
release/6.0
test/UZ-8-no-telecom
6.1.0-alpha
6.0.0
6.0.0-beta
6.0.0-alpha
1 merge request
!1379
Fixed active speaker video hidden when alone in a conference and then someone else joins
Pipeline
#75271
passed with stage
in 4 minutes and 37 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
app/src/main/java/org/linphone/activities/main/conference/data/ScheduledConferenceData.kt
+2
-6
...ctivities/main/conference/data/ScheduledConferenceData.kt
app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt
+27
-3
...inphone/activities/voip/viewmodels/ConferenceViewModel.kt
app/src/main/java/org/linphone/core/CoreService.kt
+1
-1
app/src/main/java/org/linphone/core/CoreService.kt
app/src/main/res/layout-land/voip_conference_active_speaker.xml
+1
-1
...c/main/res/layout-land/voip_conference_active_speaker.xml
app/src/main/res/layout/voip_conference_active_speaker.xml
+1
-1
app/src/main/res/layout/voip_conference_active_speaker.xml
with
32 additions
and
12 deletions
app/src/main/java/org/linphone/activities/main/conference/data/ScheduledConferenceData.kt
+
2
−
6
View file @
3b121289
...
...
@@ -163,16 +163,12 @@ class ScheduledConferenceData(val conferenceInfo: ConferenceInfo, private val is
val
address
=
participant
.
asStringUriOnly
()
participantsListShort
+=
"$name, "
when
(
info
.
role
)
{
Participant
.
Role
.
Speaker
->
{
speakersListExpanded
+=
"$name ($address)\n"
}
Participant
.
Role
.
Listener
->
{
participantsListExpanded
+=
"$name ($address)\n"
allSpeaker
=
false
}
else
->
{
// For meetings created before 5.3 SDK
participantsListExpanded
+=
"$name ($address)\n"
allSpeaker
=
false
else
->
{
// For meetings created before 5.3 SDK, a speaker might be Unknown
speakersListExpanded
+=
"$name ($address)\n"
}
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/org/linphone/activities/voip/viewmodels/ConferenceViewModel.kt
+
27
−
3
View file @
3b121289
...
...
@@ -58,6 +58,7 @@ class ConferenceViewModel : ViewModel() {
val
speakingParticipantFound
=
MutableLiveData
<
Boolean
>()
val
speakingParticipant
=
MutableLiveData
<
ConferenceParticipantDeviceData
>()
val
speakingParticipantVideoEnabled
=
MutableLiveData
<
Boolean
>()
val
meParticipant
=
MutableLiveData
<
ConferenceParticipantDeviceData
>()
val
isBroadcast
=
MutableLiveData
<
Boolean
>()
...
...
@@ -128,6 +129,7 @@ class ConferenceViewModel : ViewModel() {
when
(
conferenceParticipantDevices
.
value
.
orEmpty
().
size
)
{
1
->
{
speakingParticipant
.
value
?.
videoEnabled
?.
value
=
false
speakingParticipantVideoEnabled
.
value
=
false
allParticipantsLeftEvent
.
value
=
Event
(
true
)
}
2
->
{
...
...
@@ -192,6 +194,8 @@ class ConferenceViewModel : ViewModel() {
}
else
->
{}
}
}
else
{
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
}
...
...
@@ -212,6 +216,7 @@ class ConferenceViewModel : ViewModel() {
device
.
isActiveSpeaker
.
value
=
true
speakingParticipant
.
value
=
device
!!
speakingParticipantFound
.
value
=
true
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
else
if
(
device
==
null
)
{
Log
.
w
(
"[Conference] Participant device [${participantDevice.address.asStringUriOnly()}] is the active speaker but couldn't find it in devices list"
...
...
@@ -219,6 +224,20 @@ class ConferenceViewModel : ViewModel() {
}
}
override
fun
onParticipantDeviceMediaAvailabilityChanged
(
conference
:
Conference
,
device
:
ParticipantDevice
)
{
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
override
fun
onParticipantDeviceMediaCapabilityChanged
(
conference
:
Conference
,
device
:
ParticipantDevice
)
{
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
override
fun
onStateChanged
(
conference
:
Conference
,
state
:
Conference
.
State
)
{
Log
.
i
(
"[Conference] State changed: $state"
)
isVideoConference
.
value
=
conference
.
currentParams
.
isVideoEnabled
&&
!
corePreferences
.
disableVideo
...
...
@@ -537,6 +556,7 @@ class ConferenceViewModel : ViewModel() {
val
activelySpeakingParticipantDevice
=
conference
.
activeSpeakerParticipantDevice
var
foundActivelySpeakingParticipantDevice
=
false
speakingParticipantFound
.
value
=
false
speakingParticipantVideoEnabled
.
value
=
false
val
conferenceInfo
=
conference
.
core
.
findConferenceInformationFromUri
(
conference
.
conferenceAddress
...
...
@@ -587,6 +607,7 @@ class ConferenceViewModel : ViewModel() {
deviceData
.
isActiveSpeaker
.
value
=
true
foundActivelySpeakingParticipantDevice
=
true
speakingParticipantFound
.
value
=
true
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
}
}
...
...
@@ -599,6 +620,7 @@ class ConferenceViewModel : ViewModel() {
speakingParticipant
.
value
=
deviceData
deviceData
.
isActiveSpeaker
.
value
=
true
speakingParticipantFound
.
value
=
true
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
for
(
device
in
conference
.
me
.
devices
)
{
...
...
@@ -666,10 +688,11 @@ class ConferenceViewModel : ViewModel() {
val
sortedDevices
=
sortDevicesDataList
(
devices
)
if
(
speakingParticipant
.
value
==
null
)
{
if
(
speakingParticipant
.
value
==
null
||
speakingParticipantFound
.
value
==
false
)
{
speakingParticipant
.
value
=
deviceData
deviceData
.
isActiveSpeaker
.
value
=
true
speakingParticipantFound
.
value
=
false
speakingParticipantFound
.
value
=
true
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
conferenceParticipantDevices
.
value
=
sortedDevices
...
...
@@ -710,7 +733,8 @@ class ConferenceViewModel : ViewModel() {
val
deviceData
=
devices
[
1
]
speakingParticipant
.
value
=
deviceData
deviceData
.
isActiveSpeaker
.
value
=
true
speakingParticipantFound
.
value
=
false
speakingParticipantFound
.
value
=
true
speakingParticipantVideoEnabled
.
value
=
speakingParticipant
.
value
?.
isInConference
?.
value
==
true
&&
speakingParticipant
.
value
?.
isSendingVideo
?.
value
==
true
}
conferenceParticipantDevices
.
value
=
devices
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/org/linphone/core/CoreService.kt
+
1
−
1
View file @
3b121289
...
...
@@ -82,7 +82,7 @@ class CoreService : CoreService() {
// Done elsewhere
}
override
fun
showForegroundServiceNotification
()
{
override
fun
showForegroundServiceNotification
(
isVideoCall
:
Boolean
)
{
Log
.
i
(
"[Service] Starting service as foreground"
)
coreContext
.
notificationsManager
.
startCallForeground
(
this
)
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout-land/voip_conference_active_speaker.xml
+
1
−
1
View file @
3b121289
...
...
@@ -221,7 +221,7 @@
android:id=
"@+id/conference_active_speaker_remote_video"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:visibility=
"@{!conferenceViewModel.isConferenceLocallyPaused && conferenceViewModel.speakingParticipant
.v
ideoEnabled
&& conferenceViewModel.speakingParticipant.isInConference
? View.VISIBLE : View.GONE}"
android:visibility=
"@{!conferenceViewModel.isConferenceLocallyPaused && conferenceViewModel.speakingParticipant
V
ideoEnabled ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toBottomOf=
"@id/active_speaker_background"
app:layout_constraintEnd_toEndOf=
"@id/active_speaker_background"
app:layout_constraintStart_toStartOf=
"@id/active_speaker_background"
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/voip_conference_active_speaker.xml
+
1
−
1
View file @
3b121289
...
...
@@ -180,7 +180,7 @@
android:id=
"@+id/conference_active_speaker_remote_video"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:visibility=
"@{!conferenceViewModel.isConferenceLocallyPaused && conferenceViewModel.speakingParticipant
.v
ideoEnabled
&& conferenceViewModel.speakingParticipant.isInConference
? View.VISIBLE : View.GONE}"
android:visibility=
"@{!conferenceViewModel.isConferenceLocallyPaused && conferenceViewModel.speakingParticipant
V
ideoEnabled ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toBottomOf=
"@id/active_speaker_background"
app:layout_constraintTop_toTopOf=
"@id/active_speaker_background"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets