Fix / prevent camera switch if no second camera
This commit is contained in:
parent
64a67b57b8
commit
6b806922ee
|
@ -736,6 +736,7 @@ class WebRtcPeerConnectionManager @Inject constructor(
|
|||
|
||||
fun switchCamera() {
|
||||
Timber.v("## VOIP switchCamera")
|
||||
if (!canSwitchCamera()) return
|
||||
if (currentCall != null && currentCall?.mxCall?.state is CallState.Connected && currentCall?.mxCall?.isVideoCall == true) {
|
||||
videoCapturer?.switchCamera(object : CameraVideoCapturer.CameraSwitchHandler {
|
||||
// Invoked on success. |isFrontCamera| is true if the new camera is front facing.
|
||||
|
|
Loading…
Reference in New Issue