Quellcode durchsuchen

Merge remote-tracking branch 'origin/Private-X_1.4.4_dep'

huangxiaodong vor 6 Monaten
Ursprung
Commit
ae5b6482c1

+ 2 - 2
创维盒子/code/AppDelegate/SceneDelegate.m

@@ -2042,8 +2042,8 @@
         NSInteger selectedIndex = ksharedAppDelegate.mainTabBar.selectedIndex;
         
         if(selectedIndex < curVCArr.count){
-            UIViewController * curVC = curVCArr[selectedIndex];
-            [curVC.navigationController pushViewController:curVC animated:YES];
+            UINavigationController * curNav = curVCArr[selectedIndex];
+            [curNav pushViewController:vc animated:YES];
             
             KWeakSelf
             vc.didClickBackFun = ^{

+ 5 - 1
创维盒子/code/Class/Guide/QRCodeScanViewController.m

@@ -204,7 +204,11 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
 //    [self.photoBtn addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
 //    [self.view addSubview:self.photoBtn];
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
+
     
     //添加返回键
     CGFloat btn_w_h  = 40;

+ 5 - 1
创维盒子/code/Class/Set/ChangeDevice/QRCodeScanForChangeDeviceViewController.m

@@ -220,7 +220,11 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
 //    [self.photoBtn addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
 //    [self.view addSubview:self.photoBtn];
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
+
     
     //添加返回键
     CGFloat btn_w_h  = 40;

+ 17 - 1
创维盒子/code/Class/Set/CustomerWebViewController.m

@@ -70,8 +70,24 @@
 
     self.titleLabel.text = titleStr;
     
-    // WKWebView
+    // 初始化配置对象
     WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
+    
+    if (@available(iOS 18.0, *)) {
+        // 系统版本 ≥ 18.0
+        
+        // 默认是NO,这个值决定了用内嵌HTML5播放视频还是用本地的全屏控制
+        config.allowsInlineMediaPlayback = YES;
+        // 自动播放, 不需要用户采取任何手势开启播放
+        // WKAudiovisualMediaTypeNone 音视频的播放不需要用户手势触发, 即为自动播放
+        config.mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone;
+        config.allowsAirPlayForMediaPlayback = YES;
+        config.allowsPictureInPictureMediaPlayback = YES;
+    }
+        
+
+    // WKWebView
+    //WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
     self.webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) configuration:config];
     // 解决闪白问题
     self.view.backgroundColor = [UIColor whiteColor];

+ 7 - 1
创维盒子/code/Class/Set/uploadFile/PhotoPreviewViewController.m

