You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,14 @@ Because there is no sense to download video a lot of times while streaming!
14
14
15
15
Note `AndroidVideoCache` works only with **direct urls** to media file, it [**doesn't support**](https://github.com/danikula/AndroidVideoCache/issues/19) any streaming technology like DASH, SmoothStreaming, HLS.
16
16
17
-
## How to use?
17
+
## Get started
18
18
Just add dependency (`AndroidVideoCache` is available in jcenter):
19
19
```
20
20
repositories {
21
21
jcenter()
22
22
}
23
23
dependencies {
24
-
compile 'com.danikula:videocache:2.3.4'
24
+
compile 'com.danikula:videocache:2.4.0'
25
25
}
26
26
```
27
27
@@ -64,7 +64,8 @@ public class App extends Application {
64
64
or use [simple factory](http://pastebin.com/s2fafSYS).
65
65
More preferable way is use some dependency injector like [Dagger](http://square.github.io/dagger/).
66
66
67
-
## Configuration
67
+
## Recipes
68
+
### Disk cache limit
68
69
By default `HttpProxyCacheServer` uses 512Mb for caching files. You can change this value:
Use `HttpProxyCacheServer.registerCacheListener(CacheListener listener)` method to set listener with callback `onCacheAvailable(File cacheFile, String url, int percentsAvailable)` to be aware of caching progress. Do not forget to to unsubscribe listener with help of `HttpProxyCacheServer.unregisterCacheListener(CacheListener listener)` method to avoid memory leaks.
91
+
92
+
Use `HttpProxyCacheServer.isCached(String url)` method to check was url's content fully cached to file or not.
93
+
94
+
See `sample` app for more details.
87
95
88
-
See `sample` app for details.
96
+
### Sample
97
+
See `sample` app.
89
98
90
99
## Whats new
91
100
See Release Notes [here](https://github.com/danikula/AndroidVideoCache/releases)
0 commit comments