| | |
| | | |
| | | @implementation LCOnMonitorViewController |
| | | { |
| | | BOOL isAccessAudio; |
| | | BOOL isAccessVideo; |
| | | BOOL isBackGround; |
| | | BOOL iSVideoNotDetermined; |
| | | BOOL iSAudioNotDetermined; |
| | | |
| | | NSString * tipStr; |
| | | NSString * okStr; |
| | |
| | | - (void)onPlayerResult:(NSString*)code Type:(NSInteger)type Index:(NSInteger)index { |
| | | // play |
| | | WEAKSELF_AT(self); |
| | | NSLog(@"LIVE_PLAY-CODE:%@,TYPE:%ld", code, type); |
| | | NSLog(@"LIVE_PLAY-CODE:%@,TYPE:%ld", code, (long)type); |
| | | //是否已经弹窗过 |
| | | if(isShowErrorAlert) return;; |
| | | |
| | |
| | | -(void)viewWillDisappear:(BOOL)animated{ |
| | | [super viewWillDisappear:animated]; |
| | | |
| | | //1.暂停SDK相关播放 |
| | | [self stopPlay]; |
| | | //2.Delegate释放 |
| | | self.mLCCallDelegate = nil; |
| | | //3.定时器释放 |
| | | if(_openDoorTimer){ |
| | | dispatch_source_cancel(_openDoorTimer); |
| | | _openDoorTimer = nil; // OK |
| | | } |
| | | |
| | | //防止用户不按挂断,或者不等收到对方的挂断,点击返回按钮。 |
| | | // if(_es){ |
| | | // [_es onHangup]; |
| | | // [_es onStopCapture]; |
| | | // [_es stopTalk]; |
| | | // |
| | | // _es.delegate = nil; |
| | | // ESVideo.shareInstance.snapImageCallback = nil; |
| | | // // _es.showView.removeFromSuperview; |
| | | // } |
| | | // [_es freeSubClass]; |
| | | [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| | | } |
| | | |
| | | -(void)dealloc{ |
| | | NSLog(@"==============dealloc 1"); |
| | | [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| | | NSLog(@"==============dealloc 2"); |
| | | // [_es freeSubClass]; |
| | | // NSLog(@"==============dealloc 3"); |
| | | |
| | | if(_openDoorTimer){ |
| | | dispatch_source_cancel(_openDoorTimer); |
| | | _openDoorTimer = nil; // OK |
| | | |
| | | } |
| | | NSLog(@"==============dealloc 3"); |
| | | } |
| | | |
| | | //#pragma mark ESVideoPhoneDelegate |