diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index 0c0a2c469..ca15b32cc 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -2008,6 +2008,17 @@ public class CallActivity extends CallBaseActivity { updateSelfVideoViewPosition(); } + private void updateSelfVideoViewConnected(boolean connected) { + // FIXME In voice only calls there is no video view, so the progress bar would appear floating in the middle of + // nowhere. However, a way to signal that the local participant is not connected to the HPB is still need in + // that case. + if (!connected && !isVoiceOnlyCall) { + binding.selfVideoViewProgressBar.setVisibility(View.VISIBLE); + } else { + binding.selfVideoViewProgressBar.setVisibility(View.GONE); + } + } + private void updateSelfVideoViewPosition() { Log.d(TAG, "updateSelfVideoViewPosition"); if (!isInPipMode) { @@ -2051,13 +2062,17 @@ public class CallActivity extends CallBaseActivity { if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.PEER_CONNECTED) { - if (participantDisplayItems.get(sessionId) != null) { + if (webSocketClient != null && webSocketClient.getSessionId() == sessionId) { + updateSelfVideoViewConnected(true); + } else if (participantDisplayItems.get(sessionId) != null) { participantDisplayItems.get(sessionId).setConnected(true); participantsAdapter.notifyDataSetChanged(); } } else if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.PEER_DISCONNECTED) { - if (participantDisplayItems.get(sessionId) != null) { + if (webSocketClient != null && webSocketClient.getSessionId() == sessionId) { + updateSelfVideoViewConnected(false); + } else if (participantDisplayItems.get(sessionId) != null) { participantDisplayItems.get(sessionId).setConnected(false); participantsAdapter.notifyDataSetChanged(); } diff --git a/app/src/main/res/layout/call_activity.xml b/app/src/main/res/layout/call_activity.xml index 897c6ed06..ca5be5a8e 100644 --- a/app/src/main/res/layout/call_activity.xml +++ b/app/src/main/res/layout/call_activity.xml @@ -77,6 +77,14 @@ android:layout_marginBottom="20dp" app:placeholderImage="@drawable/ic_switch_video_white_24px" app:roundAsCircle="true" /> + + 180dp 110dp 48dp + 48dp 0dp 52dp