From 587b80c2a7c356f89b6974aea8dc188fcb0c79be Mon Sep 17 00:00:00 2001 From: guoshuyu <359369982@qq.com> Date: Thu, 19 Mar 2020 18:37:22 +0800 Subject: [PATCH] add public DEFAULT_MAX_SIZE --- .../java/com/shuyu/gsyvideoplayer/cache/ProxyCacheManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache/ProxyCacheManager.java b/gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache/ProxyCacheManager.java index 54d63061c..83df25809 100644 --- a/gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache/ProxyCacheManager.java +++ b/gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache/ProxyCacheManager.java @@ -24,6 +24,8 @@ public class ProxyCacheManager implements ICacheManager, CacheListener { + public static int DEFAULT_MAX_SIZE = 512 * 1024 * 1024; + //视频代理 protected HttpProxyCacheServer proxy; @@ -154,6 +156,7 @@ public HttpProxyCacheServer newProxy(Context context, File file) { } HttpProxyCacheServer.Builder builder = new HttpProxyCacheServer.Builder(context); builder.cacheDirectory(file); + builder.maxCacheSize(DEFAULT_MAX_SIZE); builder.headerInjector(userAgentHeadersInjector); mCacheDir = file; return builder.build();