|
@@ -65,6 +65,8 @@
|
|
|
[self enablePanRightBack];
|
|
|
[self removeKVOObserverFun];
|
|
|
ksharedAppDelegate.supportScreenRotateType = NO;
|
|
|
+
|
|
|
+ [self removeNewIndicator];
|
|
|
}
|
|
|
|
|
|
- (void)setWebRtcMsgMod:(webRtcMsgModel *)webRtcMsgMod
|
|
@@ -87,19 +89,28 @@
|
|
|
make.top.mas_equalTo(0.f);
|
|
|
}];
|
|
|
|
|
|
- [self linkWebRtcFun];
|
|
|
+ //判断是否是全屏
|
|
|
+ BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
|
|
|
+ CGSize phoneSize = CGSizeMake(1080.0, 1920.0);
|
|
|
+ if(fullscreenType){
|
|
|
+ phoneSize = [RCCommandHelp commondToSetFullScreenPhoneSizeBySize];
|
|
|
+ }
|
|
|
+
|
|
|
+ [self linkWebRtcFunWithSize:phoneSize];
|
|
|
|
|
|
[self initBaseUIFun];
|
|
|
[self setTimerCountDown];
|
|
|
|
|
|
- CGFloat curRate = 1080.0/1920.0;
|
|
|
+ //CGFloat curRate = 1080.0/1920.0;
|
|
|
+ CGFloat curRate = phoneSize.width/phoneSize.height;
|
|
|
[self setPoMas_makeWithImageRate:curRate];
|
|
|
+
|
|
|
[self showNewIndicatorWithCanBack:YES canTouch:NO];
|
|
|
|
|
|
}
|
|
|
|
|
|
#pragma mark 链接webrtc
|
|
|
-- (void)linkWebRtcFun
|
|
|
+- (void)linkWebRtcFunWithSize:(CGSize)phoneSize
|
|
|
{
|
|
|
//链接用
|
|
|
NSString *signallingUrl = [[NSString alloc] initWithFormat:@"%@:%@",_webRtcMsgMod.data.signalling.domainName,_webRtcMsgMod.data.signalling.port];
|
|
@@ -122,8 +133,8 @@
|
|
|
sn:roomName
|
|
|
direct:0
|
|
|
fmt:1//1(h264) 5(h265)
|
|
|
- videoWidth:1080.0
|
|
|
- videoHeight:1920.0
|
|
|
+ videoWidth:(NSInteger)phoneSize.width
|
|
|
+ videoHeight:(NSInteger)phoneSize.height
|
|
|
fps:30
|
|
|
bitrate:3000
|
|
|
cardWidth:0
|
|
@@ -137,7 +148,14 @@
|
|
|
#pragma mark 重连
|
|
|
- (void)relinkWebRtcFun
|
|
|
{
|
|
|
- [self linkWebRtcFun];
|
|
|
+ //判断是否是全屏
|
|
|
+ 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
|
|
@@ -340,13 +358,13 @@
|
|
|
// NSString *commandStr = [RCCommandHelp commondToSetFullScreenPhoneSize];
|
|
|
// [self send_data:commandStr];
|
|
|
|
|
|
- NSInteger cardDensity = 380;//460;
|
|
|
+ NSInteger cardDensity = 480;//422;//380;//460;
|
|
|
|
|
|
|
|
|
CGSize size = [RCCommandHelp commondToSetFullScreenPhoneSizeBySize];
|
|
|
[self setCardSize:size.width cardHeight:size.height cardDensity:cardDensity];
|
|
|
|
|
|
- tempRate = (size.width *1.0)/(size.width *1.0);
|
|
|
+ tempRate = (size.width *1.0)/(size.height *1.0);
|
|
|
}
|
|
|
else{
|
|
|
// NSString *commondStr = [RCCommandHelp setPhoneSizecommandWithWidth:1080 high:1920 dpi:480];
|
|
@@ -419,6 +437,8 @@
|
|
|
#pragma mark 监听到云机的宽高以及屏幕方向
|
|
|
- (void)handlUIAfterGetCloudPhoneVideoWidth:(int)videoWidth videoHeight:(int)videoHeight rotation:(int)rotation
|
|
|
{
|
|
|
+ HLog(@"云机屏幕 宽:%d 高:%d 横竖屏:%d",videoWidth,videoHeight,rotation);
|
|
|
+
|
|
|
CGFloat curRate = (CGFloat)videoWidth/(CGFloat)videoHeight;
|
|
|
|
|
|
if(lastVideoWHRate == curRate){
|