diff --git a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m b/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m index 4f7f393..a07b5c7 100644 --- a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m +++ b/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m @@ -46,6 +46,8 @@ } \ } while(0) +static NSString *const UnrecognizedMacOSVersionException = @"UnrecognizedMacOSVersionException"; + @interface VideoDataDelegate : NSObject @property (readonly) AVBindDataCallback mCallback; @@ -191,13 +193,10 @@ STATUS AVBindDevices(AVBindMediaType mediaType, PAVBindDevice *ppDevices, int *p AVCaptureDeviceTypeMicrophone, AVCaptureDeviceTypeExternal, ]; - } - else { - refAllTypes = @[ - AVCaptureDeviceTypeBuiltInWideAngleCamera, - AVCaptureDeviceTypeBuiltInMicrophone, - AVCaptureDeviceTypeExternalUnknown, - ]; + } else { + @throw [NSException exceptionWithName:UnrecognizedMacOSVersionException + reason:@"Unrecognized or unsupported macOS version detected." + userInfo:nil]; } #else refAllTypes = @[