From 8662797cf8aa2120517be09958c4f181efe09f69 Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 15 Jun 2020 18:20:13 +0200 Subject: [PATCH] Restart capture after close for older android --- .../riotx/features/call/WebRtcPeerConnectionManager.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt b/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt index 9cbd0dfddd..1ebaf11a91 100644 --- a/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt @@ -301,6 +301,11 @@ class WebRtcPeerConnectionManager @Inject constructor( } } else -> { + // Fallback for old android, try to restart capture when attached + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP && capturerIsInError && call.mxCall.isVideoCall) { + // try to restart capture? + videoCapturer?.startCapture(1280, 720, 30) + } // sink existing tracks (configuration change, e.g screen rotation) attachViewRenderersInternal() }