ios: notify RTCAudioSession about CallKit AVAudioSession activation
This commit is contained in:
parent
5a53d7f32a
commit
f060ac9db1
|
@ -26,6 +26,7 @@
|
||||||
#import <React/RCTBridge.h>
|
#import <React/RCTBridge.h>
|
||||||
#import <React/RCTEventEmitter.h>
|
#import <React/RCTEventEmitter.h>
|
||||||
#import <React/RCTUtils.h>
|
#import <React/RCTUtils.h>
|
||||||
|
#import <WebRTC/WebRTC.h>
|
||||||
|
|
||||||
#import <JitsiMeet/JitsiMeet-Swift.h>
|
#import <JitsiMeet/JitsiMeet-Swift.h>
|
||||||
|
|
||||||
|
@ -307,22 +308,26 @@ RCT_EXPORT_METHOD(updateCall:(NSString *)callUUID
|
||||||
startedConnectingAt:nil];
|
startedConnectingAt:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following just help with debugging:
|
|
||||||
#ifdef DEBUG
|
|
||||||
|
|
||||||
- (void) providerDidActivateAudioSessionWithSession:(AVAudioSession *)session {
|
- (void) providerDidActivateAudioSessionWithSession:(AVAudioSession *)session {
|
||||||
|
#ifdef DEBUG
|
||||||
NSLog(@"[RNCallKit][CXProviderDelegate][provider:didActivateAudioSession:]");
|
NSLog(@"[RNCallKit][CXProviderDelegate][provider:didActivateAudioSession:]");
|
||||||
|
#endif
|
||||||
|
[[RTCAudioSession sharedInstance] audioSessionDidActivate:session];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) providerDidDeactivateAudioSessionWithSession:(AVAudioSession *)session {
|
- (void) providerDidDeactivateAudioSessionWithSession:(AVAudioSession *)session {
|
||||||
|
#ifdef DEBUG
|
||||||
NSLog(@"[RNCallKit][CXProviderDelegate][provider:didDeactivateAudioSession:]");
|
NSLog(@"[RNCallKit][CXProviderDelegate][provider:didDeactivateAudioSession:]");
|
||||||
|
#endif
|
||||||
|
[[RTCAudioSession sharedInstance] audioSessionDidDeactivate:session];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) providerTimedOutPerformingActionWithAction:(CXAction *)action {
|
- (void) providerTimedOutPerformingActionWithAction:(CXAction *)action {
|
||||||
|
#ifdef DEBUG
|
||||||
NSLog(@"[RNCallKit][CXProviderDelegate][provider:timedOutPerformingAction:]");
|
NSLog(@"[RNCallKit][CXProviderDelegate][provider:timedOutPerformingAction:]");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// The bridge might already be invalidated by the time a CallKit event is processed,
|
// The bridge might already be invalidated by the time a CallKit event is processed,
|
||||||
// just ignore it and don't emit it.
|
// just ignore it and don't emit it.
|
||||||
|
|
Loading…
Reference in New Issue