GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fightingBirdCaiy/JmVideoCache: 1.短视频本地缓存下载优化。2.fork from https://github.com/danikula/AndroidVideoCache

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
app
app
 
 
gradle/wrapper
gradle/wrapper
 
 
videocache
videocache
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

JmVideoCache

短视频本地缓存下载优化(只下载当前需要播放的视频,取消划出屏幕的视频的下载)

1.使用场景

类似抖音播放小视频功能:用户快速下滑recyclerview中的视频view,当上一个视频view划出屏幕的时候调用stopCacheAndShutdown方法即可取消上一个视频的下载。 从而减少网络请求竞争(网速较慢的时候优先下载当前需要播放的视频,已划出屏幕的视频需要取消下载)。

2.基于https://github.com/danikula/AndroidVideoCache 2.7.0版本

3.HttpProxyCacheServer类中增加方法stopCacheAndShutdown

/**
 * 停止缓存视频文件并关闭
 * 注:自定义方法,原项目地址没有这个方法
 * added by yongc
 * @param url 原始的url,非本地代理后的url
 */
public void stopCacheAndShutdown(String url){
    synchronized (clientsLock) {
        HttpProxyCacheServerClients clients = clientsMap.get(url);
        if (clients != null) {
            clients.shutdown();
        }
    }
}

About

1.短视频本地缓存下载优化。2.fork from https://github.com/danikula/AndroidVideoCache

Resources

Readme
Activity

Stars

5 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.