From b897bf1e118e69764da20ef6668ef5d9ec1653e8 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期四, 25 五月 2023 09:33:38 +0800
Subject: [PATCH] 增加监视结束国际化

---
 HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m"
index 0be0912..247edac 100644
--- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m"
+++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m"
@@ -10,7 +10,7 @@
 #import <Photos/Photos.h>
 #import "HDLLinphoneUtlis.h"
 #import "HDLLinphoneManager.h"
-
+#import "HDLLinPhoneCommon.h"
 //#import "HDLLinPhoneSDK-Swift.h"
 //#import "LCUtlis.h"
 //#import "LCApiKit.h"
@@ -37,7 +37,7 @@
 @property (nonatomic,strong) dispatch_source_t openDoorTimer;
 @property (nonatomic, assign) int openDoorTimeout;
 
-
+@property (nonatomic, assign)  BOOL isHangUpByRemote;//鏄惁瀵规柟杩滅▼鎸傛柇
 /// 鎾斁鍣�
 //@property (nonatomic, strong) LCOpenSDK_PlayWindow *playWindow;
 
@@ -75,7 +75,7 @@
     [self initData];
     [self initESVideo];
     [self StartMonitoring];
-//    [HDLLinphoneManager.instance enableMicro:false];
+    [HDLLinphoneManager.instance enableMicro:false];
     
 //    //鏆傛椂涓嶆敮鎸佸紑閿佸姛鑳�
 //    [self setUnlock:NO];
@@ -101,7 +101,8 @@
     int state = [[notif.userInfo objectForKey:@"state"] intValue];
     if ((state == LinphoneCallEnd || state == LinphoneCallError)){//鎸傛柇浜�
         NSLog(@"鎸傛柇鎴栧嚭閿欎簡");
-        [self showUIAlertViewWithBack:@"鐩戣缁撴潫"];
+        self.isHangUpByRemote=YES;
+        [self showUIAlertViewWithBack:endOfMonitoringStr];
         
     }
 }
@@ -422,7 +423,7 @@
  寮�濮嬬洃鎺�
  */
 -(void)StartMonitoring{
-    NSLog(@"寮�濮嬪懠鍙細@%@",self.userName);
+    NSLog(@"寮�濮嬪懠鍙細%@",self.userName);
     [HDLLinphoneManager.instance startCall:self.userName];
     
 }
@@ -450,8 +451,9 @@
     [alertController addAction:[UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
         [self backAction];
     }]];
-    
     [self presentViewController:alertController animated:YES completion:nil];
+//    [[HDLLinPhoneCommon rootController] presentViewController:alertController animated:YES completion:nil];
+
 }
 
 
@@ -469,14 +471,16 @@
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
-    
+   
     
 }
 -(void)viewWillDisappear:(BOOL)animated{
     [super viewWillDisappear:animated];
     
     //1.鏆傚仠SDK鐩稿叧鎾斁
-    [self stopPlay];
+    if (!self.isHangUpByRemote) {
+        [self stopPlay];
+    }
     //2.Delegate閲婃斁
 //    self.mLCCallDelegate = nil;
     //3.瀹氭椂鍣ㄩ噴鏀�

--
Gitblit v1.8.0