From 7f62f2d3bf626ac55d2d2de05ca1d71eaaabef39 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 13 五月 2021 09:55:37 +0800
Subject: [PATCH] 2021-05-13 1.备份

---
 iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m |   38 ++++++++++++++++++++++++++------------
 1 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m b/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m
index e0294c2..ff39a7f 100644
--- a/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m
+++ b/iOS/Xamarin/LCSDKOnXamarin/LCSDKOnXamarin/LCOnMonitorViewController.m
@@ -8,9 +8,9 @@
 #import "LCOnMonitorViewController.h"
 #import <AVFoundation/AVFoundation.h>
 #import <Photos/Photos.h>
-#import "LCKit.h"
-
-
+#import "LCUtlis.h"
+#import "LCApiKit.h"
+#import <LCOpenSDKDynamic/LCOpenSDKDynamic.h>
 
 @interface LCOnMonitorViewController ()<LCOpenSDK_EventListener>
 
@@ -76,8 +76,10 @@
     [self initESVideo];
     [self StartMonitoring];
     
-    //鏆傛椂涓嶆敮鎸佸紑閿佸姛鑳�
-    [self setUnlock:NO];
+//    //鏆傛椂涓嶆敮鎸佸紑閿佸姛鑳�
+//    [self setUnlock:NO];
+    //娉ㄥ唽寮�閿佹垚鍔熺洃鍚�
+    [self addOpenSuccessAction];
     // Do any additional setup after loading the view.
 }
 
@@ -277,9 +279,9 @@
     [_unlockImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_unlock_unselect"] forState:UIControlStateNormal];
     [_unlockTextBtn setTitleColor:TextColor forState:UIControlStateNormal];
     //寮�閿�
-    //    if(_es){
-    //        [_es openTheDoorWithRoomid:_mESRoomID];
-    //    }
+    if(self.mLCCallDelegate != NULL){
+        [self.mLCCallDelegate onUnlockAction];
+    }
 }
 
 - (UIButton *)unlockTextBtn{
@@ -479,13 +481,13 @@
         if (type == 0) {
             
             if ([RTSP_Result_String(STATE_RTSP_DESCRIBE_READY) isEqualToString:code]) {
-//                dispatch_async(dispatch_get_main_queue(), ^{
-//                });
+                //                dispatch_async(dispatch_get_main_queue(), ^{
+                //                });
                 return;
             }
             if ([RTSP_Result_String(STATE_RTSP_PLAY_READY) isEqualToString:code]) {
-//                dispatch_async(dispatch_get_main_queue(), ^{
-//                });
+                //                dispatch_async(dispatch_get_main_queue(), ^{
+                //                });
                 return;
             }
             //鎻愮ず澶辫触
@@ -1069,6 +1071,18 @@
     
 }
 
+- (void)addOpenSuccessAction {
+
+    [[NSNotificationCenter defaultCenter] removeObserver:self
+                                                    name:LCCallDelegateOpenDoorSuccess
+                                                  object:nil];
+
+    [[NSNotificationCenter defaultCenter] addObserver:self
+                                             selector:@selector(setOpenDoorSuccess)
+                                                 name:LCCallDelegateOpenDoorSuccess
+                                               object:nil];
+}
+
 
 @end
 

--
Gitblit v1.8.0