Commit Graph

95 Commits

Author SHA1 Message Date
Marcel Hibbe
6445633c94
simplify call grid design for voice only calls
this will remove the workaround regarding heightForNonGridComponents by using a BoxWithConstraints

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-28 15:04:05 +02:00
Marcel Hibbe
6a048fde08
improve/fix contents for picture in picture mode
depending on amount of participants, voiceOnly call and enabled/disabled own video, the contents of PIP windows are updated.

This will be further improved when speaker-view is implemented.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-13 11:40:33 +02:00
Marcel Hibbe
eaed93087b
simplify participant data structure
move ParticipantUiState into ParticipantDisplayItem

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 15:01:26 +02:00
Marcel Hibbe
38072d40c2
fix to show screenshare
at least as another cell. fullscreen needs to be implemented

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:41 +02:00
Marcel Hibbe
b6519f6ffb
make sure to release pipSelfVideoRenderer after hangup
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:41 +02:00
Marcel Hibbe
1703a34007
remove unused code
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:40 +02:00
Marcel Hibbe
51eb7edcb0
remove unused constants
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:40 +02:00
Marcel Hibbe
af93877e96
move self video position more to edge
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:40 +02:00
Marcel Hibbe
257dc2af54
only show avatars for voiceonly calls
improve pip handling a bit

minor changes

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:40 +02:00
Marcel Hibbe
1136508ba2
fix voice only call design by workaround.
For now, instead to measure height mixed from xml and compose, assume a fixed height for the xml views (callInfosLinearLayout and callControls) to limit the grid height.
They is not a nice solution and should be replaced once everything is migrated to compose.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:39 +02:00
Marcel Hibbe
35c777e70d
move SurfaceViewRenderer into WebRTCVideoView
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:38 +02:00
Marcel Hibbe
aacc013485
improve call participants layout
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:37 +02:00
Marcel Hibbe
42a8afded8
fix z index of videos and click listener to show controls
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:37 +02:00
Marcel Hibbe
feeec78ab4
WIP migrate call grid to compose
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:37 +02:00
Marcel Hibbe
7df19b7623
convert ParticipantsAdapter to kt
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-12 13:55:36 +02:00
Marcel Hibbe
0d2014aa27
set icon with call name as fallback for pip group calls when own video is disabled
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-05 09:57:20 +02:00
Marcel Hibbe
ee6543d766
fix to release "self" renderers when camera switched off
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-05 09:57:20 +02:00
Marcel Hibbe
e3bbe3503f
show own video in pip mode for group calls
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-05-05 09:57:19 +02:00
gavine99
d40878e3be changes to do audio channel switcheroo to bluetooth only after sco conn is available
Signed-off-by: gavine99 <github@xymail.tk>
2025-04-30 09:53:51 +00:00
gavine99
7e267ab761 add a default audio device option in audio manager. stops auto-switch to bluetooth being disabled by 'user selected audio device' being set in code
Signed-off-by: gavine99 <github@xymail.tk>
2025-04-30 09:53:51 +00:00
Marcel Hibbe
62235372ea
switch video capture between 4:3 and 16:9 ratio for portrait/landscape
switch video capture for calls between 4:3 and 16:9 ratio depending on portrait/landscape mode

Also: simplify placement of self video view (it was buggy) as well as applying the ratio there as well

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-04-04 13:16:02 +02:00
Marcel Hibbe
fbad489ecb
fix no sound after mic permission granted
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2025-03-21 11:39:27 +01:00
Andy Scherzinger
db944ec1bd
style(lint): Migrate to KTX extension function
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-03-19 18:07:35 +01:00
Daniel Calviño Sánchez
ea2bebe3b0
Add support for sending signaling messages in the MessageSender
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-08 12:35:16 +01:00
Daniel Calviño Sánchez
0ec5175c61
Send current state to remote participants when they join
Note that this implicitly send the current state to remote participants
when the local participant joins, as in that case all the remote
participants already in the call join from the point of view of the
local participant

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-08 12:35:16 +01:00
Daniel Calviño Sánchez
fe32bc1628
Add helper class to broadcast the local participant state
The LocalStateBroadcaster observes changes in the
LocalCallParticipantModel and notifies other participants in the call as
needed. Although it is created right before joining the call there is a
slim chance of the state changing before the local participant is
actually in the call, but even in that case other participants would not
be notified about the state due to the MessageSender depending on the
list of call participants / peer connections passed to it, which should
not be initialized before the local participant is actually in the call.

There is, however, a race condition that could cause participants to not
be added to the participant list if they join at the same time as the
local participant and a signaling message listing them but not the local
participant as in the call is received once the CallParticipantList was
created, but that is unrelated to the broadcaster and will be fixed
in another commit.

Currently only changes in the audio, speaking and video state are
notified, although in the future it should also notify about the nick,
the raised hand or any other state (but not one-time events, like
reactions). The notifications right now are sent only through data
channels, but at a later point they will be sent also through signaling
messages as needed.

