|
|
@@ -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];
|
|
|
});
|