fix(ios): [iOS] Video Interrupted on incoming call fix (#2207)
* [iOS] Video Interrupted on incoming call fix * Update index.d.ts
This commit is contained in:
parent
e564648b7c
commit
8cc3ca2898
@ -71,6 +71,10 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
|
||||
selector:@selector(bridgeDidForeground:)
|
||||
name:UIApplicationWillEnterForegroundNotification
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(audioDidInterrupted:)
|
||||
name:AVAudioSessionInterruptionNotification
|
||||
object:nil];
|
||||
self.autoFocus = -1;
|
||||
|
||||
}
|
||||
@ -785,6 +789,24 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)audioDidInterrupted:(NSNotification *)notification
|
||||
{
|
||||
NSDictionary *userInfo = notification.userInfo;
|
||||
NSInteger type = [[userInfo valueForKey:AVAudioSessionInterruptionTypeKey] integerValue];
|
||||
switch (type) {
|
||||
case AVAudioSessionInterruptionTypeBegan:
|
||||
[self bridgeDidBackground: notification];
|
||||
break;
|
||||
|
||||
case AVAudioSessionInterruptionTypeEnded:
|
||||
[self bridgeDidForeground: notification];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)orientationChanged:(NSNotification *)notification
|
||||
{
|
||||
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
|
||||
|
||||
1
types/index.d.ts
vendored
1
types/index.d.ts
vendored
@ -297,6 +297,7 @@ interface RecordResponse {
|
||||
uri: string;
|
||||
videoOrientation: number;
|
||||
deviceOrientation: number;
|
||||
isRecordingInterrupted: boolean;
|
||||
/** iOS only */
|
||||
codec: VideoCodec[keyof VideoCodec];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user