浏览代码

1. 1.4.2 (内侧 正式环境) 修复开启手机自动旋转的bug

huangxiaodong 1 年之前
父节点
当前提交
5fbdeb9e40

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

@@ -6111,7 +6111,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 11;
+				CURRENT_PROJECT_VERSION = 20;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -6193,7 +6193,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 11;
+				CURRENT_PROJECT_VERSION = 20;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (

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

@@ -43,6 +43,7 @@
 @property(nonatomic,strong) DeviceThirdIdModel *DeviceThirdIdMod;//设备的第三方信息  连接时需要
 @property(nonatomic,strong) webRtcMsgModel *DeviceWebRtcMsgMod;//设备的第三方信息  连接时需要
 
+@property (nonatomic, assign)BOOL isPlayerScreenLandscapeType;//拉流页面横屏状态
 @property (nonatomic, assign)BOOL supportScreenRotateType;
 +(AppDelegate*)sharedAppDelegate;
 

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

@@ -158,6 +158,10 @@
         return UIInterfaceOrientationMaskAllButUpsideDown;
     }
     
+    if(self.isPlayerScreenLandscapeType){
+        return UIInterfaceOrientationMaskLandscapeRight;
+    }
+    
     return UIInterfaceOrientationMaskPortrait;
 }
 

+ 6 - 5
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -107,23 +107,24 @@ isBangsScreen; \
 //#define CloudService   @"http://14.18.190.141:1801"
 //#define shareService   @"http://testprivacy.phone.armclouding.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
-#define CloudService   @"http://testprivacy.phone.androidscloud.com:1801"
-#define shareService   @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
+//#define CloudService   @"http://testprivacy.phone.androidscloud.com:1801"
+//#define shareService   @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 //预生产环境
 //#define CloudService   @"http://testprivacy.phone.androidscloud.com:10900"
 //#define shareService   @"http://testprivacy.phone.androidscloud.com:10900/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 //生产环境
-//#define CloudService   @"http://hiboxde.armclouding.com:7780"
-//#define shareService   @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
+#define CloudService   @"http://hiboxde.armclouding.com:7780"
+#define shareService   @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 #define AESCODEKEEYY @"fvO8gAfNSr1tbdQe"
 
+//弃用
 //#define EachPieceSzie (512*1024) //每片上传文件大小切割
 #define EachPieceSzie (2*1024*1024) //每片上传文件大小切割
 #define cutVideoPieceSzie (3 * EachPieceSzie) //视频每次切片多少(切完上传再切一次)
-
+//正在使用
 #define MaxNasUploadPieceSzie (50*1024*1024) //frp上传 限制每片最大xx M
 #define keyToForgetPwd @"%==%"
 

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

@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 #pragma mark 输入密码完成
 - (void)didInpuPwdOkFun;
+
+#pragma mark 旋转屏幕
+- (BOOL)player_rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -72,9 +72,27 @@
     
     if(self->isLanAndPrivacyEnterBackground){
         self->isLanAndPrivacyEnterBackground = NO;
-        ksharedAppDelegate.supportScreenRotateType = YES;
-        [self hx_rotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
-        HLog(@"旋转屏幕为横屏")
+        [self player_rotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
     }
 }
+
+#pragma mark 旋转屏幕
+- (BOOL)player_rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+    ksharedAppDelegate.supportScreenRotateType = YES;
+    BOOL isSuc =  [self hx_rotateToInterfaceOrientation:interfaceOrientation];
+    HLog(@"旋转屏幕")
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        ksharedAppDelegate.supportScreenRotateType = NO;
+        
+        if(interfaceOrientation == UIInterfaceOrientationLandscapeRight){
+            ksharedAppDelegate.isPlayerScreenLandscapeType =  YES;
+        }
+        else{
+            ksharedAppDelegate.isPlayerScreenLandscapeType =  NO;
+        }
+    });
+    
+    return isSuc;
+}
 @end

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

@@ -68,7 +68,7 @@
     [super viewDidAppear:animated];
     [self noEnablePanRightBack];
     [self addKVOObserverFun];
-    ksharedAppDelegate.supportScreenRotateType = YES;
+    //ksharedAppDelegate.supportScreenRotateType = YES;
 }
 
 - (void)viewDidDisappear:(BOOL)animated{
@@ -77,7 +77,7 @@
     [self HandleSomethingByExitVC];
 }
 
-#pragma mark
+#pragma mark 退出事件处理
 -(void)HandleSomethingByExitVC
 {
     [UIApplication sharedApplication].idleTimerDisabled = NO;
@@ -91,7 +91,8 @@
     
     [self enablePanRightBack];
     [self removeKVOObserverFun];
-    //ksharedAppDelegate.supportScreenRotateType = NO;
+    ksharedAppDelegate.supportScreenRotateType =  NO;
+    ksharedAppDelegate.isPlayerScreenLandscapeType =  NO;
     
     [self removeNewIndicator];
     if(_playerSecondTimer){
@@ -486,7 +487,7 @@
     }
     
     if(isLan){//保证竖屏
-        [self hx_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
+        [self player_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
     }
     
     [self.navigationController popViewControllerAnimated:YES];
@@ -622,7 +623,7 @@
     [self pauseStream];
     
     if(isLan){//保证竖屏
-        [self hx_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
+        [self player_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
     }
     
     //退出推流页
@@ -833,13 +834,13 @@
     if(rotation == 0){//竖屏
         //切换到竖屏
         isLan = NO;
-        [self hx_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
+        [self player_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
         [self setPoMas_makeWithImageRate:curRate];
     }
     else if(rotation == 1){//横屏
         //切换到横屏屏
         isLan = YES;
-        [self hx_rotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
+        [self player_rotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
         [self setLanMas_makeWithImageRate:curRate];
     }