Similarly, although right now it only notifies of changes in the state
it will also take care of notifying other participants about the current
state when they join the call (or the local participant joins).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-08 12:35:15 +01:00
Daniel Calviño Sánchez
cb52fb349f
Add data model for local call participants
This is the counterpart of CallParticipantModel for the local
participant. For now it just stores whether audio and video are enabled
or not, and whether the local participant is speaking or not, but it
will be eventually extended with further properties.

It is also expected that the views, like the button with the microphone
state, will update themselves based on the model. Similarly the model
should be moved from the CallActivity to a class similar to
CallParticipant but for the local participant. In any case, all that is
something for the future; the immediate use of the model will be to know
when the local state changes to notify other participants.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-08 12:35:15 +01:00
Daniel Calviño Sánchez
3e36c85015
Add helper class to send messages to call participants
For now it just provides support for sending a data channel message to
all participants, so notifying all participants when the media is
toggled or the speaking status change can be directly refactored to use
it.

While it would have been fine to use a single class for both MCU and no
MCU they were split for easier and cleaner unit testing in future
stages.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-08 12:35:15 +01:00
Daniel Calviño Sánchez
8fa3224879
Set "hasMCU" once its value is known
"hasMCU" (which has always been the wrong name, because it is an SFU
rather than an MCU, but it is wrong even in the signaling server so for
now the legacy name is kept) was set again and again whenever the call
participant list changed. Now it is set instead once its value is known,
that is, when it is known that the internal signaling server is used (as
no "MCU" is used in that case), or when the connection with the external
signaling server is established, as its supported features are not known
until then.

This change should have no effect in the usages of "hasMCU", as it is
used when the call participant list change, which will happen only after
joining the call in the signaling server, or when sending "isSpeaking"
and toggling media, in both cases guarded by "isConnectionEstablished",
which will be true only once "performCall" was called or if the call is
active with other participants.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-08 12:35:14 +01:00
Daniel Calviño Sánchez
f112e26d25
Fix SDP constraints used by PeerConnectionWrapper
The SDP constraints for publisher connections when the MCU is used were
set for all connections. Those constraints set "OfferToReceiveAudio" and
"OfferToReceiveVideo" to false, which disables receiving audio and video
when the local participant is the one sending the offer. Therefore,
audio and video was not received when the MCU was not used and the local
participant was the one initiating the connection.

The "OfferToReceiveXXX" configurations have no effect when set on an
answer (and thus are not even set, an empty MediaConstraints is used in
that case). However, when "OfferToReceiveVideo = false" is set the video
transceiver is explicitly stopped (which is used to avoid receiving
video when joining a call with audio only). Therefore, as
"OfferToReceiveVideo = false" was always set, video was never received
in subscriber connections when the MCU is used, or connections initiated
by the other peer when the MCU is not used.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 13:26:43 +01:00
Daniel Calviño Sánchez
94257da123
Rename attribute to a more accurate name
The SDP constraints should be set when the MCU is used, but only for
publisher connections; receiver connections should use the general SDP
constraints.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 13:26:42 +01:00
Daniel Calviño Sánchez
a4cce0581c
Rename "sendChannelData" to "send"
The legacy name was a bit strange, so now it is renamed to just "send"
as the parameter type ("DataChannelMessage") gives enough context.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 10:52:41 +01:00
Andy Scherzinger
12620a5c3e
style(detekt): shorten long methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-12-10 09:00:47 +01:00
Andy Scherzinger
751cd3f4ea
style(detekt): Shorten complex conditions
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-10 08:59:26 +01:00
Andy Scherzinger
f820277779
style(detekt): Accept current use of TooGenericExceptionCaught cases
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-06 11:11:24 +01:00
Andy Scherzinger
eb890cfbd3
style(detekt): Replace MagicNumbers with constants
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-06 11:11:02 +01:00
Andy Scherzinger
77d2632513
style(detekt): Improve score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-02 10:40:00 +01:00
sowjanyakch
9b3a11569a
bump minSdkVersion to 26 and remove old checks
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-21 11:34:23 +01:00
Marcel Hibbe
79a8c16758
rename variables and methods
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-11-12 12:11:10 +01:00
sowjanyakch
37c3f35f7a
suppress warning string format invalid
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:09 +01:00
sowjanyakch
4705d1f7b0
use proper names for popup menu
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:09 +01:00
sowjanyakch
121e77b753
use white background for popup button and formatting
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:09 +01:00
sowjanyakch
eda9b94182
use touch listeners for hiding popup button
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:09 +01:00
sowjanyakch
0920029183
show popup for leaving call in 1:1
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:08 +01:00
sowjanyakch
90628c34ce
set "all" parameter to false and set to null only before API call
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:08 +01:00
sowjanyakch
d09b7b5a07
remove isGroupConversation variable
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:08 +01:00
sowjanyakch
cfe83dd027
remove isGroupConversation variable
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:08 +01:00
sowjanyakch
de637871a6
ktlintFormat
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:07 +01:00
sowjanyakch
e5789c0cf6
set bundle keys in CallNotificationActivity
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:07 +01:00
sowjanyakch
be9bda7f04
ktlintFormat
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-11-12 12:11:06 +01:00