From a722e767f98042d5ef6259d2dde7854c925e4167 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 17 五月 2021 11:50:02 +0800
Subject: [PATCH] 2021-05-17 1.备份

---
 iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m |   37 ++++++++++---------------------------
 1 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m b/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m
index ff39a7f..9c276f0 100644
--- a/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m
+++ b/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m
@@ -41,11 +41,7 @@
 
 @implementation LCOnMonitorViewController
 {
-    BOOL isAccessAudio;
-    BOOL isAccessVideo;
     BOOL isBackGround;
-    BOOL iSVideoNotDetermined;
-    BOOL iSAudioNotDetermined;
     
     NSString * tipStr;
     NSString * okStr;
@@ -456,7 +452,7 @@
 - (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;;
     
@@ -578,34 +574,21 @@
 -(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

--
Gitblit v1.8.0