request video authorization even when no preview needed

This commit is contained in:
Benjamin Reis 2017-02-20 14:14:57 +01:00
parent 9b57a31564
commit 9ece93c655

View file

@ -24,11 +24,12 @@
#include <sys/sysctl.h>
#import <AVFoundation/AVAudioSession.h>
#import <AVFoundation/AVCaptureDevice.h>
#import <AudioToolbox/AudioToolbox.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreTelephony/CTCallCenter.h>
#import <SystemConfiguration/CaptiveNetwork.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <SystemConfiguration/CaptiveNetwork.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import "LinphoneManager.h"
#import "LinphoneCoreSettingsStore.h"
@ -2313,9 +2314,12 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
/*IOS specific*/
linphone_core_start_dtmf_stream(theLinphoneCore);
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo
completionHandler:^(BOOL granted){
}];
/*start the video preview in case we are in the main view*/
if (linphone_core_video_display_enabled(theLinphoneCore)) { //&& [self lpConfigBoolForKey:@"preview_preference"]) {
if (linphone_core_video_display_enabled(theLinphoneCore) && [self lpConfigBoolForKey:@"preview_preference"]) {
linphone_core_enable_video_preview(theLinphoneCore, TRUE);
}
/*check last keepalive handler date*/