JLChen
2021-05-13 7f62f2d3bf626ac55d2d2de05ca1d71eaaabef39
iOS/Xamarin/LCOnDemo/LCOnDemo/LCSDK/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