mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Don't re-enable the speaker in video if the user disabled it. This can happen when there's an ICE reinvite.
This commit is contained in:
parent
ea5bb01d70
commit
966f8dc9a2
1 changed files with 7 additions and 1 deletions
|
|
@ -643,8 +643,13 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
}
|
||||
}
|
||||
|
||||
// we keep the speaker auto-enabled state in this static so that we don't
|
||||
// force-enable it on ICE re-invite if the user disabled it.
|
||||
static BOOL speaker_already_enabled = FALSE;
|
||||
|
||||
// Disable speaker when no more call
|
||||
if ((state == LinphoneCallEnd || state == LinphoneCallError)) {
|
||||
speaker_already_enabled = FALSE;
|
||||
if(linphone_core_get_calls_nb(theLinphoneCore) == 0) {
|
||||
[self setSpeakerEnabled:FALSE];
|
||||
[self removeCTCallCenterCb];
|
||||
|
|
@ -695,8 +700,9 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
state == LinphoneCallOutgoingInit ||
|
||||
state == LinphoneCallConnected ||
|
||||
state == LinphoneCallStreamsRunning) {
|
||||
if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
|
||||
if (linphone_call_params_video_enabled(linphone_call_get_current_params(call)) && !speaker_already_enabled) {
|
||||
[self setSpeakerEnabled:TRUE];
|
||||
speaker_already_enabled = TRUE;
|
||||
}
|
||||
}
|
||||
if (state == LinphoneCallConnected && !mCallCenter) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue