Send video as early-media if remote asks for it & automatically initiate video calls policy is enabled
This commit is contained in:
parent
3ba46dc9ab
commit
1bb294acf1
2 changed files with 22 additions and 0 deletions
|
@ -26,6 +26,7 @@ import android.widget.Chronometer
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.databinding.ViewDataBinding
|
import androidx.databinding.ViewDataBinding
|
||||||
import androidx.navigation.navGraphViewModels
|
import androidx.navigation.navGraphViewModels
|
||||||
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.GenericFragment
|
import org.linphone.activities.GenericFragment
|
||||||
import org.linphone.activities.navigateToActiveCall
|
import org.linphone.activities.navigateToActiveCall
|
||||||
|
@ -75,6 +76,14 @@ class OutgoingCallFragment : GenericFragment<VoipCallOutgoingFragmentBinding>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
controlsViewModel.isOutgoingEarlyMedia.observe(
|
||||||
|
viewLifecycleOwner
|
||||||
|
) {
|
||||||
|
if (it) {
|
||||||
|
coreContext.core.nativePreviewWindowId = binding.localPreviewVideoSurface
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
binding.stubNumpad.setOnInflateListener { _, inflated ->
|
binding.stubNumpad.setOnInflateListener { _, inflated ->
|
||||||
val binding = DataBindingUtil.bind<ViewDataBinding>(inflated)
|
val binding = DataBindingUtil.bind<ViewDataBinding>(inflated)
|
||||||
binding?.lifecycleOwner = viewLifecycleOwner
|
binding?.lifecycleOwner = viewLifecycleOwner
|
||||||
|
|
|
@ -127,6 +127,19 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintWidth_max="@dimen/voip_buttons_max_width" />
|
app:layout_constraintWidth_max="@dimen/voip_buttons_max_width" />
|
||||||
|
|
||||||
|
<org.linphone.activities.voip.views.RoundCornersTextureView
|
||||||
|
android:id="@+id/local_preview_video_surface"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:layout_size="@{@dimen/video_preview_max_size}"
|
||||||
|
app:alignTopRight="true"
|
||||||
|
app:displayMode="black_bars"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/buttons"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHeight_max="200dp"
|
||||||
|
app:layout_constraintWidth_max="200dp" />
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/stub_numpad"
|
android:id="@+id/stub_numpad"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue