Parcourir la source

1.nas模块文件Download视频无法预览播放

huangxiaodong il y a 11 mois
Parent
commit
00d7f4aa50

+ 36 - 1
创维盒子/双子星云手机/Class/Set/previewFile/previewFileAndFolderSecondViewController.m

@@ -20,6 +20,9 @@
 #import "editShareView.h"
 #import "previewToUploadFileView.h"
 #import "netWorkManager.h"
+#import "videoPlayByAVPlayerViewController.h"
+#import "audioPlayerViewController.h"
+#import "imageDetailsScrollViewController.h"
 
 
 @interface previewFileAndFolderSecondViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
@@ -254,7 +257,39 @@
             vc.canShareType = _canShareType;
             [self.navigationController pushViewController:vc animated:YES];
         }
-    
+        else if([dataModel.type isEqualToString:@"video"]){
+            videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
+            vc.VideoDataMode = dataModel;
+            [self.navigationController pushViewController:vc animated:YES];
+            
+            KWeakSelf
+            vc.didNeedToRegetDataFun = ^{
+                [weakSelf getFileListFun];
+            };
+        }
+        else if([dataModel.type isEqualToString:@"audio"]){
+            
+            NSMutableArray *dataArr = [NSMutableArray new];
+            [dataArr addObject:dataModel];
+            
+            audioPlayerViewController *vc = [audioPlayerViewController new];
+            vc.index = 0;
+            vc.audioOutSidedataArray = dataArr;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+        else if([dataModel.type isEqualToString:@"jpg"]){
+
+            NSMutableArray *jpgDataArr = [NSMutableArray new];
+            NSInteger index = 0;
+            [jpgDataArr addObject:dataModel];
+
+            imageDetailsScrollViewController *vc = [imageDetailsScrollViewController new];
+            vc.index = index;
+            vc.totalDataArr = jpgDataArr;
+            [self.navigationController pushViewController:vc animated:YES];
+            vc.canShareType = _canShareType;
+
+        }
     }
 
 }

+ 36 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewFileAndFolderViewController.m

@@ -22,6 +22,9 @@
 #import "netWorkManager.h"
 #import "NASFileAndFolderModel.h"
 #import "queryShareModel.h"
+#import "videoPlayByAVPlayerViewController.h"
+#import "audioPlayerViewController.h"
+#import "imageDetailsScrollViewController.h"
 
 @interface previewFileAndFolderViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 {
@@ -380,6 +383,39 @@
             vc.canShareType = canShareType;
             [self.navigationController pushViewController:vc animated:YES];
         }
+        else if([dataModel.type isEqualToString:@"video"]){
+            videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
+            vc.VideoDataMode = dataModel;
+            [self.navigationController pushViewController:vc animated:YES];
+            
+            KWeakSelf
+            vc.didNeedToRegetDataFun = ^{
+                [weakSelf getFileListFun];
+            };
+        }
+        else if([dataModel.type isEqualToString:@"audio"]){
+            
+            NSMutableArray *dataArr = [NSMutableArray new];
+            [dataArr addObject:dataModel];
+            
+            audioPlayerViewController *vc = [audioPlayerViewController new];
+            vc.index = 0;
+            vc.audioOutSidedataArray = dataArr;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+        else if([dataModel.type isEqualToString:@"jpg"]){
+
+            NSMutableArray *jpgDataArr = [NSMutableArray new];
+            NSInteger index = 0;
+            [jpgDataArr addObject:dataModel];
+
+            imageDetailsScrollViewController *vc = [imageDetailsScrollViewController new];
+            vc.index = index;
+            vc.totalDataArr = jpgDataArr;
+            [self.navigationController pushViewController:vc animated:YES];
+            vc.canShareType = canShareType;
+
+        }
     }
 
 }