Skip to content

Commit ef45a91

Browse files
committed
设置默认视频缓存目录
1 parent 06afd33 commit ef45a91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ios/Classes/FLTVideoPlayer.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ - (instancetype)initWithCall:(FlutterMethodCall *)call frameUpdater:(FLTFrameUpd
5050
id cacheFolderPath = argsMap[@"cachePath"];
5151
if (cacheFolderPath!=nil&&cacheFolderPath!=NULL&&![@"" isEqualToString:cacheFolderPath]&&cacheFolderPath!=[NSNull null]) {
5252
playConfig.cacheFolderPath = cacheFolderPath;
53-
playConfig.maxCacheItems = 2;
53+
playConfig.maxCacheItems = 20;
5454
}else{
5555
// 设置缓存路径
56-
//playConfig.cacheFolderPath =[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
57-
playConfig.maxCacheItems = 0;
56+
playConfig.cacheFolderPath =[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
57+
playConfig.maxCacheItems = 10;
5858
}
5959

6060
playConfig.progressInterval = 1;

0 commit comments

Comments
 (0)