diff --git a/linphone-app/src/components/other/desktop-tools/DesktopToolsMacOs.mm b/linphone-app/src/components/other/desktop-tools/DesktopToolsMacOs.mm index 1ec5c1f12..da4a4dbff 100644 --- a/linphone-app/src/components/other/desktop-tools/DesktopToolsMacOs.mm +++ b/linphone-app/src/components/other/desktop-tools/DesktopToolsMacOs.mm @@ -3,8 +3,10 @@ void DesktopTools::init(){ // Request permissions - if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] != AVAuthorizationStatusAuthorized) - [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL) {}]; - if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio] != AVAuthorizationStatusAuthorized) - [AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL) {}]; + if( @available(macOS 10.14, *) ) { + if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusNotDetermined) + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL) {}]; + if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio] == AVAuthorizationStatusNotDetermined) + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL) {}]; + } }