diff --git a/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java b/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java index 45c8236af..248d508f4 100644 --- a/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java +++ b/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java @@ -264,6 +264,8 @@ public boolean setUp(String url, boolean cacheWithPlay, File cachePath, Object.. if (!mCacheFile && GSYVideoManager.instance() != null) { proxy.registerCacheListener(GSYVideoManager.instance(), mOriginUrl); } + } else if (!cacheWithPlay && (!url.startsWith("http") && !url.startsWith("rtmp") && !url.startsWith("rtsp"))) { + mCacheFile = true; } this.mUrl = url; this.mObjects = objects;