forked from mirrors/linphone-iphone
Stop voice recording in progress if any before accepting a call
This commit is contained in:
parent
f33ed2f7f9
commit
1a9c6060c2
2 changed files with 6 additions and 0 deletions
|
|
@ -159,4 +159,6 @@
|
|||
|
||||
-(void) initiateReplyViewForMessage:(LinphoneChatMessage *)message;
|
||||
|
||||
-(void) stopVoiceRecording;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -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)")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue