Skip to content

Commit c735813

Browse files
committed
continuityCamera and external for macos also
1 parent 6a9e436 commit c735813

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Sources/LiveKit/Support/DeviceManager.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,21 @@ class DeviceManager: Loggable {
4949
.builtInTelephotoCamera, // Physical
5050
.builtInUltraWideCamera, // Physical
5151
]
52+
#elseif os(macOS)
53+
deviceTypes = [
54+
.builtInWideAngleCamera,
55+
]
56+
#endif
57+
5258
// Xcode 15.0 Swift 5.9 (iOS 17)
5359
#if compiler(>=5.9)
54-
if #available(iOS 17.0, *) {
60+
if #available(macOS 14.0, iOS 17.0, *) {
5561
deviceTypes.append(contentsOf: [
5662
.continuityCamera,
5763
.external,
5864
])
5965
}
6066
#endif
61-
#else
62-
deviceTypes = [
63-
.builtInWideAngleCamera,
64-
]
65-
#endif
6667

6768
return AVCaptureDevice.DiscoverySession(deviceTypes: deviceTypes,
6869
mediaType: .video,

0 commit comments

Comments
 (0)