mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-26 20:41:46 +08:00
Change code conditional to conditional compilation directive to avoid CI failure
This commit is contained in:
@@ -183,20 +183,21 @@ STATUS AVBindDevices(AVBindMediaType mediaType, PAVBindDevice *ppDevices, int *p
|
||||
PAVBindDevice pDevice;
|
||||
AVMediaType _mediaType = mediaType == AVBindMediaTypeVideo ? AVMediaTypeVideo : AVMediaTypeAudio;
|
||||
|
||||
NSArray *refAllTypes;
|
||||
if (@available(macOS 14.0, *)) {
|
||||
refAllTypes = @[
|
||||
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_14_0
|
||||
NSArray *refAllTypes = @[
|
||||
AVCaptureDeviceTypeBuiltInWideAngleCamera,
|
||||
AVCaptureDeviceTypeMicrophone,
|
||||
AVCaptureDeviceTypeExternal,
|
||||
];
|
||||
} else {
|
||||
refAllTypes = @[
|
||||
#else
|
||||
NSArray *refAllTypes = @[
|
||||
AVCaptureDeviceTypeBuiltInWideAngleCamera,
|
||||
AVCaptureDeviceTypeBuiltInMicrophone,
|
||||
AVCaptureDeviceTypeExternalUnknown,
|
||||
];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
AVCaptureDeviceDiscoverySession *refSession = [AVCaptureDeviceDiscoverySession
|
||||
discoverySessionWithDeviceTypes: refAllTypes
|
||||
|
Reference in New Issue
Block a user