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
13 changes: 10 additions & 3 deletions sdk/objc/components/capturer/RTCCameraVideoCapturer.m
Original file line number Diff line number Diff line change
Expand Up @@ -506,21 +506,28 @@ - (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
#if (TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_MACCATALYST) && !TARGET_OS_VISION
if (@available(iOS 7.0, tvOS 17.0, macCatalyst 14.0, *)) {
result.automaticallyConfiguresApplicationAudioSession = false;
}
#endif
return result;
}

- (BOOL)isUsingSelfCreatedMultiCamSession {
Expand Down