From b469805b2d0c9b23ca020cf9356ff137205f856c Mon Sep 17 00:00:00 2001
From: 464027401@qq.com <464027401@qq.com>
Date: 星期一, 27 九月 2021 10:22:10 +0800
Subject: [PATCH] 修复来点页面重复呼叫时alert位置不对问题

---
 HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 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..2e13e73 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;
 
@@ -101,6 +101,7 @@
     int state = [[notif.userInfo objectForKey:@"state"] intValue];
     if ((state == LinphoneCallEnd || state == LinphoneCallError)){//鎸傛柇浜�
         NSLog(@"鎸傛柇鎴栧嚭閿欎簡");
+        self.isHangUpByRemote=YES;
         [self showUIAlertViewWithBack:@"鐩戣缁撴潫"];
         
     }
@@ -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