diff --git a/Classes/ChatConversationView.h b/Classes/ChatConversationView.h index 7d8fd00dc..b186a849c 100644 --- a/Classes/ChatConversationView.h +++ b/Classes/ChatConversationView.h @@ -159,4 +159,6 @@ -(void) initiateReplyViewForMessage:(LinphoneChatMessage *)message; +-(void) stopVoiceRecording; + @end diff --git a/Classes/Swift/CallManager.swift b/Classes/Swift/CallManager.swift index 444fc8617..cf13510b3 100644 --- a/Classes/Swift/CallManager.swift +++ b/Classes/Swift/CallManager.swift @@ -202,6 +202,10 @@ import AVFoundation callParams.recordFile = writablePath + if let chatView : ChatConversationView = PhoneMainView.instance().VIEW(ChatConversationView.compositeViewDescription()), chatView.isVoiceRecording { + Log.directLog(BCTBX_LOG_MESSAGE, text: "Voice recording in progress, stopping it befoce accepting the call.") + chatView.stopVoiceRecording() + } try call.acceptWithParams(params: callParams) } catch { Log.directLog(BCTBX_LOG_ERROR, text: "accept call failed \(error)")