We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d151c5 commit 7fdbb0cCopy full SHA for 7fdbb0c
Sources/LiveKit/Track/Capturers/CameraCapturer.swift
@@ -90,12 +90,17 @@ public class CameraCapturer: VideoCapturer {
90
private lazy var adapter: VideoCapturerDelegateAdapter = .init(cameraCapturer: self)
91
92
#if os(iOS)
93
+ // static let is lazy by default and AVCaptureMultiCamSession will only be initialized if used.
94
private static let _multiCamSession = AVCaptureMultiCamSession()
95
#endif
96
97
public var captureSession: AVCaptureSession {
98
- Self._multiCamSession
99
+ if AVCaptureMultiCamSession.isMultiCamSupported {
100
+ Self._multiCamSession
101
+ } else {
102
+ AVCaptureSession()
103
+ }
104
#else
105
AVCaptureSession()
106
0 commit comments