Skip to content

Commit 358cba2

Browse files
committed
enable an event into rtcaudio session
this enables M75 of ios WebRTC SDK to start/stop audio session
1 parent f95cae6 commit 358cba2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ios/RNCallKeep/RNCallKeep.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,13 @@ - (void)provider:(CXProvider *)provider didActivateAudioSession:(AVAudioSession
573573
#ifdef DEBUG
574574
NSLog(@"[RNCallKeep][CXProviderDelegate][provider:didActivateAudioSession]");
575575
#endif
576+
NSDictionary *userInfo
577+
= @{
578+
AVAudioSessionInterruptionTypeKey: [NSNumber numberWithInt:AVAudioSessionInterruptionTypeEnded],
579+
AVAudioSessionInterruptionOptionKey: [NSNumber numberWithInt:AVAudioSessionInterruptionOptionShouldResume]
580+
};
581+
[[NSNotificationCenter defaultCenter] postNotificationName:AVAudioSessionInterruptionNotification object:nil userInfo:userInfo];
582+
576583
[self configureAudioSession];
577584
[self sendEventWithName:RNCallKeepDidActivateAudioSession body:nil];
578585
}

0 commit comments

Comments
 (0)