Skip to content

Commit 0a9cdb1

Browse files
authored
Merge pull request #176 from Romick2005/master
#174 Fix audio session restore for setForceSpeakerphoneOn method
2 parents 54bd8d4 + f9b2c97 commit 0a9cdb1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ios/RNInCallManager/RNInCallManager.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,15 @@ - (void)updateAudioRoute
493493
NSLog(@"RNInCallManager.updateAudioRoute(): did NOT overrideOutputAudioPort()");
494494
}
495495

496+
if (![_audioSession.category isEqualToString:_incallAudioCategory]) {
497+
[self audioSessionSetCategory:_incallAudioCategory
498+
options:0
499+
callerMemo:NSStringFromSelector(_cmd)];
500+
NSLog(@"RNInCallManager.updateAudioRoute() audio category has changed to %@", _incallAudioCategory);
501+
} else {
502+
NSLog(@"RNInCallManager.updateAudioRoute() did NOT change audio category");
503+
}
504+
496505
if (audioMode.length > 0 && ![_audioSession.mode isEqualToString:audioMode]) {
497506
[self audioSessionSetMode:audioMode
498507
callerMemo:NSStringFromSelector(_cmd)];

0 commit comments

Comments
 (0)