mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-11 23:04:17 +01:00
Show progress bar on local participant when not connected
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
a76e519219
commit
2f44e6fd19
@ -2008,6 +2008,17 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
updateSelfVideoViewPosition();
|
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() {
|
private void updateSelfVideoViewPosition() {
|
||||||
Log.d(TAG, "updateSelfVideoViewPosition");
|
Log.d(TAG, "updateSelfVideoViewPosition");
|
||||||
if (!isInPipMode) {
|
if (!isInPipMode) {
|
||||||
@ -2051,13 +2062,17 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
|
|
||||||
if (peerConnectionEvent.getPeerConnectionEventType() ==
|
if (peerConnectionEvent.getPeerConnectionEventType() ==
|
||||||
PeerConnectionEvent.PeerConnectionEventType.PEER_CONNECTED) {
|
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);
|
participantDisplayItems.get(sessionId).setConnected(true);
|
||||||
participantsAdapter.notifyDataSetChanged();
|
participantsAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
} else if (peerConnectionEvent.getPeerConnectionEventType() ==
|
} else if (peerConnectionEvent.getPeerConnectionEventType() ==
|
||||||
PeerConnectionEvent.PeerConnectionEventType.PEER_DISCONNECTED) {
|
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);
|
participantDisplayItems.get(sessionId).setConnected(false);
|
||||||
participantsAdapter.notifyDataSetChanged();
|
participantsAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,14 @@
|
|||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
app:placeholderImage="@drawable/ic_switch_video_white_24px"
|
app:placeholderImage="@drawable/ic_switch_video_white_24px"
|
||||||
app:roundAsCircle="true" />
|
app:roundAsCircle="true" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/selfVideoViewProgressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="@dimen/call_self_participant_progress_bar_size"
|
||||||
|
android:layout_height="@dimen/call_self_participant_progress_bar_size"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:visibility="gone" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
<dimen name="call_grid_item_min_height">180dp</dimen>
|
<dimen name="call_grid_item_min_height">180dp</dimen>
|
||||||
<dimen name="call_controls_height">110dp</dimen>
|
<dimen name="call_controls_height">110dp</dimen>
|
||||||
<dimen name="call_participant_progress_bar_size">48dp</dimen>
|
<dimen name="call_participant_progress_bar_size">48dp</dimen>
|
||||||
|
<dimen name="call_self_participant_progress_bar_size">48dp</dimen>
|
||||||
<dimen name="zero">0dp</dimen>
|
<dimen name="zero">0dp</dimen>
|
||||||
|
|
||||||
<dimen name="online_status_item_height">52dp</dimen>
|
<dimen name="online_status_item_height">52dp</dimen>
|
||||||
|
Loading…
Reference in New Issue
Block a user