From 65150ff832383e25f31d20837ad97f77d2338979 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 02 四月 2021 09:05:38 +0800
Subject: [PATCH] 2021-04-02 1.更新丰林最新SDK

---
 On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnMonitorViewController.m |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnMonitorViewController.m b/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnMonitorViewController.m
index 1944aec..192c1f2 100644
--- a/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnMonitorViewController.m
+++ b/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnMonitorViewController.m
@@ -12,13 +12,13 @@
 #import <ESVideoPhoneSDk/ESVideoPhone.h>
 #import <ESVideoPhoneSDk/ESError.h>
 #import <Photos/Photos.h>
-#import "AudioSessionHelper.h"
+//#import "AudioSessionHelper.h"
 //#import "CBToast.h"
 #import "ESVideo.h"
 
 @interface ESOnMonitorViewController ()<ESVideoPhoneDelegate>
 
-@property (nonatomic,strong) AudioSessionHelper    *sessionHelper;
+//@property (nonatomic,strong) AudioSessionHelper    *sessionHelper;
 @property (nonatomic,strong) ESVideoPhone          *es;
 @property (nonatomic,assign) BOOL                  playing;
 @property (nonatomic,assign) BOOL                  isInterrupt;
@@ -139,7 +139,7 @@
 -(UILabel *)titleUILabel{
     if (_titleUILabel == Nil) {
         _titleUILabel = [[UILabel alloc] initWithFrame:CGRectMake(90, APP_STATUS_BAR_HEIGHT, self.view.frame.size.width - 180, 44)];
-        _titleUILabel.font = [UIFont fontWithName:APP_UIFont_BOLD size:17.0];
+        _titleUILabel.font = [UIFont fontWithName:APP_UIFont_BOLD size:18.0];
         _titleUILabel.textColor = TextColor;
         _titleUILabel.text = @"";
         _titleUILabel.textAlignment = NSTextAlignmentCenter;
@@ -236,7 +236,7 @@
         _screenshotTextBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, GetRealWidth(100), GetRealWidth(20))];
         [_screenshotTextBtn setTitle:@"鎴浘" forState:UIControlStateNormal];
         _screenshotTextBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
-        _screenshotTextBtn.titleLabel.font = [UIFont fontWithName:APP_UIFont size:15.0];
+        _screenshotTextBtn.titleLabel.font = [UIFont fontWithName:APP_UIFont size:14.0];
         [_screenshotTextBtn setTitleColor:TextColor forState:UIControlStateNormal];
         //        [_screenshotTextBtn setTitleColor:TextSelectColor forState:UIControlStateSelected];
         [_screenshotTextBtn addTarget:self action:@selector(screenshotAction) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchUpOutside];
@@ -279,7 +279,7 @@
     if (_unlockTextBtn == nil) {
         _unlockTextBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, GetRealWidth(100), GetRealWidth(20))];
         [_unlockTextBtn setTitle:@"寮�閿�" forState:UIControlStateNormal];
-        _unlockTextBtn.titleLabel.font = [UIFont fontWithName:APP_UIFont size:15.0];
+        _unlockTextBtn.titleLabel.font = [UIFont fontWithName:APP_UIFont size:14.0];
         _unlockTextBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
         //        _unlockTextBtn.titleLabel.textColor = TextColor;
         [_unlockTextBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled];
@@ -299,6 +299,10 @@
     _openDoorTimeout = 0;
     [self startOpenDoorCountdown];
     [self showUIAlertView:unlockSuccessfullyStr];
+    // 寮�閿佹垚鍔熷洖璋�
+    if(self.mESCallDelegate != NULL){
+        [self.mESCallDelegate onUnlockAction];
+    }
 }
 
 -(void)setUnlock:(BOOL)ISEnable{
@@ -395,9 +399,9 @@
 //            NSLog(@"VideoCaptureSession 鍒濆鍖栧け璐�");
 //        }
 //    }
-    //鍒濆鍖朅udioSession
-    _sessionHelper = [[AudioSessionHelper alloc]init];
-    [_sessionHelper setAudioSession];
+//    //鍒濆鍖朅udioSession
+//    _sessionHelper = [[AudioSessionHelper alloc]init];
+//    [_sessionHelper setAudioSession];
     //娣诲姞杩涘叆鍚庡彴锛屼腑鏂瓑閫氱煡
     [self addObservers];
     
@@ -598,7 +602,7 @@
     // If media services were reset, and the last start succeeded, restart the session.
     if (error.code == AVErrorMediaServicesWereReset) {
         [_es onStopCapture];
-        [_es startTalk];
+        [_es stopTalk];
     }
 }
 
@@ -729,10 +733,12 @@
     //    }
     
     if(!_isSpeaking){
-        result = [_sessionHelper speaker:YES];
+//        result = [_sessionHelper speaker:YES];
+        [_es resetAudioCaptureIsSpeak:YES];
         _isSpeaking = YES;
     }else{
-        result = [_sessionHelper speaker:NO];
+//        result = [_sessionHelper speaker:NO];
+        [_es resetAudioCaptureIsSpeak:NO];
         _isSpeaking = NO;
     }
     if (result) {

--
Gitblit v1.8.0