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() {
|
fun switchCamera() {
|
||||||
Timber.v("## VOIP switchCamera")
|
Timber.v("## VOIP switchCamera")
|
||||||
|
if (!canSwitchCamera()) return
|
||||||
if (currentCall != null && currentCall?.mxCall?.state is CallState.Connected && currentCall?.mxCall?.isVideoCall == true) {
|
if (currentCall != null && currentCall?.mxCall?.state is CallState.Connected && currentCall?.mxCall?.isVideoCall == true) {
|
||||||
videoCapturer?.switchCamera(object : CameraVideoCapturer.CameraSwitchHandler {
|
videoCapturer?.switchCamera(object : CameraVideoCapturer.CameraSwitchHandler {
|
||||||
// Invoked on success. |isFrontCamera| is true if the new camera is front facing.
|
// Invoked on success. |isFrontCamera| is true if the new camera is front facing.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user