Fix #2000: video preview not enabled at first launch (iPad)

This commit is contained in:
Guillaume BIENKOWSKI 2015-01-19 16:00:17 +01:00
parent d30ccafcb7
commit 59978a1de2
2 changed files with 13 additions and 4 deletions

View file

@ -144,15 +144,23 @@ static UICompositeViewDescription *compositeDescription = nil;
[callButton setEnabled:TRUE];
// Update on show
LinphoneManager *mgr=[LinphoneManager instance];
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* call = linphone_core_get_current_call(lc);
LinphoneManager *mgr = [LinphoneManager instance];
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* call = linphone_core_get_current_call(lc);
LinphoneCallState state = (call != NULL)?linphone_call_get_state(call): 0;
[self callUpdate:call state:state];
if([LinphoneManager runningOnIpad]) {
if(linphone_core_video_enabled(lc) && [mgr lpConfigBoolForKey:@"preview_preference"]) {
BOOL videoEnabled = linphone_core_video_enabled(lc);
BOOL previewPref = [mgr lpConfigBoolForKey:@"preview_preference"];
if( videoEnabled && previewPref ) {
linphone_core_set_native_preview_window_id(lc, (unsigned long)videoPreview);
if( !linphone_core_video_preview_enabled(lc)){
linphone_core_enable_video_preview(lc, TRUE);
}
[backgroundView setHidden:FALSE];
[videoCameraSwitch setHidden:FALSE];
} else {

View file

@ -30,6 +30,7 @@ capture_dev_id=AU: Audio Unit Receiver
eq_active=0
[app]
preview_preference=1
animations_preference=1
edge_opt_preference=0
use_system_contacts=0