@@ -109,7 +109,12 @@
     
         if(!model.imageData)
         {
-            [[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+            PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
+            options.version = PHImageRequestOptionsVersionCurrent;
+            options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+            
+            [[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                     // 直接得到最终的 NSData 数据
                     if (imageData) {
                         //model.imageData = imageData;
@@ -124,6 +129,7 @@
                 
                 PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
                 options.version = PHVideoRequestOptionsVersionOriginal;
+                options.networkAccessAllowed = YES; // Allow downloading from iCloud
                 [[PHImageManager defaultManager] requestAVAssetForVideo:model.asset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
                     if ([asset isKindOfClass:[AVURLAsset class]]) {
                         

+ 8 - 1
创维盒子/code/Class/Set/uploadFile/uploadFileManager/backupsFileManager.m

@@ -292,7 +292,13 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
     KWeakSelf
     if(curAsset.mediaType == PHAssetMediaTypeImage){
         _curPhotosBackupsTaskMod.curUploadFileType = uploadFileTypeImage;
-        [[PHImageManager defaultManager] requestImageDataForAsset:curAsset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+        
+        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+        options.networkAccessAllowed = YES; // Allow downloading from iCloud
+        options.version = PHImageRequestOptionsVersionCurrent;
+        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+        
+        [[PHImageManager defaultManager] requestImageDataForAsset:curAsset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                 // 直接得到最终的 NSData 数据
                 if (imageData) {
                     [weakSelf  afterGetImageDataFun:imageData];
@@ -316,6 +322,7 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
         //真正的视频数据
         PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
         options.version = PHVideoRequestOptionsVersionOriginal;
+        options.networkAccessAllowed = YES; // Allow downloading from iCloud
         [[PHImageManager defaultManager] requestAVAssetForVideo:curAsset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
             if ([asset isKindOfClass:[AVURLAsset class]]) {
                 

+ 21 - 6
创维盒子/code/Class/Set/uploadFile/uploadFileManager/uploadFileManager.m

@@ -178,8 +178,13 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
             NSString *imgName1 = [curModel.filename stringByReplacingOccurrencesOfString:@"." withString:@"_"];
             curModel.videoFirstImageName = [[NSString alloc] initWithFormat:@"%@.png",imgName1];
            
+            PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
+            options.version = PHImageRequestOptionsVersionCurrent;
+            options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+            
             //第一帧图片
-            [[PHImageManager defaultManager] requestImageDataForAsset:curModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+            [[PHImageManager defaultManager] requestImageDataForAsset:curModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                     // 直接得到最终的 NSData 数据
                     if (imageData) {
                         curModel.imageData = imageData;
@@ -354,7 +359,12 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
     if(_curUploadFileDataModel.curUploadFileType == uploadFileTypeImage)
     {
         if(!_curUploadFileDataModel.imageData || _curUploadFileDataModel.imageData.length == 0){
-            [[PHImageManager defaultManager] requestImageDataForAsset:_curUploadFileDataModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+            PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
+            options.version = PHImageRequestOptionsVersionCurrent;
+            options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+            
+            [[PHImageManager defaultManager] requestImageDataForAsset:_curUploadFileDataModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                     // 直接得到最终的 NSData 数据
                     if (imageData) {
                         self->_curUploadFileDataModel.imageData = imageData;
@@ -367,9 +377,13 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
         }
     }
     else if(_curUploadFileDataModel.curUploadFileType == uploadFileTypeVideo){
+        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+        options.networkAccessAllowed = YES; // Allow downloading from iCloud
+        options.version = PHImageRequestOptionsVersionCurrent;
+        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
         
         //第一帧图片
-        [[PHImageManager defaultManager] requestImageDataForAsset:_curUploadFileDataModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+        [[PHImageManager defaultManager] requestImageDataForAsset:_curUploadFileDataModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                 // 直接得到最终的 NSData 数据
                 if (imageData) {
                     self->_curUploadFileDataModel.imageData = imageData;
@@ -378,9 +392,10 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
         }];
 
         //真正的视频数据
-        PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
-        options.version = PHVideoRequestOptionsVersionOriginal;
-        [[PHImageManager defaultManager] requestAVAssetForVideo:_curUploadFileDataModel.asset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
+        PHVideoRequestOptions *options2 = [[PHVideoRequestOptions alloc] init];
+        options2.version = PHVideoRequestOptionsVersionOriginal;
+        options2.networkAccessAllowed = YES; // Allow downloading from iCloud
+        [[PHImageManager defaultManager] requestAVAssetForVideo:_curUploadFileDataModel.asset options:options2 resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
             if ([asset isKindOfClass:[AVURLAsset class]]) {
                 
                 AVURLAsset* urlAsset = (AVURLAsset*)asset;

+ 12 - 2
创维盒子/code/Class/Set/uploadFile/uploadFileView/uploadFileRecordCell.m

@@ -248,7 +248,12 @@
                     self->_fileImageView.image = [UIImage imageNamed:@"uploadFile_image"];
                 }
                 else{
-                    [[PHImageManager defaultManager] requestImageDataForAsset:curUploadFileDataModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+                    PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+                    options.networkAccessAllowed = YES; // Allow downloading from iCloud
+                    options.version = PHImageRequestOptionsVersionCurrent;
+                    options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+                    
+                    [[PHImageManager defaultManager] requestImageDataForAsset:curUploadFileDataModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                             // 直接得到最终的 NSData 数据
                             if (imageData) {
                                 curUploadFileDataModel.imageData = imageData;
@@ -280,7 +285,12 @@
                     curUploadFileDataModel.asset = asset;
                 }
                 
-                [[PHImageManager defaultManager] requestImageDataForAsset:curUploadFileDataModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+                PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+                options.networkAccessAllowed = YES; // Allow downloading from iCloud
+                options.version = PHImageRequestOptionsVersionCurrent;
+                options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+                
+                [[PHImageManager defaultManager] requestImageDataForAsset:curUploadFileDataModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                         // 直接得到最终的 NSData 数据
                         if (imageData) {
                             curUploadFileDataModel.imageData = imageData;

+ 7 - 1
创维盒子/code/Class/Set/uploadFile/uploadImageOrVideoViewController.m

@@ -566,7 +566,12 @@
     
     if(!model.totalBytes)
     {
-        [[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+        options.networkAccessAllowed = YES; // Allow downloading from iCloud
+        options.version = PHImageRequestOptionsVersionCurrent;
+        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+        
+        [[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                 // 直接得到最终的 NSData 数据
                 if (imageData) {
                     //model.imageData = imageData;
@@ -588,6 +593,7 @@
             
             PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
             options.version = PHVideoRequestOptionsVersionOriginal;
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
             [[PHImageManager defaultManager] requestAVAssetForVideo:model.asset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
                 if ([asset isKindOfClass:[AVURLAsset class]]) {
                     

+ 87 - 85
创维盒子/code/NAS/NASViewController.m

@@ -222,7 +222,7 @@
         make.bottom.mas_equalTo(-TABBARHEIGHT);
     }];
     
-    self.tableView.userInteractionEnabled = NO;
+    //self.tableView.userInteractionEnabled = NO;
     
     _tableHeadView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, (42+ 14) + 165+ 15 +120 +54 + 15)];
     //_tableHeadView.backgroundColor = [UIColor hwColor:@"#F6F8FA"];
@@ -1076,100 +1076,102 @@
 {
     //[self beginShowAlertFun];
     //后台回来点击首页无效问题
-    self.tableView.userInteractionEnabled = YES;
-    [self checkBoxHeartbeatFun];
-}
 
-#pragma mark 检测盒子的心跳情况
-- (void)checkBoxHeartbeatFun
-{
-    //2、点击系统升级弹框确定按钮后30分钟内不弹;
-    NSNumber *preSecondNum =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type1_BoxHeartbeat")];
-    if(preSecondNum){
-        long seconds =  [iTools getNowTimeStamp];
-        if(seconds - preSecondNum.longValue <= 60*30){
-            return;
-        }
-    }
-    
-    //3、重启、恢复出厂设备、首次设置密码 3个情况下8分钟之内不弹
-    NSNumber *preSecondNum2 =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type2_BoxHeartbeat")];
-    if(preSecondNum2){
-        long seconds =  [iTools getNowTimeStamp];
-        if(seconds - preSecondNum2.longValue <= 60*8){
-            return;
-        }
-    }
-    
-    if(ksharedAppDelegate.didShowBoxHeartbeatAlertType
-       ||[webRtcManager shareManager].isResetingType
-       ||[webRtcManager shareManager].isRebootIngType
-       || [ksharedAppDelegate didShowImageRenewViewFun]){
-        return;
-    }
-    
-    //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
-    if(ksharedAppDelegate.isDidShowPwdType){
-        KWeakSelf
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [weakSelf checkBoxHeartbeatFun];
-        });
-        
-        return;
-    }
-    
-    //test code
-//    [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
-//                
-//    }];
-    
-    if(ksharedAppDelegate.isWebSockLinkOKAginType && ksharedAppDelegate.cloudPhoneExtraFileListMod){
-        return;
-    }
-    
-    NSMutableDictionary *paraDict = [NSMutableDictionary new];
-   
-    KWeakSelf
-    [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryHeartbeat Parameters:paraDict success:^(id  _Nonnull responseObject){
-        queryHeartbeatModel *heartbeatMod = [[queryHeartbeatModel alloc] initWithDictionary:responseObject error:nil];
-        if(heartbeatMod && heartbeatMod.data){
-            [weakSelf checkBoxHeartbeatToShowPopViewFunBy:heartbeatMod];
-        }
-        
-    } failure:^(NSError * _Nonnull error) {
-    }];
+    //self.tableView.userInteractionEnabled = YES;
+//    [self checkBoxHeartbeatFun];
 
 }
 
-#pragma mark 根据盒子的心跳情况 显示异常谈了
-- (void)checkBoxHeartbeatToShowPopViewFunBy:(queryHeartbeatModel*)heartbeatMod
-{
-    if(!heartbeatMod || !heartbeatMod.data){
-        return;
-    }
-    
-    if (//!heartbeatMod.data.frpStatus&&
-        !heartbeatMod.data.hostAgentStatus
-        &&!heartbeatMod.data.containerAgentStatus) {//全部异常
-        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:1 didClickBut:^(NSInteger tag) {
-                    
-        }];
-    }
-    else if (heartbeatMod.data.hostAgentStatus
-            //&& !heartbeatMod.data.frpStatus
-            && !heartbeatMod.data.containerAgentStatus) {//frp异常
-        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
-                    
-        }];
-    }
-}
+//#pragma mark 检测盒子的心跳情况
+//- (void)checkBoxHeartbeatFun
+//{
+//    //2、点击系统升级弹框确定按钮后30分钟内不弹;
+//    NSNumber *preSecondNum =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type1_BoxHeartbeat")];
+//    if(preSecondNum){
+//        long seconds =  [iTools getNowTimeStamp];
+//        if(seconds - preSecondNum.longValue <= 60*30){
+//            return;
+//        }
+//    }
+//    
+//    //3、重启、恢复出厂设备、首次设置密码 3个情况下8分钟之内不弹
+//    NSNumber *preSecondNum2 =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type2_BoxHeartbeat")];
+//    if(preSecondNum2){
+//        long seconds =  [iTools getNowTimeStamp];
+//        if(seconds - preSecondNum2.longValue <= 60*8){
+//            return;
+//        }
+//    }
+//    
+//    if(ksharedAppDelegate.didShowBoxHeartbeatAlertType
+//       ||[webRtcManager shareManager].isResetingType
+//       ||[webRtcManager shareManager].isRebootIngType
+//       || [ksharedAppDelegate didShowImageRenewViewFun]){
+//        return;
+//    }
+//    
+//    //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
+//    if(ksharedAppDelegate.isDidShowPwdType){
+//        KWeakSelf
+//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//            [weakSelf checkBoxHeartbeatFun];
+//        });
+//        
+//        return;
+//    }
+//    
+//    //test code
+////    [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
+////                
+////    }];
+//    
+//    if(ksharedAppDelegate.isWebSockLinkOKAginType && ksharedAppDelegate.cloudPhoneExtraFileListMod){
+//        return;
+//    }
+//    
+//    NSMutableDictionary *paraDict = [NSMutableDictionary new];
+//   
+//    KWeakSelf
+//    [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryHeartbeat Parameters:paraDict success:^(id  _Nonnull responseObject){
+//        queryHeartbeatModel *heartbeatMod = [[queryHeartbeatModel alloc] initWithDictionary:responseObject error:nil];
+//        if(heartbeatMod && heartbeatMod.data){
+//            [weakSelf checkBoxHeartbeatToShowPopViewFunBy:heartbeatMod];
+//        }
+//        
+//    } failure:^(NSError * _Nonnull error) {
+//    }];
+//
+//}
+
+//#pragma mark 根据盒子的心跳情况 显示异常谈了
+//- (void)checkBoxHeartbeatToShowPopViewFunBy:(queryHeartbeatModel*)heartbeatMod
+//{
+//    if(!heartbeatMod || !heartbeatMod.data){
+//        return;
+//    }
+//    
+//    if (//!heartbeatMod.data.frpStatus&&
+//        !heartbeatMod.data.hostAgentStatus
+//        &&!heartbeatMod.data.containerAgentStatus) {//全部异常
+//        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:1 didClickBut:^(NSInteger tag) {
+//                    
+//        }];
+//    }
+//    else if (heartbeatMod.data.hostAgentStatus
+//            //&& !heartbeatMod.data.frpStatus
+//            && !heartbeatMod.data.containerAgentStatus) {//frp异常
+//        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
+//                    
+//        }];
+//    }
+//}
 
 #pragma mark 输入密码完成
 - (void)didInpuPwdOkFun
 {
     KWeakSelf
     mainBlock(^{
-        weakSelf.tableView.userInteractionEnabled = YES;
+       // weakSelf.tableView.userInteractionEnabled = YES;
     });
 }
 

+ 8 - 1
创维盒子/code/NAS/nasBackupsManager/nasBackupsManager.m

@@ -313,7 +313,13 @@
     KWeakSelf
     if(curAsset.mediaType == PHAssetMediaTypeImage){
         _curPhotosBackupsTaskMod.curUploadFileType = uploadFileTypeImage;
-        [[PHImageManager defaultManager] requestImageDataForAsset:curAsset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+        
+        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+        options.networkAccessAllowed = YES; // Allow downloading from iCloud
+        options.version = PHImageRequestOptionsVersionCurrent;
+        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+
+        [[PHImageManager defaultManager] requestImageDataForAsset:curAsset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                 // 直接得到最终的 NSData 数据
                 if (imageData) {
                     weakSelf.isGetFileDataFailType = NO;
@@ -339,6 +345,7 @@
         //真正的视频数据
         PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
         options.version = PHVideoRequestOptionsVersionOriginal;
+        options.networkAccessAllowed = YES; // Allow downloading from iCloud
         [[PHImageManager defaultManager] requestAVAssetForVideo:curAsset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
             if ([asset isKindOfClass:[AVURLAsset class]]) {
                 

+ 7 - 1
创维盒子/code/NAS/nasBackupsManager/nasMixBackupsManager.m

@@ -282,7 +282,12 @@
                     operation.fileModel.asset = asset;
                 }
                 
-                [[PHImageManager defaultManager] requestImageDataForAsset:operation.fileModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+                PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+                options.networkAccessAllowed = YES; // Allow downloading from iCloud
+                options.version = PHImageRequestOptionsVersionCurrent;
+                options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+                
+                [[PHImageManager defaultManager] requestImageDataForAsset:operation.fileModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                         // 直接得到最终的 NSData 数据
                         if (imageData) {
                             operation.fileModel.imageData = imageData;
@@ -337,6 +342,7 @@
             //真正的视频数据
             PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
             options.version = PHVideoRequestOptionsVersionOriginal;
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
             [[PHImageManager defaultManager] requestAVAssetForVideo:operation.fileModel.asset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
                 if ([asset isKindOfClass:[AVURLAsset class]]) {
                     

+ 7 - 1
创维盒子/code/NAS/nasUploadManager/nasMixUploadManager.m

@@ -375,7 +375,12 @@
                     operation.fileModel.asset = asset;
                 }
                 
-                [[PHImageManager defaultManager] requestImageDataForAsset:operation.fileModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+                PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+                options.networkAccessAllowed = YES; // Allow downloading from iCloud
+                options.version = PHImageRequestOptionsVersionCurrent;
+                options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+                
+                [[PHImageManager defaultManager] requestImageDataForAsset:operation.fileModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                         // 直接得到最终的 NSData 数据
                         if (imageData) {
                             operation.fileModel.imageData = imageData;
@@ -436,6 +441,7 @@
             //真正的视频数据
             PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
             options.version = PHVideoRequestOptionsVersionOriginal;
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
             [[PHImageManager defaultManager] requestAVAssetForVideo:operation.fileModel.asset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
                 if ([asset isKindOfClass:[AVURLAsset class]]) {
                     

+ 6 - 1
创维盒子/code/NAS/nasUploadManager/nasUploadFileManager.m

@@ -178,8 +178,13 @@
             NSString *imgName1 = [curModel.filename stringByReplacingOccurrencesOfString:@"." withString:@"_"];
             curModel.videoFirstImageName = [[NSString alloc] initWithFormat:@"%@.png",imgName1];
            
+            PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+            options.networkAccessAllowed = YES; // Allow downloading from iCloud
+            options.version = PHImageRequestOptionsVersionCurrent;
+            options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+            
             //第一帧图片
-            [[PHImageManager defaultManager] requestImageDataForAsset:curModel.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+            [[PHImageManager defaultManager] requestImageDataForAsset:curModel.asset options:options resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
                     // 直接得到最终的 NSData 数据
                     if (imageData) {
                         curModel.imageData = imageData;

+ 5 - 1
创维盒子/code/mine/scanToPCLoginViewController.m

@@ -160,7 +160,11 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
     [self.session addOutput:guangOutPut];
 
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
+
     
     //添加返回键
     CGFloat btn_w_h  = 40;

+ 2 - 2
创维盒子/code/webRtc/webRtcPlayerViewController.m

@@ -1069,7 +1069,7 @@
         case AFNetworkReachabilityStatusReachableViaWWAN:/*流量*/
         {
             mainBlock(^{
-                [weakSelf.mediaStream setMaxBitrate:[NSNumber numberWithInteger:4*1024]];
+                [weakSelf.mediaStream setMaxBitrate:[NSNumber numberWithInteger:2*1024]];
             });
             
         }
@@ -1077,7 +1077,7 @@
         case AFNetworkReachabilityStatusReachableViaWiFi:/*WiFi*/
         {
             mainBlock(^{
-                [weakSelf.mediaStream setMaxBitrate:[NSNumber numberWithInteger:8*1024]];
+                [weakSelf.mediaStream setMaxBitrate:[NSNumber numberWithInteger:4*1024]];
             });
             
         }