linphone-desktop/linphone-app/src/components/other/desktop-tools/DesktopToolsMacOs.mm

10 lines
530 B
Text

#include "DesktopToolsMacOs.hpp"
#import <AVFoundation/AVFoundation.h>
void DesktopTools::initialize(){
// Request permissions
if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] != AVAuthorizationStatusAuthorized)
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL) {}];
if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio] != AVAuthorizationStatusAuthorized)
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL) {}];
}