Skip to content

Commit

Permalink
continuityCamera and external for macos also
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed May 31, 2024
1 parent 6a9e436 commit c735813
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Sources/LiveKit/Support/DeviceManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,21 @@ class DeviceManager: Loggable {
.builtInTelephotoCamera, // Physical
.builtInUltraWideCamera, // Physical
]
#elseif os(macOS)
deviceTypes = [
.builtInWideAngleCamera,
]
#endif

// Xcode 15.0 Swift 5.9 (iOS 17)
#if compiler(>=5.9)
if #available(iOS 17.0, *) {
if #available(macOS 14.0, iOS 17.0, *) {
deviceTypes.append(contentsOf: [
.continuityCamera,
.external,
])
}
#endif
#else
deviceTypes = [
.builtInWideAngleCamera,
]
#endif

return AVCaptureDevice.DiscoverySession(deviceTypes: deviceTypes,
mediaType: .video,
Expand Down

0 comments on commit c735813

Please sign in to comment.