Fixed video display on incoming early media call
This commit is contained in:
parent
5caa304b7f
commit
f6a6459b29
2 changed files with 10 additions and 0 deletions
|
@ -79,6 +79,13 @@ class IncomingCallActivity : GenericActivity() {
|
|||
}
|
||||
})
|
||||
|
||||
viewModel.earlyMediaVideoEnabled.observe(this, Observer {
|
||||
if (it) {
|
||||
Log.i("[Incoming Call Activity] Early media video being received, set native window id")
|
||||
coreContext.core.nativeVideoWindowId = binding.remoteVideoSurface
|
||||
}
|
||||
})
|
||||
|
||||
val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
|
||||
viewModel.screenLocked.value = keyguardManager.isKeyguardLocked
|
||||
|
||||
|
|
|
@ -69,14 +69,17 @@
|
|||
android:layout_height="200dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_below="@id/contact_number"
|
||||
android:layout_above="@id/buttons"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
tools:layout="@layout/contact_avatar_big"
|
||||
app:viewModel="@{viewModel}"/>
|
||||
|
||||
<TextureView
|
||||
android:id="@+id/remote_video_surface"
|
||||
android:visibility="@{viewModel.earlyMediaVideoEnabled ? View.VISIBLE : View.GONE}"
|
||||
android:layout_below="@id/contact_number"
|
||||
android:layout_above="@id/buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue