Skip to content

Commit

Permalink
Fix CallKit audio session late init
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Buquet <nbuquet@buquet-net.com>
  • Loading branch information
Nicolas Buquet committed Jun 19, 2024
1 parent 8bf8711 commit 50dba6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MatrixSDK/VoIP/CallKit/MXCallKitAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ - (void)reportIncomingCall:(MXCall *)call {
update.supportsUngrouping = NO;
update.supportsDTMF = NO;

// If the user tap the "Answer" button from Element's timeline, very often, he can't hear the other user.
// It's because the audio session is not configured at the beginiing of the call.
// It's a flaw in CallKit implementation.
// The audio session need to be configured earlier, like here.
//
// See https://developer.apple.com/forums/thread/64544 (7th post from Apple Engineer)
[self.audioSessionConfigurator configureAudioSessionForVideoCall:call.isVideoCall];

[self.provider reportNewIncomingCallWithUUID:callUUID update:update completion:^(NSError * _Nullable error) {
if (error)
{
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-1866.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix CallKit audio session late init in VoIP call.

0 comments on commit 50dba6b

Please sign in to comment.