Kaynağa Gözat

1.音视频播放相关

huangxiaodong 1 yıl önce
ebeveyn
işleme
bf40cf035b

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

@@ -167,10 +167,12 @@
         NSString *filePath = yourModel.path;
         NSString *urlStr = ksharedAppDelegate.NASFileService;
         NSString *fileUrl = [[NSString alloc] initWithFormat:@"%@getFile?path=%@",urlStr,filePath];
-        HLog(@"%@",fileUrl);
         //fileUrl = @"http://transfertest.armclouding.com:10006/getFile?path=/storage/emulated/0/Download/录音大师-2024.05.22-16:57.mp3";
+        //fileUrl = @"http://transfertest.armclouding.com:10010/getFile?path=/sdcard/Music/abc.mp3";
+        //fileUrl = @"http://m10.music.126.net/20240527160012/d3f165dc686ac01afd4497400b2c2c58/ymusic/5353/0f0f/0358/d99739615f8e5153d77042092f07fd77.mp3";
         fileUrl = [fileUrl  stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
         NSURL * curURL =  [NSURL fileURLWithPath:fileUrl];
+        HLog(@"%@",curURL.absoluteString);
         model.audioUrl = curURL;
         
 //        if ([yourModel.yourUrl hasPrefix:@"http"]) {//网络音频

+ 12 - 11
创维盒子/双子星云手机/Class/Set/previewFile/previewAudioOrDocumentViewController.m

@@ -23,6 +23,7 @@
 #import "NASFileAudioModel.h"
 #import "queryShareModel.h"
 #import "audioPlayerViewController.h"
+#import "videoPlayByAVPlayerViewController.h"
 
 @interface previewAudioOrDocumentViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 {
@@ -369,22 +370,22 @@
     NSInteger row = indexPath.row;
     if(row < _curNASFileAudioMod.data.list.count){
         
+//        NASFileAudioDataModel*dataModel =  _curNASFileAudioMod.data.list[row];
+//        videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
+//        NASFilePicDataArrModel *VideoDataMode = [NASFilePicDataArrModel new];
+//        VideoDataMode.size  = dataModel.size;
+//        VideoDataMode.path  = dataModel.path;
+//        VideoDataMode.name  = dataModel.name;
+//        VideoDataMode.time  = dataModel.time;
+//        vc.VideoDataMode = VideoDataMode;
+//        [self.navigationController pushViewController:vc animated:YES];
+        
+        
         audioPlayerViewController * vc = [audioPlayerViewController new];
         vc.index = row;
         vc.audioOutSidedataArray = _curNASFileAudioMod.data.list;
         [self.navigationController pushViewController:vc animated:YES];
         
-//        NASFileAudioDataModel* dataModel = _curNASFileAudioMod.data.list[row];
-//        
-//        NSString *filePath = dataModel.path;
-//        NSString *urlStr = ksharedAppDelegate.NASFileService;
-//        NSString *fileUrl = [[NSString alloc] initWithFormat:@"%@getFile?path=%@",urlStr,filePath];
-//        NSString *showUrl = [[NSString alloc] initWithFormat:@"%@getThumbnail?path=%@",urlStr,filePath];
-//        HLog(@"%@",fileUrl);
-//        //fileUrl = @"http://transfertest.armclouding.com:10010/getFile?path=/sdcard/bb.mp4";
-//        fileUrl = [fileUrl  stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-//        
-//        NSURL * sourceMovieURL= [NSURL URLWithString:fileUrl];
     }
 }
 

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

@@ -86,6 +86,7 @@
         NSString *showUrl = [[NSString alloc] initWithFormat:@"%@getThumbnail?path=%@",urlStr,filePath];
         //HLog(@"%@",fileUrl);
         //fileUrl = @"http://transfertest.armclouding.com:10010/getFile?path=/sdcard/bb.mp4";
+        //fileUrl = @"http://m10.music.126.net/20240527160012/d3f165dc686ac01afd4497400b2c2c58/ymusic/5353/0f0f/0358/d99739615f8e5153d77042092f07fd77.mp3";
         fileUrl = [fileUrl  stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
         
         NSURL * sourceMovieURL= [NSURL URLWithString:fileUrl];