mirror of
https://github.com/zhigang1992/AndroidVideoCache.git
synced 2026-04-26 04:55:34 +08:00
📦 release 2.6.4: hide closing output stream error stacktrace
This commit is contained in:
@@ -32,11 +32,8 @@ Note `AndroidVideoCache` works only with **direct urls** to media file, it [**d
|
||||
## Get started
|
||||
Just add dependency (`AndroidVideoCache` is available in jcenter):
|
||||
```
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
compile 'com.danikula:videocache:2.6.3'
|
||||
compile 'com.danikula:videocache:2.6.4'
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 23
|
||||
versionCode 19
|
||||
versionName '2.6.3'
|
||||
versionCode 20
|
||||
versionName '2.6.4'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
@@ -43,7 +43,7 @@ publish {
|
||||
userOrg = 'alexeydanilov'
|
||||
groupId = 'com.danikula'
|
||||
artifactId = 'videocache'
|
||||
publishVersion = '2.6.3'
|
||||
publishVersion = android.defaultConfig.versionName
|
||||
description = 'Cache support for android VideoView'
|
||||
website = 'https://github.com/danikula/AndroidVideoCache'
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ import static com.danikula.videocache.Preconditions.checkNotNull;
|
||||
* <pre><code>
|
||||
* public onCreate(Bundle state) {
|
||||
* super.onCreate(state);
|
||||
* <p/>
|
||||
*
|
||||
* HttpProxyCacheServer proxy = getProxy();
|
||||
* String proxyUrl = proxy.getProxyUrl(VIDEO_URL);
|
||||
* videoView.setVideoPath(proxyUrl);
|
||||
* }
|
||||
* <p/>
|
||||
*
|
||||
* private HttpProxyCacheServer getProxy() {
|
||||
* // should return single instance of HttpProxyCacheServer shared for whole app.
|
||||
* }
|
||||
* <code/></pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* @author Alexey Danilov (danikula@gmail.com).
|
||||
*/
|
||||
@@ -291,7 +291,7 @@ public class HttpProxyCacheServer {
|
||||
socket.shutdownOutput();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
onError(new ProxyCacheException("Error closing socket output stream", e));
|
||||
LOG.warn("Failed to close socket on proxy side: {}. It seems client have already closed connection.", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,11 +359,11 @@ public class HttpProxyCacheServer {
|
||||
|
||||
/**
|
||||
* Overrides default cache folder to be used for caching files.
|
||||
* <p/>
|
||||
* <p>
|
||||
* By default AndroidVideoCache uses
|
||||
* '/Android/data/[app_package_name]/cache/video-cache/' if card is mounted and app has appropriate permission
|
||||
* or 'video-cache' subdirectory in default application's cache directory otherwise.
|
||||
* <p/>
|
||||
* </p>
|
||||
* <b>Note</b> directory must be used <b>only</b> for AndroidVideoCache files.
|
||||
*
|
||||
* @param file a cache directory, can't be null.
|
||||
@@ -387,9 +387,10 @@ public class HttpProxyCacheServer {
|
||||
|
||||
/**
|
||||
* Sets max cache size in bytes.
|
||||
* <p>
|
||||
* All files that exceeds limit will be deleted using LRU strategy.
|
||||
* Default value is 512 Mb.
|
||||
* <p/>
|
||||
* </p>
|
||||
* Note this method overrides result of calling {@link #maxCacheFilesCount(int)}
|
||||
*
|
||||
* @param maxSize max cache size in bytes.
|
||||
@@ -403,7 +404,6 @@ public class HttpProxyCacheServer {
|
||||
/**
|
||||
* Sets max cache files count.
|
||||
* All files that exceeds limit will be deleted using LRU strategy.
|
||||
* <p/>
|
||||
* Note this method overrides result of calling {@link #maxCacheSize(long)}
|
||||
*
|
||||
* @param count max cache files count.
|
||||
|
||||
@@ -38,7 +38,7 @@ dependencies {
|
||||
// compile project(':library')
|
||||
compile 'com.android.support:support-v4:23.1.0'
|
||||
compile 'org.androidannotations:androidannotations-api:3.3.2'
|
||||
compile 'com.danikula:videocache:2.6.3'
|
||||
compile 'com.danikula:videocache:2.6.4'
|
||||
compile 'com.viewpagerindicator:library:2.4.2-SNAPSHOT@aar'
|
||||
apt 'org.androidannotations:androidannotations:3.3.2'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user