Explorar o código

1.尝试偶现修复横屏推流回到前台触控无效问题

huangxiaodong hai 1 ano
pai
achega
af2ad6a21e

+ 2 - 2
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -6158,7 +6158,7 @@
 				CODE_SIGN_ENTITLEMENTS = "隐私保护.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -6237,7 +6237,7 @@
 				CODE_SIGN_ENTITLEMENTS = "隐私保护.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

+ 1 - 0
创维盒子/双子星云手机/AppDelegate/AppDelegate.h

@@ -39,6 +39,7 @@
 @property(nonatomic,assign) BOOL  isFirstInputPwdDone;
 //与 isFirstInputPwdDone 有重复的地方 后续优化
 @property (nonatomic, assign)  BOOL isDidShowPwdType;// 是否显示密码界面了
+@property (nonatomic, assign)  BOOL isDelayedShowPwdType;// 需求延时显示密码界面了
 
 @property(nonatomic,strong) DeviceThirdIdModel *DeviceThirdIdMod;//设备的第三方信息  连接时需要
 @property(nonatomic,strong) webRtcMsgModel *DeviceWebRtcMsgMod;//设备的第三方信息  连接时需要

+ 4 - 2
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -644,9 +644,10 @@
                 }
             }
         }
+        
+        [self showCalculatorVC];
     }
     
-    [self showCalculatorVC];
     
 //    if(isNeeddelayedType){
 //        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@@ -782,6 +783,7 @@
     HLog(@"showCalculatorVC 处理密码框弹出")
     
     if(SCREEN_W > SCREEN_H){
+        ksharedAppDelegate.isDelayedShowPwdType = YES;
         HLog(@"showCalculatorVC 屏幕还是横屏状态")
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
             [self showCalculatorVC];
@@ -909,7 +911,7 @@
         [self.window addSubview:_calculatorVC.view];
         ksharedAppDelegate.isDidShowPwdType = YES;
     }
-    
+    ksharedAppDelegate.isDelayedShowPwdType = NO;
     [[NSNotificationCenter defaultCenter] postNotificationName:ShowPwdVCNotification object:nil];
 }
 

+ 10 - 4
创维盒子/双子星云手机/webRtc/webRtcPlayerViewController+AppDelegate.m

@@ -23,8 +23,12 @@
 
 - (void)applicationDidBecomeActive:(NSNotification *)notification
 {
-    if(!ksharedAppDelegate.isDidShowPwdType){
-        [self resumeStream];
+    
+    if(!ksharedAppDelegate.isDidShowPwdType
+       && !ksharedAppDelegate.isDelayedShowPwdType //横屏你让后台 设置竖屏 还是无效 延时显示
+       ){
+        //[self resumeStream];
+        [self relinkWebRtcFunByBecomeActive];
     }
 
 }
@@ -68,7 +72,9 @@
 #pragma mark 输入密码完成
 - (void)didInpuPwdOkFun
 {
-    [self resumeStream];
+    //[self resumeStream];
+    
+    [self relinkWebRtcFunByBecomeActive];
     
     if(self->isLanAndPrivacyEnterBackground){
         self->isLanAndPrivacyEnterBackground = NO;
@@ -80,8 +86,8 @@
 - (BOOL)player_rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
 {
     ksharedAppDelegate.supportScreenRotateType = YES;
-    BOOL isSuc =  [self hx_rotateToInterfaceOrientation:interfaceOrientation];
     HLog(@"旋转屏幕")
+    BOOL isSuc =  [self hx_rotateToInterfaceOrientation:interfaceOrientation];
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         ksharedAppDelegate.supportScreenRotateType = NO;
         

+ 3 - 0
创维盒子/双子星云手机/webRtc/webRtcPlayerViewController.h

@@ -34,6 +34,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic,strong) webRtcMsgModel * webRtcMsgMod;
 @property(nonatomic,assign) BOOL isCodeSuspendAudioType;//手动暂停播放音乐
+
+#pragma mark 重连
+- (void)relinkWebRtcFunByBecomeActive;
 @end
 
 NS_ASSUME_NONNULL_END

+ 17 - 0
创维盒子/双子星云手机/webRtc/webRtcPlayerViewController.m

@@ -247,6 +247,23 @@
     });
 }
 
+#pragma mark 重连
+- (void)relinkWebRtcFunByBecomeActive{
+    KWeakSelf
+    mainBlock(^{
+        [weakSelf showNewIndicatorWithCanBack:YES canTouch:NO];
+        
+        //判断是否是全屏
+        BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
+        CGSize  phoneSize = CGSizeMake(720.0, 1280.0);
+        if(fullscreenType){
+            phoneSize = [RCCommandHelp commondToSetFullScreenPhoneSizeBySize];
+        }
+        
+        [weakSelf linkWebRtcFunWithSize:phoneSize];
+    });
+}
+
 #pragma mark 初始化其他UI
 - (void)initBaseUIFun
 {