Преглед изворни кода

1.截图功能调试完成

huangxiaodong пре 8 месеци
родитељ
комит
ffb3f6fc92

+ 14 - 0
创维盒子/双子星云手机/CloudPlayer/View/playerSetView.m

@@ -14,6 +14,12 @@
 @property(nonatomic, strong) UIButton *TVButton;
 @property(nonatomic, strong) UILabel *TVShowLabel;
 @property(nonatomic, strong) UIButton *exitPhoneButton;
+
+@property(nonatomic, strong) UILabel *delayedLabel;//延时
+@property(nonatomic, strong) UILabel *PacketLossLabel;//丢包
+@property(nonatomic, strong) UILabel *speedLabel;//速度(带宽)
+@property(nonatomic, strong) UILabel *fpsLabel;
+
 @end
 
 @implementation playerSetView
@@ -128,6 +134,14 @@
 //        [weakSelf setAllSwitchFun];
 //    });
     
+    /***************************顶部按钮显示*******************************************************/
+    
+//    UILabel * delayedTipLabel = [UILabel a]
+//    @property(nonatomic, strong) UILabel *delayedLabel;//延时
+//    @property(nonatomic, strong) UILabel *PacketLossLabel;//丢包
+//    @property(nonatomic, strong) UILabel *speedLabel;//速度(带宽)
+//    @property(nonatomic, strong) UILabel *fpsLabel;
+    
     /**********************************************************************************/
     UIView *bg2View = [UIView new];
     bg2View.layer.cornerRadius = 12;

+ 2 - 0
创维盒子/双子星云手机/webRtc/webRtcManager/webRtcManager.h

@@ -65,6 +65,8 @@ NS_ASSUME_NONNULL_BEGIN
 #pragma mark 恢复出厂设置云机
 - (void)needToResetFun;
 
+#pragma mark 云机截图保存到云机图库
+- (void)screenshotInCloudPhoneFun;
 #pragma mark 获取TV投屏状态
 - (void)getTvStatusFun;
 #pragma mark 关闭TV投屏状态

+ 10 - 0
创维盒子/双子星云手机/webRtc/webRtcManager/webRtcManager.m

@@ -487,6 +487,13 @@
     _isResetingType = YES;
 }
 
+#pragma mark 云机截图保存到云机图库
+- (void)screenshotInCloudPhoneFun{
+    NSString*taskUid = [iTools getTaskUidStr];
+    NSString *commondStr  = [RCCommandHelp commandCloudPhoneScreenshotWithTaskUid:taskUid];
+    [self send_data:commondStr];
+}
+
 #pragma mark 获取TV投屏状态
 - (void)getTvStatusFun
 {
@@ -826,6 +833,9 @@
     else if ([messageType isEqualToString:@"reset"]){/**/
         [self deleteCommandSendTaskFunWith:@"reset"];
     }
+    else if ([messageType isEqualToString:@"shortcatRep"]){/*截图*/
+        [[iToast makeText:NSLocalizedString(@"shortcatRep_tip",nil)] show];
+    }
     
 }
 

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

@@ -360,8 +360,7 @@
         switch (tag) {
             case 200:
                 {//截图
-                   //self->needScreenShotType = YES;
-                    [[iToast makeText:@"代理接口未提供"] show];
+                   [weakSelf didClickshortCatFun];
                 }
                 break;
 #pragma mark 重启盒子
@@ -402,6 +401,12 @@
     };
 }
 
+#pragma mark 点击了截图
+- (void)didClickshortCatFun
+{
+    [[webRtcManager shareManager] screenshotInCloudPhoneFun];
+}
+
 #pragma mark 点击了重启云机
 - (void)didClickRestartFun
 {

+ 1 - 1
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -624,4 +624,4 @@
 "enable_photo_permission_noData_tip"   = "暂未开启相册权限,快去开启吧~";
 "common_wwan_open_tip"   = "去开启";
 "no_wifi_warn_tip"   = "当前为非WIFI环境,如果想通过流量传输文件,请到设置页面开启流量传输。";
-
+"shortcatRep_tip"   = "截图已保存到云机目录control下";