Przeglądaj źródła

1.竖屏全屏与否的情况

huangxiaodong 1 rok temu
rodzic
commit
844064f388

+ 4 - 1
创维盒子/双子星云手机/NAS/NASViewController.m

@@ -660,7 +660,10 @@
     didGetSysInfoType = YES;
     
     if(ksharedAppDelegate.isNeedShowImageNewType){//强制盒子更新弹窗
-        [self showImageViewRenewTipViewFun];
+        mainBlock(^{
+            [self showImageViewRenewTipViewFun];
+        });
+        
     }
 }
 

+ 3 - 0
创维盒子/双子星云手机/webRtc/WebRTC.framework/Headers/AMediaStream.h

@@ -88,6 +88,9 @@ cardDensity:(NSInteger)cardDensity
          cardHeight:(NSInteger)cardHeight
         cardDensity:(NSInteger)cardDensity;
 
+- (void)setVideoSize:(NSInteger)videoWidth
+        videoHeight:(NSInteger)videoHeight;
+
 @property (nonatomic, weak) id <MediaStreamClientEventsDelegate> eventDelegate;
 @property(nonatomic,readonly) NSString *name;
 @property(nonatomic, assign) BOOL shouldGetStats;

BIN
创维盒子/双子星云手机/webRtc/WebRTC.framework/WebRTC


+ 2 - 2
创维盒子/双子星云手机/webRtc/WebRTC.framework/_CodeSignature/CodeResources

@@ -6,7 +6,7 @@
 	<dict>
 		<key>Headers/AMediaStream.h</key>
 		<data>
-		8VcGaqj4cgyB84UGn+F5zw65WzM=
+		ELvJjW3CbzE1KsCXpEhJdbOJbuE=
 		</data>
 		<key>Headers/ANatsSignalChannel.h</key>
 		<data>
@@ -387,7 +387,7 @@
 		<dict>
 			<key>hash2</key>
 			<data>
-			7uHQGw/hf6e4mwN15wK8EC15HOuvbAHPIs3E+ogntHQ=
+			mjGSjLxNd2A0MXSNlyvMYj4Zz19MqYlJxJ1tJd8nz2c=
 			</data>
 		</dict>
 		<key>Headers/ANatsSignalChannel.h</key>

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

@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface webRtcPlayerViewController (AdjustPlayerViewFrame)
 
-//设置竖屏UI 
+//设置竖屏UI
 - (void)setPoMas_makeWithImageRate:(CGFloat)w_h_rate;
 //设置横屏屏UI 
 - (void)setLanMas_makeWithImageRate:(CGFloat)w_h_rate;

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

@@ -53,7 +53,7 @@
         
     }];
     
-    [self.mediaStream setVideoContentMode:UIViewContentModeScaleAspectFit];
+    //[self.mediaStream setVideoContentMode:UIViewContentModeScaleAspectFit];
     
     [self.bottomContrView mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.height.mas_equalTo(40.f);

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

@@ -19,6 +19,7 @@
 }
 @property (nonatomic, copy)   NSTimer      *playerSecondTimer; // 定时器-控制按钮
 @property (nonatomic, assign) RTCIceConnectionState linkState;
+@property (nonatomic, assign) BOOL didHandleRotation;//第一次处理旋转
 @end
 
 @implementation webRtcPlayerViewController
@@ -105,7 +106,6 @@
     
     //CGFloat curRate = 1080.0/1920.0;
     CGFloat curRate = phoneSize.width/phoneSize.height;
-    [self setPoMas_makeWithImageRate:curRate];
     
     [self showNewIndicatorWithCanBack:YES canTouch:NO];
     
@@ -160,16 +160,16 @@
     HLog(@"发起重连 relinkWebRtcFun")
     mainBlock(^{
         [self showNewIndicatorWithCanBack:YES canTouch:NO];
+        
+        //判断是否是全屏
+        BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
+        CGSize  phoneSize = CGSizeMake(1080.0, 1920.0);
+        if(fullscreenType){
+            phoneSize = [RCCommandHelp commondToSetFullScreenPhoneSizeBySize];
+        }
+        
+        [self linkWebRtcFunWithSize:phoneSize];
     });
-    
-    //判断是否是全屏
-    BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
-    CGSize  phoneSize = CGSizeMake(1080.0, 1920.0);
-    if(fullscreenType){
-        phoneSize = [RCCommandHelp commondToSetFullScreenPhoneSizeBySize];
-    }
-    
-    [self linkWebRtcFunWithSize:phoneSize];
 }
 
 #pragma mark 初始化其他UI
@@ -525,7 +525,6 @@
         [self setCardSize:size.width cardHeight:size.height cardDensity:cardDensity];
         
         tempRate = (size.width *1.0)/(size.height *1.0);
-        //_mediaStream.frame =CGRectMake(0, 0, SCREEN_W, SCREEN_H);
     }
     else{
 //        NSString *commondStr  = [RCCommandHelp setPhoneSizecommandWithWidth:1080 high:1920 dpi:480];
@@ -551,12 +550,7 @@
         cardDensity:(NSInteger)cardDensit
 {
     [_mediaStream setCardSize:cardWidth cardHeight:cardHeight cardDensity:cardDensit];
-    
-//    [_mediaStream pauseStream];
-//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-//        [self->_mediaStream resumeStream];
-//    });
-    
+    [_mediaStream setVideoSize:cardWidth videoHeight:cardHeight];
 }
 
 #pragma mark -- /*通知添加与移除*/
@@ -628,6 +622,7 @@
         [self setLanMas_makeWithImageRate:curRate];
     }
     
+    _didHandleRotation = YES;
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [self extensionAdjustBtnFrameCheckAdjustTime];
     });