File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
SuperPlayerDemo/SuperPlayer/CacheView
SuperPlayerKit/SuperPlayer Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,8 @@ - (TXVodDownloadCenter *)manager {
625625 _manager = [TXVodDownloadCenter sharedInstance ];
626626 _manager.delegate = self;
627627 // 设置下载存储路径
628- NSString *cachesDir = [NSSearchPathForDirectoriesInDomains (NSCachesDirectory, NSUserDomainMask, YES ) firstObject ];
628+ NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES );
629+ NSString *cachesDir = [paths objectAtIndex: 0 ];
629630 NSString *path = [NSString stringWithFormat: @" %@ /videoCache" ,cachesDir];
630631 [_manager setDownloadPath: path];
631632 }
Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ @implementation SuperPlayerView {
107107#pragma mark - life Cycle
108108
109109+ (void )initialize {
110- NSString *path = [NSSearchPathForDirectoriesInDomains (NSCachesDirectory, NSUserDomainMask, YES ) objectAtIndex: 0 ];
110+ NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES );
111+ NSString *path = [paths objectAtIndex: 0 ];
111112 NSString *cachePath = [path stringByAppendingString: @" /TXCache" ];
112113 [TXPlayerGlobalSetting setCacheFolderPath: cachePath];
113114 [TXPlayerGlobalSetting setMaxCacheSize: 500 ];
You can’t perform that action at this time.
0 commit comments