mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-30 16:06:24 +00:00
10 lines
530 B
Text
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) {}];
|
|
}
|