Do not force speaker on video activation/deactivation in conference

This commit is contained in:
Christophe Deschamps 2022-11-18 09:27:26 +01:00
parent 3e6bffd723
commit 3043fc5c7a
2 changed files with 2 additions and 2 deletions

View file

@ -715,7 +715,7 @@ import AVFoundation
let readyForRoutechange = CallManager.instance().callkitAudioSessionActivated == nil || (CallManager.instance().callkitAudioSessionActivated == true)
if (readyForRoutechange && (cstate == .IncomingReceived || cstate == .OutgoingInit || cstate == .Connected || cstate == .StreamsRunning)) {
if ((call.currentParams?.videoEnabled ?? false) && CallManager.instance().isReceiverEnabled()) {
if ((call.currentParams?.videoEnabled ?? false) && CallManager.instance().isReceiverEnabled() && call.conference == nil) {
CallManager.instance().changeRouteToSpeaker()
} else if (isBluetoothAvailable()) {
// Use bluetooth device by default if one is available

View file

@ -110,7 +110,7 @@ class ControlsViewModel {
}
}
if (ConfigManager.instance().lpConfigBoolForKey(key: "route_audio_to_speaker_when_video_enabled",defaultValue:true) && call.currentParams?.videoEnabled == true) {
if (ConfigManager.instance().lpConfigBoolForKey(key: "route_audio_to_speaker_when_video_enabled",defaultValue:true) && call.currentParams?.videoEnabled == true && call.conference == nil) {
// Do not turn speaker on when video is enabled if headset or bluetooth is used
if (!AudioRouteUtils.isHeadsetAudioRouteAvailable() &&
!AudioRouteUtils.isBluetoothAudioRouteCurrentlyUsed(call: call)