forked from mirrors/linphone-iphone
disable idle timer during video calls (works)
This commit is contained in:
parent
dc11bb4300
commit
f70916d8d9
4 changed files with 15 additions and 6 deletions
|
|
@ -67,8 +67,9 @@
|
|||
UIActionSheet *mIncomingCallActionSheet;
|
||||
FirstLoginViewController* myFirstLoginViewController;
|
||||
VideoViewController* mVideoViewController;
|
||||
|
||||
BOOL mVideoShown;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* dialerView;
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* videoViewController;
|
||||
@property (nonatomic, retain) IBOutlet UITextField* address;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
|
||||
if (!mVideoShown) [[UIApplication sharedApplication] setIdleTimerDisabled:false];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
[erase initWithAddressField:address];
|
||||
self.videoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
|
||||
mVideoShown=FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -179,6 +179,7 @@
|
|||
if (modalVC != nil) {
|
||||
// clear previous native window ids
|
||||
if (modalVC == self.videoViewController) {
|
||||
mVideoShown=FALSE;
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],0);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],0);
|
||||
}
|
||||
|
|
@ -250,6 +251,7 @@
|
|||
|
||||
-(void) displayVideoCallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
|
||||
mVideoShown=TRUE;
|
||||
[self presentModalViewController:self.videoViewController animated:true];
|
||||
}
|
||||
//status reporting
|
||||
|
|
|
|||
|
|
@ -99,13 +99,16 @@
|
|||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
-(void) viewWillDisappear:(BOOL)animated {
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
|
||||
}
|
||||
|
||||
-(void) viewDidDisappear:(BOOL)animated{
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
|
||||
}
|
||||
|
||||
-(void) viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:true];
|
||||
|
||||
//redirect audio to speaker
|
||||
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
|
||||
|
|
@ -119,6 +122,9 @@
|
|||
waitUntilDone:YES];
|
||||
[mMute reset];
|
||||
[mMuteLand reset];
|
||||
}
|
||||
|
||||
- (void) viewDidAppear:(BOOL)animated{
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 6982a559db03fd191858856e97264b63e49e80cb
|
||||
Subproject commit 2063d0201e1b2681f4663e73ba96d3f47c58c25a
|
||||
Loading…
Add table
Reference in a new issue