|
@@ -446,10 +446,7 @@ ComontAlretViewControllerDelegate>
|
|
|
if (weakSelf.commandChannelManager.rc_socketStatus == RCSocketCloudPhoneStatusConnected){
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
|
|
- NSString *getPhoneSizeStr = [RCCommandHelp getPhoneSizecommand];
|
|
|
- [weakSelf send_data:getPhoneSizeStr];
|
|
|
-
|
|
|
- [weakSelf fristConnectNeedGiveAMsgFun];
|
|
|
+ [weakSelf handlAllMsgAfterDidLinkFun];
|
|
|
|
|
|
//设置分辨率
|
|
|
// NSString *commondStr = @"{\"data\":{\"height\":1920,\"width\":1080,\"dpi\":480},\"type\":\"setPhoneSize\"}";
|
|
@@ -1616,13 +1613,29 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
|
|
|
|
|
|
}
|
|
|
|
|
|
-#pragma mark 盒子第一次连接成功 给ws发送信息 单点登录 把其他账号挤下去
|
|
|
+#pragma mark 盒子链接成功后需要处理的各种各样事情
|
|
|
+- (void)handlAllMsgAfterDidLinkFun
|
|
|
+{
|
|
|
+ //获取云机尺寸 兼容 720*1080 &1080*1920 不同分辨率的展示和触控
|
|
|
+ NSString *getPhoneSizeStr = [RCCommandHelp getPhoneSizecommand];
|
|
|
+ [self send_data:getPhoneSizeStr];
|
|
|
+
|
|
|
+ //判断是否为需要改机
|
|
|
+ BOOL isNeedRandomChangeParams = [HWDataManager getBoolWithKey:Const_need_random_Change_Params];
|
|
|
+ if(isNeedRandomChangeParams)
|
|
|
+ {
|
|
|
+ NSString *commondStr = @"{\"type\":\"randomChangeParams\"}";
|
|
|
+ [self send_data:commondStr];
|
|
|
+ }
|
|
|
+
|
|
|
+ [self fristConnectNeedGiveAMsgFun];
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
+#pragma mark 盒子第一次连接成功 给ws发送信息 单点登录 把其他账号挤下去
|
|
|
- (void)fristConnectNeedGiveAMsgFun{
|
|
|
|
|
|
- //test code
|
|
|
- //return;
|
|
|
-
|
|
|
if([self isPlayerViewIsTopVCFun]){
|
|
|
//等下再发
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|