mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
WebRTC call: fix pip showing
This commit is contained in:
parent
94981d5f37
commit
0da8a46311
2 changed files with 9 additions and 9 deletions
|
@ -232,7 +232,6 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
||||||
private fun renderFullScreenMode(state: VectorCallViewState) {
|
private fun renderFullScreenMode(state: VectorCallViewState) {
|
||||||
views.callToolbar.isVisible = true
|
views.callToolbar.isVisible = true
|
||||||
views.callControlsView.isVisible = true
|
views.callControlsView.isVisible = true
|
||||||
views.pipRendererWrapper.isVisible = true
|
|
||||||
views.callControlsView.updateForState(state)
|
views.callControlsView.updateForState(state)
|
||||||
val callState = state.callState.invoke()
|
val callState = state.callState.invoke()
|
||||||
views.callActionText.setOnClickListener(null)
|
views.callActionText.setOnClickListener(null)
|
||||||
|
@ -243,13 +242,13 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
||||||
is CallState.CreateOffer,
|
is CallState.CreateOffer,
|
||||||
is CallState.LocalRinging,
|
is CallState.LocalRinging,
|
||||||
is CallState.Dialing -> {
|
is CallState.Dialing -> {
|
||||||
views.callVideoGroup.isInvisible = true
|
views.callVideoGroup.isVisible = false
|
||||||
views.callInfoGroup.isVisible = true
|
views.callInfoGroup.isVisible = true
|
||||||
views.callToolbar.setSubtitle(R.string.call_ringing)
|
views.callToolbar.setSubtitle(R.string.call_ringing)
|
||||||
configureCallInfo(state)
|
configureCallInfo(state)
|
||||||
}
|
}
|
||||||
is CallState.Answering -> {
|
is CallState.Answering -> {
|
||||||
views.callVideoGroup.isInvisible = true
|
views.callVideoGroup.isVisible = false
|
||||||
views.callInfoGroup.isVisible = true
|
views.callInfoGroup.isVisible = true
|
||||||
views.callToolbar.setSubtitle(R.string.call_connecting)
|
views.callToolbar.setSubtitle(R.string.call_connecting)
|
||||||
configureCallInfo(state)
|
configureCallInfo(state)
|
||||||
|
@ -259,7 +258,7 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
||||||
if (callState.iceConnectionState == MxPeerConnectionState.CONNECTED) {
|
if (callState.iceConnectionState == MxPeerConnectionState.CONNECTED) {
|
||||||
if (state.isLocalOnHold || state.isRemoteOnHold) {
|
if (state.isLocalOnHold || state.isRemoteOnHold) {
|
||||||
views.smallIsHeldIcon.isVisible = true
|
views.smallIsHeldIcon.isVisible = true
|
||||||
views.callVideoGroup.isInvisible = true
|
views.callVideoGroup.isVisible = false
|
||||||
views.callInfoGroup.isVisible = true
|
views.callInfoGroup.isVisible = true
|
||||||
configureCallInfo(state, blurAvatar = true)
|
configureCallInfo(state, blurAvatar = true)
|
||||||
if (state.isRemoteOnHold) {
|
if (state.isRemoteOnHold) {
|
||||||
|
@ -290,13 +289,13 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
||||||
views.callInfoGroup.isVisible = false
|
views.callInfoGroup.isVisible = false
|
||||||
views.pipRenderer.isVisible = !state.isVideoCaptureInError && state.otherKnownCallInfo == null
|
views.pipRenderer.isVisible = !state.isVideoCaptureInError && state.otherKnownCallInfo == null
|
||||||
} else {
|
} else {
|
||||||
views.callVideoGroup.isInvisible = true
|
views.callVideoGroup.isVisible = false
|
||||||
views.callInfoGroup.isVisible = true
|
views.callInfoGroup.isVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// This state is not final, if you change network, new candidates will be sent
|
// This state is not final, if you change network, new candidates will be sent
|
||||||
views.callVideoGroup.isInvisible = true
|
views.callVideoGroup.isVisible = false
|
||||||
views.callInfoGroup.isVisible = true
|
views.callInfoGroup.isVisible = true
|
||||||
configureCallInfo(state)
|
configureCallInfo(state)
|
||||||
views.callToolbar.setSubtitle(R.string.call_connecting)
|
views.callToolbar.setSubtitle(R.string.call_connecting)
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
app:cardCornerRadius="@dimen/call_pip_radius"
|
app:cardCornerRadius="@dimen/call_pip_radius"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
|
app:layout_goneMarginEnd="0dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@id/callControlsView">
|
app:layout_constraintBottom_toTopOf="@id/callControlsView">
|
||||||
|
|
||||||
|
@ -71,16 +72,16 @@
|
||||||
android:id="@+id/otherKnownCallLayout"
|
android:id="@+id/otherKnownCallLayout"
|
||||||
android:layout_width="@dimen/call_pip_width"
|
android:layout_width="@dimen/call_pip_width"
|
||||||
android:layout_height="@dimen/call_pip_height"
|
android:layout_height="@dimen/call_pip_height"
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@color/element_background_light"
|
android:background="@color/element_background_light"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:cardBackgroundColor="@color/bg_call_screen"
|
app:cardBackgroundColor="@color/bg_call_screen"
|
||||||
app:cardCornerRadius="@dimen/call_pip_radius"
|
app:cardCornerRadius="@dimen/call_pip_radius"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="4dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/callControlsView"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintEnd_toStartOf="@id/pipRendererWrapper"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
Loading…
Reference in a new issue