Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sdk/objc/components/capturer/RTCCameraVideoCapturer.m
Original file line number Diff line number Diff line change
Expand Up @@ -506,21 +506,24 @@ - (void)handleApplicationDidBecomeActive:(NSNotification *)notification {
#pragma mark - Private

- (AVCaptureSession *)createCaptureSession {
AVCaptureSession *result = nil;
#if TARGET_MULTICAM_CAPABLE
if (AVCaptureMultiCamSession.isMultiCamSupported) {
// AVCaptureMultiCamSession exists and device supports multi-cam.
if (_sharedMultiCamSession == nil) {
_sharedMultiCamSession = [[AVCaptureMultiCamSession alloc] init];
}
return _sharedMultiCamSession;
result = _sharedMultiCamSession;
} else {
// AVCaptureMultiCamSession exists but device doesn't support multi-cam.
return [[AVCaptureSession alloc] init];
result = [[AVCaptureSession alloc] init];
}
#else
// AVCaptureMultiCamSession doesn't exist with this platform, use AVCaptureSession.
return [[AVCaptureSession alloc] init];
result = [[AVCaptureSession alloc] init];
#endif
result.automaticallyConfiguresApplicationAudioSession = false;
return result;
}

- (BOOL)isUsingSelfCreatedMultiCamSession {
Expand Down